import request from '@/utils/request'

// 查询项目结构节点列表
export function listStructure(query) {
  return request({
    url: '/generator/structure/list',
    method: 'get',
    params: query
  })
}

// 查询项目结构节点列表
export function listAllStructure(query) {
  return request({
    url: '/generator/structure/listAll',
    method: 'get',
    params: query
  })
}
// 查询项目结构节点详细
export function getStructure(nodeId) {
  return request({
    url: '/generator/structure/' + nodeId,
    method: 'get'
  })
}

// 新增项目结构节点
export function addStructure(data) {
  return request({
    url: '/generator/structure',
    method: 'post',
    data: data
  })
}

// 修改项目结构节点
export function updateStructure(data) {
  return request({
    url: '/generator/structure',
    method: 'put',
    data: data
  })
}

// 删除项目结构节点
export function delStructure(nodeId) {
  return request({
    url: '/generator/structure/' + nodeId,
    method: 'delete'
  })
}
