20 lines
464 B
Python
Executable File
20 lines
464 B
Python
Executable File
from pydantic import BaseModel, ConfigDict, EmailStr
|
|
from typing import Optional
|
|
from datetime import datetime
|
|
|
|
class UserBase(BaseModel):
|
|
email: EmailStr
|
|
full_name: Optional[str] = None
|
|
|
|
class UserCreate(UserBase):
|
|
password: str
|
|
|
|
class UserResponse(UserBase):
|
|
id: int
|
|
is_active: bool
|
|
reputation_score: int # Ez a legfontosabb új mező!
|
|
is_superuser: bool
|
|
created_at: datetime
|
|
|
|
model_config = ConfigDict(from_attributes=True)
|