import service from '@/utils/request'

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

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

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

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

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

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