25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

carpart.py 645 B

123456789101112131415
  1. from sqlalchemy import Column, Float, 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(Float, nullable=False)