User Privilege
This model is used to store user privilege/scope. It has a many-to-one relationship with User
model.
Bases: Base
User role model
This model is used to store user privilege/scope. It has a many-to-one relationship with User
model.
Bases: Base
User role model
FasterAPI\models.py
__tablename__ = 'user_privileges'
class-attribute
instance-attribute
id: Mapped[int] = mapped_column(primary_key=True, index=True)
class-attribute
instance-attribute
privilege: Mapped[str]
instance-attribute
user: Mapped[User] = relationship('User', back_populates='privileges')
class-attribute
instance-attribute
user_id: Mapped[int] = mapped_column(ForeignKey('users.id'))
class-attribute
instance-attribute