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

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

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