Measures

Renovation measures representing specific improvements applied to Buildings. Two complementary models exist: renovation_measures (building-level catalog) and scenario_measures (measures linked to Scenarios for planning and execution).

Source Files

LayerPath
Schema — renovation_measuresbackend/src/db/schema.ts (renovationMeasures)
Schema — scenario_measuresbackend/src/db/schema.ts (scenarioMeasures)
Routesbackend/src/routes/measures.ts, backend/src/routes/scenario-measures.ts

Database Tables

TablePurpose
renovation_measuresBuilding-level measures — type, priority, current/target state
scenario_measuresMeasures within a scenario — status lifecycle, cost tracking, component linking
cost_breakdownsDetailed cost categories per scenario measure (planned vs. actual)

Key Fields — Renovation Measures

FieldTypeNotes
buildingIduuid FKParent building (cascade)
measureTypeenumroof, facade, windows, doors, heating, ventilation, solar_panels, insulation, electrical, plumbing, other
priorityenumlow, medium, high, critical
statusvarcharDefault planned
currentStatejsonbDescription, energy class, estimated cost/savings
targetStatejsonbTarget parameters after renovation

Key Fields — Scenario Measures

FieldTypeNotes
scenarioIduuid FKParent scenario (cascade)
buildingIduuid FKParent building (cascade) — no direct projectId; the project comes via the scenario
measureTypeenumSame enum as renovation measures
statusenumdraft planned approved in_progress completed / cancelled
priorityenumlow, medium, high, critical
isLocked, lockedAt, lockedBybool/timestamp/uuidLocked when moving to execution phase
buildingComponentIduuid FKLinks to Building Components (set null)
currentState / targetStatejsonbBefore/after parameters (costs, specs, energy class)
executionOrderintegerOrder of execution within the scenario
dependenciesjsonbIDs of measures that must be completed first

Measure Types

TypeExamples
roofRoof insulation, re-roofing
facadeExternal wall insulation (ETICS/WDVS)
windowsWindow replacement, triple glazing
doorsDoor replacement, thermal upgrade
heatingHeat pump installation, boiler replacement
ventilationMechanical ventilation with heat recovery
solar_panelsPV installation, solar thermal
insulationBasement ceiling, top floor ceiling
electrical / plumbingSystem modernization

Relationships

Renovation Measure *──1 Building
Scenario Measure *──1 Scenario
Scenario Measure *──1 Building (denormalized FK)
Scenario Measure *──1 Building Component (optional)
Scenario Measure 1──* Cost Breakdowns
Funding Measure *──1 Building Component (funding links go through components, not scenario measures)

Features

  • Current/target state tracking — jsonb fields capture before/after parameters
  • Status lifecycle for scenario measures with locking at execution phase
  • Cost breakdowns per scenario measure (material, labor, planning) with payment tracking
  • Component linking — scenario measures reference specific Building Components
  • Funding eligibilityfunding_measures rows link Funding Applications to Funding Programs measure definitions, optionally tied to a building component
  • Energy Calculations — each measure has energy savings impact
  • Scenario Planning — compare measure combinations across Scenarios

Buildings | Scenarios | Building Components | Funding Programs | Funding Applications | Energy Calculations | Scenario Planning | Financial Calculations | Database Architecture