report.go 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. package model
  2. const (
  3. //TypeVideo video type
  4. TypeVideo = int16(10)
  5. //TypeComment comment type
  6. TypeComment = int16(20)
  7. //TypeDanmu danmu type
  8. TypeDanmu = int16(30)
  9. //TypeUser user type
  10. TypeUser = int16(40)
  11. )
  12. // ReportConfig .
  13. type ReportConfig struct {
  14. Type int16 `json:"type"`
  15. Reasons []int16 `json:"reasons,omitempty"`
  16. }
  17. // ReasonConfig .
  18. type ReasonConfig struct {
  19. ReasonType int16 `json:"reason_type"`
  20. Name string `json:"name"`
  21. }
  22. //Reports .
  23. var Reports = []*ReportConfig{
  24. {
  25. Type: 10,
  26. Reasons: []int16{1, 2, 7, 3, 4, 100},
  27. },
  28. {
  29. Type: 20,
  30. Reasons: []int16{1, 2, 7, 3, 100},
  31. },
  32. {
  33. Type: 30,
  34. Reasons: []int16{1, 2, 7, 3, 100},
  35. },
  36. {
  37. Type: 40,
  38. Reasons: []int16{5, 6},
  39. },
  40. }
  41. //Reasons .
  42. var Reasons = []*ReasonConfig{
  43. {
  44. ReasonType: 1,
  45. Name: "违法违禁",
  46. },
  47. {
  48. ReasonType: 2,
  49. Name: "色情",
  50. },
  51. {
  52. ReasonType: 3,
  53. Name: "赌博诈骗",
  54. },
  55. {
  56. ReasonType: 4,
  57. Name: "血腥暴力",
  58. },
  59. {
  60. ReasonType: 5,
  61. Name: "昵称违规",
  62. },
  63. {
  64. ReasonType: 6,
  65. Name: "头像违规",
  66. },
  67. {
  68. ReasonType: 7,
  69. Name: "低俗",
  70. },
  71. {
  72. ReasonType: 100,
  73. Name: "其他",
  74. },
  75. }
  76. // MapReasons map reasons
  77. var MapReasons = map[int16]string{
  78. 1: "违法违禁",
  79. 2: "色情",
  80. 3: "赌博诈骗",
  81. 4: "血腥暴力",
  82. 5: "昵称违规",
  83. 6: "头像违规",
  84. 7: "低俗",
  85. 100: "其他",
  86. }
  87. // BiliReasonsMap 主站评论举报类型映射, key bbq value bilibili
  88. var BiliReasonsMap = map[int16]int16{
  89. 1: 9,
  90. 2: 2,
  91. 3: 12,
  92. 4: 0,
  93. 5: 0,
  94. 6: 0,
  95. 7: 10,
  96. 100: 0,
  97. }