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

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

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

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

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

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

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

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

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