import httpClient from '@/utils/http';

import { ControllerResponse } from './data-contracts';
export default {
  /**
   * @description 根据模块和字段获取相应的筛选数据
   */
  filterList: (query: {
    /**
     * 模块名称(student/teacher/exam)
     * @example ""student""
     */
    module: string;
    /**
     * 字段名称(grade/exam_subject/role/subject/class)
     * @example ""grade""
     */
    field: string;
    /** 年级Key，当module为teacher/student且field为class时必填 */
    grade_key?: number;
  }) => {
    return httpClient.get<
      ControllerResponse & {
        data?: any;
      }
    >(`/query/filter`, { query: query });
  }
};
