Notification Cooldown Log Table
Component Detail
Data Layer
low complexity
backend
0
Dependencies
1
Dependents
0
Entities
0
Integrations
Description
Notification Cooldown Log Table
notification-cooldown-log-table
Responsibilities
- Record each dispatched scenario notification with scenario ID, user ID, entity ID, and timestamp
- Support cooldown window queries to enforce idempotency before re-triggering
- Enable scheduled purging of expired cooldown records to control table growth
Interfaces
recordDispatch(scenarioId: string, userId: string, entityId: string): Promise<void>
isWithinCooldown(scenarioId: string, userId: string, entityId: string, cooldownHours: number): Promise<boolean>
purgeExpired(olderThanDays: number): Promise<number>