This commit is contained in:
2026-03-08 00:51:39 +08:00
parent e50a402152
commit 84e7ae4ef1
4 changed files with 204 additions and 79 deletions
+4
View File
@@ -162,6 +162,7 @@ class STPFile(Base):
analysis_metrics = relationship("AnalysisMetrics", back_populates="stp_file", uselist=False)
feature_detections = relationship("FeatureDetection", back_populates="stp_file")
design_recommendations = relationship("DesignRecommendation", back_populates="stp_file")
processing_tasks = relationship("ProcessingTask", back_populates="stp_file")
def __repr__(self):
return f"<STPFile(id={self.id}, original_filename='{self.original_filename}', status='{self.status}')>"
@@ -294,6 +295,9 @@ class ProcessingTask(Base):
# 处理参数
parameters = Column(JSON, nullable=True) # 任务参数
# 关联关系
stp_file = relationship("STPFile", back_populates="processing_tasks")
def __repr__(self):
return f"<ProcessingTask(id={self.id}, task_id='{self.task_id}', status='{self.status}')>"