Browse Source

update 完善事件字段

Alvin 9 months ago
parent
commit
a7a5f1dc04

+ 1 - 0
game/game_cluster/internal/mdb/eventmodels/basic.go

@@ -5,6 +5,7 @@ type EventBasic struct {
 	IsSuccess        bool   `json:"is_uccess"`          // http响应结果
 	Status           int    `json:"status"`             // 事件状态 0:表示成功/完成
 	RewardDrawStatus int    `json:"reward_draw_status"` // 奖励领取状态
+	Reward           string `json:"reward"`             // 奖励 json字符串 eg:[]ItemReward
 	CreateAt         int64  `json:"create_at"`          // 事件创建时间戳
 }
 

+ 0 - 1
game/game_cluster/internal/mdb/eventmodels/taskFinishEvent.go

@@ -8,7 +8,6 @@ type TaskFinishEventContent struct {
 	TaskName      string `json:"task_name"`      // 任务名称
 	TaskCondition string `json:"task_condition"` // 任务条件
 	TaskType      string `json:"task_type"`      // 任务类型
-	TaskReward    string `json:"task_reward"`    // 任务奖励 json字符串 eg:[]ItemReward
 	TaskProgress  int    `json:"task_progress"`  // 任务进度
 }
 

+ 6 - 5
game/game_cluster/internal/mdb/eventmodels/userRewardEvent.go

@@ -4,11 +4,12 @@ package eventmodels
 type UserRewardEventContent struct {
 	UserBasic
 	EventBasic
-	Source    int    `json:"source"` // 奖励来源
-	SourceId  int    `json:"sourceId"`
-	AddReward string `json:"add_reward"` // 增加的道具json字符串 eg:[]ItemReward
-	SubReward string `json:"sub_reward"` // 减少的道具json字符串 eg:[]ItemReward
-	Desc      string `json:"desc"`       // json字符串
+	Source        int    `json:"source"` // 奖励来源
+	SourceId      int    `json:"sourceId"`
+	OperationType string `json:"operation_type"` // 操作类型 范围:constant.OperationTypeStr 增加:increase;减少:decrease
+	AddReward     string `json:"add_reward"`     // 增加的道具json字符串 eg:[]ItemReward
+	SubReward     string `json:"sub_reward"`     // 减少的道具json字符串 eg:[]ItemReward
+	Desc          string `json:"desc"`           // json字符串
 }
 
 type ItemReward struct {