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

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

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

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

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

  get entityTarget(): any {
    return GateModel;
  }

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

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