Flag Store
Component Detail
Data Layer
low complexity
backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations
Description
Data access layer for activity flag state, persisted as a status field and flag_reason column on the activities table alongside a flagged_by foreign key. Provides querying, filtering, and count operations consumed by the flagging service and the admin UI.
flag-store
Responsibilities
- Read and write flag status, reason, and flagged_by on activity records
- Query flagged activities with filtering by org, reason, and age
- Persist flag resolution state and resolver identity
- Support count queries for dashboard KPI aggregation
Interfaces
setFlag(activityId, reason, flaggedByUserId)
clearFlag(activityId, resolvedByUserId, action)
findFlagged(orgId, filters)
countFlagged(orgId)
findByReason(reason, orgId)
getFlagDetails(activityId)
findFlaggedOlderThan(days, orgId)
Relationships
Dependents (3)
Components that depend on this component