import { Provide, Inject, Get, Query } from '@midwayjs/decorator';
import { CoolController, BaseController } from '@cool-midway/core';
import { DataFieldEntity } from '../../../entity/sys/data_field';
import { BaseSysFieldsService } from '../../../service/sys/datafields';

/**
 * 图集
 */
@Provide()
@CoolController({
  api: ['add', 'delete', 'update', 'info', 'list', 'page'],
  entity: DataFieldEntity,
  service: BaseSysFieldsService,
})
export class BaseSysFieldsController extends BaseController {
  @Inject()
  baseSysFieldsService: BaseSysFieldsService;

  /**
   * 获取
   */
  @Get('/disList', { summary: '获取' })
  async disList(@Query('tableId') tableId: number) {
    return await this.baseSysFieldsService.disList(tableId);
  }
}
