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.

16 lines
640 B

  1. from sqlalchemy import Column, Integer, String, ForeignKey, LargeBinary
  2. from sqlalchemy.orm import relationship
  3. from db.base import Base
  4. class CarPart(Base):
  5. Id = Column(Integer, primary_key=True, index=True)
  6. # a list of weak entities of class CarPart
  7. ParentId = Column(Integer, ForeignKey("maintenancejob.Id"), nullable=False)
  8. parent = relationship("MaintenanceJob", back_populates="CarParts")
  9. Name = Column(String, nullable=False)
  10. Number = Column(String, nullable=False)
  11. Condition = Column(String, nullable=False)
  12. ImageURL = Column(LargeBinary, nullable=False)
  13. Cost = Column(Integer, nullable=False)