param.go 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237
  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. Reward []data.ItemReward `json:"reward"`
  59. }
  60. type GetCountryRankResp struct {
  61. Ranks map[int]*CountryBase `json:"ranks"`
  62. Self *CountryBase `json:"self"`
  63. }
  64. type DrawConfig struct {
  65. ID int `json:"id"`
  66. ItemID int `json:"itemId"`
  67. Num int `json:"num"`
  68. }
  69. type WeeklyRankConfigResp struct {
  70. WeeklyTotalReward []data.ItemReward `json:"weeklyTotalReward"`
  71. StartTime string `json:"startTime"`
  72. EndTime string `json:"endTime"`
  73. InviteReward []data.ItemReward `json:"inviteReward"`
  74. VipInviteReward []data.ItemReward `json:"vipInviteReward"`
  75. InviteNum int `json:"inviteNum"`
  76. InviteTotalReward []data.ItemReward `json:"inviteTotalReward"`
  77. VipInviteNum int `json:"vipInviteNum"`
  78. VipInviteTotalReward []data.ItemReward `json:"vipInviteTotalReward"`
  79. }
  80. type GetRankRewardReq struct {
  81. Id int `json:"id"` //排行榜ID
  82. }
  83. type DrawReq struct {
  84. Tp int `json:"tp"` //1单抽2 10连抽
  85. }
  86. type ShareReq struct {
  87. Tp int `json:"tp"` //1 每日抽奖分享
  88. }
  89. type JumpReq struct {
  90. Tp int `json:"tp"` //1 关注推特 2 加入TG频道 3 关注Yutube账号 4 加入DC频道
  91. }
  92. type JumpResp struct {
  93. Dirty bool `json:"dirty"`
  94. }
  95. type SaveXReq struct {
  96. Twitter string `json:"twitter"`
  97. }
  98. type SaveTonWallReq struct {
  99. TonWall string `json:"tonWall"`
  100. PassWord string `json:"password"`
  101. }
  102. type InviteReq struct {
  103. ParentName string `json:"parentName"`
  104. Sign string `json:"sign"`
  105. }
  106. type GetLevelResp struct {
  107. NowLevel int `json:"nowLevel"`
  108. NextLevel int `json:"nextLevel"`
  109. NextRoll int `json:"nextRoll"`
  110. NextInvite int `json:"nextInvite"`
  111. NowRoll int `json:"nowRoll"`
  112. NowInvite int `json:"nowInvite"`
  113. }
  114. type ClaimReq struct {
  115. Tp int `json:"tp"` //类型 1榜单奖励 2邀请裂变奖励 3首次奖励 4 邀请节点奖励
  116. Id int `json:"id"` //奖励类型ID 邀请奖励传0
  117. UserName string `json:"userName"` // 邀请裂变贡献人
  118. }
  119. type CashOutReq struct {
  120. Tp int `json:"tp"`
  121. Amount float64 `json:"amount"`
  122. PassWord string `json:"passWord"`
  123. }
  124. type PlayerBase struct {
  125. UserName string `json:"userName"`
  126. OpenId string `json:"openId"`
  127. UserNameMaybe string `json:"userNameMaybe"`
  128. NickName string `json:"nickName"`
  129. IsLeader int `json:"-"`
  130. Rank int `json:"rank"`
  131. Score int `json:"score"`
  132. Avatar string `json:"avatar"`
  133. IsClaim int `json:"isClaim"`
  134. Reward []data.ItemReward `json:"reward"`
  135. }
  136. type CountryBase struct {
  137. Country string `json:"country"`
  138. Score int64 `json:"score"`
  139. Rank int `json:"rank"`
  140. Icon string `json:"icon"`
  141. }
  142. type RollOnce struct {
  143. IsLevelUp bool `json:"isLevelUp"`
  144. IsDailyTask bool `json:"isDaily"`
  145. Roll
  146. }
  147. type ChangeData struct {
  148. IsLevelUp bool `json:"isLevelUp"`
  149. IsDailyTask bool `json:"isDaily"`
  150. IsAchieveTask bool `json:"isAchieveTask"`
  151. AddItem map[int]*data.ItemReward `json:"addItem"`
  152. SubItem map[int]*data.ItemReward `json:"subItem"`
  153. CurGold int `json:"curGold"`
  154. NodeAddItem map[int]*data.ItemReward `json:"nodeAddItem"`
  155. }
  156. type Draw struct {
  157. ID int `json:"id"`
  158. CurID int `json:"-"`
  159. Reward []data.ItemReward `json:"reward"`
  160. }
  161. type Roll struct {
  162. Score int `json:"score"`
  163. RollType int `json:"rollType"`
  164. Rand map[int]int32 `json:"rand"`
  165. }
  166. type SetPwdReq struct {
  167. Mail string `json:"email" validate:"required"`
  168. PassWord string `json:"password" validate:"required"`
  169. ConfirmPassWord string `json:"confirmPassword" validate:"required"`
  170. }
  171. type InviteRatioClaim struct {
  172. UserName string `json:"userName"`
  173. Avatar string `json:"avatar"`
  174. ClaimNum int64 `json:"claimNum"`
  175. IsClaim int `json:"isClaim"`
  176. NickName string `json:"nickName"`
  177. }
  178. type InviteRatioResp struct {
  179. Ratio float64 `json:"ratio"`
  180. ClaimSlice []InviteRatioClaim `json:"claimSlice"`
  181. TotalAmount int64 `json:"totalAmount"`
  182. }
  183. type UnitTestData struct {
  184. Param1 string `json:"param1"`
  185. Param2 string `json:"param2"`
  186. Param3 string `json:"param3"`
  187. }
  188. type ItemRecordReq struct {
  189. ItemBaseType int `json:"itemBaseType"`
  190. ItemId int `json:"itemId"`
  191. }
  192. type ItemRecord struct {
  193. DataTime int64
  194. ItemNum int64
  195. }
  196. type ItemRecordResp struct {
  197. TotalIncome int64 `json:"totalIncome"`
  198. ItemRecords []ItemRecord `json:"itemRecords"`
  199. }