- 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.
44 lines
1.9 KiB
Python
44 lines
1.9 KiB
Python
from api.v1.common.base_models import TenantScopedMixin
|
|
from core.database import Base
|
|
from sqlalchemy import DECIMAL, Column, ForeignKeyConstraint, Integer, String
|
|
|
|
|
|
class Vehicle(Base, TenantScopedMixin):
|
|
__tablename__ = "vehicle"
|
|
__table_args__ = (
|
|
ForeignKeyConstraint(
|
|
["tenant_id"], ["a76.tenants.id"], name="fk_vehicle_tenants"
|
|
),
|
|
ForeignKeyConstraint(
|
|
["company_id"], ["a76.company.id"], name="fk_vehicle_company"
|
|
),
|
|
{"schema": "a76"},
|
|
)
|
|
|
|
vehicle_key = Column(String(14), primary_key=True, nullable=False)
|
|
ace_vehicle_key = Column(String(10), nullable=True)
|
|
transporter_key = Column(String(23), nullable=True)
|
|
transport_identifier = Column(String(30), nullable=True)
|
|
transport_type = Column(String(2), nullable=True)
|
|
entity_code = Column(String(1), nullable=True)
|
|
transponder_number = Column(String(16), nullable=True)
|
|
dot_number = Column(String(8), nullable=True)
|
|
plate_number = Column(String(17), nullable=True)
|
|
city = Column(String(30), nullable=True)
|
|
state = Column(String(30), nullable=True)
|
|
country = Column(String(3), nullable=True)
|
|
seal = Column(String(49), nullable=True)
|
|
insurance_company_name = Column(String(30), nullable=True)
|
|
insurance_number = Column(String(20), nullable=True)
|
|
insurance_amount = Column(DECIMAL(13, 2), nullable=True)
|
|
insurance_date = Column(Integer, nullable=True)
|
|
box_number = Column(String(300), nullable=True)
|
|
brand = Column(String(20), nullable=True)
|
|
year = Column(String(4), nullable=True)
|
|
series = Column(String(30), nullable=True)
|
|
description = Column(String(100), nullable=True)
|
|
engine_number = Column(String(50), nullable=True)
|
|
sct_permission = Column(String(40), nullable=True)
|
|
color = Column(String(20), nullable=True)
|
|
container_key = Column(String(3), nullable=True)
|