import request from '@/utils/request'

export function getProjectList(query) {
  return request({
    url: '/project/project/',
    method: 'get',
    params: query
  })
}

export function createProject(data) {
  return request({
    url: '/project/project/',
    method: 'post',
    data
  })
}

export function deleteProject(id) {
  return request({
    url: `/project/project/${id}/`,
    method: 'delete'
  })
}


export function updateProject(id, data) {
  return request({
    url: `/project/project/${id}/`,
    method: 'put',
    data
  })
}

export function getProject(id) {
  return request({
    url: `/project/project/${id}/`,
    method: 'get',
  })
}

export function nextProject(id) {
  return request({
    url: `/project/project/${id}/next/`,
    method: 'put'
  })
}

export function edateProject(id, data) {
  return request({
    url: `/project/project/${id}/edate/`,
    method: 'put',
    data
  })
}

export function planProject(data) {
  return request({
    url: '/project/project/plan/',
    method: 'put',
    data
  })
}