"""Authentication models for user management""" from pydantic import BaseModel, EmailStr, Field from typing import Optional from datetime import datetime class UserCreate(BaseModel): """Schema for user registration""" username: str = Field(..., min_length=3, max_length=50) email: Optional[EmailStr] = None password: str = Field(..., min_length=6) full_name: Optional[str] = None class UserLogin(BaseModel): """Schema for user login""" username: str password: str class User(BaseModel): """Schema for user data""" id: str username: str email: Optional[str] = None full_name: Optional[str] = None is_active: bool = True created_at: datetime last_login: Optional[datetime] = None class Token(BaseModel): """Schema for authentication token""" access_token: str token_type: str = "bearer" class UserInDB(User): """Schema for user stored in database (with hashed password)""" hashed_password: str