import { BaseBatchUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-batch-update-status.manager';
import { UserPrivilegeEntity } from '../../../entities/user-privilege.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { UserPrivilegeModel } from '../../../../data/models/user-privilege.model';
import { UserPrivilegeChangeStatusEvent } from '../../../entities/event/user-privilege-change-status.event';
import { BatchResult } from 'src/core/response/domain/ok-response.interface';
import { Injectable } from '@nestjs/common';

@Injectable()
export class BatchConfirmUserPrivilegeManager extends BaseBatchUpdateStatusManager<UserPrivilegeEntity> {
  validateData(data: UserPrivilegeEntity): Promise<void> {
    return;
  }

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

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

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

  get entityTarget(): any {
    return UserPrivilegeModel;
  }

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

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