Hello experts,
I need your help. :)
I am writing a todoo app which should allow each user to set when they want to be reached.
That means a user1 can set that he is reachable in group 1 only on monday between 12:00 - 17:00 and in group 2 from 11:00 - 16:00.
If user2 sets a todoo in group 1 and it is in the time range of user1 then the todoo will be sent to him otherwise not.
My question
How do I set this structure in Firebase.
I have a collection with todoos, user and group. Where Todoo is a subcollection of Groups.
Now where do I place the group settings for each user and when do I create the documents.
My problem is how do I avoid having multiple documents (aka. group settings documents) for one group of one user. I want only one group settings document per user. ๐
If I write a cloud function that, for example, creates the group settings for each user when the group is created, I do not create new groupsettings for "later joiner".
I hope my problem is somewhat clear. I look forward to your help.
Thanks alot
Maximilian