Add "Result" element to data model
The VILLASweb datamodel and API requires an extension to manage simulation result data. Two options for result saving shall be available:
- Saving a result file to the PostgreSQL DB
- Saving time series results to a TS DB (e.g. Influx, Cassandra, ...) and link the set of results to the PostgreSQL DB
A Scenario gets a new associated table "Results".
The model of Result:
type Result struct {
Model
// UUID of result (used to link result to time series TB entries)
UUID string
// JSON Snapshots of the component configurations used to obtain the results
ConfigSnapshots postgres.Jsonb
// A short (optional) description of the simulation executed to obtain the results
Description string
// Array of FileIDs of result files in the DB (files must belong to scenario)
ResultFileIDs []uint
// ID of scenario to which result belongs
ScenarioID uint
// ...
}
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information