feat(alerts): Postgres repo — read_at/deleted_at columns, filter params, new mutations
- save/rowMapper read+write read_at and deleted_at - listForInbox: tri-state acked/read filters; always excludes deleted - countUnreadBySeverity: rewire without alert_reads join, preserve zero-fill - new: markRead/bulkMarkRead/softDelete/bulkSoftDelete/bulkAck/restore - delete PostgresAlertReadRepository + its bean - restore zero-fill Javadoc on interface - mechanical compile-fixes in AlertController, InAppInboxQuery, AlertControllerIT, InAppInboxQueryTest; Task 6 owns the rewrite - PostgresAlertReadRepositoryIT stubbed @Disabled; Task 7 owns migration Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -43,6 +43,8 @@ public interface AlertInstanceRepository {
|
||||
* Count unread alert instances visible to the user, grouped by severity.
|
||||
* Visibility: targets user directly, or via one of the given groups/roles.
|
||||
* "Unread" = {@code read_at IS NULL AND deleted_at IS NULL}.
|
||||
* Always returns a map with an entry for every {@link AlertSeverity} (value 0 if no rows),
|
||||
* so callers never need null-checks.
|
||||
*/
|
||||
Map<AlertSeverity, Long> countUnreadBySeverity(UUID environmentId,
|
||||
String userId,
|
||||
|
||||
Reference in New Issue
Block a user