Real Time x Firestore database structure
System structure posts in Real Time:
Posts
--ID_USER_1
----IdPost1
------Date
------Image
---IdPost2
------Date
------Image
---IdPost3
------Date
------Image
--ID_USER_2
----IdPost1
------Date
------Image
---IdPost2
------Date
------Image
---IdPost3
------Date
------Image
Post system model in RealTime. To structure in the Firestore, it could look something like this:
Post
--ID_POST1
----Id_user1
----Image
--ID_POST2
----Id_user2
----Image
From what I understand in Firestore has the constraints of collections, because when converting to the same structure of Real Time, it would not work because we can not have two collections like: mDB.collection ("Posts").collection().
What is the best way to structure a posting system between users?
Thank you!!