You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

25 lines
673 B
Python

from sqlalchemy import Column, Integer, String
from sqlalchemy.orm import relationship
from src.database.core import Base
from src.models import DefaultMixin, IdentityMixin
class Simulation(Base, DefaultMixin, IdentityMixin):
__tablename__ = "lcc_simulations"
label = Column(String, nullable=False)
version = Column(Integer, nullable=True)
masterdata_entries = relationship(
"MasterDataSimulation",
back_populates="simulation",
cascade="all, delete-orphan",
)
plant_transactions = relationship(
"PlantTransactionDataSimulations",
back_populates="simulation",
cascade="all, delete-orphan",
)