Spaces:
Sleeping
Sleeping
Download app/models/user.py from vara201/simple-rag: direct link, hf CLI and curl.
- Browser
- Download file 620 Bytes
-
https://huggingface.co/spaces/vara201/simple-rag/resolve/main/app/models/user.py
- Command line
-
hf download hf://spaces/vara201/simple-rag/app/models/user.py
-
curl -L -o user.py https://huggingface.co/spaces/vara201/simple-rag/resolve/main/app/models/user.py
620 Bytes
| import uuid | |
| from sqlalchemy import String | |
| from sqlalchemy.orm import Mapped | |
| from sqlalchemy.orm import mapped_column | |
| from app.models.base import Base | |
| class User(Base): | |
| __tablename__ = "users" | |
| id: Mapped[str] = mapped_column( | |
| String, | |
| primary_key=True, | |
| default=lambda: str(uuid.uuid4()) | |
| ) | |
| email: Mapped[str] = mapped_column( | |
| String, | |
| unique=True, | |
| index=True | |
| ) | |
| hashed_password: Mapped[str] = mapped_column( | |
| String | |
| ) | |
| role: Mapped[str] = mapped_column( | |
| String, | |
| default="user" | |
| ) |