import { BaseBatchUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-batch-update-status.manager';
import { NewsEntity } from '../../entities/news.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { NewsModel } from '../../../data/models/news.model';
import { NewsChangeStatusEvent } from '../../entities/event/news-change-status.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

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

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

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

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

  get entityTarget(): any {
    return NewsModel;
  }

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

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