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

@Injectable()
export class DeleteItemRateManager extends BaseDeleteManager<ItemRateEntity> {
  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 ItemRateModel;
  }

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