forked from sr2/cloud-api
feat: contact model restructure
Blank contacts are now generated on org creation and assigned to each contact type. These contacts are linked to the org, only accessible to the org, and removed when the org is removed. With this all contact endpoints have been removed. Contact manipulation is done via the org only.
This commit is contained in:
parent
707482adc2
commit
2b6d923ae1
7 changed files with 146 additions and 165 deletions
|
|
@ -39,6 +39,10 @@ class Organisation(Base):
|
|||
def root_user_email(self):
|
||||
return self.root_user_rel.email if self.root_user_rel else None
|
||||
|
||||
billing_contact_rel = relationship("Contact", foreign_keys=[billing_contact_id])
|
||||
security_contact_rel = relationship("Contact", foreign_keys=[security_contact_id])
|
||||
owner_contact_rel = relationship("Contact", foreign_keys=[owner_contact_id])
|
||||
|
||||
|
||||
class OrgUsers(Base):
|
||||
__tablename__ = "orgusers"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue