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

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

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

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

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

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

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

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

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