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

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

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

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

/** 根据id获取DeviceCategory POST /device_category/getDeviceCategoryById */
export async function postDeviceCategoryGetDeviceCategoryById(
  body: API.GetById,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.DeviceDeviceCategoryResponse }>(
    `/api/v1/device_category/getDeviceCategoryById`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 获取DeviceCategory外键列表 POST /device_category/getDeviceCategoryFkSelect */
export async function postDeviceCategoryGetDeviceCategoryFkSelect(
  body: API.GetFkSelect,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.FkResult; msg?: string }>(
    `/api/v1/device_category/getDeviceCategoryFkSelect`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 分页获取DeviceCategory列表 POST /device_category/getDeviceCategoryList */
export async function postDeviceCategoryGetDeviceCategoryList(
  body: API.SearchDeviceCategoryParams,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.PageResult; msg?: string }>(
    `/api/v1/device_category/getDeviceCategoryList`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 获得DeviceCategory名称列表 POST /device_category/getDeviceCategoryNames */
export async function postDeviceCategoryGetDeviceCategoryNames(
  body: API.IdsReq,
  options?: { [key: string]: any },
) {
  return request<API.Response & { data?: API.NamesResult; msg?: string }>(
    `/api/v1/device_category/getDeviceCategoryNames`,
    {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json',
      },
      data: body,
      ...(options || {}),
    },
  );
}

/** 修改基础DeviceCategory PUT /device_category/updateDeviceCategory */
export async function putDeviceCategoryUpdateDeviceCategory(
  body: API.DeviceCategory,
  options?: { [key: string]: any },
) {
  return request<API.Response & { msg?: string }>(`/api/v1/device_category/updateDeviceCategory`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
