Resumen del trabajo de hoy: Se agregaron y actualizaron módulos, rutas, servicios y DTOs para las entidades trabajadas hoy, incluyendo Aduanal, Drivers, Trailers, TransportModes, TransportTypes, Transporters, Vehicles, entre otros. Se verificó la presencia de los campos tenant_id y company_id en los modelos relevantes.

This commit is contained in:
2025-11-08 08:35:02 -06:00
parent ace261fc57
commit 6fab5a3dd4
33 changed files with 1024 additions and 0 deletions

View File

@@ -0,0 +1,33 @@
from sqlalchemy import Column, String, Integer, ForeignKey
from core.database import Base
class Driver(Base):
__tablename__ = "driver"
__table_args__ = {"schema": "a76"}
transporter_key = Column(String(5), ForeignKey("a76.transporter.transporter_key", ondelete="CASCADE"), primary_key=True, nullable=False)
line = Column(Integer, primary_key=True, nullable=False)
driver_name = Column(String(80), nullable=True)
license_number = Column(String(29), nullable=True)
express_line_id = Column(String(17), nullable=True)
ace_id = Column(String(20), nullable=True)
birth_date = Column(Integer, nullable=True)
gender = Column(String(1), nullable=True)
birth_country = Column(String(3), nullable=True)
hazardous_material_auth = Column(String(2), nullable=True)
hazardous_material_state = Column(String(30), nullable=True)
first_name = Column(String(20), nullable=True)
last_name = Column(String(20), nullable=True)
id_key1 = Column(String(40), nullable=True)
id_number1 = Column(String(20), nullable=True)
id_state1 = Column(String(30), nullable=True)
id_country1 = Column(String(3), nullable=True)
id_key2 = Column(String(40), nullable=True)
id_number2 = Column(String(20), nullable=True)
id_state2 = Column(String(30), nullable=True)
id_country2 = Column(String(3), nullable=True)
badge_number = Column(String(20), nullable=True)
class_type = Column(String(1), nullable=True)
unique_badge_number = Column(String(100), nullable=True)
company_id = Column(String, ForeignKey("a76.company.id"), nullable=False)
tenant_id = Column(String, ForeignKey("a76.tenants.id"), nullable=False)