Spaces:
Runtime error
Runtime error
Download src/models/user.py from asadullahshafique/hackathon-todo-backend: direct link, hf CLI and curl.
- Browser
- Download file 539 Bytes
-
https://huggingface.co/spaces/asadullahshafique/hackathon-todo-backend/resolve/main/src/models/user.py
- Command line
-
hf download hf://spaces/asadullahshafique/hackathon-todo-backend/src/models/user.py
-
curl -L -o user.py https://huggingface.co/spaces/asadullahshafique/hackathon-todo-backend/resolve/main/src/models/user.py
539 Bytes
| """User database model.""" | |
| from datetime import datetime | |
| from uuid import UUID, uuid4 | |
| from sqlmodel import Field, SQLModel | |
| class User(SQLModel, table=True): | |
| """User entity for authentication.""" | |
| __tablename__ = "users" | |
| id: UUID = Field(default_factory=uuid4, primary_key=True) | |
| email: str = Field(unique=True, index=True, max_length=255) | |
| hashed_password: str = Field(max_length=255) | |
| created_at: datetime = Field(default_factory=datetime.utcnow) | |
| updated_at: datetime = Field(default_factory=datetime.utcnow) | |