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

/**
 * 获取Art Category分页
 * @param data
 * @returns
 */
export function getArtCatByPage(data: any) {
  return apiRequest({
    url: '/art/cat/page',
    method: 'GET',
    params: data,
  })
}

/**
 * 获取Art Category列表
 * @param data
 * @returns
 */
export function getArtCatByList(data: any) {
  return apiRequest({
    url: '/art/cat',
    method: 'GET',
    params: data,
  })
}

/**
 * 根据Id获取Art Category
 * @param artCatId
 * @returns
 */
export function getArtCatById(artCatId: number) {
  return apiRequest({
    url: `/art/cat/${artCatId}`,
    method: 'GET',
  })
}

/**
 * 添加Art Category
 * @param data
 * @returns
 */
export function createArtCat(data: any) {
  return apiRequest({
    url: '/art/cat/add',
    method: 'post',
    data,
  })
}

/**
 * 更新Art Category
 * @param data
 * @returns
 */
export function updateArtCat(data: any) {
  return apiRequest({
    url: '/art/cat/update',
    method: 'PUT',
    data,
  })
}

/**
 * 删除Art Category
 * @param artCatId
 * @returns
 */
export function deleteArtCatById(artCatId: number) {
  return apiRequest({
    url: `/art/cat/${artCatId}`,
    method: 'DELETE',
  })
}
