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

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

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

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

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

  get entityTarget(): any {
    return FaqModel;
  }

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

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