MCPcopy Create free account
hub / github.com/AgentOps-AI/agentops / UserOrgModel

Class UserOrgModel

app/api/agentops/opsboard/models.py:542–558  ·  view source on GitHub ↗

Model that maps to the user_orgs table (many-to-many)

Source from the content-addressed store, hash-verified

540
541
542class UserOrgModel(BaseModel):
543 """Model that maps to the user_orgs table (many-to-many)"""
544
545 __tablename__ = "user_orgs"
546 __table_args__ = {"schema": "public"}
547
548 user_id = model.Column(model.UUID, model.ForeignKey("public.users.id"), primary_key=True)
549 org_id = model.Column(model.UUID, model.ForeignKey("public.orgs.id"), primary_key=True)
550 role = model.Column(
551 model.Enum(OrgRoles, name="org_roles", create_constraint=False, native_enum=True),
552 default=OrgRoles.owner,
553 )
554 user_email = model.Column(model.String)
555 is_paid = model.Column(model.Boolean, default=False)
556
557 user = orm.relationship("UserModel", back_populates="orgs")
558 org = orm.relationship("OrgModel", back_populates="users")
559
560
561class OrgInviteModel(BaseModel):

Calls

no outgoing calls

Used in the wild real call sites across dependent graphs

searching dependent graphs…