Skip to content

linkusergroup

LinkUserGroup

Bases: SQLModel

Crossing table between User and UserGroup

Source code in fractal_server/app/models/linkusergroup.py
11
12
13
14
15
16
17
18
19
20
21
22
class LinkUserGroup(SQLModel, table=True):
    """
    Crossing table between User and UserGroup
    """

    group_id: int = Field(foreign_key="usergroup.id", primary_key=True)
    user_id: int = Field(foreign_key="user_oauth.id", primary_key=True)

    timestamp_created: datetime = Field(
        default_factory=get_timestamp,
        sa_column=Column(DateTime(timezone=True), nullable=False),
    )