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.
 
 

17 rindas
678 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)