wallet.ts 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. // Wallet recharge config
  2. // 对应后端:/wallet/recharge/browser/goldCoin/config
  3. import type { NextDTO } from './skill'
  4. /**
  5. * 单个充值档位
  6. * 后端字段:id, coinRechargeAmount, amount
  7. */
  8. export interface WalletRechargeConfigItem {
  9. /** ID */
  10. id: string
  11. /** 钻石数量 */
  12. coinRechargeAmount: number
  13. /** 金额(数值) */
  14. amount: number
  15. }
  16. /**
  17. * 钱包充值配置
  18. */
  19. export interface WalletRechargeConfigVO {
  20. /** 充值档位列表 */
  21. items: WalletRechargeConfigItem[]
  22. }
  23. /**
  24. * 通用字符串结果
  25. * 对应后端 ResultVOString.result
  26. */
  27. export interface ResultVOString {
  28. /** 结果字符串(如收银台链接) */
  29. result: string
  30. }
  31. /**
  32. * 钱包充值 - 查询订单状态
  33. * 对应后端:POST /wallet/recharge/checkOrderState
  34. * 0:等待预下单, 1:预下未支付, 2:支付成功, 3:支付失败, 4:取消支付
  35. */
  36. export interface WalletRechargeOrderStateVo {
  37. /** 订单号 */
  38. orderNo: string
  39. /** 订单状态 */
  40. status: 0 | 1 | 2 | 3 | 4
  41. /** 订单创建时间(时间戳,单位可能为 ms 或 s) */
  42. createTime: number
  43. }
  44. // Wallet record (cursor pagination)
  45. // 对应后端:/wallet/record/goldCoin, /wallet/record/diamond, /wallet/record/bean
  46. /**
  47. * 钱包流水查询请求体
  48. */
  49. export interface WalletRecordDTO {
  50. /** 起始时间:yyyy-MM-dd */
  51. beginDate?: string
  52. /** 结束时间:yyyy-MM-dd */
  53. endDate?: string
  54. /** 游标分页参数 */
  55. page: NextDTO
  56. }
  57. /**
  58. * 钱包流水记录项
  59. */
  60. export interface WalletRecordVo {
  61. /** 金额 */
  62. amount: number
  63. /** 出入类型 1:收入,2:支出,3:结算 */
  64. inOut: number
  65. /** 时间(时间戳) */
  66. createAt: number
  67. /** 业务类型:30000... */
  68. bizType: number
  69. /** 业务信息 */
  70. data: Record<string, unknown>
  71. }
  72. /**
  73. * 钱包流水 - 游标分页响应
  74. */
  75. export interface NextVOWalletRecordVo {
  76. /** 钱包流水 - 返回 */
  77. list: WalletRecordVo[]
  78. /** 返回下一页的基准点 - 游标,NULL/空字符串 = 没有下一页 */
  79. next: unknown
  80. }
  81. // Wallet withdraw real name auth
  82. // 对应后端:POST /wallet/withdraw/realNameAuth
  83. /**
  84. * 身份证信息
  85. */
  86. export interface IdCardInfoSub {
  87. /** 身份证编号 */
  88. idNo: string
  89. /** 真实姓名 */
  90. realName: string
  91. /** 身份证正面图片 */
  92. idCardFrontImage: string
  93. /** 身份证背面图片 */
  94. idCardBackImage: string
  95. }
  96. /**
  97. * 银行卡信息
  98. */
  99. export interface BankCardInfoSub {
  100. /** 银行卡号 */
  101. bankNo: string
  102. /** 真实姓名 */
  103. realName: string
  104. /** 银行名称 */
  105. bankName: string
  106. }
  107. /**
  108. * 提现实名认证 - 请求参数
  109. */
  110. export interface WalletWithdrawRealNameAuthDTO {
  111. /** 身份证信息 */
  112. idCard: IdCardInfoSub
  113. /** 银行卡信息 */
  114. bankCard: BankCardInfoSub
  115. }
  116. /**
  117. * 提现实名认证 - 响应参数
  118. */
  119. export interface WalletWithdrawRealInfoAuthApplyVo {
  120. /** 身份证信息申请提交是否成功 */
  121. idCardApply: boolean
  122. /** 银行卡信息申请提交是否成功 */
  123. idBankCardApply: boolean
  124. }
  125. /**
  126. * 提现实名认证状态
  127. * 0:没有信息,1:待审核,2:已实名,3:审核不通过
  128. */
  129. export type WalletWithdrawAuthState = 0 | 1 | 2 | 3
  130. /**
  131. * 获得提现实名认证状态 - 响应参数
  132. */
  133. export interface WalletWithdrawRealInfoAuthStatusVo {
  134. /** 身份信息状态:0:没有身份信息,1:待审核,2:已实名,3:审核不通过 */
  135. idCardState: WalletWithdrawAuthState
  136. /** 银行卡信息状态:0:没有银行卡信息,1:待审核,2:已实名,3:审核不通过 */
  137. bankCardState: WalletWithdrawAuthState
  138. /** 身份证信息 */
  139. idCardInfo?: IdCardInfoSub
  140. /** 银行卡信息 */
  141. bankCardInfo?: BankCardInfoSub
  142. /** 身份证信息-审核备注 */
  143. idCardReviewNotes?: string
  144. /** 银行卡信息-审核备注 */
  145. bankReviewNotes?: string
  146. }
  147. // Wallet withdraw info
  148. // 对应后端:POST /wallet/withdraw/info
  149. export interface BaseWithdrawConfigBO {
  150. /** 币种 */
  151. currency: string
  152. /** 最小提现金额(法币,如 IDR) */
  153. minnum: number
  154. /** 固定手续费 */
  155. feeAmount: number
  156. /** 手续费率 % */
  157. feeRate: number
  158. /** 0:固定手续费,1:手续费率 */
  159. feeType: 0 | 1
  160. }
  161. export interface WalletWithdrawInfoVo {
  162. /** 金豆可用余额 */
  163. availableBeanAmount: number
  164. /** 提现最小金豆数量 */
  165. withdrawMinBeanAmount: number
  166. /** 配置 */
  167. config: BaseWithdrawConfigBO
  168. }
  169. /**
  170. * 金豆提现计算 - 响应参数
  171. * 对应后端:POST /wallet/withdraw/calculate
  172. */
  173. export interface WalletWithdrawCalculateVo {
  174. /** IDR金额 */
  175. amount: number
  176. /** IDR金额=实际提现所得 */
  177. actualAmount: number
  178. /** 手续费金额 */
  179. feeAmount: number
  180. }
  181. /**
  182. * 金豆提现申请提交 - 请求参数
  183. * 对应后端:POST /wallet/withdraw/submit
  184. */
  185. export interface WalletWithdrawApplyDTO {
  186. /** 要提现的金豆金额 */
  187. amount: number
  188. }