23 lines
773 B
Python
23 lines
773 B
Python
from typing import Optional
|
|
from sqlalchemy import Sequence
|
|
|
|
from sqlalchemy import ForeignKey
|
|
|
|
from db.models.base import Base
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
|
|
class RecyclingParameters(Base):
|
|
__tablename__ = 'recycling_parameters'
|
|
|
|
id: Mapped[int] = mapped_column(primary_key=True,
|
|
autoincrement=True,
|
|
server_default=Sequence('recycling_parameters_id_seq', start=41).next_value())
|
|
load_id: Mapped[Optional[int]] = mapped_column(ForeignKey('load_parameters.id', ondelete='SET NULL'))
|
|
recycling_level: Mapped[int]
|
|
co2: Mapped[float]
|
|
n2: Mapped[float]
|
|
h2o: Mapped[float]
|
|
o2: Mapped[float]
|
|
|
|
def __repr__(self):
|
|
return f"<RecyclingParameters>" |