log_ip.go 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. package log
  2. type IpLog struct {
  3. Id uint `json:"id"`
  4. Ip string `json:"ip"` //模拟器ip
  5. LogUuid string `json:"log_uuid"` //日志UUID
  6. GameId int `json:"game_id"` //游戏id
  7. Account string `json:"account"` //账号
  8. PcCode string `json:"pc_code"` //电脑编号
  9. CreateDate string `json:"create_date"` // 创建日期
  10. CreateTime string `json:"create_time"` // 创建时间
  11. }
  12. type IpLogRequest struct {
  13. Id uint `json:"id"`
  14. Ip string `json:"ip"` //模拟器ip
  15. Date []string `json:"date"`
  16. LogUuid string `json:"log_uuid"` //日志UUID
  17. GameId int `json:"game_id"` //游戏id
  18. Account string `json:"account"` //账号
  19. PcCode string `json:"pc_code"` //电脑编号
  20. CreateDate string `json:"create_date"` // 创建日期
  21. CreateTime string `json:"create_time"` // 创建时间
  22. }
  23. type IpLogResponse struct {
  24. PcCode string `json:"pc_code"` //电脑编号
  25. GameId int `json:"game_id"` //游戏id
  26. CreateDate string `json:"create_date"` // 创建日期
  27. CountTotal int `json:"count_total"` //ip总上报次数
  28. CountDistinctIp int `json:"count_distinct_ip"` //IP个数
  29. }
  30. type GameIpRequest struct {
  31. Id uint `json:"id"`
  32. Ip string `json:"ip"` //模拟器ip
  33. Date []string `json:"date"`
  34. User string `json:"user"` //负责人
  35. LogUuid string `json:"log_uuid"` //日志UUID
  36. GameId int `json:"game_id"` //游戏id
  37. Account string `json:"account"` //账号
  38. PcCode string `json:"pc_code"` //电脑编号
  39. CreateDate string `json:"create_date"` // 创建日期
  40. CreateTime string `json:"create_time"` // 创建时间
  41. }
  42. type GameIpResponse struct {
  43. GameId int `json:"game_id"` //游戏id
  44. User string `json:"user"` //负责人
  45. TaskName string `json:"task_name"` //游戏名
  46. CreateDate string `json:"create_date"` // 创建日期
  47. CountTotal int `json:"count_total"` //ip总上报次数
  48. SuccessIp int `json:"success_ip"` //进入游戏所上报ip个数
  49. CountDistinctIp int `json:"count_distinct_ip"` //ip个数
  50. TaskCount int `json:"task_count"` //完成任务总数
  51. MaxCount int `json:"max_count"` //最多ip的数量
  52. ExceedThree int64 `json:"exceed_three"` //超过3的ip数量
  53. IpRepetitionRate float64 `json:"ip_repetition_rate"` //ip重复率
  54. AverageIpRepetitionRate float64 `json:"average_ip_repetition_rate"` //平均重复率
  55. }
  56. type QueryIpList struct {
  57. Ip string `json:"ip"` //模拟器ip
  58. Count int `json:"count"`
  59. }
  60. type AbnormalMachineIp struct {
  61. Id uint `json:"id"`
  62. Ip string `json:"ip"` //模拟器ip
  63. Count int `json:"count"` //ip数量
  64. GameId int `json:"game_id"` //游戏id
  65. PcCode string `json:"pc_code"` //电脑编号
  66. CreateDate string `json:"create_date"` // 创建日期
  67. }
  68. type AbnormalIpLogRequest struct {
  69. Id uint `json:"id"`
  70. Ip string `json:"ip"` //模拟器ip
  71. Date []string `json:"date"`
  72. GameId int `json:"game_id"` //游戏id
  73. PcCode string `json:"pc_code"` //电脑编号
  74. CreateDate string `json:"create_date"` // 创建日期
  75. }
  76. type TodayAbnormalMachineIp struct {
  77. Id uint `json:"id"`
  78. Ip string `json:"ip"` //模拟器ip
  79. Count int `json:"count"` //ip数量
  80. GameId int `json:"game_id"` //游戏id
  81. PcCode string `json:"pc_code"` //电脑编号
  82. User string `json:"user"` //负责人名称
  83. TaskName string `json:"task_name"` //任务名称
  84. CreateDate string `json:"create_date"` // 创建日期
  85. }
  86. func (IpLog) TableName() string {
  87. return "ip_log"
  88. }
  89. func (AbnormalMachineIp) TableName() string {
  90. return "abnormal_machine_ip"
  91. }
  92. func (GameIpResponse) TableName() string {
  93. return "game_ip_list"
  94. }