credit_state.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337
  1. package model
  2. // const credit state
  3. const (
  4. // blocked_opinion
  5. BlockedOpinionAttrOn = int8(1)
  6. BlockedOPinionAttrOff = int8(0)
  7. // blocked_info.block_type
  8. PunishBlock = int8(0) // 系统封禁
  9. PunishJury = int8(1) // 风纪仲裁
  10. CreditStatusBlocked = -2
  11. // blocked_info.punish_type
  12. PunishTypeMoral = int8(1)
  13. PunishTypeBlock = int8(2)
  14. PunishTypeForever = int8(3)
  15. // Publish type
  16. PublishTypedef = int8(0)
  17. PublishTypePunish = int8(1)
  18. PublishTypeBan = int8(2)
  19. PublishTypeOptimize = int8(3)
  20. // publish status
  21. PublishStatusClose = int8(0) // 案件关闭状态
  22. PublishStatusOpen = int8(1) // 案件公开状态
  23. // origin_type.
  24. OriginReply = int8(1) // 评论
  25. OriginDM = int8(2) // 弹幕
  26. OriginMsg = int8(3) // 私信
  27. OriginTag = int8(4) // 标签
  28. OriginMember = int8(5) // 个人资料
  29. OriginArchive = int8(6) // 投稿
  30. OriginMusic = int8(7) // 音频
  31. OriginArticle = int8(8) // 专栏
  32. OriginSpaceTop = int8(9) // 空间头图
  33. OriginDsynamic = int8(10) // 动态
  34. OriginPhoto = int8(11) // 相册
  35. OriginMinVideo = int8(12) // 小视频
  36. // blocked_publish init lenth
  37. PublishInitLen = 4
  38. // blocked_jury.status
  39. JuryStatusEffect = int8(1)
  40. JuryStatusNoEffect = int8(2)
  41. // blocked_jury.case_type
  42. JudeCaseTypePrivate = int8(0) // 小众众裁
  43. JudeCaseTypePublic = int8(1) // 大众众裁
  44. // case obtain day by mid
  45. CaseObtainToday = true
  46. CaseObtainNoToday = false
  47. // message
  48. ApplyJuryTitle = "获得风纪委员资格"
  49. ApplyJuryContext = `恭喜您获得%d天风纪委员资格!风纪委员应遵守以下原则:
  50. "1. 在了解举报案件背景后,公正客观投票。对不了解或难以判断的案件,可以选择弃权。
  51. "2. 以身作则,不在举报案件相关视频、评论下讨论或发布不相关内容。相关违规举报被落实处罚后,将会失去风纪委员资格。`
  52. AppealTitle = "申诉处理通知"
  53. MaxAddCaseNum = 100 //批量增加案件最大数量
  54. // list multi juryer info
  55. JuryMultiJuryerInfoMax = 50
  56. // jury expired
  57. JuryExpiredDays = 30
  58. // one day
  59. OneDaySecond = 86400
  60. // black or white
  61. JuryBlack = int8(1)
  62. JuryWhite = int8(2)
  63. // blocked_info blocked_forever
  64. NotInBlockedForever = int8(0)
  65. InBlockedForever = int8(1)
  66. // blocked_info blocked_forever bool
  67. BlockedStateForever = true
  68. BlockedStateNoForever = false
  69. // guard
  70. GuardMedalPointA = int64(5000)
  71. GuardMedalPointB = int64(1000)
  72. GuardMedalPointC = int64(200)
  73. GuardMedalNone = int64(0)
  74. GuardMedalA = int64(69)
  75. GuardMedalB = int64(68)
  76. GuardMedalC = int64(67)
  77. // reasonType
  78. ReasonOtherType = int8(0)
  79. ReasonBrushScreen = int8(1)
  80. ReasonGrabFloor = int8(2)
  81. ReasonGamblingFraud = int8(4)
  82. ReasonProhibited = int8(5)
  83. ReasonGarbageAds = int8(6)
  84. ReasonPersonalAttacks = int8(7)
  85. ReasonViolatePrivacy = int8(8)
  86. ReasonLeadBattle = int8(9)
  87. ReasonSpoiler = int8(10)
  88. ReasonAddUnrelatedTags = int8(11)
  89. ReasonDelOtherTags = int8(12)
  90. ReasonPornographic = int8(13)
  91. ReasonVulgar = int8(14)
  92. ReasonBloodyViolence = int8(15)
  93. ReasonAnimusVideoUp = int8(16)
  94. ReasonIllegalWebsite = int8(17)
  95. ReasonSpreadErrinfo = int8(18)
  96. ReasonAbettingEncouragement = int8(19)
  97. ReasonAnimusBrushScreen = int8(20)
  98. ReasonAccountViolation = int8(21)
  99. ReasonMaliciousPlagiarism = int8(22)
  100. ReasonPosingAsHomemade = int8(23)
  101. ReasonPostTeenBadContent = int8(24)
  102. ReasonDestroyCyberSecurity = int8(25)
  103. ReasonPostingMisleadingInfo = int8(26)
  104. ReasonCounterfeitOfficialAuth = int8(27)
  105. ReasonPublishInappropriateContent = int8(28)
  106. ReasonViolationOperatingRules = int8(29)
  107. ReasonIllegalCreateTopic = int8(30)
  108. ReasonIllegalDrawLottery = int8(31)
  109. ReasonIllegalFakeMan = int8(32)
  110. // reply reasonType
  111. ReplyReasonOtherType = int8(0)
  112. ReplyReasonGarbageAds = int8(1)
  113. ReplyReasonPornographic = int8(2)
  114. ReplyReasonAnimusBrushScreen = int8(3)
  115. ReplyReasonLeadBattle = int8(4)
  116. ReplyReasonSpoiler = int8(5)
  117. ReplyReasonPolitical = int8(6)
  118. ReplyReasonPersonalAttacks = int8(7)
  119. ReplyReasonIrrelevantVideo = int8(8)
  120. ReplyReasonProhibited = int8(9)
  121. ReplyReasonVulgar = int8(10)
  122. ReplyReasonIllegalWebsite = int8(11)
  123. ReplyReasonGamblingFraud = int8(12)
  124. ReplyReasonSpreadErrinfo = int8(13)
  125. ReplyReasonAbettingEncouragement = int8(14)
  126. ReplyReasonViolatePrivacy = int8(15)
  127. ReplyReasonGrabFloor = int8(16)
  128. ReplyReasonPostTeenBadContent = int8(17)
  129. // tag reasonType
  130. TagReasonAddUnrelatedTags = int8(1)
  131. TagReasonProhibited = int8(2)
  132. TagReasonPersonalAttacks = int8(3)
  133. TagReasonSpoiler = int8(4)
  134. TagReasonDelOtherTags = int8(5)
  135. // case status.
  136. CaseStatusGranting = 1 // 发放中
  137. CaseStatusGrantStop = 2 // 停止发放
  138. CaseStatusDealing = 3 // 结案中
  139. CaseStatusDealed = 4 // 已裁决
  140. CaseStatusRestart = 5 // 待重启
  141. CaseStatusUndealed = 6 // 未裁决
  142. CaseStatusFreeze = 7 // 冻结中
  143. CaseStatusQueueing = 8 // 队列中
  144. // blocked_case.punish_result
  145. BlockNone = int8(0)
  146. Block3Days = int8(1)
  147. Block7Days = int8(2)
  148. BlockForever = int8(3)
  149. BlockCustom = int8(4)
  150. Block15Days = int8(5)
  151. BlockOnlyDel = int8(6)
  152. // judge status.
  153. JudgeTypeUndeal = 0 // 未裁决
  154. JudgeTypeViolate = 1 // 违规
  155. JudgeTypeLegal = 2 // 未违规
  156. // vote type
  157. VoteBanned = 1 // 违规封禁
  158. VoteRule = 2
  159. VoteAbstain = 3
  160. VoteDel = 4 // 违规删除
  161. // opinion type
  162. OpinonBreak = 1 // 违规观点
  163. OpinionRule = 2 // 不违规观点
  164. // labour ans
  165. LabourNoAnswer = int8(0)
  166. LabourOkAnswer = int8(1)
  167. // opinion state
  168. OpinionStateOK = int8(0)
  169. OpinionStateNoOK = int8(1)
  170. // kpi rate
  171. KPILevelS = int8(1)
  172. KPILevelA = int8(2)
  173. KPILevelB = int8(3)
  174. KPILevelC = int8(4)
  175. KPILevelD = int8(5)
  176. // block status
  177. BlockStatusNone = int8(0)
  178. BlockStatusForever = int8(1)
  179. BlockStatusOn = int8(2)
  180. )
  181. // var credit state
  182. var (
  183. _punishResult = map[int8]string{
  184. BlockNone: "",
  185. Block3Days: "封禁3天",
  186. Block7Days: "封禁7天",
  187. BlockForever: "永久封禁",
  188. BlockCustom: "封禁%d天",
  189. Block15Days: "封禁15天",
  190. BlockOnlyDel: "扣节操",
  191. }
  192. _punishType = map[int8]string{
  193. PunishTypeMoral: "节操",
  194. PunishTypeBlock: "封禁",
  195. PunishTypeForever: "永久封禁",
  196. }
  197. _reasonType = map[int8]string{
  198. ReasonOtherType: "其他",
  199. ReasonBrushScreen: "刷屏",
  200. ReasonGrabFloor: "抢楼",
  201. ReasonGamblingFraud: "发布赌博诈骗信息",
  202. ReasonProhibited: "发布违禁相关信息",
  203. ReasonGarbageAds: "发布垃圾广告信息",
  204. ReasonPersonalAttacks: "发布人身攻击言论",
  205. ReasonViolatePrivacy: "发布侵犯他人隐私信息",
  206. ReasonLeadBattle: "发布引战言论",
  207. ReasonSpoiler: "发布剧透信息",
  208. ReasonAddUnrelatedTags: "恶意添加无关标签",
  209. ReasonDelOtherTags: "恶意删除他人标签",
  210. ReasonPornographic: "发布色情信息",
  211. ReasonVulgar: "发布低俗信息",
  212. ReasonBloodyViolence: "发布暴力血腥信息",
  213. ReasonAnimusVideoUp: "涉及恶意投稿行为",
  214. ReasonIllegalWebsite: "发布非法网站信息",
  215. ReasonSpreadErrinfo: "发布传播不实信息",
  216. ReasonAbettingEncouragement: "发布怂恿教唆信息",
  217. ReasonAnimusBrushScreen: "恶意刷屏",
  218. ReasonAccountViolation: "账号违规",
  219. ReasonMaliciousPlagiarism: "恶意抄袭",
  220. ReasonPosingAsHomemade: "冒充自制原创",
  221. ReasonPostTeenBadContent: "发布青少年不良内容",
  222. ReasonDestroyCyberSecurity: "破坏网络安全",
  223. ReasonPostingMisleadingInfo: "发布虚假误导信息",
  224. ReasonCounterfeitOfficialAuth: "仿冒官方认证账号",
  225. ReasonPublishInappropriateContent: "发布不适宜内容",
  226. ReasonViolationOperatingRules: "违反运营规则",
  227. ReasonIllegalCreateTopic: "恶意创建话题",
  228. ReasonIllegalDrawLottery: "发布违规抽奖",
  229. ReasonIllegalFakeMan: "恶意冒充他人",
  230. }
  231. _originType = map[int8]string{
  232. OriginReply: "评论",
  233. OriginDM: "弹幕",
  234. OriginMsg: "私信",
  235. OriginTag: "标签",
  236. OriginMember: "个人资料",
  237. OriginArchive: "投稿",
  238. OriginMusic: "音频",
  239. OriginArticle: "专栏",
  240. OriginSpaceTop: "空间头图",
  241. OriginDsynamic: "动态",
  242. OriginPhoto: "相册",
  243. OriginMinVideo: "小视频",
  244. }
  245. _replyReasonType = map[int8]int8{
  246. ReplyReasonOtherType: ReasonOtherType,
  247. ReplyReasonGarbageAds: ReasonGarbageAds,
  248. ReplyReasonPornographic: ReasonPornographic,
  249. ReplyReasonAnimusBrushScreen: ReasonAnimusBrushScreen,
  250. ReplyReasonLeadBattle: ReasonLeadBattle,
  251. ReplyReasonSpoiler: ReasonSpoiler,
  252. ReplyReasonPolitical: ReasonOtherType,
  253. ReplyReasonPersonalAttacks: ReasonPersonalAttacks,
  254. ReplyReasonIrrelevantVideo: ReasonOtherType,
  255. ReplyReasonProhibited: ReasonProhibited,
  256. ReplyReasonVulgar: ReasonVulgar,
  257. ReplyReasonIllegalWebsite: ReasonIllegalWebsite,
  258. ReplyReasonGamblingFraud: ReasonGamblingFraud,
  259. ReplyReasonSpreadErrinfo: ReasonSpreadErrinfo,
  260. ReplyReasonAbettingEncouragement: ReasonAbettingEncouragement,
  261. ReplyReasonViolatePrivacy: ReasonViolatePrivacy,
  262. ReplyReasonGrabFloor: ReasonGrabFloor,
  263. ReplyReasonPostTeenBadContent: ReasonPostTeenBadContent,
  264. }
  265. _tagReasonType = map[int8]int8{
  266. TagReasonAddUnrelatedTags: ReasonAddUnrelatedTags,
  267. TagReasonProhibited: ReasonProhibited,
  268. TagReasonPersonalAttacks: ReasonPersonalAttacks,
  269. TagReasonSpoiler: ReasonSpoiler,
  270. TagReasonDelOtherTags: ReasonDelOtherTags,
  271. }
  272. )
  273. // PunishResultDesc get PunishResult desc
  274. func PunishResultDesc(punishResult int8) (desc string) {
  275. desc = _punishResult[punishResult]
  276. return
  277. }
  278. // PunishTypeDesc get punishType desc
  279. func PunishTypeDesc(punishType int8) (desc string) {
  280. desc = _punishType[punishType]
  281. return
  282. }
  283. // ReasonTypeDesc get reasonType desc
  284. func ReasonTypeDesc(reasonType int8) (desc string) {
  285. desc = _reasonType[reasonType]
  286. return
  287. }
  288. // OriginTypeDesc get originType desc
  289. func OriginTypeDesc(originType int8) (desc string) {
  290. desc = _originType[originType]
  291. return
  292. }
  293. // BlockedReasonTypeByReply get blocked reason type.
  294. func BlockedReasonTypeByReply(replyReasonType int8) (reasonType int8) {
  295. reasonType = _replyReasonType[replyReasonType]
  296. return
  297. }
  298. // BlockedReasonTypeByTag get blocked reason type.
  299. func BlockedReasonTypeByTag(tagReasonType int8) (reasonType int8) {
  300. reasonType = _tagReasonType[tagReasonType]
  301. return
  302. }