|
- from sqlalchemy import Column, Integer, String, ForeignKey, DateTime
- from sqlalchemy.orm import relationship
- from db.base import Base
-
-
- class Auction(Base):
- Id = Column(Integer, primary_key=True, index=True)
-
- initialPrice = Column(Integer, nullable=False)
- minimalBet = Column(Integer, nullable=False)
- carID = Column(Integer, ForeignKey("car.Id"), nullable=False)
- vehicle = relationship("Vehicle", back_populates="auction")
- CreatedBy = relationship("User", back_populates="auctions")
- dateStart = Column(DateTime, nullable=False)
- dateEnd = Column(DateTime, nullable=False)
-
|