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

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

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

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

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

  get entityTarget(): any {
    return ItemCategoryModel;
  }

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

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