mail.go 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. package msg
  2. import "leafstalk/covenant/model"
  3. // 邮件列表
  4. type LetterList struct {
  5. PlayerId int64 `json:"userId"`
  6. }
  7. type ResponseLetterList struct {
  8. ErrCode int `json:"errCode"`
  9. Msg string `json:"msg,omitempty"`
  10. Data []*LetterData `json:"data"`
  11. }
  12. type LetterData struct {
  13. Id int64 `json:"id"`
  14. State int `json:"state"` //0:未读,1:已读,2:已领取
  15. Title string `json:"title"`
  16. Content string `json:"content"`
  17. Extra []*model.DropedItem `json:"extra"`
  18. CreateTime int64 `json:"createTime"`
  19. ExpireTime int64 `json:"expireTime"`
  20. // DrawState int `json:"drawState"`
  21. // Type int64 `json:"type"`
  22. }
  23. // type DropedItem struct {
  24. // Id int64 `json:"id"`
  25. // Type int64 `json:"type"`
  26. // Num int64 `json:"num"`
  27. // }
  28. // 领取附件
  29. type DrawLetterExtra struct {
  30. PlayerId int64 `json:"userId"`
  31. Letters []int64 `json:"letters"`
  32. }
  33. type ResponseDrawLetterExtra struct {
  34. ErrCode int `json:"errCode"`
  35. Msg string `json:"msg,omitempty"`
  36. Data *DrawLetterExtraData `json:"data"`
  37. }
  38. type DrawLetterExtraData struct {
  39. Letters []int64 `json:"letters"`
  40. Bundles *model.DropedBundle `json:"bundles"`
  41. }
  42. // 删除邮件
  43. type DeleteLetter struct {
  44. PlayerId int64 `json:"userId"`
  45. Letters []int64 `json:"letters"`
  46. }
  47. type ResponseDeleteLetter struct {
  48. ErrCode int `json:"errCode"`
  49. Msg string `json:"msg,omitempty"`
  50. Data []int64 `json:"data"`
  51. }
  52. // 查看邮件
  53. type ViewLetter struct {
  54. PlayerId int64 `json:"userId"`
  55. Letters []int64 `json:"letters"`
  56. }
  57. type ResponseViewLetter struct {
  58. ErrCode int `json:"errCode"`
  59. Msg string `json:"msg,omitempty"`
  60. Data []int64 `json:"data"`
  61. }
  62. type AddNewLetterNotfiyIs struct {
  63. PlayerIds []int64 `json:"userId"`
  64. // Letters []int64 `json:"letters"`
  65. }
  66. type GMLetter struct {
  67. MsgId string `json:"msgId"`
  68. Letter *model.MailGlobal `json:"letter"`
  69. Players []int64 `json:"players"`
  70. OperatorId int64 `json:"operatorId"`
  71. }
  72. type ResponseGMLetter struct {
  73. ErrCode int `json:"errCode"`
  74. MsgId string `json:"msgId"`
  75. }
  76. type DrawLetterExtraIs struct {
  77. RpcRequestMsg
  78. PlayerId int64 `json:"userId"`
  79. Letters []int64 `json:"letters"`
  80. Materials map[int64]int64 `json:"materials"`
  81. Equips []int64 `json:"equips"`
  82. Roles []int64 `json:"roles"`
  83. }
  84. type ResponseDrawLetterExtraIs struct {
  85. RpcResponseMsg
  86. }