from __future__ import annotations

from typing import Literal, Optional

from pydantic import AnyHttpUrl, BaseModel


class OcrTaskRequest(BaseModel):
    document_id: str
    file_url: AnyHttpUrl


class TaskStatusResponse(BaseModel):
    task_id: str
    status: Literal["pending", "processing", "completed", "failed"]
    progress: int = 0
    message: Optional[str] = None
