User Model
This model is used to store user information.
Bases: Base
User model
This model is used to store user information.
Bases: Base
User model
FasterAPI\models.py
__tablename__ = 'users'
class-attribute
instance-attribute
email: Mapped[str]
instance-attribute
first_name: Mapped[str]
instance-attribute
hashed_password: Mapped[str]
instance-attribute
id: Mapped[int] = mapped_column(primary_key=True, index=True)
class-attribute
instance-attribute
is_superuser: Mapped[bool]
instance-attribute
last_name: Mapped[str]
instance-attribute
privileges: Mapped[List[UserPrivilege]] = relationship(back_populates='user', cascade='all,delete')
class-attribute
instance-attribute
session: Mapped[ActiveSession] = relationship(back_populates='user', cascade='all,delete')
class-attribute
instance-attribute
username: Mapped[str] = mapped_column(unique=True, index=True)
class-attribute
instance-attribute