param.go 4.4 KB

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