wallet.ts 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  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. bankCode: string
  108. }
  109. /**
  110. * 提现实名认证 - 请求参数
  111. */
  112. export interface WalletWithdrawRealNameAuthDTO {
  113. /** 身份证信息 */
  114. idCard?: IdCardInfoSub
  115. /** 银行卡信息 */
  116. bankCard?: BankCardInfoSub
  117. }
  118. /**
  119. * 提现实名认证 - 响应参数
  120. */
  121. export interface WalletWithdrawRealInfoAuthApplyVo {
  122. /** 身份证信息申请提交是否成功 */
  123. idCardApply: boolean
  124. /** 银行卡信息申请提交是否成功 */
  125. idBankCardApply: boolean
  126. }
  127. /**
  128. * 提现实名认证状态
  129. * 0:没有信息,1:待审核,2:已实名,3:审核不通过
  130. */
  131. export type WalletWithdrawAuthState = 0 | 1 | 2 | 3
  132. /**
  133. * 获得提现实名认证状态 - 响应参数
  134. */
  135. export interface WalletWithdrawRealInfoAuthStatusVo {
  136. /** 身份信息状态:0:没有身份信息,1:待审核,2:已实名,3:审核不通过 */
  137. idCardState: WalletWithdrawAuthState
  138. /** 银行卡信息状态:0:没有银行卡信息,1:待审核,2:已实名,3:审核不通过 */
  139. bankCardState: WalletWithdrawAuthState
  140. /** 身份证信息 */
  141. idCardInfo?: IdCardInfoSub
  142. /** 银行卡信息 */
  143. bankCardInfo?: BankCardInfoSub
  144. /** 身份证信息-审核备注 */
  145. idCardReviewNotes?: string
  146. /** 银行卡信息-审核备注 */
  147. bankReviewNotes?: string
  148. }
  149. // Wallet withdraw info
  150. // 对应后端:POST /wallet/withdraw/info
  151. export interface BaseWithdrawConfigBO {
  152. /** 币种 */
  153. currency: string
  154. /** 最小提现金额(法币,如 IDR) */
  155. minnum: number
  156. /** 固定手续费 */
  157. feeAmount: number
  158. /** 手续费率 % */
  159. feeRate: number
  160. /** 0:固定手续费,1:手续费率 */
  161. feeType: 0 | 1
  162. }
  163. export interface WalletWithdrawInfoVo {
  164. /** 金豆可用余额 */
  165. availableBeanAmount: number
  166. /** 提现最小金豆数量 */
  167. withdrawMinBeanAmount: number
  168. /** 配置 */
  169. config: BaseWithdrawConfigBO
  170. }
  171. /**
  172. * 金豆提现计算 - 响应参数
  173. * 对应后端:POST /wallet/withdraw/calculate
  174. */
  175. export interface WalletWithdrawCalculateVo {
  176. /** IDR金额 */
  177. amount: number
  178. /** IDR金额=实际提现所得 */
  179. actualAmount: number
  180. /** 手续费金额 */
  181. feeAmount: number
  182. }
  183. /**
  184. * 金豆提现申请提交 - 请求参数
  185. * 对应后端:POST /wallet/withdraw/submit
  186. */
  187. export interface WalletWithdrawApplyDTO {
  188. /** 要提现的金豆金额 */
  189. amount: number
  190. }