概述

奖励后端从消息队列(Kafka)处理实时事件,以支持以下功能:
  1. 忠诚度(等级系统):基于玩家活动的经验值进度和等级提升
  2. 挑战:跟踪投注、存款、赌场计数、连续登录和其他挑战类型的进度
  3. 游戏映射:从玩家活动中自动发现和映射游戏

事件类型

GamesEnriched (CasinoEvent)

描述:轮次聚合前的单个赌场交易事件(投注或获胜)。
使用者
  1. 忠诚度系统
  2. 投注挑战
  3. 赌场计数挑战
  4. 获胜倍数挑战
  5. 游戏映射服务
必需字段
字段类型描述
user_id
int64
内部用户ID(必须 > 0 且 < MaxInt32)
game_id
string
游戏标识符
game_name
string
游戏名称
vendor_id
string
游戏厂商/提供商标识符。如果启用了allow_incomplete_game_hash,则可选。
vendor_name
string
游戏厂商/提供商名称。如果启用了allow_incomplete_game_hash,则可选。
origin
string
玩家来源标识符
type
string
交易类型(例如,"bet"、"win")
amount
float64
交易金额(必须 > 0)
activity_id
string
唯一活动/交易标识符
currency
string
货币代码
timestamp
time
事件时间戳(不能为零)
status
string
必须为"approved"或"rollback"
round_id
string
游戏轮次标识符。某些服务需要,可配置。
JSON示例

PaymentEnriched

描述:支付交易事件(存款和提款)。
使用者
  1. 忠诚度服务:用于基于存款的经验值贡献
  2. (连续)存款挑战
必需字段
字段类型描述
user_id
int64
内部用户ID(必须 > 0 且 < MaxInt32)
payment_id
string
唯一支付标识符
status
string
支付状态。挑战处理必须为"approved"。也支持回滚状态用于忠诚度贡献逆转。
type
string
支付类型。挑战处理必须为"deposit"。
amount
float64
支付金额(必须 > 0)
currency
string
货币代码
origin
string
玩家来源标识符
timestamp
time
事件时间戳(不能为零)
JSON示例

LoginEventEnriched

描述:用户登录事件。
使用者
  1. 连续登录挑战
必需字段
字段类型描述
user_id
int64
内部用户ID(必须 > 0 且 < MaxInt32)
unique_id
string
唯一事件标识符
timestamp
time
事件时间戳(不能为零)
JSON示例

SportsBetEnriched

描述:体育博彩事件。
使用者
  1. 忠诚度服务:用于体育投注经验值贡献
必需字段
字段类型描述
user_id
int64
内部用户ID(必须 > 0)
origin
string
玩家来源标识符
activity_id
string
唯一活动标识符
status
string
投注状态。对于忠诚度经验值贡献,只处理状态为"Settlement"的事件。
currency
string
货币代码
timestamp
time
事件时间戳(不能为零)
amount
float64
投注金额(必须 > 0)
type
string
投注类型
JSON示例