|
1234567891011121314 |
- from sqlalchemy import Column, Integer, String, ForeignKey, ARRAY, DateTime
- from db.base import Base
- from sqlalchemy.orm import relationship
-
-
- class DriveTask(Base):
- Id = Column(Integer, primary_key=True, index=True)
- DriverId = Column(ForeignKey("user.Id"), nullable=False)
- CreatedBy = relationship("User", back_populates="driveTasks")
- Description = Column(String, nullable=True)
- Status = Column(String, nullable=False)
- StartLocation = Column(ARRAY(String), nullable=False)
- EndLocation = Column(ARRAY(String), nullable=False)
- StartDateTime = Column(DateTime, nullable=False)
|