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

Description

Persists duplicate detection events for coordinator audit review as required by the feature specification. Stores each detection with metadata including the triggering activity parameters, the conflicting activity ID, and the user's decision (override or cancel). Enables coordinators to identify patterns of accidental double registration across their local association.

Feature: Duplicate Activity Detection

duplicate-audit-repository

Responsibilities

  • Persist duplicate detection events with full context (params, conflict ID, user decision)
  • Retrieve audit log entries filtered by organization and date range
  • Support coordinator audit review queries for their local association scope

Interfaces

saveDuplicateDetection(entry: DuplicateAuditEntry): Promise<void>
findByOrganization(localAssociationId: string, options: QueryOptions): Promise<DuplicateAuditEntry[]>
findByPeerMentor(peerMentorId: string): Promise<DuplicateAuditEntry[]>
countDetectionsByPeriod(orgId: string, from: Date, to: Date): Promise<number>

Relationships

Dependents (1)

Components that depend on this component

Related Data Entities (1)

Data entities managed by this component