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

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

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

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

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

  get entityTarget(): any {
    return ItemRateModel;
  }

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

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