PIbd-42_SSPR/db/models/recycling_parameters_model.py

20 lines
557 B
Python
Raw Normal View History

from typing import Optional
from sqlalchemy import ForeignKey
from db.models.base import Base, int_pk_incr
2024-10-14 19:49:54 +04:00
from sqlalchemy.orm import Mapped, mapped_column
class RecyclingParameters(Base):
__tablename__ = 'recycling_parameters'
2024-10-14 19:49:54 +04:00
id: Mapped[int_pk_incr]
load_id: Mapped[Optional[int]] = mapped_column(ForeignKey('load_parameters.id', ondelete='SET NULL'))
2024-10-14 19:49:54 +04:00
recycling_level: Mapped[int]
co2: Mapped[float]
n2: Mapped[float]
h2o: Mapped[float]
o2: Mapped[float]
def __repr__(self):
return f"<RecyclingParameters>"