import request from '@/utils/request';

// 用户提现记录
export function getUserWithdrawList(data) {
  return request({
    url: `/trans/withdraw/list`,
    method: 'post',
    data: data
  });
}

// 用户审核提现
export function setWithdrawStatus(data) {
  return request({
    url: `/trans/withdraw/update`,
    method: 'post',
    data: data
  });
}

// 用户充值记录
export function getUserChargeList(data) {
  return request({
    url: `/trans/charge/list`,
    method: 'post',
    data: data
  });
}

// 用户分账记录
export function getUserDivideList(data) {
  return request({
    url: `/trans/divide/list`,
    method: 'post',
    data: data
  });
}

// 用户分账规则记录
export function getUserDivideRuleList(data) {
  return request({
    url: `/trans/divide/rule/list`,
    method: 'post',
    data: data
  });
}

// 用户分账规则新增
export function addUserDivideRule(data) {
  return request({
    url: `/trans/divide/rule/add`,
    method: 'post',
    data: data
  });
}

// 用户分账规则编辑
export function editUserDivideRule(data) {
  return request({
    url: `/trans/divide/rule/update`,
    method: 'post',
    data: data
  });
}

// 用户分账规则详情
export function getUserDivideRuleDetail(id) {
  return request({
    url: `/trans/divide/rule/${id}`,
    method: 'get'
  });
}

// 删除分账规则
export function deleteUserDivideRule(id) {
  return request({
    url: '/trans/divide/rule/' + id,
    method: 'delete'
  });
}
