"""PROSEC Schemas"""

from typing import Optional
from pydantic import BaseModel, Field


class ProsecResponse(BaseModel):
    """PROSEC (Programa de Promoción Sectorial)"""

    FRACCION: Optional[str] = Field(None, max_length=10)
    PRODUCTO: Optional[str] = Field(None, max_length=999)
    TASA: Optional[str] = Field(None, max_length=19)
    SECTOR: Optional[str] = Field(None, max_length=2)
    ANEXO: Optional[str] = Field(None, max_length=19)
    DOF: Optional[str] = Field(None, max_length=8)
    NOTAS: Optional[str] = Field(None, max_length=5000)
    NICO: Optional[str] = Field("", max_length=2)
    SYSID: int

    class Config:
        from_attributes = True
