We are looking for a mechanism that allows users to purchase digital content using Angular 10.
I'm thinking about how to create 1:N relationship with reference type using Angular 10 and Cloud Firestore by referring to the following in digitalcontents.service.ts, but by nesting in subcollection or by reference I didn't know how to add or get to the users collection by referencing the root collection (digitalContents).
DB Structure
-root-
users<collection>
uid<document>
name:string<field>
digitalContents:map[{
digitalId:reference
purchaceDate:timeStamp
}]
digitalContents<collection>
digitalId<document>
name:string<field>
price:number
Is the DB design good for how to add or get to the above users collection, or how should I do this? I would appreciate it if you could teach me. You can DI the AngularFireStore and get the collection.
We apologize for the inconvenience, but we would appreciate it if you could teach us.