v1.3 - client and admin scaffolding
This commit is contained in:
@@ -12,6 +12,7 @@ class Scenario(Base):
|
||||
__tablename__ = "scenarios"
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
tenant_id: Mapped[str] = mapped_column(String(64), default="default")
|
||||
name: Mapped[str] = mapped_column(String(255), unique=True)
|
||||
status: Mapped[str] = mapped_column(String(32), default="draft")
|
||||
description: Mapped[str | None] = mapped_column(String(500), nullable=True)
|
||||
@@ -28,6 +29,7 @@ class CostingResult(Base):
|
||||
__tablename__ = "costing_results"
|
||||
|
||||
id: Mapped[int] = mapped_column(primary_key=True)
|
||||
tenant_id: Mapped[str] = mapped_column(String(64), default="default")
|
||||
scenario_id: Mapped[int] = mapped_column(ForeignKey("scenarios.id"), index=True)
|
||||
product_id: Mapped[int] = mapped_column(ForeignKey("products.id"), index=True)
|
||||
finished_product_delivered: Mapped[float] = mapped_column(Float)
|
||||
@@ -38,4 +40,3 @@ class CostingResult(Base):
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, default=datetime.utcnow)
|
||||
|
||||
scenario: Mapped[Scenario] = relationship(back_populates="results")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user