Spaces:
Runtime error
Runtime error
File size: 559 Bytes
4dbe421 f8b25ce 4dbe421 e941a76 4dbe421 e941a76 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
# app/models/user.py
from pydantic import BaseModel, EmailStr, Field
from typing import Optional
from datetime import timedelta, datetime
import uuid
class User(BaseModel):
user_id: str = Field(default_factory=lambda: str(uuid.uuid4()))
first_name: str
surname: str
phone: str
country: str
address: str
# username: str
email: EmailStr
password: str
class UserInDB(User):
is_validated: bool = Field(default=False)
created_at: datetime = Field(default_factory=datetime.utcnow)
updated_at: Optional[str] = None
|