import { defHttp } from '/@/utils/http/axios';
enum Api {
  sysDictItemAdd = '/sys/dictItem/add',
  sysDictItemEdit = '/sys/dictItem/edit',
  sysDictItemRemove = '/sys/dictItem/deleteByIds',
  sysDictItemQueryList = '/sys/dictItem/query/list',
}

/**
 * @description: 新增字典项,权限 - sys:dict:add
 * @method: POST
 */
export const sysDictItemAdd = (params?: object) => {
  return defHttp.post({ url: Api.sysDictItemAdd, params: params });
};
/**
 * @description: 通过主键id修改字典项,权限 - sys:dict:edit
 * @method: POST
 */
export const sysDictItemEdit = (params?: object) => {
  return defHttp.post({ url: Api.sysDictItemEdit, params: params });
};
/**
 * @description: 根据字典码查询字典项列表,权限 - 无
 * @method: POST
 */

export const sysDictItemQueryList = (params?: object) => {
  return defHttp.post({ url: Api.sysDictItemQueryList, params: params });
};
/**
 * @description: 删除字典项,权限 - sys:dict:remove
 * @method: POST
 */

export const sysDictItemRemove = (params?: Array<string | number>) => {
  return defHttp.post({ url: Api.sysDictItemRemove, params: params });
};
