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

@Injectable()
export class DeleteTermConditionManager extends BaseDeleteManager<TermConditionEntity> {
  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 TermConditionModel;
  }

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