param.go 4.9 KB

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