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

Entity: clientEmissionFactor ​

Entity Definition ​

  • Entity Name: clientEmissionFactor
  • Entity Type: Database table
  • Description: Tier-2 client-level override for CO₂ emission factors. Structurally identical to the client scope of calorificValue but represents a separate domain — emission factors express the CO₂ equivalent emitted per unit of energy consumed (e.g. t CO₂/MWh). The three-tier resolution is: per-gauge individual → client override (this entity) → system default.

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idPrimary keyUUIDGenerated in code (app layer)YesYesUUID v7-Primary Key018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
tenantIdTenant this record belongs to.UUID-YesNoUUID v7FK → tenant; must existname: idx_client_emission_factor_tenantId, type: btree018fa51f-fda1-79f4-8461-2cb8f1cabc10
clientIdClient this override applies toUUID-YesNoUUID v7FK → client; must exist — see clientname: idx_client_emission_factor_clientId, type: btree018fa51f-fda1-79f4-8461-2cb8f1cabc10
mediumEnergy medium this factor applies toString-YesNoSee Enum - GaugeMediumMust be a valid GaugeMedium string valuename: idx_client_emission_factor_clientId_medium_primarySource, type: btree (unique)electricity
primarySourceEnergy medium this factor applies toInteger-YesNoSee Enum - PrimarySourceMust be a valid PrimarySource integer value. Composite unique with (clientId, medium).-17
valueEmission factor value (CO₂ equivalent per unit of energy)Float-YesNo-Positive number-0.205
unitFromSource unit (energy unit)Integer-YesNoSee Enum - UnitMust be a valid Unit integer value-2
unitToTarget unit (CO₂ unit — typically t = 5)Integer-YesNoSee Enum - UnitMust be a valid Unit integer value-5
createdAtTimestamp of when the record was created. Immutable after insert.Timestamp with time zonenow() — set in codeYesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZCannot be null; cannot be modified after creation-2025-03-16T18:00:00Z
updatedAtTimestamp of the last update.Timestamp with time zonenow() — set in codeYesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZCannot be null-2025-03-16T18:00:00Z
deletedAtTimestamp of soft deletion. Null means active. Once set, immutable.Timestamp with time zone-NoNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZImmutable once set. Active records: WHERE deletedAt IS NULL-2025-06-01T09:00:00Z
createdByIdentifier of the actor who created the recordString-YesNotype:actorNon-empty-user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
updatedByIdentifier of the actor who last updated the recordString-YesNotype:actorNon-empty-user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2

Note: same copy/paste artefact as the migrated clientCalorificValue page — the source page's primarySource row Description reads "Energy medium this factor applies to", duplicating the medium row's description instead of describing the primary-source concept. Carried over verbatim.

Audited fields ​

Recorded on created (in full), updated (changed only) and deleted (in full): clientId, medium, primarySource, value, unitFrom, unitTo.

Excluded: none.

Structurally identical to clientCalorificValue — same natural-key caveat applies to clientId.

Not registered for entityName resolution, and has no independent human-readable attribute to register — identified by its clientId/medium/primarySource scope.