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.
27 lines
883 B
Python
27 lines
883 B
Python
from sqlalchemy import Column, Float, ForeignKey, Integer, String
|
|
from sqlalchemy.dialects.postgresql import UUID as PGUUID
|
|
from sqlalchemy.orm import relationship
|
|
|
|
from src.database.core import Base
|
|
from src.models import DefaultMixin, IdentityMixin
|
|
|
|
|
|
class MasterDataSimulation(Base, DefaultMixin, IdentityMixin):
|
|
__tablename__ = "lcc_ms_master_simulations"
|
|
|
|
simulation_id = Column(
|
|
PGUUID(as_uuid=True), ForeignKey("lcc_simulations.id"), nullable=False
|
|
)
|
|
name = Column(String, nullable=True)
|
|
description = Column(String, nullable=True)
|
|
unit_of_measurement = Column(String, nullable=True)
|
|
value_num = Column(Float, nullable=True)
|
|
value_str = Column(String, nullable=True)
|
|
seq = Column(Integer, nullable=True)
|
|
|
|
simulation = relationship(
|
|
"Simulation",
|
|
back_populates="masterdata_entries",
|
|
lazy="joined",
|
|
)
|