import { BaseBatchDeleteManager } from 'src/core/modules/domain/usecase/managers/base-batch-delete.manager';
import { DataSchedulingEntity } from '../../entities/data-scheduling.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { DataSchedulingModel } from '../../../data/models/data-scheduling.model';
import { DataSchedulingDeletedEvent } from '../../entities/event/data-scheduling-deleted.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

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

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

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

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

  get entityTarget(): any {
    return DataSchedulingModel;
  }

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

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