Notification Settings
Data Entity
Description
Per-user notification preference configuration controlling which notification types and delivery channels (push, email, SMS) are enabled, supporting GDPR consent requirements and user autonomy over communication preferences.
Data Structure
| Name | Type | Description | Constraints |
|---|---|---|---|
id |
uuid |
Primary key identifier for the notification settings record | PKrequiredunique |
user_id |
uuid |
Foreign key to the users table; one-to-one relationship ensuring each user has exactly one settings record | requiredunique |
push_enabled |
boolean |
Master toggle for push notification delivery channel | required |
email_enabled |
boolean |
Master toggle for email notification delivery channel | required |
sms_enabled |
boolean |
Master toggle for SMS notification delivery channel; defaults to false as SMS requires explicit GDPR opt-in under Norwegian ePrivacy regulation | required |
activity_reminders |
json |
Per-channel preferences for activity reminder notifications (e.g., {"push": true, "email": false, "sms": false}) | required |
assignment_alerts |
json |
Per-channel preferences for encrypted assignment dispatch and status notifications | required |
approval_notifications |
json |
Per-channel preferences for expense and activity approval status updates | required |
event_notifications |
json |
Per-channel preferences for event invitations, reminders, and updates | required |
system_announcements |
json |
Per-channel preferences for platform-wide system announcements and maintenance notices | required |
certificate_reminders |
json |
Per-channel preferences for certification expiry and renewal reminders | required |
team_updates |
json |
Per-channel preferences for coordinator team activity and peer mentor status updates | required |
quiet_hours_start |
string |
Start time for do-not-disturb window in HH:mm format (24h), null if quiet hours disabled | - |
quiet_hours_end |
string |
End time for do-not-disturb window in HH:mm format (24h), null if quiet hours disabled | - |
sms_consent_given_at |
datetime |
Timestamp when the user explicitly opted in to SMS notifications; required for GDPR compliance audit trail | - |
created_at |
datetime |
Timestamp when the settings record was created | required |
updated_at |
datetime |
Timestamp of the last settings modification | required |
Database Indexes
idx_notification_settings_user_id
Columns: user_id
Validation Rules
valid_user_reference
error
Validation failed
valid_json_channel_preferences
error
Validation failed
valid_quiet_hours_format
error
Validation failed
sms_consent_timestamp_required
error
Validation failed
unique_user_constraint
error
Validation failed
Business Rules
one_settings_per_user
Each user has exactly one notification_settings record. Created automatically during user account provisioning.
sms_requires_explicit_consent
SMS channel cannot be enabled unless the user explicitly opts in. sms_consent_given_at must be set before sms_enabled can become true. Required under GDPR and Norwegian ePrivacy regulation.
master_toggle_overrides_category
When a master channel toggle (push_enabled, email_enabled, sms_enabled) is disabled, all category-level preferences for that channel are effectively suppressed at delivery time, without modifying the stored per-category values.
quiet_hours_enforcement
Push notifications are deferred (not dropped) during the user's configured quiet hours window. Email and SMS are unaffected.
cascade_delete_on_user_removal
When a user account is deactivated or deleted, the associated notification_settings record is removed.
default_settings_on_creation
New records are initialized with sensible defaults: push and email enabled, SMS disabled, all category preferences set to default JSON values.