- 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.
44 lines
1.1 KiB
Python
44 lines
1.1 KiB
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class VehicleBaseDTO(BaseModel):
|
|
vehicle_key: str
|
|
ace_vehicle_key: Optional[str]
|
|
transporter_key: Optional[str]
|
|
transport_identifier: Optional[str]
|
|
transport_type: Optional[str]
|
|
entity_code: Optional[str]
|
|
transponder_number: Optional[str]
|
|
dot_number: Optional[str]
|
|
plate_number: Optional[str]
|
|
city: Optional[str]
|
|
state: Optional[str]
|
|
country: Optional[str]
|
|
seal: Optional[str]
|
|
insurance_company_name: Optional[str]
|
|
insurance_number: Optional[str]
|
|
insurance_amount: Optional[float]
|
|
insurance_date: Optional[int]
|
|
box_number: Optional[str]
|
|
brand: Optional[str]
|
|
year: Optional[str]
|
|
series: Optional[str]
|
|
description: Optional[str]
|
|
engine_number: Optional[str]
|
|
sct_permission: Optional[str]
|
|
color: Optional[str]
|
|
container_key: Optional[str]
|
|
company_id: str
|
|
tenant_id: str
|
|
|
|
|
|
class VehicleCreateDTO(VehicleBaseDTO):
|
|
pass
|
|
|
|
|
|
class VehicleResponseDTO(VehicleBaseDTO):
|
|
class Config:
|
|
from_attributes = True
|