param.go 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176
  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 DrawConfig struct {
  56. ID int `json:"id"`
  57. ItemID int `json:"itemId"`
  58. Num int `json:"num"`
  59. }
  60. type WeeklyRankConfigResp struct {
  61. WeeklyTotalReward []data.ItemReward `json:"weeklyTotalReward"`
  62. StartTime string `json:"startTime"`
  63. EndTime string `json:"endTime"`
  64. InviteReward []data.ItemReward `json:"inviteReward"`
  65. VipInviteReward []data.ItemReward `json:"vipInviteReward"`
  66. InviteNum int `json:"inviteNum"`
  67. InviteTotalReward []data.ItemReward `json:"inviteTotalReward"`
  68. VipInviteNum int `json:"vipInviteNum"`
  69. VipInviteTotalReward []data.ItemReward `json:"vipInviteTotalReward"`
  70. }
  71. type GetRankRewardReq struct {
  72. Id int `json:"id"` //排行榜ID
  73. }
  74. type DrawReq struct {
  75. Tp int `json:"tp"` //1单抽2 10连抽
  76. }
  77. type ShareReq struct {
  78. Tp int `json:"tp"` //1 每日抽奖分享
  79. }
  80. type JumpReq struct {
  81. Tp int `json:"tp"` //1 关注推特 2 加入TG频道 3 关注Yutube账号 4 加入DC频道
  82. }
  83. type SaveXReq struct {
  84. Twitter string `json:"twitter"`
  85. }
  86. type SaveTonWallReq struct {
  87. TonWall string `json:"tonWall"`
  88. PassWord string `json:"password"`
  89. }
  90. type InviteReq struct {
  91. ParentName string `json:"parentName"`
  92. Type int `json:"type"` //2普通邀请3VIP邀请
  93. }
  94. type GetLevelResp struct {
  95. NowLevel int `json:"nowLevel"`
  96. NextLevel int `json:"nextLevel"`
  97. NextRoll int `json:"nextRoll"`
  98. NextInvite int `json:"nextInvite"`
  99. NowRoll int `json:"nowRoll"`
  100. NowInvite int `json:"nowInvite"`
  101. }
  102. type ClaimReq struct {
  103. Tp int `json:"tp"` //类型 1榜单奖励 2邀请奖励 3成就奖励 4日常奖励
  104. Id int `json:"id"` //奖励类型ID 邀请奖励传0
  105. }
  106. type CashOutReq struct {
  107. Tp int `json:"tp"`
  108. Amount float64 `json:"amount"`
  109. PassWord string `json:"passWord"`
  110. }
  111. type PlayerBase struct {
  112. UserName string `json:"userName"`
  113. OpenId string `json:"openId"`
  114. UserNameMaybe string `json:"userNameMaybe"`
  115. NickName string `json:"nickName"`
  116. IsLeader int `json:"-"`
  117. Rank int `json:"rank"`
  118. Score int `json:"score"`
  119. Avatar string `json:"avatar"`
  120. IsClaim int `json:"isClaim"`
  121. Reward []data.ItemReward `json:"reward"`
  122. }
  123. type RollOnce struct {
  124. IsLevelUp bool `json:"isLevelUp"`
  125. IsDailyTask bool `json:"isDaily"`
  126. Roll
  127. }
  128. type ChangeData struct {
  129. IsLevelUp bool `json:"isLevelUp"`
  130. IsDailyTask bool `json:"isDaily"`
  131. IsAchieveTask bool `json:"isAchieveTask"`
  132. AddItem map[int]*data.ItemReward `json:"addItem"`
  133. SubItem map[int]*data.ItemReward `json:"subItem"`
  134. }
  135. type Draw struct {
  136. ID int `json:"id"`
  137. CurID int `json:"-"`
  138. Reward []data.ItemReward `json:"reward"`
  139. }
  140. type Roll struct {
  141. Score int `json:"score"`
  142. RollType int `json:"rollType"`
  143. Rand map[int]int32 `json:"rand"`
  144. }
  145. type SetPwdReq struct {
  146. Mail string `json:"email" validate:"required"`
  147. PassWord string `json:"password" validate:"required"`
  148. ConfirmPassWord string `json:"confirmPassword" validate:"required"`
  149. }