I am trying to create a fitness app wherein I have created two apps sharing the same database.
Since I cannot have two Users Collection, I am using a common one for both with a True/False field
Both the apps should follow the following logic for operation
The user registers onto the app, and the same gets updated in the “User Collection”
The gym owner registers onto the app, and the same gets updated in the “User Collection”
Now, the gym owner will link the user with his gym. This should only happen if both (user and gym) are already registered.
How can I do this ? Not getting any idea on how should I design the database for this ?
Hey @Yongki, thanks for this. I got partial answer to my query.
However, not understanding how can I set a validation?
As there are two apps (gym owner’s app and gym goer’s app), I want whenever a gym owner adds a gym goer, the app should first check in the database if gym-goer is present. If yes, update his gym name
Note - The gym owner adds gym-goer by typing his mobile number.
You can add additional screen to add gym name, I just made this an example, so I just add directly from collection editor.
And about phone number, you can use simple list and display phone number so it can be become searchable and then have action to update gym with add current user.