- Added methods to list drivers and filter by company and tenant in DriverService. - Updated API routes to include transporters, vehicles, drivers, trailers, customs sections, and code pedimento regimens. - Modified frontend components to handle new transportation data, including select inputs for transporters, vehicles, drivers, and trailers. - Improved data fetching in server-side routes to include additional transportation-related data. - Enhanced UI components to display and select transportation-related information in the invoice editing form.
42 lines
1008 B
Python
42 lines
1008 B
Python
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
|