import request from '@/utils/request'

// 查询模块列表
export function listModels(query) {
  return request({
    url: '/project/module/list',
    method: 'get',
    params: query
  })
}

// 查询模块列表(根据项目Id)
export function selectbyProjectId(projectId) {
  return request({
    url: '/project/module/SelectByProjectId',
    method: 'get',
    params: { projectId }
  })
}

// 查询模块详细
export function getModels(moduleId) {
  return request({
    url: '/project/module/' + moduleId,
    method: 'get'
  })
}

// 新增模块
export function addModels(data) {
  return request({
    url: '/project/module',
    method: 'post',
    data: data
  })
}

// 修改模块
export function updateModels(data) {
  return request({
    url: '/project/module/updateModels',
    method: 'post',
    data: data
  })
}

// 删除模块
export function delModels(moduleId) {
  return request({
    url: '/project/module/' + moduleId,
    method: 'delete'
  })
}
