35 lines
1.7 KiB
Python
35 lines
1.7 KiB
Python
from sqlalchemy import Column, String, DECIMAL, Integer, ForeignKey
|
|
from core.database import Base
|
|
|
|
class Vehicle(Base):
|
|
__tablename__ = "vehicle"
|
|
__table_args__ = {"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)
|
|
company_id = Column(String, ForeignKey("a76.company.id"), nullable=False)
|
|
tenant_id = Column(String, ForeignKey("a76.tenants.id"), nullable=False) |