Skip to content
Updated Sep 24, 2026 by Barča Dvořáková · Owner: analysisactiveentity Edit on GitHub

Entity: notificationPreference ​

Entity Type: Database table

Description: Per-user notification opt-in/opt-out settings, one row per user, kept on their own table rather than as columns on user. Storage only: the business meaning of each preference (when an email/SMS actually fires, what triggers an "incident") and any UI/API to manage them belongs to a future Notifications feature, not to Users & Access.

One-to-one with user: a user has at most one notificationPreference row. Whether the row is created eagerly (on user creation, with defaults) or lazily (on first preference change) is a Notifications-feature decision, not fixed by this page.

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
userIdThe user these preferences belong to.UUID-YesYesUUID v7FK → user; must exist; one row per user.name: uidx_notificationPreference_userId, type: btree018fa51f-fda1-79f4-8461-2cb8f1cabc10
emailReporting(Out of scope — Notifications feature, not yet analysed.) Per-user opt-in for email reporting. Storage only; no API/UI exposure yet.Boolean-NoNo---true
emailReminder(Out of scope — Notifications feature, not yet analysed.) Per-user opt-in for email reminders. Storage only; no API/UI exposure yet.Boolean-NoNo---true
incidentEmailReporting(Out of scope — Notifications feature, not yet analysed.) Per-user opt-in for incident email reporting. Storage only; no API/UI exposure yet.Boolean-NoNo---false
smsNotificationsEnabled(Out of scope — Notifications feature, not yet analysed.) Per-user opt-in for SMS notifications. Storage only; no API/UI exposure yet.Boolean-NoNo---false
createdAtTimestamp of when the record was created. Immutable after insert.Timestamp with time zonenow() — set in codeYesNoISO 8601Cannot be null; cannot be modified after creation.-2025-03-16T18:00:00Z
updatedAtTimestamp of the last update.Timestamp with time zonenow() — set in codeYesNoISO 8601Cannot be null.-2025-03-16T18:00:00Z
deletedAtTimestamp of soft deletion. Null means the record is active. Once set, immutable.Timestamp with time zone-NoNoISO 8601Immutable once set. Active records: WHERE deletedAt IS NULL-null
createdByIdentifier of the actor who created the record.String-YesNotype:actorNon-empty.-user:018e...
updatedByIdentifier of the actor who last updated the record.String-YesNotype:actorNon-empty.-user:018e...

Audited fields ​

Not yet declared — storage-only, out of scope for Users & Access. The Notifications feature will declare its own "Audited fields" section here (or supersede this note) when it takes this entity on.