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

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

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

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

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

  get entityTarget(): any {
    return PaymentMethodModel;
  }

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

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