- Create .env.example for environment variables - Update README with project structure and development setup instructions - Implement FastAPI application with API routes for scenarios and parameters - Add database models for scenarios, parameters, and simulation results - Introduce validation middleware for JSON requests - Create services for running simulations and generating reports - Add testing strategy and directory structure in documentation
15 lines
505 B
Python
15 lines
505 B
Python
from sqlalchemy import Column, Integer, Float, ForeignKey
|
|
from sqlalchemy.orm import relationship
|
|
from config.database import Base
|
|
|
|
|
|
class SimulationResult(Base):
|
|
__tablename__ = "simulation_result"
|
|
|
|
id = Column(Integer, primary_key=True, index=True)
|
|
scenario_id = Column(Integer, ForeignKey("scenario.id"), nullable=False)
|
|
iteration = Column(Integer, nullable=False)
|
|
result = Column(Float, nullable=False)
|
|
|
|
scenario = relationship("Scenario", back_populates="simulation_results")
|