userRewardEvent.go 879 B

12345678910111213141516171819202122232425262728
  1. package eventmodels
  2. // 用户奖励事件
  3. type UserRewardEventContent struct {
  4. UserBasic
  5. EventBasic
  6. Source int `json:"source"` // 奖励来源
  7. SourceId int `json:"sourceId"`
  8. AddReward string `json:"add_reward"` // 增加的道具json字符串 eg:[]ItemReward
  9. SubReward string `json:"sub_reward"` // 减少的道具json字符串 eg:[]ItemReward
  10. Desc string `json:"desc"` // json字符串
  11. }
  12. type ItemReward struct {
  13. ItemBaseType int `json:"item_base_type"` // itemType:道具基类型
  14. ItemID int `json:"item_id"` // itemID:道具ID
  15. Amount int `json:"amount"` // amount:数量
  16. }
  17. type DescDraw struct {
  18. ID int `json:"id"` // 中奖格子
  19. CurID int `json:"cur_id"` // 规则ID
  20. Reward []ItemReward `json:"reward"`
  21. }
  22. func (e *UserRewardEventContent) EventName() string {
  23. return "UserReward"
  24. }