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

@Injectable()
export class UpdateVipCategoryManager extends BaseUpdateManager<VipCategoryEntity> {
  async validateProcess(): Promise<void> {
    return;
  }

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

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

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

  get uniqueColumns(): columnUniques[] {
    return [{ column: 'name' }];
  }

  get entityTarget(): any {
    return VipCategoryModel;
  }

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