import { Injectable } from '@nestjs/common';
import { BaseDeleteManager } from 'src/core/modules/domain/usecase/managers/base-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';

@Injectable()
export class DeleteRefundManager extends BaseDeleteManager<RefundEntity> {
  getResult(): string {
    return `Success`;
  }

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

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

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

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

  get entityTarget(): any {
    return RefundModel;
  }

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