- 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.
27 lines
548 B
Python
27 lines
548 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class TrailerBaseDTO(BaseModel):
|
|
trailer_number: str
|
|
ace_trailer_number: Optional[str]
|
|
trailer_type_key: Optional[str]
|
|
seal: Optional[str]
|
|
entity_code: Optional[str]
|
|
plate_number: Optional[str]
|
|
state: Optional[str]
|
|
country: Optional[str]
|
|
container_key: Optional[str]
|
|
company_id: str
|
|
tenant_id: str
|
|
|
|
|
|
class TrailerCreateDTO(TrailerBaseDTO):
|
|
pass
|
|
|
|
|
|
class TrailerResponseDTO(TrailerBaseDTO):
|
|
class Config:
|
|
from_attributes = True
|