model.go 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. package model
  2. const (
  3. // BangumiTyp 番剧
  4. BangumiTyp = 1
  5. // ComicTyp 漫画
  6. ComicTyp = 2
  7. // ArchiveTyp 稿件
  8. ArchiveTyp = 3
  9. // PlaylistTyp 播单
  10. PlaylistTyp = 4
  11. // ArchiveMsgTyp .
  12. ArchiveMsgTyp = "archive"
  13. // BangumiMsgTyp .
  14. BangumiMsgTyp = "bangumi_share"
  15. // ComicMsgTyp .
  16. ComicMsgTyp = "comic_share"
  17. // PlaylistMsgTyp .
  18. PlaylistMsgTyp = "playlist"
  19. )
  20. // ShareParams .
  21. type ShareParams struct {
  22. OID int64 `json:"oid" form:"oid" validate:"required,gt=0"`
  23. MID int64 `json:"mid" form:"mid" validate:"required"`
  24. TP int `json:"tp" form:"tp" validate:"required,gt=0"`
  25. IP string `json:"ip"`
  26. }
  27. // Share share item
  28. type Share struct {
  29. OID int64 `json:"oid"`
  30. Tp int `json:"tp"`
  31. Count int64 `json:"count"`
  32. }
  33. // MIDShare .
  34. type MIDShare struct {
  35. OID int64 `json:"oid"`
  36. MID int64 `json:"mid"`
  37. TP int `json:"tp"`
  38. Time int64 `json:"time"`
  39. }
  40. // ArchiveShare .
  41. type ArchiveShare struct {
  42. Type string `json:"type"`
  43. ID int64 `json:"id"`
  44. Count int `json:"count"`
  45. Ts int64 `json:"timestamp"`
  46. }