This commit is contained in:
cjw
2026-02-16 18:33:17 +08:00
parent d111721ed9
commit 1525f6fc0b
5 changed files with 25 additions and 849 deletions
-31
View File
@@ -199,8 +199,6 @@ class MoldCavityData(Base):
product_volume = Column(Float, nullable=True)
wall_thickness_range = Column(String(50), nullable=True)
complexity_score = Column(Float, nullable=True)
estimated_cycle_time = Column(String(50), nullable=True)
manufacturing_tolerance = Column(String(50), nullable=True)
# 质量评估
weld_line_risk = Column(String(50), nullable=True) # 熔接痕风险
@@ -328,32 +326,3 @@ class SystemLog(Base):
def __repr__(self):
return f"<SystemLog(id={self.id}, level='{self.level}', module='{self.module}')>"
class AnalysisResultSnapshot(Base):
"""分析结果快照表 - 存储每次分析结果的完整副本"""
__tablename__ = "analysis_result_snapshots"
id = Column(Integer, primary_key=True, index=True)
stp_file_id = Column(Integer, ForeignKey("stp_files.id"), nullable=False, index=True)
# 快照标识信息
snapshot_name = Column(String(255), nullable=False, index=True) # 文件名+日期时间格式
snapshot_type = Column(String(50), default="complete") # complete, geometry_only, key_info_only
# 完整分析结果数据
task_data = Column(JSON, nullable=False) # 任务基本信息
geometry_data = Column(JSON, nullable=True) # 几何数据
mold_cavity_data = Column(JSON, nullable=True) # 模具型腔数据
key_info = Column(JSON, nullable=True) # 关键信息
html_info = Column(JSON, nullable=True) # HTML文件信息
# 时间戳
created_time = Column(DateTime, default=func.now())
analysis_time = Column(DateTime, nullable=False) # 原始分析时间
# 关联关系
stp_file = relationship("STPFile")
def __repr__(self):
return f"<AnalysisResultSnapshot(id={self.id}, snapshot_name='{self.snapshot_name}', stp_file_id={self.stp_file_id})>"