- Rearranged imports in multiple files for consistency and clarity. - Updated logging middleware to exclude specific paths from logging. - Enhanced security module by cleaning up token handling and improving tenant validation. - Added tenant and company scoped mixins for better database model management. - Implemented generic CRUD routes for tenant-scoped resources. - Improved error handling and response management in API routes. - Cleaned up login and logout processes to ensure proper session management. - Introduced mechanisms to clear local storage and cookies on tenant change. - Enhanced company store to detect tenant changes and clear data accordingly. - Added new DTO mixins for currency and value affect flags.
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: str
|
|
tenant_id: str
|
|
|
|
|
|
class DriverCreateDTO(DriverBaseDTO):
|
|
pass
|
|
|
|
|
|
class DriverResponseDTO(DriverBaseDTO):
|
|
class Config:
|
|
from_attributes = True
|