您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

12345678910111213141516171819202122
  1. # Postgres table model for vehicles
  2. from sqlalchemy import (
  3. Column,
  4. Integer,
  5. String,
  6. ARRAY,
  7. )
  8. from db.base import Base
  9. class Vehicle(Base):
  10. __tablename__ = "vehicles"
  11. Id = Column(Integer, primary_key=True, index=True)
  12. Model = Column(String, nullable=False)
  13. Year = Column(Integer, nullable=False)
  14. LicensePlate = Column(String, nullable=False)
  15. Type = Column(String, nullable=False)
  16. AssignedDriverIds = Column(ARRAY(Integer), nullable=True)
  17. CurrentLocation = Column(ARRAY(String), nullable=True)
  18. Fuel = Column(Integer, nullable=False)
  19. Mileage = Column(Integer, nullable=False)
  20. MaintenanceNotes = Column(ARRAY(String), nullable=True)