I have a users
and apps
tables in my application. The relationship between them is one-to-many. An app belongs to a user and a user has many apps. I want to add a invites
tables too. which a has a token stored in it. When a user creates an invitation token and pass it to another user, by signing up with that token the new user becomes one of the app's users which I'm storing them as a group in another table. Now the problem is in the sign up page, when the token is passed in I want to say:
John Doe (user who created the invitation token) has invited you to join TechLive (the app user is invited to join) Team.
So from the record in invites
table. I need to also fetch the user who created the invitation link or token and because a user can have many apps I need to know which app the link points or belongs to in order to add the user specifically to that app?
Can any one help me with the design schema of the invites
table?
Thanks in advance.