import { defHttp } from '/@/utils/http/axios';
import { setParams } from '/@/utils/index';
enum Api {
  // 操作日志
  operLogAdd = '/sys/operLog/add',
  operLogDetail = '/sys/operLog/detail',
  operLogEdit = '/sys/operLog/edit',
  operLogQueryPage = '/sys/operLog/query/page',
  operLogRemove = '/sys/operLog/deleteByIds',
  // 登录日志
}

/**
 * @description: 新增操作日志记录,权限 - sys:log:add
 * @method: POST
 */
export const operLogAdd = (params?: object) => {
  return defHttp.post({ url: Api.operLogAdd, params: params });
};
/**
 * @description: 获取操作日志记录详细信息,权限 - sys:log:query
 * @method: POST
 */
export const operLogDetail = (params?: object) => {
  return defHttp.post({ url: Api.operLogDetail, params: params });
};
/**
 * @description: 通过主键id修改操作日志记录,权限 - sys:log:edit
 * @method: POST
 */
export const operLogEdit = (params?: object) => {
  return defHttp.post({ url: Api.operLogEdit, params: params });
};
/**
 * @description: 查询操作日志记录列表,权限 - sys:log:list
 * @method: POST
 */
export const operLogQueryPage = (params?: object) => {
  return defHttp.post({ url: Api.operLogQueryPage, params: setParams(params) });
};
/**
 * @description: 删除增操作日志记录,权限 - sys:log:remove
 * @method: POST
 */
export const operLogRemove = (params?: Array<string | number>) => {
  return defHttp.post({ url: Api.operLogRemove, params: params });
};
