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

@Injectable()
export class BatchDelete{{pascalCase name}}Manager extends BaseBatchDeleteManager<{{pascalCase name}}Entity> {
  async beforeProcess(): Promise<void> {
    return;
  }

  async validateData(data: {{pascalCase name}}Entity): Promise<void> {
    return;
  }

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

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

  get entityTarget(): any {
    return {{pascalCase name}}Model;
  }

  get eventTopics(): EventTopics[] {
    return [
      {
        topic: {{pascalCase name}}DeletedEvent,
      },
    ];
  }

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