data.go 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package proto
  2. const (
  3. _ = iota // 0=无效
  4. Type_Login // 1=登录
  5. Type_Charge // 2=充值
  6. Type_Game // 3=游戏
  7. Type_Task // 4=任务
  8. Type_Chat // 5=聊天
  9. Type_AudioRoom // 6=语聊房
  10. Type_Friend // 7=好友
  11. Type_Bankruptcy // 8=破产
  12. )
  13. // 标签范围
  14. type Scope struct {
  15. GameId int `json:",omitempty"` // 游戏id
  16. IsFriendRoom bool `json:",omitempty"` // 是否好友房
  17. OnlineSeconds int `json:",omitempty"` // 在线时长
  18. GoldAmount int `json:",omitempty"` // 金币数量
  19. PayPrice float64 `json:",omitempty"` // 充值金额(美元)
  20. IsDiscount bool `json:",omitempty"` // 是否折扣
  21. Num int `json:",omitempty"` // 数量
  22. IPAddress string `json:",omitempty"` // IP地址
  23. IMei string `json:",omitempty"` // IMei
  24. UTMSource string `json:",omitempty"` // 流量渠道
  25. IsRegister bool `json:",omitempty"` // 是否注册
  26. IsReturn bool `json:",omitempty"` // 是否回归
  27. }
  28. // LabelConfig 标签
  29. type LabelConfig struct {
  30. TypeId int `json:"TypeId"` // 类别ID
  31. TypeName string `json:"TypeName"` // 类别名称
  32. Color string `json:"Color"` // 颜色
  33. Days int `json:"Days,omitempty"` // 天数
  34. Content []struct {
  35. LabelId string `json:"LabelId"` // 标签Id
  36. LabelName string `json:"LabelName"` // 标签名称
  37. Memo string `json:"Memo"` // 描述
  38. Min int `json:"Min,omitempty"` // 最低值
  39. Max int `json:"Max,omitempty"` // 最高值
  40. Percentage int `json:"Percentage,omitempty"` // 百分比
  41. Ext int `json:"Ext,omitempty"` // 扩展参数
  42. PoolValue int `json:"PoolValue,omitempty"` // 奖池金额
  43. } `json:"Content"` // 具体内容
  44. }
  45. // 标签信息
  46. type LabelInfo struct {
  47. TypeId int `json:"TypeId,omitempty"` // 类型ID
  48. LabelId string `json:"LabelId,omitempty"` // 标签Id
  49. TotalValue int `json:"TotalValue,omitempty"` // 累计数值
  50. Days []*DayInfo `json:"Days,omitempty"` // 每天数据
  51. }
  52. // 日信息
  53. type DayInfo struct {
  54. Index int `json:"Index,omitempty"` // 日期索引
  55. Param string `json:"Param,omitempty"` // 参数
  56. Value int `json:"Value,omitempty"` // 数值
  57. ExtValue int `json:"ExtValue,omitempty"` // 扩展数值
  58. }
  59. // 计算标签结果
  60. type CalResult struct {
  61. Success bool // 操作结果
  62. LabelId string // 标签id
  63. LabelName string // 标签名称
  64. PoolValue int // 奖池
  65. Days int // 天数
  66. }
  67. // ConfigSimpleInfo 标签
  68. type ConfigSimpleInfo struct {
  69. TypeId int `json:"TypeId"` // 类别ID
  70. TypeName string `json:"TypeName"` // 类别名称
  71. Color string `json:"Color"` // 颜色
  72. LabelId string `json:"LabelId"` // 标签Id
  73. LabelName string `json:"LabelName"` // 标签名称
  74. }