Skip to content

Commit

Permalink
small changes
Browse files Browse the repository at this point in the history
  • Loading branch information
YuXHe15 committed Jun 28, 2023
1 parent 5020181 commit da67432
Show file tree
Hide file tree
Showing 8 changed files with 6 additions and 70 deletions.
Empty file.
Binary file not shown.
Empty file.
Binary file not shown.

This file was deleted.

Binary file not shown.

This file was deleted.

12 changes: 6 additions & 6 deletions amworkflow/src/infrastructure/database/models/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class SliceFile(Base):
# slice_id: Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
slice_hashname: Mapped[str] = mapped_column(String(32), nullable=False, primary_key=True)
step_length: Mapped[float] = mapped_column(nullable=False)
stl_hashname_ = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
stl_hashname = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
created_date: Mapped[datetime] = mapped_column(nullable=False, default=datetime.now)
batch_num: Mapped[str] = mapped_column(nullable=True)
GCode = relationship("GCode", cascade="all, delete", back_populates="SliceFile")
Expand All @@ -47,7 +47,7 @@ class SliceFile(Base):
class XdmfFile(Base):
__tablename__ = "XdmfFile"
# mesh_id : Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
xdmf_name: Mapped[str] = mapped_column(nullable=False)
filename: Mapped[str] = mapped_column(nullable=False)
xdmf_hashname: Mapped[str] = mapped_column(String(32), nullable=False, primary_key=True)
mesh_size_factor: Mapped[float] = mapped_column(nullable=False)
layer_thickness: Mapped[float] = mapped_column(nullable=True)
Expand All @@ -61,7 +61,7 @@ class XdmfFile(Base):
class H5File(Base):
__tablename__ = "H5File"
# mesh_id : Mapped[int] = mapped_column(primary_key=True, autoincrement=True)
h5_name: Mapped[str] = mapped_column(nullable=False)
filename: Mapped[str] = mapped_column(nullable=False)
h5_hashname: Mapped[str] = mapped_column(String(32), nullable=False, primary_key=True)
created_date: Mapped[datetime] = mapped_column(nullable=False, default=datetime.now)
batch_num: Mapped[str] = mapped_column(nullable=True)
Expand All @@ -74,8 +74,8 @@ class GCode(Base):
gcode_hashname: Mapped[str] = mapped_column(String(32), nullable=False, primary_key=True)
created_date: Mapped[datetime] = mapped_column(nullable=False, default=datetime.now)
batch_num: Mapped[str] = mapped_column(nullable=True)
stl_hashname_ = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
slice_hashname_ = mapped_column(ForeignKey('SliceFile.slice_hashname', ondelete="CASCADE"))
stl_hashname = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
slice_hashname = mapped_column(ForeignKey('SliceFile.slice_hashname', ondelete="CASCADE"))
GeometryFile = relationship("GeometryFile", back_populates="GCode")
SliceFile = relationship("SliceFile", back_populates="GCode")

Expand All @@ -85,6 +85,6 @@ class FEResult(Base):
fe_hashname: Mapped[str] = mapped_column(String(32), nullable=False, primary_key=True)
created_date: Mapped[datetime] = mapped_column(nullable=False, default=datetime.now)
batch_num: Mapped[str] = mapped_column(nullable=True)
stl_hashname_ = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
stl_hashname = mapped_column(ForeignKey('GeometryFile.stl_hashname', ondelete="CASCADE"))
GeometryFile = relationship("GeometryFile", back_populates="FEResult")

0 comments on commit da67432

Please sign in to comment.