Appearance
Entity: contractSupplier
Entity: contractSupplier
Description: A per-tenant catalogue of supplier names referenced by contract.supplierId. Represents only the name of an external energy supplier — not a full legal entity with contact/billing data.
Entity Type: database table
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 | 018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2 |
tenantId | Tenant this supplier name belongs to. Suppliers are per-tenant, not shared across tenants. | UUID | - | Yes | No | UUID v7 | Foreign Key: tenant; must exist | name: idx_contractSupplier_tenantId, type: btree | 018fa51f-fda1-79f4-8461-2cb8f1cabc10 |
name | Display name of the supplier. | string | - | Yes | No | - | Must not be empty | - | ČEZ Prodej |
createdAt | Timestamp of when the record was created. Immutable after insert. | timestamp with time zone | now() — set in code | Yes | No | ISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZ | Cannot be null; cannot be modified after creation | - | 2025-03-16T18:00:00Z |
updatedAt | Timestamp of the last update to the record. Set on insert (equal to createdAt) and updated on every change. | timestamp with time zone | now() — set in code | Yes | No | ISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZ | Cannot be null | - | 2025-03-16T18:00:00Z |
deletedAt | Timestamp of soft deletion. Null means the record is active. Once set, this value is immutable and cannot be changed. | timestamp with time zone | - | No | No | ISO 8601 — YYYY-MM-DDTHH:mm:ss.SSSZ | Immutable once set. Active records: WHERE deletedAt IS NULL | - | 2025-06-01T09:00:00Z |
createdBy | Identifier of the actor who created the record (user ID or system actor). | string | - | Yes | No | type:actor — e.g. user:uuid or system:migration | Non-empty | - | system:migration-v1 |
updatedBy | Identifier of the actor who last updated the record (user ID or system actor). | string | - | Yes | No | type:actor — e.g. user:uuid or system:migration | Non-empty | - | user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2 |
Audited fields
Recorded on created only — this entity has no update or delete endpoint: name.
Excluded: none.
Registered for entityName resolution — resolves to name (architecture 61-audit-log.md §7.4 in the code repo).