import apiRequest from '@/network/http/apiRequest'

/**
 * 获取Job Class列表
 * @param data
 */
export function getJobClassByList(data: any) {
  return apiRequest({
    url: '/job/class',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取Job Class
 * @param jobClassId
 */
export function getJobClassById(jobClassId: number) {
  return apiRequest({
    url: `/job/class/${jobClassId}`,
    method: 'GET',
  })
}

/**
 * 添加Job Class
 * @param data
 */
export function createJobClass(data: any) {
  return apiRequest({
    url: '/job/class/add',
    method: 'POST',
    data,
  })
}

/**
 * 更新Job Class
 * @param data
 */
export function updateJobClass(data: any) {
  return apiRequest({
    url: '/job/class/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除Job Class
 * @param jobClassId
 */
export function deleteJobClassById(jobClassId: number) {
  return apiRequest({
    url: `/job/class/${jobClassId}`,
    method: 'DELETE',
  })
}
