Appearance
Entity: buildingEnergyProfile
Entity Type: Database table
Description: Current administrative and energy-related metadata for a building. Stores energy performance certificate data (PENB), programme enrolments (EPC, ISO, OPZP), installed power, and building envelope coefficients. One record per building (1:1 relationship). Versioned attributes are tracked in separate append-only history tables (see Note below); this table always reflects the latest state. A denormalised tenantId is stored so the table can carry a uniform Row-Level Security policy; the application keeps it consistent with the parent building.
Content resolution note: Confluence held two pages for this entity — the original buildingEnergyProfile (id 524845062, last modified 2026-06-16) and buildingEnergyProfile rev. 2 (id 554237957, last modified 2026-06-17). Rev. 2 is a superseding redesign of the same entity: it switches from an ad-hoc audit approach to an explicit "current + history" pattern and adds four append-only history tables. This document is migrated from rev. 2, the current/authoritative version; the original page's content is superseded and not separately preserved here.
Rev. 2 also defines four related append-only history entities (buildingEnergyProfilePenbHistory, buildingEnergyProfileEnvelopeHistory, buildingEnergyProfileProgramHistory, buildingEnergyProfileLightingHistory), each a child of this entity via buildingEnergyProfileId. These are genuinely separate database tables, not JSONB columns of buildingEnergyProfile, and were not in this migration's assigned page list — they are not documented as sibling files here and still need their own entity folders when migrated. See the Confluence source (rev. 2) for their full DATs in the meantime.
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 | Yes | Yes | UUID v4 | - | Primary Key | a1b2c3d4-… |
| buildingId | The building this profile belongs to. One profile per building. | UUID | - | Yes | Yes | UUID v4 | Foreign Key → building; must exist; unique (1:1) | name: idx_buildingEnergyProfile_buildingId, type: btree | b2c3d4e5-… |
| tenantId | Tenant that owns this record. Denormalised from building for Row-Level Security. Must equal the parent building's tenantId; enforced by the application on insert. | UUID | - | Yes | No | UUID v4 | Foreign Key → tenant; must exist; must equal parent building.tenantId | name: idx_buildingEnergyProfile_tenantId, type: btree | e5f6a7b8-… |
| floorCount | Total number of above-ground floors in the building. | Integer | null | No | No | smallint | Min 1 | - | 3 |
| factorAv | Ratio of building envelope surface area to enclosed volume (A/V, m⁻¹). Used in energy performance calculations. Migrated as-is from legacy factor_av column on building_properties. | Decimal | null | No | No | decimal(10,4) | Min 0 | - | 0.3500 |
| installedPowerKw | Installed power of the main energy source (kW), parsed from legacy rated_power_source. Populated only when the legacy value could be parsed into a single numeric value. See installedPowerRaw for the original legacy string. | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 250.00 |
| installedPowerUnit | Unit of installed power, parsed from legacy rated_power_source (e.g. "kW", "kWh"). Populated only when the legacy value could be successfully parsed. Null when parse failed or legacy field was empty. | String | null | No | No | - | Max 20 characters | - | kW |
| installedPowerRaw | Original free-text value of legacy rated_power_source, migrated as-is. Preserved to avoid data loss when the value could not be parsed into a number + unit. Null when the legacy field was empty. | String | null | No | No | - | Max 255 characters | - | 2x50kWh |
| uemCalculated | Calculated heat transfer coefficient of the building envelope (W/m²·K). | Decimal | null | No | No | decimal(8,4) | Min 0 | - | 0.3200 |
| uemReference | Reference heat transfer coefficient for a comparable standard building (W/m²·K). | Decimal | null | No | No | decimal(8,4) | Min 0 | - | 0.4500 |
| penbClass | Energy performance classification from the building's energy performance certificate (PENB). | String | null | No | No | - | One of: A, B, C, D, E, F, G | - | C |
| penbTotalEnergy | PENB: total delivered energy demand (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 180.00 |
| penbTotalEnergyRef | PENB: reference value for total energy demand (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 200.00 |
| penbNonRenewableEnergy | PENB: non-renewable primary energy demand (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 150.00 |
| penbNonRenewableEnergyRef | PENB: reference value for non-renewable primary energy (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 170.00 |
| penbHeatingConsumption | PENB: specific delivered energy for heating (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 90.00 |
| penbHotWaterConsumption | PENB: specific delivered energy for hot water (kWh/m²/year). | Decimal | null | No | No | decimal(10,2) | Min 0 | - | 30.00 |
| rvoCount | Number of public lighting control cabinets (rozvaděče veřejného osvětlení). Applicable to buildings of type publicLighting only. | Integer | null | No | No | - | Min 0; only valid when building.type = publicLighting | - | 12 |
| operatingTime | Legacy free-text description of the building's typical operating hours, migrated as-is from EM2. Non-binding — the structured schedule in buildingSchedule takes precedence in all system logic. Not versioned — stored only on the main entity. | String | null | No | No | - | Max 255 characters | - | Mo–Fr 07:00–18:00 |
| classification1 | Custom classification label 1 (Jiné 1). Tenant-defined, free text. | String | null | No | No | - | Max 255 characters | - | Green building |
| classification1Since | Date from which classification1 applies. | Date | null | No | No | YYYY-MM-DD | - | - | 2020-01-01 |
| classification2 | Custom classification label 2 (Jiné 2). Tenant-defined, free text. | String | null | No | No | - | Max 255 characters | - | ISO 50001 scope |
| classification2Since | Date from which classification2 applies. | Date | null | No | No | YYYY-MM-DD | - | - | 2021-06-01 |
| epcEnrolled | Indicates whether the building is enrolled in an Energy Performance Contracting programme. | Boolean | false | Yes | No | - | - | - | false |
| epcFrom | Start date of the EPC programme enrolment. | Date | null | No | No | YYYY-MM-DD | Required when epcEnrolled = true | - | 2022-01-01 |
| isoCertified | Indicates whether the building holds an ISO energy management certification. | Boolean | false | Yes | No | - | - | - | true |
| isoFrom | Date from which ISO certification is valid. | Date | null | No | No | YYYY-MM-DD | Required when isoCertified = true | - | 2021-06-01 |
| opzpEnrolled | Indicates whether the building is part of the OPZP environmental programme. | Boolean | false | Yes | No | - | - | - | false |
| opzpFrom | Start date of OPZP programme enrolment. | Date | null | No | No | YYYY-MM-DD | Required when opzpEnrolled = true | - | 2020-03-15 |
| legacyId | Legacy-system identifier; migration provenance. | String | null | No | No | - | - | - | 5502 |
| createdAt | Timestamp of when the record was created. | Timestamp | now() | Yes | No | YYYY-MM-DDTHH:mm:ss.SSS+00 | - | - | 2024-03-01T08:00:00.000+00 |
| updatedAt | Timestamp of the last update to the record. | Timestamp | now() | Yes | No | YYYY-MM-DDTHH:mm:ss.SSS+00 | - | - | 2024-06-15T14:22:00.000+00 |
| createdBy | Identifier of the actor who created the record (user ID or system). | String | system | Yes | No | - | Non-empty | - | user:a1b2c3d4 / system |
| updatedBy | Identifier of the actor who last updated the record (user ID or system). | String | system | Yes | No | - | Non-empty | - | user:a1b2c3d4 / system |
Note: source page has no deletedAt column for this entity. Documented as given; not added.
Note: the rev. 2 source page's prose says attributes are "versioned in 5 logical groups" but only 4 history tables/groups are actually defined in the body (PENB, Envelope, Programmes, Lighting) — a discrepancy in the source itself, flagged here rather than guessed at.
Audited fields
Recorded on created (in full), updated (changed only) and deleted (in full): floorCount, factorAv, installedPowerRaw, installedPowerKw, installedPowerUnit, uemCalculated, uemReference, penbClass, penbTotalEnergy, penbTotalEnergyRef, penbNonRenewableEnergy, penbNonRenewableEnergyRef, penbHeatingConsumption, penbHotWaterConsumption, rvoCount, operatingTime, classification1, classification1Since, classification2, classification2Since, epcEnrolled, epcFrom, isoCertified, isoFrom, opzpEnrolled, opzpFrom, legacyId.
Excluded: none.
Not registered for entityName resolution — one row per building (buildingId unique); described via the building it belongs to, not a name of its own.