moral.go 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. package model
  2. const (
  3. // DMReasonType is.
  4. DMReasonType = 1
  5. // ReplyReasonType is.
  6. ReplyReasonType = 2
  7. // TagReasonType is.
  8. TagReasonType = 3
  9. // ElecReasonType is.
  10. ElecReasonType = 4
  11. // AccountReasonType is.
  12. AccountReasonType = 5
  13. // SysReasonType is.
  14. SysReasonType = 6
  15. // RevocableMoralStatus is.
  16. RevocableMoralStatus = 0
  17. // RevokedMoralStatus is.
  18. RevokedMoralStatus = 1
  19. // IrrevocableMoralStatus is.
  20. IrrevocableMoralStatus = 2
  21. // ReportRewardType is.
  22. ReportRewardType = 1
  23. // PunishmentType is.
  24. PunishmentType = 2
  25. // CancelRewardType is.
  26. CancelRewardType = 3
  27. // CancelPunishType is.
  28. CancelPunishType = 4
  29. // ManualRecoveryType is.
  30. ManualRecoveryType = 5
  31. // ManualChangeType is.
  32. ManualChangeType = 6
  33. )
  34. //ArgUpdateMorals argUpdateMorals.
  35. type ArgUpdateMorals struct {
  36. Mids []int64 `form:"mids,split" validate:"required"`
  37. Delta int64 `form:"delta" validate:"required"`
  38. Origin int64 `form:"origin" validate:"required"`
  39. Reason string `form:"reason" validate:"required"`
  40. ReasonType int64 `form:"reason_type"`
  41. Operator string `form:"operator" validate:"required"`
  42. Remark string `form:"remark" validate:"required"`
  43. Status int64 `form:"status"`
  44. IsNotify bool `form:"is_notify"`
  45. IP string `form:"ip"`
  46. }
  47. //ArgUpdateMoral argUpdateMoral.
  48. type ArgUpdateMoral struct {
  49. Mid int64 `form:"mid" validate:"required"`
  50. Delta int64 `form:"delta" validate:"required"`
  51. Origin int64 `form:"origin" validate:"required"`
  52. Reason string `form:"reason" validate:"required"`
  53. ReasonType int64 `form:"reason_type"`
  54. Operator string `form:"operator" validate:"required"`
  55. Remark string `form:"remark" validate:"required"`
  56. Status int64 `form:"status"`
  57. IsNotify bool `form:"is_notify"`
  58. IP string `form:"ip"`
  59. }
  60. //ArgUndo argUndo.
  61. type ArgUndo struct {
  62. LogID string `form:"log_id" validate:"required"`
  63. Remark string `form:"remark" validate:"required"`
  64. Operator string `form:"operator" validate:"required"`
  65. }
  66. //ReasonType reasonType
  67. type ReasonType struct {
  68. Name string
  69. NotifyType string
  70. }
  71. //OriginType originType
  72. type OriginType struct {
  73. Name string
  74. NeedReason bool
  75. }
  76. //Notice notice
  77. type Notice struct {
  78. Title string
  79. Message string
  80. NoticeType string
  81. }
  82. var (
  83. // ReasonTypes ...
  84. ReasonTypes = map[int64]*ReasonType{
  85. DMReasonType: {"弹幕", "2_1_4"},
  86. ReplyReasonType: {"评论", "2_1_3"},
  87. TagReasonType: {"TAG", ""},
  88. ElecReasonType: {"电波", ""},
  89. AccountReasonType: {"账号", ""},
  90. SysReasonType: {"管理系统", ""},
  91. }
  92. // OriginTypes ...
  93. OriginTypes = map[int64]*OriginType{
  94. ReportRewardType: {"举报奖励", true},
  95. PunishmentType: {"违规惩罚", true},
  96. CancelRewardType: {"撤销奖励", true},
  97. CancelPunishType: {"撤销惩罚", true},
  98. ManualRecoveryType: {"自动恢复", true},
  99. ManualChangeType: {"手动修改", false},
  100. }
  101. // Less6000Notice is.
  102. Less6000Notice = &Notice{Title: "你的节操值已低于60", Message: "抱歉,你的节操值已低于60,社交类功能将不能正常使用,更多加减明细请查看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}", NoticeType: "2_1_5"}
  103. // Less3000Notice is.
  104. Less3000Notice = &Notice{Title: "你的节操值已低于30", Message: "抱歉,你的节操值已低于30,社交类功能将不能正常使用,更多加减明细请查看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}", NoticeType: "2_1_6"}
  105. // Greater6000Notice is .
  106. Greater6000Notice = &Notice{Title: "你的节操值已恢复至60以上", Message: "恭喜,你的节操值已恢复至60以上,所有功能将回复正常使用,更多加减明细请查看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}", NoticeType: "2_1_7"}
  107. // PunishmentNotice is.
  108. PunishmentNotice = &Notice{Title: "你被举报处理扣除了%s节操值", Message: "由于发布了违规内容,你被举报处理扣除了%s节操值,具体原因请看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}"}
  109. // SysPunishmentNotice is.
  110. SysPunishmentNotice = &Notice{Title: "你被举报处理扣除了%s节操值", Message: "由于发布了违规内容,你被系统处理扣除了%s节操值,具体原因请看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}"}
  111. // RewardNotice is.
  112. RewardNotice = &Notice{Title: "你举报的%s已被处理", Message: "您举报的%s已被管理员处理,获得了%s节操值奖励,具体详情请看 #{节操记录}{\"https://account.bilibili.com/site/record?type=moral\"}"}
  113. )