Firebase Schema For Marketplace App

Database & APIs
Hey guys!

Maybe this question of mine is considered silly by some people, but I need to know:

I'm developing a marketplace app, and I have a collection called businesses, where the data of each business that registers to sell on the platform will be stored. Each company must register its products and services, and that is exactly where my question lies:

How to create this relationship? Or better yet, how to define the firestore schema so that each business has its products and it is possible to access and display this information in the search results listview and also in the detail cards for each item?
Would it be working with collections and subcollections or with distinct collections using owner documentReference?
What have you tried so far?
Practical example:
Company 1 (businesses collection), wants to register product x (?? collection or subcollection??), this company and also this product must be able to be displayed in users' search results.
Did you check FlutterFlow's Documentation for this topic?
Yes
2 replies