Data Layer low complexity mobilebackend
0
Dependencies
2
Dependents
0
Entities
0
Integrations

Description

Drift table definition and repository mirroring the notification_settings PostgreSQL table. Stores one preferences row per user with a versioned JSON column for category-channel overrides and UTC offset fields for quiet hours. Schema versioning allows new notification categories to be added with safe defaults without requiring row migrations.

Feature: Notification Settings

notification-settings-table

Responsibilities

  • Define Drift table schema matching the notification_settings PostgreSQL table
  • Provide CRUD and watch operations for user notification preferences
  • Store quiet hours as UTC offset start and end fields
  • Maintain a schema_version field to support non-breaking additions of new categories
  • Return cached rows for offline reads when the backend is unreachable

Interfaces

getByUserId(userId) → NotificationSettingsRow?
upsert(settings) → Future<void>
watchByUserId(userId) → Stream<NotificationSettingsRow?>
delete(userId) → Future<void>

Relationships

Dependents (2)

Components that depend on this component