You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 1 година
преди 1 година
1234567891011121314151617181920
  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. )