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

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

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

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

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

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

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

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

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

/** 更新网点中的设备 PUT /device_model_in_group/updateDevicesInGroupModel */
export async function putRoleUpdateDevicesInGroupModel(
  body: API.UpdateDevicesInGroupModelParams,
  options?: { [key: string]: any },
) {
  return request<any>(`/api/v1/device_model_in_group/updateDevicesInGroupModel`, {
    method: 'PUT',
    headers: {
      'Content-Type': 'application/json',
    },
    data: body,
    ...(options || {}),
  });
}
