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

/**
 * 获取Atu列表
 * @param data
 * @returns
 */
export function getX(apiCode: string, data: any) {
  return apiRequest({
    url: `/x/${apiCode}`,
    method: 'GET',
    params: data,
  })
}

/**
 * 添加Atu
 * @param data
 * @returns
 */
export function createX(apiCode: string, data: any) {
  return apiRequest({
    url: `/x/${apiCode}`,
    method: 'POST',
    data,
  })
}

/**
 * 更新Atu
 * @param data
 * @returns
 */
export function updateX(apiCode: string, data: any) {
  return apiRequest({
    url: `/x/${apiCode}`,
    method: 'PUT',
    data,
  })
}

/**
 * 更新Atu
 * @param data
 * @returns
 */
export function patchX(apiCode: string, data: any) {
  return apiRequest({
    url: `/x/${apiCode}`,
    method: 'PUT',
    data,
  })
}

/**
 * 删除Atu
 * @param apiId
 * @param atuId
 * @returns
 */
export function deleteX(apiCode: string, data: any) {
  return apiRequest({
    url: `/x/${apiCode}`,
    method: 'DELETE',
    data,
  })
}
