"""
DTOs for historical tariff fractions.
"""

from datetime import datetime
from decimal import Decimal
from typing import Optional

from pydantic import BaseModel, ConfigDict


class HistoricalTariffFractionResponseDTO(BaseModel):
    id: int
    historical_fraction: Optional[str] = None
    unit_of_measure_code: Optional[str] = None
    country: Optional[str] = None
    fraction_type: Optional[str] = None
    sector: Optional[str] = None
    import_tax_rate: Optional[Decimal] = None
    export_tax_rate: Optional[Decimal] = None
    publication_date: Optional[datetime] = None
    is_immex: Optional[bool] = None
    normal_temporality: Optional[bool] = None
    services_temporality: Optional[bool] = None
    certified_temporality: Optional[bool] = None
    by_log: Optional[bool] = None
    end_date: Optional[datetime] = None

    model_config = ConfigDict(from_attributes=True)
