import { BenefitAssessmentRecord } from '@/domain/aggregates'
import { AuthorizationId, UserId, Month, RegionCode } from '@/domain/value-objects'
import { RoleType } from '@/domain/enums'

export const BENEFIT_ASSESSMENT_RECORD_REPOSITORY = Symbol('IBenefitAssessmentRecordRepository')

export interface IBenefitAssessmentRecordRepository {
  save(record: BenefitAssessmentRecord): Promise<void>
  saveAll(records: BenefitAssessmentRecord[]): Promise<void>
  findById(id: string): Promise<BenefitAssessmentRecord | null>
  findByAuthorizationAndMonth(
    authorizationId: AuthorizationId,
    month: Month,
  ): Promise<BenefitAssessmentRecord | null>
  findByUserAndMonth(userId: UserId, month: Month): Promise<BenefitAssessmentRecord[]>
  findByMonthAndRoleType(
    month: Month,
    roleType: RoleType,
  ): Promise<BenefitAssessmentRecord[]>
  findByMonthAndRegion(
    month: Month,
    roleType: RoleType,
    regionCode: RegionCode,
  ): Promise<BenefitAssessmentRecord[]>
  findByAuthorization(authorizationId: AuthorizationId): Promise<BenefitAssessmentRecord[]>
  delete(id: string): Promise<void>
}
