Files
plantillas-proyectos/backend/api/v1/modules/a76/transportation/trailers/models.py
acazares aa35635397 feat: Implement customs brokers management interface
- 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.
2025-11-12 16:57:15 -06:00

25 lines
966 B
Python

from api.v1.common.base_models import TenantScopedMixin
from core.database import Base
from sqlalchemy import Column, ForeignKey, ForeignKeyConstraint, String
class Trailer(Base, TenantScopedMixin):
__tablename__ = "trailer"
__table_args__ = (
ForeignKeyConstraint(["company_id"], ["a76.company.id"]),
ForeignKeyConstraint(["tenant_id"], ["a76.tenants.id"]),
{"schema": "a76"},
)
trailer_number = Column(String(20), primary_key=True, nullable=False)
ace_trailer_number = Column(String(10), nullable=True)
trailer_type_key = Column(
String(2), ForeignKey("a76.trailer_type.trailer_type_key"), nullable=True
)
seal = Column(String(15), nullable=True)
entity_code = Column(String(1), nullable=True)
plate_number = Column(String(17), nullable=True)
state = Column(String(30), nullable=True)
country = Column(String(3), nullable=True)
container_key = Column(String(3), nullable=True)