Files
plantillas-proyectos/backend/api/v1/modules/a76/seal/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

32 lines
609 B
Python

"""
DTOs for Seal.
"""
from typing import Optional
from pydantic import BaseModel, Field
class SealBaseDTO(BaseModel):
seal: str = Field(..., description="Seal identifier", max_length=15)
class SealCreateDTO(SealBaseDTO):
"""Schema for creating a seal"""
pass
class SealUpdateDTO(SealBaseDTO):
"""Schema for updating a seal"""
seal: Optional[str] = Field(None, description="Seal identifier", max_length=15)
class SealResponseDTO(SealBaseDTO):
"""Schema for seal response"""
id: int
company_id: int
tenant_id: int
class Config:
from_attributes = True