import { Injectable } from '@nestjs/common';
import { BaseDeleteManager } from 'src/core/modules/domain/usecase/managers/base-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';

@Injectable()
export class DeleteGateManager extends BaseDeleteManager<GateEntity> {
  getResult(): string {
    return `Success`;
  }

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

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

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

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

  get entityTarget(): any {
    return GateModel;
  }

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