advance.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. package model
  2. // all variable used in advance dm
  3. const (
  4. // mode
  5. AdvSpeMode = "sp" // mode 7
  6. AdvMode = "advance" // mode8 mode9
  7. // type
  8. AdvTypeRequest = "request"
  9. AdvTypeAccept = "accept"
  10. AdvTypeBuy = "buy"
  11. AdvTypeDeny = "deny"
  12. // coin
  13. AdvSPCoin = 2
  14. AdvCoin = 5
  15. // reason
  16. AdvSPCoinReason = "购买特殊弹幕"
  17. AdvCoinReason = "购买高级弹幕"
  18. AdvSPCoinCancelReason = "购买特殊弹幕被取消"
  19. AdvCoinCancelReason = "购买高级弹幕被取消"
  20. // confirm state
  21. AdvStatConfirmDefault = 0
  22. AdvStatConfirmAgree = 1
  23. AdvStatConfirmRequest = 2
  24. AdvStatConfirmDeny = 3
  25. // 高级弹幕申请权限控制
  26. AdvPermitAll = int8(0) // 任何人
  27. AdvPermitFollower = int8(1) // 仅限粉丝
  28. AdvPermitAttention = int8(2) // 仅限相互关注
  29. AdvPermitForbid = int8(3) // 始终拒绝
  30. )
  31. // BuyAdv user buy adv
  32. type BuyAdv struct {
  33. CID int64
  34. Owner int64
  35. Mid int64
  36. Type string
  37. Timestamp int64
  38. Mode string
  39. Refund int
  40. }
  41. // ArgAdvBuy buy adv data
  42. type ArgAdvBuy struct {
  43. Mid int64
  44. Owner int64
  45. Type string
  46. Reason string
  47. Cid int64
  48. Coin float64
  49. Mode string
  50. Cookie string
  51. AccessKey string
  52. Refund int
  53. IsCoin bool
  54. }
  55. // AdvState state
  56. type AdvState struct {
  57. Coins int `json:"coins"`
  58. Confirm int `json:"confirm"`
  59. Accept bool `json:"accept"`
  60. HasBuy bool `json:"hasBuy"`
  61. }
  62. // Advance dm_advancecomment
  63. type Advance struct {
  64. ID int64 `json:"id"`
  65. Owner int64 `json:"owner"`
  66. Cid int64 `json:"cid"`
  67. Aid int64 `json:"aid"`
  68. Type string `json:"type"`
  69. Mode string `json:"mode"`
  70. Mid int64 `json:"mid"`
  71. Timestamp int64 `json:"timestamp"`
  72. Refund int8 `json:"refund"`
  73. Uname string `json:"uname"`
  74. Title string `json:"title"`
  75. Cover string `json:"cover"`
  76. }