- Added a data table for displaying customs brokers with columns for key, name, type, license, RFC, email, phone, city, and actions. - Created a dialog for adding new customs brokers with a form for inputting necessary details. - Implemented actions for viewing details and deleting customs brokers with confirmation dialogs. - Integrated search functionality to find customs brokers by their key. - Established server-side loading for the customs brokers page to handle authentication and data retrieval.
35 lines
935 B
Python
35 lines
935 B
Python
from typing import Optional
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
|
|
class TrailerBaseDTO(BaseModel):
|
|
trailer_number: str = Field(..., description="Trailer number (primary identifier)")
|
|
ace_trailer_number: Optional[str] = None
|
|
trailer_type_key: Optional[str] = None
|
|
seal: Optional[str] = None
|
|
entity_code: Optional[str] = None
|
|
plate_number: Optional[str] = None
|
|
state: Optional[str] = None
|
|
country: Optional[str] = None
|
|
container_key: Optional[str] = None
|
|
|
|
|
|
class TrailerCreateDTO(TrailerBaseDTO):
|
|
"""Schema for creating a trailer"""
|
|
pass
|
|
|
|
|
|
class TrailerUpdateDTO(TrailerBaseDTO):
|
|
"""Schema for updating a trailer"""
|
|
trailer_number: Optional[str] = Field(None, description="Trailer number (cannot be modified)")
|
|
|
|
|
|
class TrailerResponseDTO(TrailerBaseDTO):
|
|
"""Schema for trailer response"""
|
|
company_id: int
|
|
tenant_id: int
|
|
|
|
class Config:
|
|
from_attributes = True
|