param.go 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227
  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. IP string `json:"ip"`
  13. }
  14. type LoginResp struct {
  15. UserName string `json:"userName" bson:"userName"`
  16. OpenId string `json:"openId" bson:"openId"`
  17. TargetPath string `json:"targetPath" bson:"-"`
  18. }
  19. type GuideReq struct {
  20. Close int `json:"close"`
  21. CloseReward int `json:"closeReward"`
  22. Status int32 `json:"status"`
  23. IsVip int32 `json:"isVip"`
  24. }
  25. type GuideResp struct {
  26. Guide int `json:"guide"`
  27. FirstReward int `json:"firstReward"`
  28. Rolled int `json:"rolled"`
  29. FollowChannel int32 `json:"followChannel"`
  30. AddItem map[int]*data.ItemReward `json:"addItem"`
  31. SubItem map[int]*data.ItemReward `json:"subItem"`
  32. }
  33. type RollReq struct {
  34. Multi int `json:"multi"`
  35. }
  36. type RollResp struct {
  37. ChangeData
  38. Multi int `json:"multi"`
  39. Xcode string `json:"xcode"`
  40. Rolls []Roll `json:"rolls"`
  41. }
  42. type DrawResp struct {
  43. ChangeData
  44. Multi int `json:"multi"`
  45. Draws []*DrawConfig `json:"draws"`
  46. }
  47. type GetRankReq struct {
  48. Id int `json:"id"` //排行榜ID
  49. Tp int `json:"tp"` //是否是上一期榜单1是0否
  50. }
  51. type GetRankResp struct {
  52. Ranks map[int]*PlayerBase `json:"ranks"`
  53. Self *PlayerBase `json:"self"`
  54. }
  55. type GetCountryRankResp struct {
  56. Ranks map[int]*CountryBase `json:"ranks"`
  57. Self *CountryBase `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. Type int `json:"type"` //2普通邀请3VIP邀请
  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. UserName string `json:"userName"` // 邀请裂变贡献人
  110. }
  111. type CashOutReq struct {
  112. Tp int `json:"tp"`
  113. Amount float64 `json:"amount"`
  114. PassWord string `json:"passWord"`
  115. }
  116. type PlayerBase struct {
  117. UserName string `json:"userName"`
  118. OpenId string `json:"openId"`
  119. UserNameMaybe string `json:"userNameMaybe"`
  120. NickName string `json:"nickName"`
  121. IsLeader int `json:"-"`
  122. Rank int `json:"rank"`
  123. Score int `json:"score"`
  124. Avatar string `json:"avatar"`
  125. IsClaim int `json:"isClaim"`
  126. Reward []data.ItemReward `json:"reward"`
  127. }
  128. type CountryBase struct {
  129. Country string `json:"country"`
  130. Score int64 `json:"score"`
  131. Rank int `json:"rank"`
  132. Icon string `json:"icon"`
  133. }
  134. type RollOnce struct {
  135. IsLevelUp bool `json:"isLevelUp"`
  136. IsDailyTask bool `json:"isDaily"`
  137. Roll
  138. }
  139. type ChangeData struct {
  140. IsLevelUp bool `json:"isLevelUp"`
  141. IsDailyTask bool `json:"isDaily"`
  142. IsAchieveTask bool `json:"isAchieveTask"`
  143. AddItem map[int]*data.ItemReward `json:"addItem"`
  144. SubItem map[int]*data.ItemReward `json:"subItem"`
  145. CurGold int `json:"curGold"`
  146. NodeAddItem map[int]*data.ItemReward `json:"nodeAddItem"`
  147. }
  148. type Draw struct {
  149. ID int `json:"id"`
  150. CurID int `json:"-"`
  151. Reward []data.ItemReward `json:"reward"`
  152. }
  153. type Roll struct {
  154. Score int `json:"score"`
  155. RollType int `json:"rollType"`
  156. Rand map[int]int32 `json:"rand"`
  157. }
  158. type SetPwdReq struct {
  159. Mail string `json:"email" validate:"required"`
  160. PassWord string `json:"password" validate:"required"`
  161. ConfirmPassWord string `json:"confirmPassword" validate:"required"`
  162. }
  163. type InviteRatioClaim struct {
  164. UserName string `json:"userName"`
  165. Avatar string `json:"avatar"`
  166. ClaimNum int64 `json:"claimNum"`
  167. IsClaim int `json:"isClaim"`
  168. NickName string `json:"nickName"`
  169. }
  170. type InviteRatioResp struct {
  171. Ratio float64 `json:"ratio"`
  172. ClaimSlice []InviteRatioClaim `json:"claimSlice"`
  173. TotalAmount int64 `json:"totalAmount"`
  174. }
  175. type UnitTestData struct {
  176. Param1 string `json:"param1"`
  177. Param2 string `json:"param2"`
  178. Param3 string `json:"param3"`
  179. }
  180. type ItemRecordReq struct {
  181. ItemBaseType int `json:"itemBaseType"`
  182. ItemId int `json:"itemId"`
  183. }
  184. type ItemRecord struct {
  185. DataTime int64
  186. ItemNum int64
  187. }
  188. type ItemRecordResp struct {
  189. TotalIncome int64 `json:"totalIncome"`
  190. ItemRecords []ItemRecord `json:"itemRecords"`
  191. }