import { Injectable } from '@nestjs/common';
import { IndexTaxManager } from './index-tax.manager';
import { Param } from 'src/core/modules/domain/entities/base-filter.entity';

@Injectable()
export class IndexTaxFormulaManager extends IndexTaxManager {
  get selects(): string[] {
    return [
      `${this.tableName}.id`,
      `${this.tableName}.name`,
      `${this.tableName}.value`,
    ];
  }

  get specificFilter(): Param[] {
    return [
      {
        cols: `${this.tableName}.status::text`,
        data: [`'active'`],
        isStatus: true,
      },
      ...super.specificFilter,
    ];
  }
}
