import { Injectable } from '@nestjs/common';
import { IndexVipCodeManager } from './managers/index-vip-code.manager';
import { VipCodeReadService } from '../../data/services/vip-code-read.service';
import { VipCodeEntity } from '../entities/vip-code.entity';
import { PaginationResponse } from 'src/core/response/domain/ok-response.interface';
import { BaseReadOrchestrator } from 'src/core/modules/domain/usecase/orchestrators/base-read.orchestrator';
import { TABLE_NAME } from 'src/core/strings/constants/table.constants';

@Injectable()
export class VipCodeReadOrchestrator extends BaseReadOrchestrator<VipCodeEntity> {
  constructor(
    private indexManager: IndexVipCodeManager,
    private serviceData: VipCodeReadService,
  ) {
    super();
  }

  async index(params): Promise<PaginationResponse<VipCodeEntity>> {
    this.indexManager.setFilterParam(params);
    this.indexManager.setService(this.serviceData, TABLE_NAME.VIP_CODE);
    await this.indexManager.execute();
    return this.indexManager.getResult();
  }

  async detail(dataId: string): Promise<VipCodeEntity> {
    return;
  }
}
