2024-10-14 22:02:08 +04:00
|
|
|
from typing import Optional
|
|
|
|
|
2024-10-21 13:25:59 +04:00
|
|
|
from sqlalchemy import ForeignKey, Identity
|
2024-10-14 16:57:57 +04:00
|
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
|
2024-10-21 13:25:59 +04:00
|
|
|
from db.models.base import Base
|
|
|
|
|
|
|
|
|
2024-10-14 16:57:57 +04:00
|
|
|
class ExperimentParameters(Base):
|
2024-10-14 22:02:08 +04:00
|
|
|
__tablename__ = 'experiment_parameters'
|
2024-10-14 16:57:57 +04:00
|
|
|
|
2024-11-18 21:48:39 +04:00
|
|
|
id: Mapped[int] = mapped_column(Identity(start=1100, cycle=True),
|
2024-10-21 13:25:59 +04:00
|
|
|
primary_key=True)
|
2024-10-14 16:57:57 +04:00
|
|
|
outer_blades_count: Mapped[int]
|
|
|
|
outer_blades_length: Mapped[float]
|
|
|
|
outer_blades_angle: Mapped[float]
|
|
|
|
middle_blades_count: Mapped[int]
|
2024-10-14 22:02:08 +04:00
|
|
|
load_id: Mapped[Optional[int]] = mapped_column(ForeignKey('load_parameters.id', ondelete='SET NULL'))
|
|
|
|
recycling_id: Mapped[Optional[int]] = mapped_column(ForeignKey('recycling_parameters.id', ondelete='SET NULL'))
|
2024-10-25 02:02:31 +04:00
|
|
|
experiment_hash: Mapped[str] = mapped_column(unique=True)
|
2024-10-25 02:15:24 +04:00
|
|
|
experiment_category_id: Mapped[Optional[int]] = mapped_column(ForeignKey('experiment_category.id', ondelete='SET NULL'), nullable=True)
|
2024-11-28 21:52:42 +04:00
|
|
|
oxidizer_temp: Mapped[float] = mapped_column(nullable=True)
|
2024-10-14 16:57:57 +04:00
|
|
|
|
|
|
|
def __repr__(self):
|
2024-10-21 13:25:59 +04:00
|
|
|
return f"<ExperimentParameters>"
|