I've 3 models on my app: Company, User, Role
The business rule is some like this:
- User are Role at Company
- Elon are CEO at SpaceX
- Cindy are Manager at SpaceX
- Elon are CEO at Tesla
I was thinking about creating a #4 model, something like Employees.
But I don't have any idea how to create a migration and relationship between this models.
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire