assist.go 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. package assist
  2. import "go-common/library/time"
  3. var (
  4. // ActEnum action enum
  5. ActEnum = map[int8]map[int8]string{
  6. 1: {
  7. 1: "删除评论",
  8. 2: "隐藏评论",
  9. },
  10. 2: {
  11. 1: "删除弹幕",
  12. 2: "屏蔽弹幕",
  13. 3: "保护弹幕",
  14. 4: "拉黑用户",
  15. 5: "移动弹幕到字幕池",
  16. 6: "忽略字幕池的弹幕",
  17. 7: "取消拉黑用户",
  18. },
  19. }
  20. )
  21. // Assist is Assists model.
  22. type Assist struct {
  23. AssistMid int64 `json:"assist_mid"`
  24. Banned int8 `json:"banned"`
  25. AssistAvatar string `json:"assist_avatar"`
  26. AssistName string `json:"assist_name"`
  27. Rights *Rights `json:"rights"`
  28. CTime time.Time `json:"ctime"`
  29. MTime time.Time `json:"mtime"`
  30. Total map[int8]map[int8]int `json:"total"`
  31. }
  32. // AssistLog is single record for assist done
  33. type AssistLog struct {
  34. ID int64 `json:"id"`
  35. Mid int64 `json:"mid"`
  36. AssistMid int64 `json:"assist_mid"`
  37. AssistAvatar string `json:"assist_avatar"`
  38. AssistName string `json:"assist_name"`
  39. Type int8 `json:"type"`
  40. Action int8 `json:"action"`
  41. SubjectID int64 `json:"subject_id"`
  42. ObjectID string `json:"object_id"`
  43. Detail string `json:"detail"`
  44. State int8 `json:"state"`
  45. CTime time.Time `json:"ctime"`
  46. }
  47. // LiveAssist is single record for assist done
  48. type LiveAssist struct {
  49. AssistMid int64 `json:"uid"`
  50. RoomID int64 `json:"roomid"`
  51. CTime time.Time `json:"-"`
  52. Datetime string `json:"ctime"`
  53. }
  54. // Rights main and live status
  55. type Rights struct {
  56. Main int8 `json:"main"`
  57. Live int8 `json:"live"`
  58. }