Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

21 rinda
889 B

  1. from sqlalchemy import Column, Float, Integer, String, ForeignKey, DateTime, LargeBinary
  2. from sqlalchemy.orm import relationship
  3. from db.base import Base
  4. class FuelingTask(Base):
  5. Id = Column(Integer, primary_key=True, index=True)
  6. VehicleId = Column(ForeignKey("vehicle.Id"), nullable=False)
  7. DriverId = Column(ForeignKey("user.Id"), nullable=False)
  8. CreatedById = Column(ForeignKey("user.Id"), nullable=False)
  9. Date = Column(DateTime, nullable=False)
  10. Description = Column(String, nullable=True)
  11. Cost = Column(Float, nullable=False)
  12. FuelRefilled = Column(Float, nullable=False)
  13. GasStationName = Column(String, nullable=False)
  14. ImageBefore = Column(LargeBinary, nullable=False)
  15. ImageAfter = Column(LargeBinary, nullable=False)
  16. CreatedBy = relationship(
  17. "User", back_populates="fuelingTasks", foreign_keys="FuelingTask.CreatedById"
  18. )