from datetime import datetime from pydantic import BaseModel, ConfigDict class BaseSchema(BaseModel): """Base Pydantic schema with common configurations.""" model_config = ConfigDict( from_attributes=True, # Allow ORM model -> Pydantic model populate_by_name=True # Allow populating by attribute name ) class TimestampSchema(BaseSchema): """Mixin for schemas that include timestamp fields.""" created_at: datetime updated_at: datetime