import http from '@/utils/http'

export function getAllDepartmentTree() {
  return http.get('/department/all-tree')
}

export function getAllDepartmentNotTree() {
  return http.get('/department/all-not-tree')
}

export function addDepartment(department) {
  return http.post('/department/add', department)
}

export function editDepartment(department) {
  return http.put('/department/edit', department)
}

export function moveDepartment({ sortType, id }) {
  return http.put(`/department/sort/${sortType}/${id}`)
}

export function deleteDepartment(id) {
  return http.delete(`/department/del/${id}`)
}
