import { BaseBatchDeleteManager } from 'src/core/modules/domain/usecase/managers/base-batch-delete.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 { GateDeletedEvent } from '../../entities/event/gate-deleted.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

@Injectable()
export class BatchDeleteGateManager extends BaseBatchDeleteManager<GateEntity> {
  async beforeProcess(): Promise<void> {
    return;
  }

  async validateData(data: GateEntity): Promise<void> {
    return;
  }

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

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

  get entityTarget(): any {
    return GateModel;
  }

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

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