import request from '@/utils/request'

export function listDepartment(query) {
  return request({
    url: '/department/list',
    method: 'get',
    params: query
  })
}

export function createDepartment(data) {
  return request({
    url: '/department/create',
    method: 'post',
    data
  })
}

export function readDepartment(data) {
  return request({
    url: '/department/read',
    method: 'get',
    data
  })
}

export function updateDepartment(data) {
  return request({
    url: '/department/update',
    method: 'post',
    data
  })
}

export function deleteDepartment(data) {
  return request({
    url: '/department/delete',
    method: 'post',
    data
  })
}
export function allDepartment() {
  return request({
    url: '/department/all',
    method: 'get'
  })
}
