bfb1fc9312
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
34 lines
543 B
Python
34 lines
543 B
Python
import uuid
|
|
from datetime import datetime
|
|
|
|
from pydantic import BaseModel, EmailStr
|
|
|
|
from app.models.user import UserRole
|
|
|
|
|
|
class UserCreate(BaseModel):
|
|
username: str
|
|
email: str
|
|
password: str
|
|
|
|
|
|
class UserLogin(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class UserResponse(BaseModel):
|
|
id: uuid.UUID
|
|
username: str
|
|
email: str
|
|
role: UserRole
|
|
is_active: bool
|
|
created_at: datetime
|
|
|
|
model_config = {"from_attributes": True}
|
|
|
|
|
|
class Token(BaseModel):
|
|
access_token: str
|
|
token_type: str = "bearer"
|