package messages // 交易消息 type Transaction struct { MessageId string FromUserId string //发起用户ID FromCurrency TransactionCurrencyEnum //扣款类型 FromAmount string //扣款数量 FromPlatform string //扣款所在平台 ToUserId string //接收用户 ToCurrency TransactionCurrencyEnum //接收类型 ToAmount string //接收数量 TransactionRate string //交易抽成 TransactionState TransactionStateEnum //交易状态 TransactionType TransactionTypeEnum //充值、打赏、购买表情、购买守护、兑换、砸蛋、提现、订单等 TransactionId string //充值ID、打赏ID、购买表情ID、购买守护ID、兑换ID、砸蛋ID、提现ID、订单ID等 TransactionCreateTime string //交易创建时间 TransactionCompleteTime string //交易完成时间 TransactionSubjectId string //充值为产品ID、打赏为房间ID、购买表情为表情ID、购买守护为房间ID、兑换为配置ID、砸蛋为配置ID、提现为配置ID、订单为品类ID TransactionCode TransactionCodeEnum //充值为充值渠道(支付宝H5、支付宝App、微信、运营赠送等)、打赏为打赏类型(单个、批量)、购买表情为空、购买守护为守护类型、兑换为空、砸蛋为中奖等级、提现为银行名称、订单为空 TransactionAmount string //交易金额(单位为扣款类型) TransactionAmountCoupon string //交易优惠金额(单位为扣款类型) TransactionAmountCouponId string //交易优惠凭证ID TransactionAmountPay string //交易实际支付金额(单位为扣款类型) GuildId string //俱乐部ID } // 交易更新消息 type TransactionUpdate struct { MessageId string TransactionState TransactionStateEnum //交易状态 TransactionId string //充值ID、打赏ID、购买表情ID、购买守护ID、兑换ID、砸蛋ID、提现ID、订单ID等 TransactionCompleteTime string //交易完成时间 } type TransactionCodeEnum string const ( RewardSimple TransactionCodeEnum = "SIMPLE" //单个打赏 RewardMulti TransactionCodeEnum = "MULTI" //批量打赏 RewardBagSimple TransactionCodeEnum = "BAG_SIMPLE" //背包礼物单个打赏 RewardBagMulti TransactionCodeEnum = "BAG_MULTI" //背包礼物批量打赏 GuardLevel01 TransactionCodeEnum = "1" //青铜守护 GuardLevel02 TransactionCodeEnum = "2" //白银守护 GuardLevel03 TransactionCodeEnum = "3" //黄金守护 Hunting1 TransactionCodeEnum = "1" //单砸 Hunting10 TransactionCodeEnum = "10" //十砸 Hunting100 TransactionCodeEnum = "100" //百砸 RechargeAppAlipay TransactionCodeEnum = "AppAlipay" //app支付宝 RechargeAppWeChat TransactionCodeEnum = "AppWeChat" //app微信 RechargeAppIap TransactionCodeEnum = "AppIap" //appIap RechargeH5Alipay TransactionCodeEnum = "H5Alipay" //H5支付宝 RechargeH5WeChatClub TransactionCodeEnum = "H5WeChatClub" //H5微信公众号 RechargeOperation TransactionCodeEnum = "Operation" //Operation ) type TransactionStateEnum string const ( CREATED TransactionStateEnum = "CREATED" //已创建 SUCCESS TransactionStateEnum = "SUCCESS" //成功 FAILED TransactionStateEnum = "FAILED" //失败 ) type TransactionCurrencyEnum string const ( DIAMOND TransactionCurrencyEnum = "DIAMOND" //钻石 CRYSTAL TransactionCurrencyEnum = "CRYSTAL" //晶石 MONEY TransactionCurrencyEnum = "MONEY" //钱 FRAGMENT TransactionCurrencyEnum = "FRAGMENT" //碎片 ) type TransactionTypeEnum string const ( RECHARGE TransactionTypeEnum = "RECHARGE" //充值 RechargeNCoin TransactionTypeEnum = "RECHARGE_N_COIN" //充值N币 REWARD TransactionTypeEnum = "REWARD" //打赏 REWARDNCoin TransactionTypeEnum = "REWARD_N_COIN" //打赏 GUARD TransactionTypeEnum = "GUARD" //购买守护 EMOJI TransactionTypeEnum = "EMOJI" //购买表情 OperationDiamond TransactionTypeEnum = "OPERATION_DIAMOND" //手工加钻石 OperationCrystal TransactionTypeEnum = "OPERATION_CRYSTAL" //手工加晶石 OperationCrystalReduce TransactionTypeEnum = "OPERATION_CRYSTAL_REDUCE" //手工扣除晶石 EXCHANGE TransactionTypeEnum = "EXCHANGE" //兑换 HUNTING TransactionTypeEnum = "HUNTING" //星空寻宝 WithdrawNCoin TransactionTypeEnum = "WITHDRAW_N_COIN" //提现 N币 ORDER TransactionTypeEnum = "ORDER" //订单 ORDERNCoin TransactionTypeEnum = "ORDER_N_COIN" //订单 ORDER_H5 TransactionTypeEnum = "ORDER_H5" //订单 ORDER_H5_NCoin TransactionTypeEnum = "ORDER_H5_N_COIN" //订单 LUCK_GIFT TransactionTypeEnum = "LUCK_GIFT" //幸运礼物 LuckGiftNCoin TransactionTypeEnum = "LUCK_GIFT_N_COIN" //幸运礼物 )