Appearance
Entity: clientNotificationMatrix
Entity Definition
- Entity Name:
clientNotificationMatrix - Entity Type: Database table
- Description: Stores the per-client notification dispatch configuration. Each row represents one cell in the matrix — a specific (notificationType, roleKey) combination — and records whether notifications of that type are dispatched to users of that role, and in what delivery form. A missing row is treated as the system default for that cell. The delivery form is stored per notification type, not per cell.
Data Attributes Table
| Attribute Name | Description | Data Type | Default Value | Required (= Nullable) | Unique | Format | Validations | Index | Example |
|---|---|---|---|---|---|---|---|---|---|
| id | Primary key | UUID | Generated in code (app layer) | Yes | Yes | UUID v7 | - | Primary Key | 018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2 |
| tenantId | Tenant this record belongs to. | UUID | - | Yes | No | UUID v7 | FK → tenant; must exist | name: idx_client_notification_matrix_tenantId, type: btree | 018fa51f-fda1-79f4-8461-2cb8f1cabc10 |
| clientId | Client this matrix row belongs to | UUID | - | Yes | No | UUID v7 | FK → client; must exist — see client | name: idx_client_notification_matrix_clientId, type: btree | 018fa51f-fda1-79f4-8461-2cb8f1cabc10 |
| notificationType | The notification type this row configures (e.g. readingDueReminder, gaugeLimitOverflow) | String | - | Yes | No | camelCase string | Non-empty; must be a known notification type; unique with (clientId, roleKey) | name: idx_client_notification_matrix_clientId_type, type: btree | gaugeLimitOverflow |
| roleKey | User role this row applies to | String | - | Yes | No | camelCase string | Non-empty; must be a known role key (admin, manager, worker, technician, accountant) | - | manager |
| enabled | Whether notifications of this type are dispatched to users with this role | Boolean | - | Yes | No | - | - | - | true |
| deliveryForm | How this notification type is delivered. Applies to all roles — stored per notificationType, not per role cell. | Enum | - | Yes | No | Enum - NotificationDeliveryForm | Must be a valid NotificationDeliveryForm value | - | immediate |
| 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. | 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 active. Once set, immutable. | 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 | String | - | Yes | No | type:actor | Non-empty | - | user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2 |
| updatedBy | Identifier of the actor who last updated the record | String | - | Yes | No | type:actor | Non-empty | - | user:018ed0b3-c298-7c7a-96d5-8b36f5a7f8d2 |
Ambiguity: both
notificationTypeanddeliveryFormreference value sets ("a known notification type"; "Enum - NotificationDeliveryForm") with no linked Confluence page and no enumeration of legal values given on this page. Neither the full set of notification types nor of delivery-form values could be confirmed from this source — recommend locating or creating those catalog pages separately.
Audited fields
Recorded on created (in full), updated (changed only) and deleted (in full): clientId, notificationType, roleKey, enabled, deliveryForm.
Excluded: none.
Every entry would carry subjectEntityType = client / subjectEntityId = clientId — one matrix cell's toggle is a client-level configuration change.
Not registered for entityName resolution, and has no independent human-readable attribute to register — identified by its clientId/notificationType/roleKey scope.