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

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

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

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

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

  get entityTarget(): any {
    return TermConditionModel;
  }

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

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