import service from '@/utils/request'

// @Tags Pool
// @Summary 创建Pool
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Pool true "创建Pool"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /pool/createPool [post]
export const createPool = (data) => {
  return service({
    url: '/pool/createPool',
    method: 'post',
    data
  })
}

// @Tags Pool
// @Summary 删除Pool
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Pool true "删除Pool"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pool/deletePool [delete]
export const deletePool = (data) => {
  return service({
    url: '/pool/deletePool',
    method: 'delete',
    data
  })
}

// @Tags Pool
// @Summary 删除Pool
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除Pool"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /pool/deletePool [delete]
export const deletePoolByIds = (data) => {
  return service({
    url: '/pool/deletePoolByIds',
    method: 'delete',
    data
  })
}

// @Tags Pool
// @Summary 更新Pool
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body model.Pool true "更新Pool"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /pool/updatePool [put]
export const updatePool = (data) => {
  return service({
    url: '/pool/updatePool',
    method: 'put',
    data
  })
}

// @Tags Pool
// @Summary 用id查询Pool
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query model.Pool true "用id查询Pool"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /pool/findPool [get]
export const findPool = (params) => {
  return service({
    url: '/pool/findPool',
    method: 'get',
    params
  })
}

// @Tags Pool
// @Summary 分页获取Pool列表
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data query request.PageInfo true "分页获取Pool列表"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /pool/getPoolList [get]
export const getPoolList = (params) => {
  return service({
    url: '/pool/getPoolList',
    method: 'get',
    params
  })
}
