import request from '@/utils/request'

export function listRefundReason(query) {
  return request({
    url: '/store/store/refundReason/list',
    method: 'get',
    params: query
  })
}

export function getChildrenByParentId(parentId) {
  return request({
    url: '/store/store/refundReason/children/' + parentId,
    method: 'get'
  })
}

export function getRefundReasonTree() {
  return request({
    url: '/store/store/refundReason/tree',
    method: 'get'
  })
}

export function getRefundReason(id) {
  return request({
    url: '/store/store/refundReason/' + id,
    method: 'get'
  })
}

export function addRefundReason(data) {
  return request({
    url: '/store/store/refundReason',
    method: 'post',
    data: data
  })
}

export function updateRefundReason(data) {
  return request({
    url: '/store/store/refundReason',
    method: 'put',
    data: data
  })
}

export function delRefundReason(id) {
  return request({
    url: '/store/store/refundReason/' + id,
    method: 'delete'
  })
}
