data.go 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. package proto
  2. const (
  3. Action_Invalid = iota // 0=无效
  4. Action_Click // 1=点击
  5. Action_Complete // 2=完成
  6. Action_Awarded // 3=已领取
  7. )
  8. const (
  9. Scene_Login = "登录"
  10. Scene_Shop = "商城"
  11. Scene_Game = "游戏"
  12. Scene_Match = "赛事"
  13. Scene_Task = "任务"
  14. Scene_HotUpdate = "热更"
  15. Scene_NoviceWelfare_Task = "新手任务"
  16. Scene_DailyWheel = "每日转盘"
  17. )
  18. // 配置
  19. type DotConfig struct {
  20. Scene string `json:",omitempty"` // 场景
  21. Event string `json:",omitempty"` // 事件
  22. Extra string `json:",omitempty"` // 扩展参数
  23. }
  24. // 打点信息
  25. type DotInfo struct {
  26. DateFlag string // 日期标识
  27. Scene string // 场景
  28. Event string // 事件
  29. Action int // 动作(1=点击 2=完成 3=领取)
  30. Times int // 次数
  31. }
  32. // 范围
  33. type DotScope struct {
  34. Scene string `json:",omitempty"` // 场景
  35. Action int `json:",omitempty"` // 动作(1=点击 2=完成 3=领取)
  36. Extra string `json:",omitempty"` // 扩展参数
  37. IpAddress string `json:",omitempty"` // ip地址
  38. }
  39. // 统计信息
  40. type StatInfo struct {
  41. DateFlag string // 日期
  42. Event string // 事件
  43. LabelID string // 标签
  44. Days int // 天数(0=当天 7=过去7天 30=过去30天)
  45. ClickTimes int // 点击次数
  46. ClickUserCount int // 点击人数
  47. CompleteUserCount int // 完成人数
  48. }
  49. // 任务统计信息
  50. type TaskStatInfo struct {
  51. DateFlag string // 日期
  52. Event string // 事件
  53. Action int // 动作(1=点击 2=完成 3=领取)
  54. UserCount int // 用户人数
  55. }