Spaces:
Runtime error
Runtime error
Download models/user.py from Quratulain1/Deploy-Backend: direct link, hf CLI and curl.
- Browser
- Download file 632 Bytes
-
https://huggingface.co/spaces/Quratulain1/Deploy-Backend/resolve/main/models/user.py
- Command line
-
hf download hf://spaces/Quratulain1/Deploy-Backend/models/user.py
-
curl -L -o user.py https://huggingface.co/spaces/Quratulain1/Deploy-Backend/resolve/main/models/user.py
632 Bytes
| from typing import Optional | |
| from datetime import datetime | |
| from sqlmodel import SQLModel, Field | |
| from pydantic import BaseModel | |
| class UserBase(SQLModel): | |
| email: str = Field(unique=True, index=True) | |
| emailVerified: Optional[datetime] = None | |
| name: Optional[str] = None | |
| class User(UserBase, table=True): | |
| id: Optional[str] = Field(default=None, primary_key=True) | |
| createdAt: datetime = Field(default_factory=datetime.utcnow) | |
| updatedAt: datetime = Field(default_factory=datetime.utcnow) | |
| class UserCreate(UserBase): | |
| pass | |
| class UserRead(UserBase): | |
| id: str | |
| createdAt: datetime | |
| updatedAt: datetime |