// @ts-ignore
/* eslint-disable */
import { request } from '@umijs/max';

/** 创建OperationRecord POST /sysOperationRecord/createOperationRecord */
export async function postSysOperationRecordCreateOperationRecord(
  body: API.OperationRecord,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(
    `/api/v1/sysOperationRecord/createOperationRecord`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 删除OperationRecord DELETE /sysOperationRecord/deleteOperationRecord */
export async function deleteSysOperationRecordDeleteOperationRecord(
  body: API.OperationRecord,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(
    `/api/v1/sysOperationRecord/deleteOperationRecord`,
    {
      method: 'DELETE',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 批量删除OperationRecord DELETE /sysOperationRecord/deleteOperationRecordByIds */
export async function deleteSysOperationRecordDeleteOperationRecordByIds(
  body: API.IdsReq,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(
    `/api/v1/sysOperationRecord/deleteOperationRecordByIds`,
    {
      method: 'DELETE',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 用id查询OperationRecord GET /sysOperationRecord/findOperationRecord */
export async function getSysOperationRecordFindOperationRecord(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysOperationRecordFindOperationRecordParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: Record<string, any>; msg?: string }>(
    `/api/v1/sysOperationRecord/findOperationRecord`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}

/** 分页获取OperationRecord列表 GET /sysOperationRecord/getOperationRecordList */
export async function getSysOperationRecordGetOperationRecordList(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getSysOperationRecordGetOperationRecordListParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/v1/sysOperationRecord/getOperationRecordList`,
    {
      method: 'GET',
      params: {
        ...params,
      },
      ...(options || {}),
    },
  );
}
