param.go 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  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 int64 `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 int64 `json:"multi"`
  39. }
  40. type RollResp struct {
  41. ChangeData
  42. Multi int64 `json:"multi"`
  43. Xcode string `json:"xcode"`
  44. Rolls []Roll `json:"rolls"`
  45. }
  46. type DrawResp struct {
  47. ChangeData
  48. Multi int64 `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 int64 `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 int64 `json:"nextRoll"`
  110. NextInvite int64 `json:"nextInvite"`
  111. NowRoll int64 `json:"nowRoll"`
  112. NowInvite int64 `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. Pid string `json:"pid"`
  136. TopPid string `json:"topPid"`
  137. }
  138. type CountryBase struct {
  139. Country string `json:"country"`
  140. Score int64 `json:"score"`
  141. Rank int `json:"rank"`
  142. Icon string `json:"icon"`
  143. }
  144. type RollOnce struct {
  145. IsLevelUp bool `json:"isLevelUp"`
  146. IsDailyTask bool `json:"isDaily"`
  147. Roll
  148. }
  149. type ChangeData struct {
  150. IsLevelUp bool `json:"isLevelUp"`
  151. IsDailyTask bool `json:"isDaily"`
  152. IsAchieveTask bool `json:"isAchieveTask"`
  153. AddItem map[int]*data.ItemReward `json:"addItem"`
  154. SubItem map[int]*data.ItemReward `json:"subItem"`
  155. CurGold int64 `json:"curGold"`
  156. NodeAddItem map[int]*data.ItemReward `json:"nodeAddItem"`
  157. }
  158. type Draw struct {
  159. ID int `json:"id"`
  160. CurID int `json:"-"`
  161. Reward []data.ItemReward `json:"reward"`
  162. }
  163. type Roll struct {
  164. Score int64 `json:"score"`
  165. RollType int `json:"rollType"`
  166. Rand map[int]int32 `json:"rand"`
  167. }
  168. type SetPwdReq struct {
  169. Mail string `json:"email" validate:"required"`
  170. PassWord string `json:"password" validate:"required"`
  171. ConfirmPassWord string `json:"confirmPassword" validate:"required"`
  172. }
  173. type InviteRatioClaim struct {
  174. UserName string `json:"userName"`
  175. Avatar string `json:"avatar"`
  176. ClaimNum int64 `json:"claimNum"`
  177. IsClaim int `json:"isClaim"`
  178. NickName string `json:"nickName"`
  179. }
  180. type InviteRatioResp struct {
  181. Ratio float64 `json:"ratio"`
  182. ClaimSlice []InviteRatioClaim `json:"claimSlice"`
  183. TotalAmount int64 `json:"totalAmount"`
  184. Total uint64 `json:"total"`
  185. }
  186. type UnitTestData struct {
  187. Param1 string `json:"param1"`
  188. Param2 string `json:"param2"`
  189. Param3 string `json:"param3"`
  190. }
  191. type ItemRecordReq struct {
  192. ItemBaseType int `json:"itemBaseType"`
  193. ItemId int `json:"itemId"`
  194. }
  195. type ItemRecord struct {
  196. DataTime int64
  197. ItemNum int64
  198. }
  199. type ItemRecordResp struct {
  200. TotalIncome int64 `json:"totalIncome"`
  201. ItemRecords []ItemRecord `json:"itemRecords"`
  202. }
  203. type PageableReq struct {
  204. PageNum int `json:"pageNum"`
  205. PageSize int `json:"pageSize"`
  206. }