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

13 行
493 B

  1. from sqlalchemy import Column, Integer, String, DateTime, ForeignKey
  2. from sqlalchemy.orm import relationship
  3. from db.base import Base
  4. class MaintenanceJob(Base):
  5. Id = Column(Integer, primary_key=True, index=True)
  6. # a list of weak entities of class CarPart
  7. CarParts = relationship("CarPart", back_populates="parent")
  8. Description = Column(String, nullable=False)
  9. Date = Column(DateTime, nullable=False)
  10. MaintenanceWorker = Column(ForeignKey("user.Id"), nullable=False)