Files
junhong_cmp_fiber/pkg/constants/wallet.go

78 lines
2.0 KiB
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package constants
// ========================================
// 钱包系统常量定义
// ========================================
// 钱包资源类型
const (
WalletResourceTypeIotCard = "iot_card" // 物联网卡钱包(个人客户)
WalletResourceTypeDevice = "device" // 设备钱包(个人客户,多卡共享)
WalletResourceTypeShop = "shop" // 店铺钱包(代理商)
)
// 钱包类型
const (
WalletTypeMain = "main" // 主钱包
WalletTypeCommission = "commission" // 分佣钱包
)
// 钱包状态
const (
WalletStatusNormal = 1 // 正常
WalletStatusFrozen = 2 // 冻结
WalletStatusClosed = 3 // 关闭
)
// 交易类型
const (
TransactionTypeRecharge = "recharge" // 充值
TransactionTypeDeduct = "deduct" // 扣款
TransactionTypeRefund = "refund" // 退款
TransactionTypeCommission = "commission" // 分佣
TransactionTypeWithdrawal = "withdrawal" // 提现
)
// 交易状态
const (
TransactionStatusSuccess = 1 // 成功
TransactionStatusFailed = 2 // 失败
TransactionStatusProcessing = 3 // 处理中
)
// 关联业务类型
const (
ReferenceTypeOrder = "order" // 订单
ReferenceTypeCommission = "commission" // 分佣
ReferenceTypeWithdrawal = "withdrawal" // 提现
ReferenceTypeTopup = "topup" // 充值
)
// 充值状态
const (
RechargeStatusPending = 1 // 待支付
RechargeStatusPaid = 2 // 已支付
RechargeStatusCompleted = 3 // 已完成
RechargeStatusClosed = 4 // 已关闭
RechargeStatusRefunded = 5 // 已退款
)
// 充值支付方式
const (
RechargeMethodAlipay = "alipay" // 支付宝
RechargeMethodWechat = "wechat" // 微信
RechargeMethodBank = "bank" // 银行转账
RechargeMethodOffline = "offline" // 线下
)
// 充值订单号前缀
const (
RechargeOrderPrefix = "RCH" // 充值订单号前缀
)
// 充值金额限制(单位:分)
const (
RechargeMinAmount = 100 // 最小充值金额1元
RechargeMaxAmount = 10000000 // 最大充值金额100000元
)