Data Layer low complexity Shared Component backend
0
Dependencies
3
Dependents
1
Entities
0
Integrations

Description

Maintains pre-aggregated assignment completion counts per peer mentor per reporting period, eliminating the need for expensive live count queries on every dashboard load. Updated atomically when an assignment is marked complete; also exposes bulk read for coordinator team overviews.

Feature: Assignment Threshold Tracking

assignment-count-store

Responsibilities

  • Store and atomically increment per-mentor period assignment counts
  • Provide fast read access for single mentor and bulk team queries
  • Support period-scoped queries for accurate within-period reporting
  • Invalidate or recalculate counts if an assignment completion is reversed

Interfaces

getCount(mentorId: String, periodId: String): int
incrementCount(mentorId: String, periodId: String): int
decrementCount(mentorId: String, periodId: String): int
getCountsForTeam(localAssociationId: String, periodId: String): MentorCountRecord[]
resetPeriodCounts(orgId: String, periodId: String): void
upsertCount(mentorId: String, periodId: String, count: int): void

Related Data Entities (1)

Data entities managed by this component