from pydantic import BaseModel
from typing import Optional, Literal


class ImportJobResponse(BaseModel):
    job_id: str
    status: str
    message: str


class CommitRequest(BaseModel):
    model_target: Literal["invoice_header", "invoice_details"]


class ImportJobStatus(BaseModel):
    status: str
    job_id: str
    total_rows: Optional[int] = 0
    error_count: Optional[int] = 0
    valid_rows: Optional[int] = 0
    error: Optional[str] = None
    inserted: Optional[int] = 0
    error_file: Optional[str] = None
