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.

auction.py 613 B

1 jaar geleden
12345678910111213141516
  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("car.Id"), nullable=False)
  9. vehicle = relationship("Vehicle", back_populates="auction")
  10. CreatedBy = relationship("User", back_populates="auctions")
  11. dateStart = Column(DateTime, nullable=False)
  12. dateEnd = Column(DateTime, nullable=False)