xxx
This commit is contained in:
@@ -125,6 +125,8 @@ class STPFile(Base):
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
user_id = Column(Integer, ForeignKey("users.id"), nullable=True, index=True)
|
||||
# 关联进销存成品(P2-1:分析结果可一键创建为成品并回写)
|
||||
product_id = Column(Integer, ForeignKey("products.id"), nullable=True, index=True)
|
||||
|
||||
# 对象存储信息
|
||||
object_key = Column(String(500), nullable=False, index=True) # MinIO对象键
|
||||
@@ -160,6 +162,7 @@ class STPFile(Base):
|
||||
|
||||
# 关联关系
|
||||
user = relationship("User", back_populates="stp_files")
|
||||
product = relationship("Product") # P2-1: 关联的进销存成品
|
||||
geometry_data = relationship("GeometryData", back_populates="stp_file", uselist=False)
|
||||
mesh_data = relationship("MeshData", back_populates="stp_file", uselist=False)
|
||||
mold_cavity_data = relationship("MoldCavityData", back_populates="stp_file", uselist=False)
|
||||
|
||||
Reference in New Issue
Block a user