import { Injectable } from '@nestjs/common';
import { BaseUpdateManager } from 'src/core/modules/domain/usecase/managers/base-update.manager';
import { SeasonTypeEntity } from '../../entities/season-type.entity';
import { SeasonTypeModel } from '../../../data/models/season-type.model';
import { SeasonTypeUpdatedEvent } from '../../entities/event/season-type-updated.event';
import {
  EventTopics,
  columnUniques,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';

@Injectable()
export class UpdateSeasonTypeManager extends BaseUpdateManager<SeasonTypeEntity> {
  async validateProcess(): Promise<void> {
    return;
  }

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

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

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

  get uniqueColumns(): columnUniques[] {
    return [{ column: 'name' }];
  }

  get entityTarget(): any {
    return SeasonTypeModel;
  }

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