monitor.go 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. package model
  2. const (
  3. // MonitorClose 取消监控
  4. MonitorClose = int32(0)
  5. // MonitorOpen 打开监控
  6. MonitorOpen = int32(1)
  7. // MonitorAudit 先审后发
  8. MonitorAudit = int32(2)
  9. // MonitorStatsAll all
  10. MonitorStatsAll = 1
  11. // MonitorStatsUser all
  12. MonitorStatsUser = 2
  13. )
  14. // SearchMonitorParams search params.
  15. type SearchMonitorParams struct {
  16. Mode int8
  17. Type int8
  18. Oid int64
  19. UID int64
  20. NickName string
  21. Keyword string
  22. Sort string
  23. Order string
  24. }
  25. // SearchMonitor search monitor.
  26. type SearchMonitor struct {
  27. ID int64 `json:"id"`
  28. Oid int64 `json:"oid"`
  29. OidStr string `json:"oid_str"`
  30. Type int8 `json:"type"`
  31. Mid int64 `json:"mid"`
  32. State int8 `json:"state"`
  33. Attr int32 `json:"attr"`
  34. Ctime string `json:"ctime"`
  35. Mtime string `json:"mtime"`
  36. Title string `json:"title"`
  37. Uname string `json:"uname"`
  38. UnverifyNmu int `json:"unverify_num"`
  39. MCount int32 `json:"mcount"`
  40. DocID string `json:"doc_id"`
  41. Remark string `json:"remark"`
  42. }
  43. // SearchMonitorResult search result.
  44. type SearchMonitorResult struct {
  45. Code int `json:"code,omitempty"`
  46. Page int64 `json:"page"`
  47. PageSize int64 `json:"pagesize"`
  48. PageCount int64 `json:"pagecount"`
  49. Total int64 `json:"total"`
  50. Order string `json:"order"`
  51. Result []*SearchMonitor `json:"result"`
  52. Message string `json:"msg,omitempty"`
  53. }
  54. // StatsMonitor stats monitor.
  55. type StatsMonitor struct {
  56. Date string `json:"date"`
  57. AdminID int64 `json:"adminid"`
  58. MonitorTotal int64 `json:"monitor_total"`
  59. MonitorPending int64 `json:"monitor_pending"`
  60. MonitorPass int64 `json:"monitor_pass"`
  61. MonitorDel int64 `json:"monitor_del"`
  62. MonitorAvgCost string `json:"monitor_avg_cost"`
  63. }
  64. // StatsMonitorResult search result.
  65. type StatsMonitorResult struct {
  66. Code int `json:"code,omitempty"`
  67. Page int `json:"page"`
  68. PageSize int `json:"pagesize"`
  69. PageCount int `json:"pagecount"`
  70. Total int `json:"total"`
  71. Order string `json:"order"`
  72. Message string `json:"msg,omitempty"`
  73. Result []*StatsMonitor `json:"result"`
  74. }
  75. // MonitorLogResult MonitorLogResult
  76. type MonitorLogResult struct {
  77. Logs []*MonitorLog `json:"logs"`
  78. Page Page `json:"page"`
  79. Order string `json:"order"`
  80. Sort string `json:"sort"`
  81. }
  82. // Page Page
  83. type Page struct {
  84. Num int64 `json:"num"`
  85. Size int64 `json:"size"`
  86. Total int64 `json:"total"`
  87. }
  88. // MonitorLog MonitorLog
  89. type MonitorLog struct {
  90. AdminID int64 `json:"adminid"`
  91. AdminName string `json:"admin_name"`
  92. Oid int64 `json:"oid"`
  93. OidStr string `json:"oid_str"`
  94. Type int32 `json:"type"`
  95. Title string `json:"title"`
  96. RedirectURL string `json:"redirect_url"`
  97. Remark string `json:"remark"`
  98. UserName string `json:"username"`
  99. Mid int64 `json:"mid"`
  100. CTime string `json:"ctime"`
  101. LogState int64 `json:"log_state"`
  102. State int64 `json:"state"`
  103. }