userRewardEvent.go 1.0 KB

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