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

/**
 * 获取Oc Type列表
 * @param data
 * @returns
 */
export function getOcTypeByList(data: any) {
  return apiRequest({
    url: '/oc/type',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取OC Type
 * @returns
 * @param ocTypeId
 * @param ocTypeId
 */
export function getOcTypeById(ocTypeId: number) {
  return apiRequest({
    url: `/oc/type/${ocTypeId}`,
    method: 'GET',
  })
}

/**
 * 添加Oc Type
 * @param data
 * @returns
 */
export function createOcType(data: any) {
  return apiRequest({
    url: '/oc/type/add',
    method: 'POST',
    data,
  })
}

/**
 * 更新Oc Type
 * @param data
 * @returns
 */
export function updateOcType(data: any) {
  return apiRequest({
    url: '/oc/type/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除Oc Type
 * @returns
 * @param ocTypeId
 */
export function deleteOcTypeById(ocTypeId: number) {
  return apiRequest({
    url: `/oc/type/${ocTypeId}`,
    method: 'DELETE',
  })
}
