event_log.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package msg
  2. const (
  3. EventTypeLogin = "login"
  4. EventTypeWatchAd = "watchAd"
  5. EventTypeBattle = "battle"
  6. EventTypeGuide = "guide"
  7. EventTypeOnlineDuration = "onlineDuration"
  8. SubTypeLoadResource1 = "loadResource1"
  9. SubTypeLoadResource2 = "loadResource2"
  10. SubTypeLoadResource3 = "loadResource3"
  11. SubTypeCover = "cover"
  12. SubTypeLogin = "login"
  13. SubTypeLoadJson = "loadJson"
  14. SubTypeHome = "home"
  15. )
  16. type EventLogReq struct {
  17. EventType string `json:"event_type"`
  18. Channel string `json:"channel"`
  19. PlayerId int64 `json:"player_id"`
  20. PlayerCreateTime int64 `json:"player_create_time"`
  21. // login
  22. EventId string `json:"event_id"`
  23. SubType string `json:"sub_type"`
  24. Duration int64 `json:"duration"`
  25. // ad
  26. AdId int64 `json:"ad_id"`
  27. Status int64 `json:"status"` // 状态 1.点击游戏内广告按钮;2.拉取不到广告;3.开始播放;4.播放完成并领取游戏内奖励;
  28. // battle
  29. ChapterId int64 `json:"chapter_id"` // 关卡id
  30. Wave int64 `json:"wave"` // 波数
  31. BattleTime int64 `json:"battle_time"` // 战斗时长
  32. BattleResult int64 `json:"battle_result"` // 战斗结果 0未通关 1通关
  33. IsRevive int `json:"is_revive"` // 是否复活 0否 1是
  34. ReviveWave int `json:"revive_wave"` // 复活波数
  35. // guide
  36. GuideId int64 `json:"guide_id"` // 引导id
  37. StepId int64 `json:"step_id"` // 步骤id
  38. // onlineDuration
  39. LoginAt int64 `json:"login_at"` // 登录时间
  40. IsValid int64 `json:"is_valid"` // 是否是有效用户 0否 1是
  41. }
  42. type EventLogResp struct {
  43. Code int64 `json:"code"`
  44. Msg string `json:"msg"`
  45. }