import { type ReportEntity } from '../entities/report.entity';
import { type ReportStatus } from '../enums/report-status.enum';
import { type ReportType } from '../enums/report-type.enum';

export const REPORT_REPOSITORY = Symbol('REPORT_REPOSITORY');

export interface ListReportsFilter {
  userId: string;
  type?: ReportType;
  status?: ReportStatus;
  limit?: number;
  offset?: number;
}

export interface IReportRepository {
  findById(id: string): Promise<ReportEntity | null>;
  findByUserId(filter: ListReportsFilter): Promise<{ reports: ReportEntity[]; total: number }>;
  save(entity: ReportEntity): Promise<void>;
  update(entity: ReportEntity): Promise<void>;
  delete(id: string): Promise<void>;
  countByUserInPeriod(userId: string, periodStart: Date, periodEnd: Date): Promise<number>;
}
