// @ts-ignore
/* eslint-disable */
import request from '@/request/http'

/** 删除 DELETE /file */
export async function deleteUsingDelete(body: number[], options?: { [key: string]: any }) {
  return request<API.RBoolean>(`/base/file`, {
    method: 'DELETE',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 单体查询 单体查询 GET /file/${param0} */
export async function get(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getParams,
  options?: { [key: string]: any }
) {
  const { id: param0, ...queryParams } = params
  return request<API.RFile>(`/base/file/${param0}`, {
    method: 'GET',
    params: { ...queryParams },
    ...(options || {})
  })
}

/** 查询单体详情 GET /file/detail */
export async function getDetail(
  // 叠加生成的Param类型 (非body参数swagger默认没有生成对象)
  params: API.getDetailParams,
  options?: { [key: string]: any }
) {
  return request<API.RFile>(`/base/file/detail`, {
    method: 'GET',
    params: {
      ...params
    },
    ...(options || {})
  })
}

/** 根据Id批量查询 根据Id批量查询 POST /file/findByIds */
export async function findByIds(body: number[], options?: { [key: string]: any }) {
  return request<API.RListFile>(`/base/file/findByIds`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 分页列表查询 POST /file/page */
export async function page(body: API.PageParamsFile, options?: { [key: string]: any }) {
  return request<API.RIPageFile>(`/base/file/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}

/** 批量查询 批量查询 POST /file/query */
export async function query(body: API.File, options?: { [key: string]: any }) {
  return request<API.RListFile>(`/base/file/query`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  })
}
