from typing import Optional

from pydantic import BaseModel, ConfigDict, Field


class InvoiceTypeDTO(BaseModel):
    key: str = Field(..., min_length=1, max_length=5)
    description: str
    note: Optional[str] = None
    type: Optional[str] = None
    operation: Optional[str] = None

    model_config = ConfigDict(from_attributes=True)
