import request from '@/config/axios'

export interface UserCryptoVO {
  id: number
  userId: number
  currencyType: string
  address: string
  label: string
  primary: number
  qrCode: string
  cryptoTag: string
  verified: number
  network: string
}

// 查询会员数字货币地址列表
export const getUserCryptoPage = async (params) => {
  return await request.get({ url: `/member/user-crypto/page`, params })
}

// 查询会员数字货币地址详情
export const getUserCrypto = async (id: number) => {
  return await request.get({ url: `/member/user-crypto/get?id=` + id })
}

// 新增会员数字货币地址
export const createUserCrypto = async (data: UserCryptoVO) => {
  return await request.post({ url: `/member/user-crypto/create`, data })
}

// 修改会员数字货币地址
export const updateUserCrypto = async (data: UserCryptoVO) => {
  return await request.put({ url: `/member/user-crypto/update`, data })
}

// 删除会员数字货币地址
export const deleteUserCrypto = async (id: number) => {
  return await request.delete({ url: `/member/user-crypto/delete?id=` + id })
}

// 导出会员数字货币地址 Excel
export const exportUserCrypto = async (params) => {
  return await request.download({ url: `/member/user-crypto/export-excel`, params })
}
