Notifications Table
Component Detail
Data Layer
medium complexity
backend
0
Dependencies
4
Dependents
0
Entities
0
Integrations
Description
Backend repository managing persistence and querying of notification records in the notifications table. Supports paginated inbox retrieval, read-state updates, unread count aggregation, and notification type filtering for the mobile inbox screen.
notifications-table
Responsibilities
- Persist notification records with type, title, body, action payload, and initial unread state
- Retrieve paginated notification history by user ID ordered by created_at descending
- Update read state for a single notification or all notifications for a user
- Return unread notification count per user for badge display
- Support filtering by notification type for focused inbox views
Interfaces
createNotification(userId, type, title, body, actionPayload)
getNotificationsByUserId(userId, page, limit)
markAsRead(notificationId)
markAllAsRead(userId)
getUnreadCount(userId)
getNotificationsByType(userId, type, page, limit)
Relationships
Dependents (4)
Components that depend on this component