param.go 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187
  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. Platform string `json:"platform"`
  9. Channel string `json:"channel"`
  10. parentName string `json:"parentName"`
  11. NickName string `json:"nickName"`
  12. Sign string `json:"sign"`
  13. IP string `json:"ip"`
  14. }
  15. type PageReq struct {
  16. Page int `json:"Page"`
  17. }
  18. type LoginResp struct {
  19. UserName string `json:"userName" bson:"userName"`
  20. OpenId string `json:"openId" bson:"openId"`
  21. TargetPath string `json:"targetPath" bson:"-"`
  22. }
  23. type GuideReq struct {
  24. Close int `json:"close"`
  25. CloseReward int `json:"closeReward"`
  26. Status int32 `json:"status"`
  27. IsVip int32 `json:"isVip"`
  28. }
  29. type GuideResp struct {
  30. Guide int `json:"guide"`
  31. FirstReward int `json:"firstReward"`
  32. Rolled int `json:"rolled"`
  33. FollowChannel int32 `json:"followChannel"`
  34. AddItem map[int]*data.ItemReward `json:"addItem"`
  35. SubItem map[int]*data.ItemReward `json:"subItem"`
  36. }
  37. type RollReq struct {
  38. Multi int `json:"multi"`
  39. }
  40. type RollResp struct {
  41. ChangeData
  42. Multi int `json:"multi"`
  43. Xcode string `json:"xcode"`
  44. Rolls []Roll `json:"rolls"`
  45. }
  46. type DrawResp struct {
  47. ChangeData
  48. Multi int `json:"multi"`
  49. Draws []*DrawConfig `json:"draws"`
  50. }
  51. type GetRankReq struct {
  52. Id int `json:"id"` //排行榜ID
  53. Tp int `json:"tp"` //是否是上一期榜单1是0否
  54. }
  55. type GetRankResp struct {
  56. Ranks map[int]*PlayerBase `json:"ranks"`
  57. Self *PlayerBase `json:"self"`
  58. }
  59. type DrawConfig struct {
  60. ID int `json:"id"`
  61. ItemID int `json:"itemId"`
  62. Num int `json:"num"`
  63. }
  64. type WeeklyRankConfigResp struct {
  65. WeeklyTotalReward []data.ItemReward `json:"weeklyTotalReward"`
  66. StartTime string `json:"startTime"`
  67. EndTime string `json:"endTime"`
  68. InviteReward []data.ItemReward `json:"inviteReward"`
  69. VipInviteReward []data.ItemReward `json:"vipInviteReward"`
  70. InviteNum int `json:"inviteNum"`
  71. InviteTotalReward []data.ItemReward `json:"inviteTotalReward"`
  72. VipInviteNum int `json:"vipInviteNum"`
  73. VipInviteTotalReward []data.ItemReward `json:"vipInviteTotalReward"`
  74. }
  75. type GetRankRewardReq struct {
  76. Id int `json:"id"` //排行榜ID
  77. }
  78. type DrawReq struct {
  79. Tp int `json:"tp"` //1单抽2 10连抽
  80. }
  81. type ShareReq struct {
  82. Tp int `json:"tp"` //1 每日抽奖分享
  83. }
  84. type JumpReq struct {
  85. Tp int `json:"tp"` //1 关注推特 2 加入TG频道 3 关注Yutube账号 4 加入DC频道
  86. }
  87. type SaveXReq struct {
  88. Twitter string `json:"twitter"`
  89. }
  90. type SaveTonWallReq struct {
  91. TonWall string `json:"tonWall"`
  92. PassWord string `json:"password"`
  93. }
  94. type InviteReq struct {
  95. ParentName string `json:"parentName"`
  96. Sign string `json:"sign"`
  97. }
  98. type GetLevelResp struct {
  99. NowLevel int `json:"nowLevel"`
  100. NextLevel int `json:"nextLevel"`
  101. NextRoll int `json:"nextRoll"`
  102. NextInvite int `json:"nextInvite"`
  103. NowRoll int `json:"nowRoll"`
  104. NowInvite int `json:"nowInvite"`
  105. }
  106. type ClaimReq struct {
  107. Tp int `json:"tp"` //类型 1榜单奖励 2邀请奖励 3成就奖励 4日常奖励
  108. Id int `json:"id"` //奖励类型ID 邀请奖励传0
  109. }
  110. type CashOutReq struct {
  111. Tp int `json:"tp"`
  112. Amount float64 `json:"amount"`
  113. PassWord string `json:"passWord"`
  114. }
  115. type PlayerBase struct {
  116. UserName string `json:"userName"`
  117. OpenId string `json:"openId"`
  118. UserNameMaybe string `json:"userNameMaybe"`
  119. NickName string `json:"nickName"`
  120. IsLeader int `json:"-"`
  121. Rank int `json:"rank"`
  122. Score int `json:"score"`
  123. Avatar string `json:"avatar"`
  124. IsClaim int `json:"isClaim"`
  125. Reward []data.ItemReward `json:"reward"`
  126. }
  127. type RollOnce struct {
  128. IsLevelUp bool `json:"isLevelUp"`
  129. IsDailyTask bool `json:"isDaily"`
  130. Roll
  131. }
  132. type ChangeData struct {
  133. IsLevelUp bool `json:"isLevelUp"`
  134. IsDailyTask bool `json:"isDaily"`
  135. IsAchieveTask bool `json:"isAchieveTask"`
  136. AddItem map[int]*data.ItemReward `json:"addItem"`
  137. SubItem map[int]*data.ItemReward `json:"subItem"`
  138. }
  139. type Draw struct {
  140. ID int `json:"id"`
  141. CurID int `json:"-"`
  142. Reward []data.ItemReward `json:"reward"`
  143. }
  144. type Roll struct {
  145. Score int `json:"score"`
  146. RollType int `json:"rollType"`
  147. Rand map[int]int32 `json:"rand"`
  148. }
  149. type SetPwdReq struct {
  150. Mail string `json:"email" validate:"required"`
  151. PassWord string `json:"password" validate:"required"`
  152. ConfirmPassWord string `json:"confirmPassword" validate:"required"`
  153. }
  154. type InviteRatioResp struct {
  155. Ratio float64 `json:"ratio"`
  156. ClaimNum int `json:"claimNUm"`
  157. MinClaim int `json:"minClaim"`
  158. }