import { BaseBatchUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-batch-update-status.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 { PaymentMethodChangeStatusEvent } from '../../entities/event/payment-method-change-status.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

@Injectable()
export class BatchConfirmPaymentMethodManager extends BaseBatchUpdateStatusManager<PaymentMethodEntity> {
  validateData(data: PaymentMethodEntity): Promise<void> {
    return;
  }

  beforeProcess(): Promise<void> {
    return;
  }

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

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

  get entityTarget(): any {
    return PaymentMethodModel;
  }

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

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