import service from '@/utils/request'

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

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

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

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

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

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