Files
plantillas-proyectos/backend/api/v1/modules/a76/customs_brokers/dto.py
acazares 962f43fe62 Refactor and enhance CRUD operations for Seal, Trailer, Transporter, Vehicle, and Customs Broker modules
- Updated SealService to support tenant and company filtering with pagination and enhanced CRUD methods.
- Refactored TrailerService to include tenant and company support, added filtering capabilities, and improved CRUD methods.
- Introduced TenantCRUDRoutes for Trailer and Transporter routes to streamline API endpoint creation and management.
- Enhanced TransporterService with tenant and company filtering, pagination, and improved CRUD operations.
- Added Customs Broker module with DTOs, models, services, and routes for managing customs broker data.
- Implemented CRUD operations for Customs Broker, including personnel and VU management.
- Improved data validation and descriptions in DTOs for better API documentation.
2025-11-11 18:20:39 -06:00

71 lines
1.7 KiB
Python

from typing import Optional
from pydantic import BaseModel
class CustomsBrokerDTO(BaseModel):
type: Optional[str]
broker_key: str
name: Optional[str]
address: Optional[str]
postal_code: Optional[str]
city: Optional[str]
state: Optional[str]
phone: Optional[str]
fax: Optional[str]
email: Optional[str]
country: Optional[str]
tax_id: Optional[str]
personal_id: Optional[str]
position: Optional[str]
license: Optional[str]
company: Optional[str]
contact: Optional[str]
tenant_id: str
company_id: str
class Config:
from_attributes = True
class CustomsBrokerVUCreateDTO(BaseModel):
certificate_path: Optional[str]
key_path: Optional[str]
access_key: Optional[str]
fiel_format: Optional[str]
signature_read_path: Optional[str]
archive_path: Optional[str]
fiel_access_key: Optional[str]
web_service_user: Optional[str]
web_service_access_key: Optional[str]
vu_email: Optional[str]
vu_figure_type: Optional[str]
xml_files_path: Optional[str]
query_tax_id: Optional[str]
doda_certificate_path: Optional[str]
doda_key_path: Optional[str]
doda_web_service_user: Optional[str]
doda_web_service_access_key: Optional[str]
doda_fiel_access_key: Optional[str]
doda_xml_files_path: Optional[str]
class Config:
from_attributes = True
class CustomsBrokerPersonnelDTO(BaseModel):
broker_key: str
line: int
name: Optional[str]
tax_id: Optional[str]
personal_id: Optional[str]
position: Optional[str]
license: Optional[str]
first_name: Optional[str]
last_name: Optional[str]
middle_name: Optional[str]
email: Optional[str]
class Config:
from_attributes = True