import request from '@/utils/request'

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

export function createEmployee(data) {
  return request({
    url: '/employee/employee/',
    method: 'post',
    data
  })
}
export function getEmployee(id, data) {
  return request({
    url: `/employee/employee/${id}/`,
    method: 'get',
    data
  })
}

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

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