feat: condensed user get endpoints

The process also added improved ORM relationships for multiple models.
This commit is contained in:
Chris Milne 2026-05-25 12:06:24 +01:00
parent 4ff184fe86
commit a80767d870
5 changed files with 39 additions and 65 deletions

View file

@ -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"