Skip to main content

Data Model: hbf-notifications

Domain objects used by this service. Full schemas: docs/domain-model.md

Objects This Service Uses

ObjectAccessKey Fields Used
Organizationreads via hbf-core-apiid, displayName

Local Entities

EntityTableDBKey Fields
NotificationnotificationMySQLid (auto), userId, organizationId, message, notificationType (enum), navLink, iconUrl, createdDate, updatedDate
NotificationReadDetailsnotification_read_detailsMySQLid (auto), userId, notification (FK, CASCADE), createdDate, updatedDate

Key Constraints

  • IDX_userId_organizationId index on Notification(userId, organizationId).
  • IDX_notification_userId index on NotificationReadDetails(notification, userId).
  • Unique constraint on NotificationReadDetails(userId, notification) prevents duplicate read records.

Notes

  • Minimal interaction with hbf-core. Only reads Organization for context.
  • Notification and NotificationReadDetails inherit from a shared AbstractEntity base class that provides id, createdDate, and updatedDate.
  • NotificationReadDetails tracks per-user read status for each notification.
  • Uses hbf-core-api HBFCoreApi client for Organization lookup.