event_log.go 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. // guide
  34. GuideId int64 `json:"guide_id"` // 引导id
  35. StepId int64 `json:"step_id"` // 步骤id
  36. // onlineDuration
  37. LoginAt int64 `json:"login_at"` // 登录时间
  38. IsValid int64 `json:"is_valid"` // 是否是有效用户 0否 1是
  39. }
  40. type EventLogResp struct {
  41. Code int64 `json:"code"`
  42. Msg string `json:"msg"`
  43. }