import { ReportSnapshot } from '../aggregates/report-snapshot';
import { ReportType, ReportPeriod } from '../value-objects';

export const REPORT_SNAPSHOT_REPOSITORY = Symbol('REPORT_SNAPSHOT_REPOSITORY');

export interface IReportSnapshotRepository {
  save(snapshot: ReportSnapshot): Promise<ReportSnapshot>;
  findById(id: bigint): Promise<ReportSnapshot | null>;
  findByCodeAndPeriodKey(
    reportCode: string,
    periodKey: string,
  ): Promise<ReportSnapshot | null>;
  findByType(type: ReportType): Promise<ReportSnapshot[]>;
  findByCode(reportCode: string): Promise<ReportSnapshot[]>;
  findByPeriod(period: ReportPeriod): Promise<ReportSnapshot[]>;
  findLatestByCode(reportCode: string): Promise<ReportSnapshot | null>;
  findExpired(): Promise<ReportSnapshot[]>;
  deleteExpired(): Promise<number>;
  delete(id: bigint): Promise<void>;
}
