from typing import Optional

from pydantic import BaseModel


class DriverBaseDTO(BaseModel):
    transporter_key: str
    line: int
    driver_name: Optional[str]
    license_number: Optional[str]
    express_line_id: Optional[str]
    ace_id: Optional[str]
    birth_date: Optional[int]
    gender: Optional[str]
    birth_country: Optional[str]
    hazardous_material_auth: Optional[str]
    hazardous_material_state: Optional[str]
    first_name: Optional[str]
    last_name: Optional[str]
    id_key1: Optional[str]
    id_number1: Optional[str]
    id_state1: Optional[str]
    id_country1: Optional[str]
    id_key2: Optional[str]
    id_number2: Optional[str]
    id_state2: Optional[str]
    id_country2: Optional[str]
    badge_number: Optional[str]
    class_type: Optional[str]
    unique_badge_number: Optional[str]
    company_id: int
    tenant_id: int


class DriverCreateDTO(DriverBaseDTO):
    pass


class DriverResponseDTO(DriverBaseDTO):
    class Config:
        from_attributes = True
