Initial commit
This commit is contained in:
35
backend/app/schemas/processing_logs.py
Normal file
35
backend/app/schemas/processing_logs.py
Normal file
@@ -0,0 +1,35 @@
|
||||
"""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)
|
||||
Reference in New Issue
Block a user