So I have next scenario.
User(Host) can create offers, other users(Players) can apply theirs offers to User(Host)
Each user can be player and host.
What is the best way to create relation between data?.
For now I created 2 tables, HostOffers, and PlayerOffers.
HostOffer has pointer to User class, so I can get all my offers that I created as Host.
If some player want to create playerOffer on HostOffer, I created relational in HostOffers to PlayerOffers. Like One to Many, one HostOffer can have many PlayerOffers.
Iโm just interesting about ACL and permissions.
I donโt want to allow Players modify HostOffer, players can only link PlayerOffer to HostOffer.
Is it a good approach? Do I need to create roles like Host and Player?(Iโm not sure in this, cuz all users can be player and host, depends if u create new HostOffer, or create playerOffer on HostOffer to play with him)
you will have to take care at permissions to make sure that the user can not change data directly that you donโt want him to be able to change it