jury.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. package model
  2. import "time"
  3. // case status
  4. const (
  5. CaseStatusGranting = 1 // 发放中
  6. CaseStatusGrantStop = 2 // 停止发放
  7. CaseStatusDealing = 3 // 结案中
  8. CaseStatusDealed = 4 // 已裁决
  9. CaseStatusRestart = 5 // 待重启
  10. CaseStatusUndealed = 6 // 未裁决
  11. JudgeTypeUndeal = 0 // 未裁决
  12. JudgeTypeViolate = 1 // 违规
  13. JudgeTypeLegal = 2 // 未违规
  14. VoteTypeUndo = 0 // 未投票
  15. VoteTypeViolate = 1 // 违规-封禁
  16. VoteTypeDelete = 4 // 违规-删除
  17. VoteTypeLegal = 2 // 不违规
  18. VoteTypeGiveUp = 3 // 放弃投票
  19. // JuryInvalid
  20. JuryBlocked = 1
  21. JuryExpire = 2
  22. JuryAdmin = 3
  23. )
  24. // Case is jury case info.
  25. type Case struct {
  26. ID int64 `json:"id"`
  27. Mid int64 `json:"mid"`
  28. Agree int64 `json:"agree"`
  29. Against int64 `json:"against"`
  30. AdminAgree int64 `json:"ad_agree"`
  31. AdminAgainst int64 `json:"ad_against"`
  32. PunishStatus int8 `json:"pubish_status"`
  33. PunishResult int8 `json:"pubish_result"`
  34. BlockDays int64 `json:"block_days"`
  35. }
  36. // Kpi is jury kpi info.
  37. type Kpi struct {
  38. ID int64 `json:"id"`
  39. Mid int64 `json:"mid"`
  40. Point int64 `json:"point"`
  41. Day time.Time `json:"day"`
  42. Rate int64 `json:"rate"`
  43. Rank int64 `json:"rank"`
  44. RankPer int64 `json:"rank_per"`
  45. RankTotal int64 `json:"rankTotal"`
  46. Expired time.Time `json:"expired"`
  47. PreCount int64 `json:"-"`
  48. }
  49. // KpiPoint is jury kpi point info.
  50. type KpiPoint struct {
  51. ID int64 `json:"id"`
  52. Mid int64 `json:"mid"`
  53. Day time.Time `json:"day"`
  54. Point int64 `json:"point"`
  55. ActiveDays int64 `json:"activeDays"`
  56. VoteTotal int64 `json:"voteTotal"`
  57. VoteRadio int64 `json:"voteRadio"`
  58. BlockedTotal int64 `json:"blockedTotal"`
  59. Expired time.Time `json:"expired"`
  60. OpinionNum int64 `json:"opinion_num"`
  61. OpinionLikes int64 `json:"opinion_likes"`
  62. OpinionHates int64 `json:"opinion_hates"`
  63. }
  64. // KpiData is jury kpi data info.
  65. type KpiData struct {
  66. KpiPoint
  67. VoteRealTotal int64 `json:"vote_real_total"`
  68. }