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

/**
 * 获取Atu列表
 * @param data
 * @returns
 */
export function getAtuByList(data: any) {
  return apiRequest({
    url: '/paas/api/atu',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取Atu
 * @param apiId
 * @param atuId
 * @returns
 */
export function getAtuById(apiId: number, atuId: number) {
  return apiRequest({
    url: `/paas/api/atu/${apiId}/${atuId}`,
    method: 'GET',
  })
}

/**
 * 添加Atu
 * @param data
 * @returns
 */
export function createAtu(data: any) {
  return apiRequest({
    url: '/paas/api/atu/add',
    method: 'POST',
    data,
  })
}

/**
 * 更新Atu
 * @param data
 * @returns
 */
export function updateAtu(data: any) {
  return apiRequest({
    url: '/paas/api/atu/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除Atu
 * @param apiId
 * @param atuId
 * @returns
 */
export function deleteAtuById(apiId: number, atuId: number) {
  return apiRequest({
    url: `/paas/api/atu/${apiId}/${atuId}`,
    method: 'DELETE',
  })
}
