import { BaseBatchUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-batch-update-status.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 { SeasonPeriodChangeStatusEvent } from '../../entities/event/season-period-change-status.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

@Injectable()
export class BatchConfirmSeasonPeriodManager extends BaseBatchUpdateStatusManager<SeasonPeriodEntity> {
  validateData(data: SeasonPeriodEntity): Promise<void> {
    return;
  }

  beforeProcess(): Promise<void> {
    return;
  }

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

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

  get entityTarget(): any {
    return SeasonPeriodModel;
  }

  get eventTopics(): EventTopics[] {
    return [
      {
        topic: SeasonPeriodChangeStatusEvent,
        relations: ['season_type'],
      },
    ];
  }

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