Open
Description
I have a superuser which belongs to several tenants. Data such as first_name
and last_name
are kept in a separate members
table as recommended. I understand your explanations in https://github.com/dsaronin/milia#inviting-additional-usermembers as follows:
- I need one
user
record for this superuser - I need entries in
tenants_users
to define the membership of this user to the according tenants - And: I need one
member
record for this user for each tenant this user can access (this is because themembers
table is tenanted; only theusers
table isn't tenanted)
However:
- your docs say there needs to be a
has_one :member
relation on theuser
(and not ahas_many
). - It doesn't feel clean to replicate the members data (such as
first_name
andlast_name
)n
times if the user belongs ton
companies.
What is the recommended way to do it with milia?