from pydantic import BaseModel, Field
from typing import List, Optional

class PedimentosWinsaaiGenerationRequest(BaseModel):
    pedimento_ids: List[int] = Field(..., description="List of Pedimento IDs to process")
    is_temporal: bool = Field(True, description="Whether to generate as temporal (SCAII) or definitive")
    is_by_class: bool = Field(False, description="Whether to group items by Class (SCAF)")

class ErrorValidacion(BaseModel):
    partida: Optional[int] = None
    linea: int
    descripcion: str
    soluciones: Optional[str] = None
    identificador: Optional[str] = None

class WinsaaiResponse(BaseModel):
    task_id: str
    status: str = "PENDING"
    message: str = "WINSAAI generation task started"
    validation_errors: List[ErrorValidacion] = []
