param.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. package param
  2. import (
  3. "github.com/mhaya/game/game_cluster/internal/data"
  4. )
  5. type LoginReq struct {
  6. Pid int `json:"pid"`
  7. OpenID string `json:"openid"`
  8. NickName string `json:"nickName"`
  9. IP string `json:"ip"`
  10. }
  11. type LoginResp struct {
  12. UserName string `json:"userName" bson:"userName"`
  13. OpenId string `json:"openId" bson:"openId"`
  14. TargetPath string `json:"targetPath" bson:"-"`
  15. }
  16. type GuideReq struct {
  17. Close int `json:"close"`
  18. CloseReward int `json:"closeReward"`
  19. Status int32 `json:"status"`
  20. }
  21. type GuideResp struct {
  22. Guide int `json:"guide"`
  23. FirstReward int `json:"firstReward"`
  24. Rolled int `json:"rolled"`
  25. FollowChannel int32 `json:"followChannel"`
  26. AddItem map[int]*data.ItemReward `json:"addItem"`
  27. SubItem map[int]*data.ItemReward `json:"subItem"`
  28. }
  29. type RollReq struct {
  30. Multi int `json:"multi"`
  31. }
  32. type RollResp struct {
  33. ChangeData
  34. Multi int `json:"multi"`
  35. Xcode string `json:"xcode"`
  36. Rolls []Roll `json:"rolls"`
  37. }
  38. type DrawResp struct {
  39. ChangeData
  40. Multi int `json:"multi"`
  41. Draws []*DrawConfig `json:"draws"`
  42. }
  43. type GetRankReq struct {
  44. Id int `json:"id"` //排行榜ID
  45. Tp int `json:"tp"` //是否是上一期榜单1是0否
  46. }
  47. type GetRankResp struct {
  48. Ranks map[int]*PlayerBase `json:"ranks"`
  49. Self *PlayerBase `json:"self"`
  50. }
  51. type DrawConfig struct {
  52. ID int `json:"id"`
  53. ItemID int `json:"itemId"`
  54. Num int `json:"num"`
  55. }
  56. type WeeklyRankConfigResp struct {
  57. WeeklyTotalReward []data.ItemReward `json:"weeklyTotalReward"`
  58. StartTime string `json:"startTime"`
  59. EndTime string `json:"endTime"`
  60. InviteReward []data.ItemReward `json:"inviteReward"`
  61. VipInviteReward []data.ItemReward `json:"vipInviteReward"`
  62. }
  63. type GetRankRewardReq struct {
  64. Id int `json:"id"` //排行榜ID
  65. }
  66. type DrawReq struct {
  67. Tp int `json:"tp"` //1单抽2 10连抽
  68. }
  69. type ShareReq struct {
  70. Tp int `json:"tp"` //1 每日抽奖分享
  71. }
  72. type JumpReq struct {
  73. Tp int `json:"tp"` //1 关注推特 2 加入TG频道 3 关注Yutube账号 4 加入DC频道
  74. }
  75. type SaveXReq struct {
  76. Twitter string `json:"twitter"`
  77. }
  78. type SaveTonWallReq struct {
  79. TonWall string `json:"tonWall"`
  80. }
  81. type InviteReq struct {
  82. ParentName string `json:"parentName"`
  83. Type int `json:"type"` //2普通邀请3VIP邀请
  84. }
  85. type GetLevelResp struct {
  86. NowLevel int `json:"nowLevel"`
  87. NextLevel int `json:"nextLevel"`
  88. NextRoll int `json:"nextRoll"`
  89. NextInvite int `json:"nextInvite"`
  90. NowRoll int `json:"nowRoll"`
  91. NowInvite int `json:"nowInvite"`
  92. }
  93. type ClaimReq struct {
  94. Tp int `json:"tp"` //类型 1榜单奖励 2邀请奖励 3成就奖励 4日常奖励
  95. Id int `json:"id"` //奖励类型ID 邀请奖励传0
  96. }
  97. type CashOutReq struct {
  98. Num int `json:"num"`
  99. }
  100. type PlayerBase struct {
  101. UserName string `json:"userName"`
  102. OpenId string `json:"openId"`
  103. UserNameMaybe string `json:"userNameMaybe"`
  104. NickName string `json:"nickName"`
  105. IsLeader int `json:"-"`
  106. Rank int `json:"rank"`
  107. Score int `json:"score"`
  108. Avatar string `json:"avatar"`
  109. IsClaim int `json:"isClaim"`
  110. Reward []data.ItemReward `json:"reward"`
  111. }
  112. type RollOnce struct {
  113. IsLevelUp bool `json:"isLevelUp"`
  114. IsDailyTask bool `json:"isDaily"`
  115. Roll
  116. }
  117. type ChangeData struct {
  118. IsLevelUp bool `json:"isLevelUp"`
  119. IsDailyTask bool `json:"isDaily"`
  120. IsAchieveTask bool `json:"isAchieveTask"`
  121. AddItem map[int]*data.ItemReward `json:"addItem"`
  122. SubItem map[int]*data.ItemReward `json:"subItem"`
  123. }
  124. type Draw struct {
  125. ID int `json:"id"`
  126. CurID int `json:"-"`
  127. Reward []data.ItemReward `json:"reward"`
  128. }
  129. type Roll struct {
  130. Score int `json:"score"`
  131. RollType int `json:"rollType"`
  132. Rand map[int]int32 `json:"rand"`
  133. }