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.
 
 

18 line
688 B

  1. from sqlalchemy import Column, Integer, String, ForeignKey, DateTime
  2. from sqlalchemy.orm import relationship
  3. from db.base import Base
  4. class Auction(Base):
  5. Id = Column(Integer, primary_key=True, index=True)
  6. initialPrice = Column(Integer, nullable=False)
  7. minimalBet = Column(Integer, nullable=False)
  8. carID = Column(Integer, ForeignKey("vehicle.Id"), nullable=False)
  9. vehicle = relationship("Vehicle", back_populates="auction")
  10. creatorId = Column(Integer, ForeignKey("user.Id"), nullable=False)
  11. CreatedBy = relationship("User", back_populates="auctions")
  12. dateStart = Column(DateTime, nullable=False)
  13. dateEnd = Column(DateTime, nullable=False)