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

Entity: contractItemAllowedTypeRate ​

Entity: contractItemAllowedTypeRate

Description: A pure validation join between contractItemType and contractItemRate, defining which pricing units are valid for a given line-item type (e.g. "vodné" may only be priced in Kč/m³, never Kč/MWh). Used to constrain the selectable rate options when a contractItem is created or edited.

Entity Type: database table

Note — no tenantId (deviation #17). This entity intentionally has no tenantId — it is structural metadata describing valid type/rate combinations, not tenant data.

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
contractItemTypeIdThe line-item type this combination applies to.UUID-YesNo (unique only as part of the composite pair below)UUID v7Foreign Key: contractItemType; must exist-018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
contractItemRateIdThe pricing unit allowed for this line-item type.UUID-YesNo (unique only as part of the composite pair below)UUID v7Foreign Key: contractItemRate; must exist-018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2
createdAtTimestamp of entity creation. Immutable.timestamp with time zonenow()YesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZ--2026-01-15T09:00:00Z
updatedAtTimestamp of last entity update. Mutable.timestamp with time zonenow()YesNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZ--2026-01-15T09:00:00Z
deletedAtTimestamp of entity soft delete. Once set, immutable.timestamp with time zone-NoNoISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZImmutable once set. Active records: WHERE deletedAt IS NULL-null
createdByIdentifier of the author who created this record.string-YesNotype:actor--user:c2d3f586-1c9a-4f5f-b9ae-45f2c4f69f7e
updatedByIdentifier of the author who last updated this record.string-YesNotype:actor--system:migration-v1

Composite uniqueness. The combination (contractItemTypeId, contractItemRateId) must be unique among active (non-deleted) records. This requires its own composite unique constraint (implemented as a unique index by the database) — this is a data-integrity requirement, not a query-performance index, and is kept regardless of table size.

Note — indexing. Beyond the composite uniqueness constraint above, no additional single-column indexes on contractItemTypeId or contractItemRateId are defined. This is a small, global validation table (well under a few hundred rows) — a sequential scan is not a performance concern.

Audited fields ​

Recorded on created (in full) and deleted (in full) — a pure validation join between two catalogues; there is no field on an existing pairing that could be changed, only added or removed: contractItemTypeId, contractItemRateId.

Excluded: none.

No subjectEntityType/subjectEntityId — this is global structural metadata (no tenantId, per this entity's own deviation note), not filed against a tenant-owned record.

Not registered for entityName resolution — a validation/join row (contractItemTypeId × contractItemRateId), not a named record.