"""Pydantic schemas — Auth.""" from datetime import datetime from pydantic import BaseModel, Field class LoginRequest(BaseModel): username: str = Field(..., max_length=64) password: str = Field(..., max_length=128) class UserInfo(BaseModel): id: int username: str display_name: str email: str model_config = {"from_attributes": True} class TokenResponse(BaseModel): access_token: str token_type: str = "bearer" user: UserInfo class UserOut(BaseModel): id: int username: str display_name: str email: str is_active: bool created_at: datetime updated_at: datetime model_config = {"from_attributes": True}