- 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.
43 lines
1.8 KiB
Python
43 lines
1.8 KiB
Python
from api.v1.common.base_models import TenantScopedMixin
|
|
from core.database import Base
|
|
from sqlalchemy import Column, ForeignKey, ForeignKeyConstraint, Integer, String
|
|
|
|
|
|
class Driver(Base, TenantScopedMixin):
|
|
__tablename__ = "driver"
|
|
__table_args__ = (
|
|
ForeignKeyConstraint(["company_id"], ["a76.company.id"]),
|
|
ForeignKeyConstraint(["tenant_id"], ["a76.tenants.id"]),
|
|
{"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)
|