from pydantic import BaseModel, EmailStr, Field from typing import Optional class RegisterRequest(BaseModel): email: EmailStr password: str = Field( ..., min_length=8, description="Password must be at least 8 characters" ) full_name: str = Field(..., min_length=1, max_length=80) username: str = Field(..., min_length=3, max_length=30) class LoginRequest(BaseModel): email: EmailStr password: str class TokenResponse(BaseModel): access_token: str token_type: str = "bearer" user: dict class UserResponse(BaseModel): id: int username: str email: str full_name: str class RefreshTokenRequest(BaseModel): refresh_token: str