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

@Injectable()
export class DeleteFaqManager extends BaseDeleteManager<FaqEntity> {
  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 FaqModel;
  }

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