您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

17 行
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)