Skip to content
Updated Sep 26, 2026 by Barča Dvořáková · Owner: analysisactiveentityconfluence-migration Edit on GitHub

Entity: gaugePurposeOption ​

Entity Type: Database table

Description: The selectable "word choice" a user picks when creating a gauge, after choosing kind and medium. Each row represents one wording (via translationKey) and the resulting technical configuration (direction, outputMode, purposeCategory) it maps to. This is the mechanism that lets a superadmin offer multiple wordings for an identical underlying configuration without any deployment — e.g. "Odebráno ze sítě" and "Odebráno" can both be separate rows pointing to the same (direction, outputMode, purposeCategory) target. gauge.purpose stores a reference to the specific row the user picked (not just the resulting combination), so the original selection is reconstructable later even when several options share the same target.

Adding a new wording variant that targets an existing, valid combination is a superadmin, no-deployment operation (new row here + a corresponding uiLabel entry). Adding an entirely new combination — a direction/outputMode pairing that isn't already valid — still requires developer involvement, since it is tied to enum values and buildingTotal formula logic (see Gauge Management → Functional Requirements → outputMode and buildingTotal).

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idUnique identifier for the option. This is the value referenced by gauge.purpose.UUIDGenerated in code (app layer)YesYesUUID v7Must be a valid UUID v7.Primary Key01960000-0000-7000-8000-000000000040
kindWhich gauge kind this option is offered for.String-YesNoenumMust be one of standard, subGauge. Virtual gauges do not use this mechanism (created via formula editor).-standard
mediumWhich medium this option is offered for.String-YesNoenumMust be one of the defined enum values.-electricity
translationKeyReference to the uiLabel entry providing the displayed wording for this option, in every supported locale.String-YesYesDot notation, e.g. gauge.purposeOption.consumedFromGridMust match an existing uiLabel.translationKey.-gauge.purposeOption.consumedFromGrid
targetDirectionThe direction value applied to the gauge when this option is selected.StringnullNoNoenumNull only when medium = kvp.-import
targetOutputModeThe outputMode value applied to the gauge when this option is selected.StringnullNoNoenumNull only when medium = kvp.-include
purposeCategoryThe business-meaning category this option belongs to. Several options (different wordings) may share the same category and the same target combination — that is the expected, supported case.StringnullNoNoenum--consumedFromGrid
sortOrderDisplay order of this option within the filtered (kind, medium) list.Integer0YesNo---10
isActiveWhether this option is currently offered to users. Deactivating an option (instead of deleting it) preserves referential integrity for gauges that already reference it via purpose.BooleantrueYesNo---true
isDefaultForCombinationMarks this option as the canonical choice for its (kind, medium, targetDirection, targetOutputMode) combination — used by the EM2 migration script to back-fill purpose for migrated gauges, where no user ever made an explicit wording choice. At most one active option should be flagged per combination.BooleanfalseYesNo-Application-layer check recommended: at most one isActive = true row with isDefaultForCombination = true per (kind, medium, targetDirection, targetOutputMode).-true
createdAtTimestamp of creation. Immutable.Timestamp with time zoneSet in codeYesNoISO 8601--2026-07-17T10:00:00Z
updatedAtTimestamp of last update.Timestamp with time zoneSet in codeYesNoISO 8601--2026-07-17T10:00:00Z
createdByActor who created this record.String-YesNotype:actor--user:01960000-0000-7000-8000-000000000099
updatedByActor who last updated this record.String-YesNotype:actor--user:01960000-0000-7000-8000-000000000099

References ​

Discrepancy flagged during migration. This entity's source page has no tenantId and no deletedAt column at all — unlike every other reviewed entity, tenant scoping and soft-delete are entirely absent here. The page gives no explicit rationale (unlike uiLabel, which documents its tenantless design as a deliberate exception). This entity reads as a global/shared configuration table, similar in spirit to uiLabel, but the exception is not stated as such on the page — worth confirming with the author whether this is intentional.

Audited fields ​

Recorded on created (in full) and updated (changed only) — this entity's own Data Attributes Table has no deletedAt at all (a discrepancy flagged on the page itself), so deactivation is expressed as an updated entry on isActive, never a deleted one: kind, medium, translationKey, targetDirection, targetOutputMode, purposeCategory, sortOrder, isActive, isDefaultForCombination.

Excluded: none.

No subjectEntityType/subjectEntityId and no tenantId — global, superadmin-managed configuration, same exception class as uiLabel and the contract-catalog entities. Not registered for entityName resolution (architecture 61-audit-log.md §7.4/§7.6 in the code repo: a valid, permanent state, not a gap). If registered, translationKey is the natural candidate.