feat: condensed user get endpoints
The process also added improved ORM relationships for multiple models.
This commit is contained in:
parent
4ff184fe86
commit
a80767d870
5 changed files with 39 additions and 65 deletions
|
|
@ -26,12 +26,14 @@ class Organisation(Base):
|
|||
security_contact_id = Column(Integer, ForeignKey("contact.id"))
|
||||
owner_contact_id = Column(Integer, ForeignKey("contact.id"))
|
||||
|
||||
users = relationship(
|
||||
user_rel = relationship(
|
||||
"User",
|
||||
secondary="orgusers",
|
||||
back_populates="organisations"
|
||||
back_populates="organisation_rel"
|
||||
)
|
||||
|
||||
group_rel = relationship("Group", back_populates="org_rel")
|
||||
|
||||
|
||||
class OrgUsers(Base):
|
||||
__tablename__ = "orgusers"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue