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

@Injectable()
export class CreateVipCategoryManager extends BaseCreateManager<VipCategoryEntity> {
  async beforeProcess(): Promise<void> {
    return;
  }

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

  async generateConfig(): Promise<void> {
    // TODO: Implement logic here
  }

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

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

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

  get entityTarget(): any {
    return VipCategoryModel;
  }
}
