Add Image models and clean up test code structure

Introduced `ImageCreate` and `Image` models to handle image-related data in the backend. Improved the organization and readability of the testing notebook by consolidating and formatting code into distinct sections with markdown cells.
This commit is contained in:
GotthardG
2025-02-26 13:33:23 +01:00
parent f588bc0cda
commit 1606e80f81
5 changed files with 277 additions and 51 deletions

View File

@ -249,6 +249,17 @@ class Beamtime(Base):
dewars = relationship("Dewar", back_populates="beamtime")
class Image(Base):
__tablename__ = "images"
id = Column(Integer, primary_key=True, index=True, autoincrement=True)
pgroup = Column(String(255), nullable=False)
comment = Column(String(200), nullable=True)
filepath = Column(String(255), nullable=False)
status = Column(String(255), nullable=True)
sample_id = Column(Integer, ForeignKey("samples.id"), nullable=False)
# class Results(Base):
# __tablename__ = "results"
#