import { Injectable } from '@nestjs/common';
import { BaseUpdateStatusManager } from 'src/core/modules/domain/usecase/managers/base-update-status.manager';
import { VipCategoryEntity } from '../../entities/vip-category.entity';
import {
  EventTopics,
  validateRelations,
} from 'src/core/strings/constants/interface.constants';
import { VipCategoryModel } from '../../../data/models/vip-category.model';
import { VipCategoryChangeStatusEvent } from '../../entities/event/vip-category-change-status.event';

@Injectable()
export class ConfirmVipCategoryManager extends BaseUpdateStatusManager<VipCategoryEntity> {
  getResult(): string {
    return `Success active data ${this.result.name}`;
  }

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

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

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

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

  get entityTarget(): any {
    return VipCategoryModel;
  }

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