title: Structure Database Firestore Posts
body: <p>Real Time x Firestore database structure</p>
  
  <p>System structure posts in Real Time:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>Post system model in RealTime. To structure in the Firestore, it could look something like this:</p>
  
  <pre><code>Post
  --ID_POST1
  ----Id_user1
  ----Image
  --ID_POST2
  ----Id_user2
  ----Image
  </code></pre>
  
  <p>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: <strong>mDB.collection ("Posts").collection().</strong></p>
  
  <p>What is the best way to structure a posting system between users? </p>
  
  <p>Thank you!!</p>