common.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. package model
  2. import "errors"
  3. var (
  4. // ErrSearchReport search report error
  5. ErrSearchReport = errors.New("search report error")
  6. // ErrSearchReply search reply error
  7. ErrSearchReply = errors.New("search reply error")
  8. // ErrSearchMonitor search monitor error
  9. ErrSearchMonitor = errors.New("search monitor error")
  10. // ErrMsgSend send message error
  11. ErrMsgSend = errors.New("send message error")
  12. // AttrNo attribute no
  13. AttrNo = uint32(0)
  14. // AttrYes attribute yes
  15. AttrYes = uint32(1)
  16. // EventReportAdd event add a report
  17. EventReportAdd = "report_add"
  18. // EventReportDel event del a report
  19. EventReportDel = "report_del"
  20. // EventReportIgnore event ignore a report
  21. EventReportIgnore = "report_ignore"
  22. // EventReportRecover event recover a report
  23. EventReportRecover = "report_recover"
  24. )
  25. const (
  26. // WeightLike like sort weight
  27. WeightLike = 2
  28. // WeightHate hate sort weight
  29. WeightHate = 4
  30. )
  31. // Pager page info.
  32. type Pager struct {
  33. Page int64 `json:"page"`
  34. PageSize int64 `json:"pagesize"`
  35. Total int64 `json:"total"`
  36. }
  37. // NewPager NewPager
  38. type NewPager struct {
  39. Num int64 `json:"num"`
  40. Size int64 `json:"size"`
  41. Total int64 `json:"total"`
  42. }