User Model

class User(**kwargs)[source]

Bases: UUIDv7AuditBase

ORM Model representing a user account in the application.

name: Mapped[str | None]

The user’s full name.

email: Mapped[str]

The unique email address for the user, used for login.

password: Mapped[str]

The hashed password for authentication.

is_active: Mapped[bool]

Indicates if the user account is active.

created_at: Mapped[datetime]

Date/time of instance creation.

id: Mapped[UUID]

UUID Primary key column.

is_superuser: Mapped[bool]

Indicates if the user has administrative privileges.

updated_at: Mapped[datetime]

Date/time of instance last update.

role_id: Mapped[UUID]

Foreign key linking to the user’s role (Role.id).

role: Mapped[Role]

The ORM relationship to the user’s Role model.

role_name: AssociationProxy[str] = ColumnAssociationProxyInstance(AssociationProxy('role', 'name'))

Proxy access to the name of the user’s role.

role_slug: AssociationProxy[str] = ColumnAssociationProxyInstance(AssociationProxy('role', 'slug'))

Proxy access to the slug (short identifier) of the user’s role.