Skip to content
Updated Sep 30, 2026 by Pavel Coufal · Owner: analysisdraftentitygauge-managementplatform Edit on GitHub

Entity: distributionRate ​

Entity Type: Database table (platform schema)

Description: Catalogue of electricity distribution rates (distribuční sazby — C01d, C25d, D57d …) as the distributor assigns them to a retail supply point. It is platform-level reference data: identical for every tenant, maintained by the Porsenna superadmin, no tenantId and no RLS — the same precedent as platform.contract_item_type and gaugePurposeOption. Its purpose beyond a label is the tariff scheme: whether the rate bills one band or two decides which tariff series a retail electricity channel records (manual entry, import, remote registers) and which fields the gauge form offers. EM2 held the same 25 rates in rates with three booleans and no validity or administration screen; EM3 keeps the codes, collapses the booleans into tariffScheme, and adds validity so a rate withdrawn by a price decision stays readable on gauges that used it. Large-scale supply points (VN, VVN) do not carry a distribution rate — their tariff bands come from the switches on the gauge (lowTariff, peakTariff). Decided 30 September 2026.

Data Attributes Table ​

Attribute NameDescriptionData TypeDefault ValueRequired (= Nullable)UniqueFormatValidationsIndexExample
idPrimary key of the entity.UUIDGenerated in code (app layer)YesYesUUID v7-Primary Key01960000-0000-7000-8000-000000000501
codeRate code as the distributor and ERÚ price decisions state it.String-YesYesUpper-case letter, two digits, lower-case d — e.g. C25dMax 10 characters; unique among active rows.name: idx_distributionRate_code, type: btree (unique, partial deletedAt IS NULL)C25d
mediumMedium the rate belongs to.StringelectricityYesNoenum — Mediumv1 accepts only electricity; gas uses the TDD class, not a rate.-electricity
supplyTypesSupply types the rate is offered for.Array of String["retail"]YesNoValues from enum — GaugeSupplyTypeNon-empty; v1 contains only retail — VN / VVN never carry a rate.-["retail"]
tariffSchemeHow many tariff bands the rate bills; drives the tariff series of every channel using the rate.String-YesNoenum — TariffSchemeMust be one of the enum values.-dual
nameShort name shown in the form and in lists.String-YesNo-Max 100 characters; non-empty.-C25d
descriptionDistributor's description of the rate.StringnullNoNo-Max 500 characters.-Dvoutarifová sazba s operativním řízením doby platnosti nízkého tarifu
odsDescriptionLonger explanatory text carried over from EM2 rates.ods_description.StringnullNoNo---…
validFromDate from which the rate may be assigned to a supply point.Datemigration date for seeded rowsYesNoISO 8601 date--2026-01-01
validToDate after which the rate is no longer offered for new assignments. Existing gauge history keeps referencing it.DatenullNoNoISO 8601 dateMust be on or after validFrom when set.-null
isActiveWhether the rate is currently offered. Deactivating keeps referential integrity for gauges that reference it.BooleantrueYesNo---true
sortOrderDisplay order within the filtered list.Integer0YesNo---40
createdAtTimestamp of creation. Immutable.Timestamp with time zoneSet in codeYesNoISO 8601--2026-09-30T10:00:00Z
updatedAtTimestamp of last update.Timestamp with time zoneSet in codeYesNoISO 8601--2026-09-30T10:00:00Z
deletedAtSoft-delete timestamp.Timestamp with time zonenullNoNoISO 8601--null
createdByActor who created the record.String-YesNotype:actor--system:seed
updatedByActor who last updated the record.String-YesNotype:actor--user:01960000-0000-7000-8000-000000000099

Notes ​

  • Seed: the 25 rows of EM2 rates (staging, 30 Sep 2026: C01d, C02d, C03d, C25d, C26d, C27d, C35d, C45d, C46d, C55d, C56d, C60d, C61d, C62d, D01d, D02d, D25d, D26d, D27d, D35d, D45d, D55d, D56d, D57d, D61d). tariffScheme = dual where high_tariff AND low_tariff, otherwise single; spec_tariff is 0 on every EM2 row. Seed IDs are reused verbatim by the migration of gauge_rate (same approach as the contract catalogue).
  • Administration: superadmin API GET/POST/PATCH /v1/admin/distribution-rates, permissions platform.distribution-rates.read / .write; a platform-admin page in the same pattern as Ceníky and Výhřevnosti.
  • Usage: gaugeDistributionRateHistory versions the assignment per gauge; the gauge form filters the list by medium and supplyType; Reading Management derives the tariff series of a channel from the rate valid at the reading time (gauge form specification, chapter 3.4).
  • The contract catalogue (platform.contract_item_type) also lists rate codes, but as price line items of a contract (high / low tariff unit price). It is not a registry of rates and does not replace this entity; a later story may link the two by code.