log_ip.go 4.9 KB

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