I have an app, in which a user can create a session for themselves. By a session I mean , it has a title and a frequency (For Example - {"title": "homework" , "frequency": "MWF"}
where MWF is Monday,Wednesday,Friday). I want to store the session frequency and title in my firestore database in such a way that when the user creates a new session, i fetch from firestore the possible clashes -
For example - if the user is creating a session called "homework" and an "homework" already exists then , I can tell them that a session by that name already exists OR If a user is creating a session with frequency" MTS and already has a session with the frequency MWF, then I have to tell the user that there is a possible clash. Same with creating TTF and MWF already exists, then I have to inform the user of a possible clash.
My question, is that how can i do it, given the fact that I use the firestore database?