"""Pydantic schemas for processing pipeline log API payloads.""" from datetime import datetime from uuid import UUID from pydantic import BaseModel, Field class ProcessingLogEntryResponse(BaseModel): """Represents one persisted processing log event returned by API endpoints.""" id: int created_at: datetime level: str stage: str event: str document_id: UUID | None document_filename: str | None provider_id: str | None model_name: str | None prompt_text: str | None response_text: str | None payload_json: dict class Config: """Enables ORM object parsing for SQLAlchemy model instances.""" from_attributes = True class ProcessingLogListResponse(BaseModel): """Represents a paginated collection of processing log records.""" total: int items: list[ProcessingLogEntryResponse] = Field(default_factory=list)