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

Entity: weatherStation ​

Entity Type: Database table

Description: Represents a meteorological measurement point that provides climate data (temperature, heating days) used across the system for energy consumption normalisation and reporting. The catalogue is split into two tiers: global stations (tenantId = null), maintained by the superadmin and visible to all tenants; and tenant-owned stations (tenantId set), visible only to their tenant. A global station's data is not tied to any specific provider — origin is tracked per-record via climateData.source, not by station tier. Both tenant-owned and global stations may be connected to the remote connection infrastructure for automated data ingestion. The relationship is stored on remoteEndPoint.weatherStationId — a station may have any number of connected endpoints, each distinguished by measurement type. Assignments of stations to clients are stored in a separate client-station assignment page. Stations with an automated external feed (e.g. ČHMÚ) are identified via wsi, used to pair incoming feed records to this station. Deletion is implemented as soft-delete (deletedAt).

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idPrimary key of the entity.UUIDGenerated in code (app layer)YesYesUUID v7-Primary Key018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
tenantIdTenant this station belongs to. Null = global station visible to all tenants; UUID = tenant-owned station visible only to that tenant.UUID-NoNoUUID v7 or nullForeign Key → tenant when non-null. Null is valid for global stations.name: idx_weatherStation_tenantId, type: btree018fa51f-fda1-79f4-8461-2cb8f1cabc10
nameName of the station as displayed in the UI and station catalogue.String-YesNo-Non-empty, max 255 chars.-Praha-Ruzyně (P1PRUZ01)
latGPS latitude of the station location.Decimal-NoNoDecimal degrees (WGS84)Range −90 to 90.-50.1008
lngGPS longitude of the station location.Decimal-NoNoDecimal degrees (WGS84)Range −180 to 180.-14.2632
altitudeAltitude of the station above sea level in metres. Used for display in the station catalogue.Integer-NoNoMetres above sea level--364
dataAvailableFromYearYear from which short-term climate data is expected to be available for this station. Input to a data-completeness check.Integer-NoNoYYYYReasonable calendar year (e.g. ≥ 1900).-2015
wsiWIGOS Station Identifier — external identifier used to pair the station with an automated data feed.String-NoNo-Not validated against any external registry; format and correctness are the responsibility of whoever enters it.-0-20000-0-11406
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 to the record. Set on insert and updated on every change.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 the record is 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 record.String-YesNotype:actor — e.g. user:uuid or system:migrationNon-empty.-user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
updatedByIdentifier of the actor who last updated the record.String-YesNotype:actor — e.g. user:uuid or system:migrationNon-empty.-system:migration-v25

Audited fields ​

Recorded on created (in full), updated (changed only) and deleted (in full): tenantId, name, lat, lng, altitude, dataAvailableFromYear, wsi.

Excluded: none.

tenantId is included here even though it is normally a pure scoping column, not an audited business fact — for this entity specifically, per its own description, tenantId distinguishes a global station (null) from a tenant-owned one (a UUID), and a station can move between the two states (an ownership change), which is itself a meaningful fact worth a trail entry, not merely which schema the row lives in.

Registered for entityName resolution — resolves to name in the shared weather-station catalogue (architecture 61-audit-log.md §7.4 in the code repo).