Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /mdfarhankc_fastapi-fullauth /fastapi_fullauth /models /sqlmodel /role.py
| from uuid import UUID | |
| from sqlmodel import Field, SQLModel | |
| from uuid_utils import uuid7 | |
| class UserRoleMixin(SQLModel): | |
| """User-role association. Combine with ``table=True``: | |
| class UserRole(UserRoleMixin, table=True): | |
| pass | |
| """ | |
| __tablename__ = "fullauth_user_roles" | |
| user_id: UUID = Field(foreign_key="fullauth_users.id", ondelete="CASCADE", primary_key=True) | |
| role_id: UUID = Field(foreign_key="fullauth_roles.id", ondelete="CASCADE", primary_key=True) | |
| class RoleMixin(SQLModel): | |
| """Role table. Combine with ``table=True``: | |
| class Role(RoleMixin, table=True): | |
| pass | |
| """ | |
| __tablename__ = "fullauth_roles" | |
| id: UUID = Field(default_factory=uuid7, primary_key=True) | |
| name: str = Field(unique=True, index=True, max_length=100) | |
Xet Storage Details
- Size:
- 790 Bytes
- Xet hash:
- 3762163d023b82e014e29d60b51b63ed4d7450af5cd64c26daef5db9c2022b9e
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.