Data Layer low complexity backend
0
Dependencies
2
Dependents
1
Entities
0
Integrations

Description

Data access layer for the assignment_threshold_configs table, providing typed read and write operations for threshold configurations including versioned records. Handles all SQL queries related to fetching active configs, listing versions, and persisting new config snapshots.

Feature: Assignment Threshold Tracking

threshold-config-repository

Responsibilities

  • Read active threshold configuration for a given organization
  • Insert new versioned threshold configuration records
  • Query config version history for an organization
  • Fetch specific config version by ID for historical reporting

Interfaces

findActiveByOrgId(orgId: String): ThresholdConfigRecord?
findVersionById(configId: String): ThresholdConfigRecord?
findAllVersionsByOrgId(orgId: String): ThresholdConfigRecord[]
insert(record: ThresholdConfigRecord): ThresholdConfigRecord
deactivate(configId: String): void
findByOrgIdAndPeriod(orgId: String, periodStart: DateTime): ThresholdConfigRecord?

Relationships

Dependents (2)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component