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

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

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

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

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

  get entityTarget(): any {
    return BannerModel;
  }

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

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