import { BaseBatchDeleteManager } from 'src/core/modules/domain/usecase/managers/base-batch-delete.manager';
import { RefundEntity } from '../../entities/refund.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { RefundModel } from '../../../data/models/refund.model';
import { RefundDeletedEvent } from '../../entities/event/refund-deleted.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

@Injectable()
export class BatchDeleteRefundManager extends BaseBatchDeleteManager<RefundEntity> {
  async beforeProcess(): Promise<void> {
    return;
  }

  async validateData(data: RefundEntity): Promise<void> {
    return;
  }

  async afterProcess(): Promise<void> {
    return;
  }

  get validateRelations(): validateRelations[] {
    return [];
  }

  get entityTarget(): any {
    return RefundModel;
  }

  get eventTopics(): EventTopics[] {
    return [
      {
        topic: RefundDeletedEvent,
      },
    ];
  }

  getResult(): BatchResult {
    return this.result;
  }
}
