Thank you very much @martinbean for your response. As I understood, you recommend me to create a single user model that has all the attributes of User and Competitor, but I do not understand the relationship of many to many with Team, since only competitors belong to a team, while Managers and Administrators do not. And it would not be bad practice to establish many columns in User that only competitors will use, being the value of these columns for managers and administrators null?
Hello, I have a problem when designing my models related to users and their relationships. In my application, I have three types of users: Admin, Manager and team of competitors. The models that I have thought to create so far are:
It should be mentioned that the attribute "competition_id" in the user table refers to a team of competitors participating in a certain competition, a manager can configure a single competition and an administrator can configure all competitions (set to null for admin) .
My problem arises when I want to relate these models to each other, where I have read that it can be done with polymorphic relationships, but I am not sure about it. I would appreciate any help regarding a new way of designing these models and their relationships or how to design relationships between these models.
Thank you very much for your time.