- 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.
32 lines
950 B
Python
32 lines
950 B
Python
from decimal import Decimal
|
|
from typing import Optional
|
|
|
|
from pydantic import Field
|
|
|
|
|
|
class CurrencyMixin:
|
|
"""Mixin for currency-related fields"""
|
|
|
|
currency: Optional[str] = Field(None, max_length=3, description="Currency")
|
|
currency_factor: Optional[Decimal] = Field(None, description="Currency factor")
|
|
|
|
|
|
class AffectValueMixin:
|
|
"""Mixin for value affect flags"""
|
|
|
|
not_affect_usd_value: Optional[int] = Field(
|
|
None, description="Not affect USD value"
|
|
)
|
|
not_affect_customs_value: Optional[int] = Field(
|
|
None, description="Not affect customs value"
|
|
)
|
|
|
|
|
|
class UpdateFlagsMixin:
|
|
"""Mixin for update flags"""
|
|
|
|
update_vat: Optional[int] = Field(None, description="Update VAT")
|
|
update_advalorem: Optional[int] = Field(None, description="Update advalorem")
|
|
update_cc: Optional[int] = Field(None, description="Update CC")
|
|
update_ieps: Optional[int] = Field(None, description="Update IEPS")
|