model.go 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. package model
  2. import (
  3. "encoding/json"
  4. "time"
  5. )
  6. // Figure user figure model
  7. type Figure struct {
  8. ID int32 `json:"-"`
  9. Mid int64 `json:"mid"`
  10. Score int32 `json:"score"`
  11. LawfulScore int32 `json:"lawful_score"`
  12. WideScore int32 `json:"wide_score"`
  13. FriendlyScore int32 `json:"friendly_score"`
  14. BountyScore int32 `json:"bounty_score"`
  15. CreativityScore int32 `json:"creativity_score"`
  16. Ver int32 `json:"-"`
  17. Ctime time.Time `json:"-"`
  18. Mtime time.Time `json:"-"`
  19. }
  20. // BinlogMsg dm binlog msg
  21. type BinlogMsg struct {
  22. Action string `json:"action"`
  23. Table string `json:"table"`
  24. New json.RawMessage `json:"new"`
  25. Old json.RawMessage `json:"old"`
  26. }
  27. // ReplyInfo Reply info.
  28. type ReplyInfo struct {
  29. Mid int64 `json:"mid"`
  30. Oid int64 `json:"oid"`
  31. Type int8 `json:"type"`
  32. Ctime int64 `json:"ctime"`
  33. }
  34. // ReplyAction reply action.
  35. type ReplyAction struct {
  36. Mid int64 `json:"mid"`
  37. Action int8 `json:"action"`
  38. Oid int64 `json:"oid"`
  39. Type int8 `json:"type"`
  40. Ctime int64 `json:"ctime"`
  41. }
  42. // DMAction danmaku report action.
  43. type DMAction struct {
  44. Action string `json:"action"`
  45. Data DMData `json:"data"`
  46. }
  47. // DMData danmaku report action.
  48. type DMData struct {
  49. ID int64 `json:"id"`
  50. Dmid int64 `json:"dmid"`
  51. OwnerUID int64 `json:"dm_owner_uid"`
  52. ReportUID int64 `json:"uid"`
  53. }