import request from '@/config/axios'

export interface BankWithdrawalDetailVO {
  id: number
  withdrawalId: number
  bankName: string
  bankCountry: string
  accountName: string
  accountNumber: string
  iban: string
  swiftBicCode: string
  bankAddress: string
  branchName: string
  branchAddress: string
  bankFee: number
}

// 查询银行卡提现详情列表
export const getBankWithdrawalDetailPage = async (params) => {
  return await request.get({ url: `/member/bank-withdrawal-detail/page`, params })
}

// 查询银行卡提现详情详情
export const getBankWithdrawalDetail = async (id: number) => {
  return await request.get({ url: `/member/bank-withdrawal-detail/get?id=` + id })
}

// 新增银行卡提现详情
export const createBankWithdrawalDetail = async (data: BankWithdrawalDetailVO) => {
  return await request.post({ url: `/member/bank-withdrawal-detail/create`, data })
}

// 修改银行卡提现详情
export const updateBankWithdrawalDetail = async (data: BankWithdrawalDetailVO) => {
  return await request.put({ url: `/member/bank-withdrawal-detail/update`, data })
}

// 删除银行卡提现详情
export const deleteBankWithdrawalDetail = async (id: number) => {
  return await request.delete({ url: `/member/bank-withdrawal-detail/delete?id=` + id })
}

// 导出银行卡提现详情 Excel
export const exportBankWithdrawalDetail = async (params) => {
  return await request.download({ url: `/member/bank-withdrawal-detail/export-excel`, params })
}
