Spaces:
Sleeping
Sleeping
Download src/models/user.py from hashir-qt/tasklert-api: direct link, hf CLI and curl.
- Browser
- Download file 793 Bytes
-
https://huggingface.co/spaces/hashir-qt/tasklert-api/resolve/main/src/models/user.py
- Command line
-
hf download hf://spaces/hashir-qt/tasklert-api/src/models/user.py
-
curl -L -o user.py https://huggingface.co/spaces/hashir-qt/tasklert-api/resolve/main/src/models/user.py
793 Bytes
| """User model compatible with Better Auth.""" | |
| from datetime import datetime | |
| from sqlmodel import SQLModel, Field | |
| class User(SQLModel, table=True): | |
| """User model - matches Better Auth schema.""" | |
| __tablename__ = "user" | |
| id: str = Field(primary_key=True) | |
| email: str = Field(index=True, unique=True) | |
| email_verified: bool = Field(default=False, sa_column_kwargs={"name": "emailVerified"}) | |
| name: str | |
| image: str | None = None | |
| created_at: datetime = Field(sa_column_kwargs={"name": "createdAt"}) | |
| updated_at: datetime = Field(sa_column_kwargs={"name": "updatedAt"}) | |
| class UserRead(SQLModel): | |
| """User response model.""" | |
| id: str | |
| email: str | |
| email_verified: bool | |
| name: str | |
| image: str | None | |
| created_at: datetime | |
| updated_at: datetime | |