import { Injectable } from '@nestjs/common';
import { BaseDeleteManager } from 'src/core/modules/domain/usecase/managers/base-delete.manager';
import { SeasonPeriodEntity } from '../../entities/season-period.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { SeasonPeriodModel } from '../../../data/models/season-period.model';
import { SeasonPeriodDeletedEvent } from '../../entities/event/season-period-deleted.event';

@Injectable()
export class DeleteSeasonPeriodManager extends BaseDeleteManager<SeasonPeriodEntity> {
  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 SeasonPeriodModel;
  }

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