feat: Add currency and unit support across models, routes, and templates; enhance UI for consumption, costs, and production
This commit is contained in:
@@ -10,8 +10,12 @@ class Capex(Base):
|
||||
scenario_id = Column(Integer, ForeignKey("scenario.id"), nullable=False)
|
||||
amount = Column(Float, nullable=False)
|
||||
description = Column(String, nullable=True)
|
||||
currency_code = Column(String(3), nullable=False, default="USD")
|
||||
|
||||
scenario = relationship("Scenario", back_populates="capex_items")
|
||||
|
||||
def __repr__(self):
|
||||
return f"<Capex id={self.id} scenario_id={self.scenario_id} amount={self.amount}>"
|
||||
return (
|
||||
f"<Capex id={self.id} scenario_id={self.scenario_id} "
|
||||
f"amount={self.amount} currency={self.currency_code}>"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user