- Added models, DTOs, services, and routes for ports, including CRUD operations. - Introduced unit conversions with corresponding models, DTOs, services, and routes. - Developed units of measure with detailed models, DTOs, services, and routes for various types. - Ensured all new features are integrated with FastAPI and SQLAlchemy for seamless database interactions.
23 lines
867 B
Python
23 lines
867 B
Python
from api.v1.common.base_models import TenantScopedMixin, TimestampMixin
|
|
from core.database import Base
|
|
from sqlalchemy import Column, ForeignKey, ForeignKeyConstraint, String
|
|
|
|
|
|
class Trailer(Base, TenantScopedMixin, TimestampMixin):
|
|
__tablename__ = "trailer"
|
|
__table_args__ = (
|
|
{"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)
|