Appearance
Entity: gaugeMonthlyValue
Entity Type: Database table
Description: Twelve monthly figures a supply point needs for the joint energy purchase, kept as rows rather than as twelve columns on the gauge so the set can grow and be read per month. Two kinds are stored: the agreed monthly consumption of a gas medium- or large-scale supply point, whose yearly sum is what the gauge detail shows as the read-only annual consumption (Confluence feature id26, attribute 16), and the monthly reserved capacities of an electricity VN / VVN supply point (attribute 19). Both are entered by the user in a modal opened from the gauge detail — Měsíční hodnoty spotřeby and Měsíční rezervované kapacity — never derived automatically. Whether the gas consumption figures should instead be computed from readings is still open (gauge form specification, chapter 8, question 18).
Data Attributes Table
| Attribute Name | Description | Data Type | Default Value | Required (= Nullable) | Unique | Format | Validations | Index | Example |
|---|---|---|---|---|---|---|---|---|---|
| id | Primary key of the entity. | UUID | Generated in code (app layer) | Yes | Yes | UUID v7 | - | Primary Key | 01960000-0000-7000-8000-000000000401 |
| tenantId | Tenant that owns this record. Denormalised from gauge. | UUID | - | Yes | No | UUID v7 | Foreign Key → tenant; must equal the parent gauge.tenantId. | name: idx_gaugeMonthlyValue_tenantId, type: btree | 01960000-0000-7000-8000-000000000099 |
| gaugeId | The supply point these figures belong to. | UUID | - | Yes | No | UUID v7 | Foreign Key → gauge; must exist. | name: idx_gaugeMonthlyValue_gaugeId_kind_year_month, type: btree (composite) | 01960000-0000-7000-8000-000000000005 |
| kind | What the twelve figures describe. | String | - | Yes | No | Values: consumption, reservedCapacity | consumption only for gas with supplyType in (mediumScale, largeScaleGas); reservedCapacity only for electricity with supplyType in (largeScaleVN, largeScaleVVN). | - | consumption |
| year | Calendar year the figures apply to. | Integer | - | Yes | No | YYYY | Between 2000 and the current year + 5. | - | 2026 |
| month | Calendar month, 1–12. | Integer | - | Yes | No | - | Between 1 and 12; unique per gaugeId + kind + year. | name: idx_gaugeMonthlyValue_gaugeId_kind_year_month, type: btree (composite) | 1 |
| value | The figure itself. Consumption in MWh, reserved capacity in MW. | Decimal | null | No | No | Decimal(18,3) | Zero or greater. Null means the month was left empty — the yearly total is then not computed and the gauge detail shows "Nevyplněno". | - | 186.400 |
| unit | Unit of value, stored explicitly so exports and the PXE report do not have to infer it from kind. | String | - | Yes | No | enum — Unit | MWh for consumption, MW for reservedCapacity. | - | MWh |
| createdAt | Timestamp of entity creation. Immutable. | Timestamp with time zone | Set in code | Yes | No | ISO 8601 | - | - | 2026-09-23T10:00:00Z |
| updatedAt | Timestamp of last update. Set on insert equal to createdAt. | Timestamp with time zone | Set in code | Yes | No | ISO 8601 | - | - | 2026-09-23T10:00:00Z |
| createdBy | Identifier of the actor who created this record. | String | - | Yes | No | type:actor | - | - | user:01960000-0000-7000-8000-000000000099 |
| updatedBy | Identifier of the actor who last updated this record. | String | - | Yes | No | type:actor | - | - | user:01960000-0000-7000-8000-000000000099 |
Audited fields
Recorded on created (in full) and updated (changed only) — no deleted, since this table has no deletedAt column; a row is removed by application logic clearing/overwriting the month's value rather than by soft-delete: gaugeId, kind, year, month, value, unit.
Excluded: none.
Every entry carries subjectEntityType = gauge / subjectEntityId = gaugeId — this table has no identity of its own beyond the gauge it belongs to.
Not registered for entityName resolution, and has no independent human-readable attribute to register — identified by its gaugeId/kind/year/month scope.
Notes
- The annual figure shown on the gauge detail for gas medium / large-scale supply points is the sum of the twelve
consumptionrows of the current year; it is not stored on the gauge and cannot be typed in directly. - All twelve
reservedCapacityrows filled means the gauge detail shows "Vyplněno" next to the Editace button; otherwise "Nevyplněno".