# Data model The entities below describe intended persistence and domain boundaries; this bootstrap does not define a database schema or migrations. | Entity | Intended contents | Purpose | | --- | --- | --- | | `ProductionOrder` | source ID, machine ID, article/material reference, known interval | Central result-attribution context | | `MachineState` | machine ID, state, observed interval | Runtime/downtime and contextual calculations | | `CalculatedMetric` | name, value/unit, result interval, attribution, provenance | Integrated consumption and future aggregates | | `ProcessEvent` | event type, time, payload/value, attribution, provenance | Completed peaks and threshold/cycle events | | `CalculationRun` | type/version, execution time, source interval, status/metadata | Auditing and reproducibility | | calculation state | calculation-instance/context key and serializable state | Incremental execution only | ## Provenance minimum Each metric/event must store `calculation_type`, `calculation_version`, and the ENLYZE source time range. Values should retain their unit. Production order and article can be absent when ENLYZE cannot provide them for a particular record; absence is explicit rather than fabricated. ## Database direction TimescaleDB will store result/event time series and supporting relational context. Schema design comes after the ENLYZE exploration milestone confirms source identifiers, timestamp precision/timezone, ordering, correction, and context-history behavior.