I have a few types of users: FIGHTER, JUDGE, SPECTATOR, PROMOTER, LOCATION_PROVIDER. They all have some parameters, some are common, others are specific. I reason, that it would be logical to have a separate tablea for each type of user. Each such table would store only relevant to a specific type of user data.
As far as I can see from the documentation available here:
https://github.com/typeorm/typeorm/blob/master/docs/entity-inheritance.md
TypeOrm suggests a number of solutions implying inheritance but they are all about reducing the amount of code. For instance, the pattern called Single Table Inheritance allows to do some separation of entities code-wise, but yet all types of users would be dumped into a single table, which is sort of obvious from the name of the pattern. Other solutions are no better for me.
I was thinking of creating a table users to store the common data and then creating all other tables that would store type specific data.
For example,
user has such fields as first_name, second_name, age.
fighter has such fields as weight, wins, losses, draws.
But the problem is that these tables happen to be unrelated. So does it mean that I have to make up some logic that would make them related? Not sure I understand how best to approach it.