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

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

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

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

  get validateRelations(): validateRelations[] {
    return [
      {
        relation: 'items',
        message:
          'Gagal! tidak dapat mengubah tipe item karena sudah berelasi dengan item',
      },
    ];
  }

  get entityTarget(): any {
    return ItemQueueModel;
  }

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

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