Appearance
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 Name | Description | Data Type | Default Value | Required (= Nullable) | Unique | Format | Validations | Index | Example |
|---|---|---|---|---|---|---|---|---|---|
| id | Primary key of the entity. | UUID | Generated in code (app layer) | Yes | Yes | UUID v7 | - | Primary Key | 01960000-0000-7000-8000-000000000501 |
| code | Rate code as the distributor and ERÚ price decisions state it. | String | - | Yes | Yes | Upper-case letter, two digits, lower-case d — e.g. C25d | Max 10 characters; unique among active rows. | name: idx_distributionRate_code, type: btree (unique, partial deletedAt IS NULL) | C25d |
| medium | Medium the rate belongs to. | String | electricity | Yes | No | enum — Medium | v1 accepts only electricity; gas uses the TDD class, not a rate. | - | electricity |
| supplyTypes | Supply types the rate is offered for. | Array of String | ["retail"] | Yes | No | Values from enum — GaugeSupplyType | Non-empty; v1 contains only retail — VN / VVN never carry a rate. | - | ["retail"] |
| tariffScheme | How many tariff bands the rate bills; drives the tariff series of every channel using the rate. | String | - | Yes | No | enum — TariffScheme | Must be one of the enum values. | - | dual |
| name | Short name shown in the form and in lists. | String | - | Yes | No | - | Max 100 characters; non-empty. | - | C25d |
| description | Distributor's description of the rate. | String | null | No | No | - | Max 500 characters. | - | Dvoutarifová sazba s operativním řízením doby platnosti nízkého tarifu |
| odsDescription | Longer explanatory text carried over from EM2 rates.ods_description. | String | null | No | No | - | - | - | … |
| validFrom | Date from which the rate may be assigned to a supply point. | Date | migration date for seeded rows | Yes | No | ISO 8601 date | - | - | 2026-01-01 |
| validTo | Date after which the rate is no longer offered for new assignments. Existing gauge history keeps referencing it. | Date | null | No | No | ISO 8601 date | Must be on or after validFrom when set. | - | null |
| isActive | Whether the rate is currently offered. Deactivating keeps referential integrity for gauges that reference it. | Boolean | true | Yes | No | - | - | - | true |
| sortOrder | Display order within the filtered list. | Integer | 0 | Yes | No | - | - | - | 40 |
| createdAt | Timestamp of creation. Immutable. | Timestamp with time zone | Set in code | Yes | No | ISO 8601 | - | - | 2026-09-30T10:00:00Z |
| updatedAt | Timestamp of last update. | Timestamp with time zone | Set in code | Yes | No | ISO 8601 | - | - | 2026-09-30T10:00:00Z |
| deletedAt | Soft-delete timestamp. | Timestamp with time zone | null | No | No | ISO 8601 | - | - | null |
| createdBy | Actor who created the record. | String | - | Yes | No | type:actor | - | - | system:seed |
| updatedBy | Actor who last updated the record. | String | - | Yes | No | type: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=dualwherehigh_tariff AND low_tariff, otherwisesingle;spec_tariffis 0 on every EM2 row. Seed IDs are reused verbatim by the migration ofgauge_rate(same approach as the contract catalogue). - Administration: superadmin API
GET/POST/PATCH /v1/admin/distribution-rates, permissionsplatform.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
mediumandsupplyType; 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 bycode.