SQLAlchemy models
fastauth.contrib.sqlalchemy.models
SQLAlchemyBaseUser
Bases: Generic[ID]
id
instance-attribute
id
email
class-attribute
instance-attribute
email = mapped_column(String(255), unique=True, index=True)
username
class-attribute
instance-attribute
username = mapped_column(String(200), unique=True, index=True)
hashed_password
class-attribute
instance-attribute
hashed_password = mapped_column(String(255))
is_active
class-attribute
instance-attribute
is_active = mapped_column(Boolean(), default=True)
is_verified
class-attribute
instance-attribute
is_verified = mapped_column(Boolean(), default=False)
SQLAlchemyBaseUserUUID
Bases: SQLAlchemyBaseUser[UUID]
email
class-attribute
instance-attribute
email = mapped_column(String(255), unique=True, index=True)
username
class-attribute
instance-attribute
username = mapped_column(String(200), unique=True, index=True)
hashed_password
class-attribute
instance-attribute
hashed_password = mapped_column(String(255))
is_active
class-attribute
instance-attribute
is_active = mapped_column(Boolean(), default=True)
is_verified
class-attribute
instance-attribute
is_verified = mapped_column(Boolean(), default=False)
id
class-attribute
instance-attribute
id = mapped_column(GUID(), primary_key=True, default=uuid4)
SQLAlchemyBaseRole
id
class-attribute
instance-attribute
id = mapped_column(primary_key=True, autoincrement=True)
codename
class-attribute
instance-attribute
codename = mapped_column(unique=True, index=True)
permissions
permissions()
Source code in fastauth/contrib/sqlalchemy/models.py
35 36 37 |
|
SQLAlchemyBasePermission
id
class-attribute
instance-attribute
id = mapped_column(primary_key=True, autoincrement=True)
codename
class-attribute
instance-attribute
codename = mapped_column(unique=True, index=True)
SQLAlchemyBaseRolePermissionRel
role_id
class-attribute
instance-attribute
role_id = mapped_column(ForeignKey('roles.id'), primary_key=True)
permission_id
class-attribute
instance-attribute
permission_id = mapped_column(ForeignKey('permissions.id'), primary_key=True)
SQLAlchemyBaseUserPermissionRel
Bases: Generic[ID]
user_id
class-attribute
instance-attribute
user_id = mapped_column(ForeignKey('users.id'), primary_key=True)
permission_id
class-attribute
instance-attribute
permission_id = mapped_column(ForeignKey('permissions.id'), primary_key=True)
SQLAlchemyBaseOAuthAccount
Bases: Generic[ID]
id
instance-attribute
id
oauth_name
class-attribute
instance-attribute
oauth_name = mapped_column(String(255), index=True)
access_token
instance-attribute
access_token
expires_at
instance-attribute
expires_at
refresh_token
instance-attribute
refresh_token
account_id
class-attribute
instance-attribute
account_id = mapped_column(String(200), index=True)
account_email
class-attribute
instance-attribute
account_email = mapped_column(String(255), index=True)
SQLAlchemyBaseOAuthAccountUUID
Bases: SQLAlchemyBaseOAuthAccount[UUID]
oauth_name
class-attribute
instance-attribute
oauth_name = mapped_column(String(255), index=True)
access_token
instance-attribute
access_token
expires_at
instance-attribute
expires_at
refresh_token
instance-attribute
refresh_token
account_id
class-attribute
instance-attribute
account_id = mapped_column(String(200), index=True)
account_email
class-attribute
instance-attribute
account_email = mapped_column(String(255), index=True)
id
class-attribute
instance-attribute
id = mapped_column(GUID(), primary_key=True, default=uuid4)
user_id
user_id()
Source code in fastauth/contrib/sqlalchemy/models.py
80 81 82 83 84 |
|
UserRBACMixin
role_id
class-attribute
instance-attribute
role_id = mapped_column(ForeignKey('roles.id'))
role
role()
Source code in fastauth/contrib/sqlalchemy/models.py
90 91 92 |
|
permissions
permissions()
Source code in fastauth/contrib/sqlalchemy/models.py
94 95 96 |
|
UserOAuthMixin
oauth_accounts
oauth_accounts()
Source code in fastauth/contrib/sqlalchemy/models.py
100 101 102 |
|