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

11 个月前
1年前
1年前
11 个月前
12345678910111213141516
  1. from sqlalchemy import Column, Double, Integer, String, ForeignKey, ARRAY, DateTime
  2. from db.base import Base
  3. from sqlalchemy.orm import relationship
  4. class DriveTask(Base):
  5. Id = Column(Integer, primary_key=True, index=True)
  6. DriverId = Column(ForeignKey("user.Id"), nullable=False)
  7. CreatedBy = relationship("User", back_populates="driveTasks")
  8. Description = Column(String, nullable=True)
  9. Status = Column(String, nullable=False)
  10. StartLocation = Column(ARRAY(String), nullable=False)
  11. EndLocation = Column(ARRAY(String), nullable=False)
  12. StartDateTime = Column(DateTime, nullable=True)
  13. DistanceCovered = Column(Double, nullable=True)
  14. EndDateTime = Column(DateTime, nullable=True)