activities.go 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. package msg
  2. import "leafstalk/covenant/model"
  3. const (
  4. // 战令类型
  5. AcTypeActive = 1 // 活跃
  6. AcTypeGrade = 2 // 等级
  7. AcTypePrincipalLine = 3 // 主线
  8. // 奖励类型
  9. AcAwardTypeFree = 1 // 免费
  10. AcAwardTypeSenior = 2 // 高级
  11. AcAwardTypeLuxury = 3 // 豪华
  12. )
  13. // GetWarOrderActiveStatus 获取活跃战令
  14. type GetWarOrderActiveStatus struct {
  15. PlayerId int64 `json:"userId"`
  16. }
  17. type ResponseGetWarOrderActiveStatus struct {
  18. ErrCode int `json:"errCode"`
  19. Msg string `json:"msg,omitempty"`
  20. Data *GetWarOrderActiveStatusData `json:"data"`
  21. }
  22. type GetWarOrderActiveStatusData struct {
  23. // 周期结束倒计时
  24. EndTs int64 `json:"endTs"`
  25. // 是否开通高级战令
  26. IsSenior bool `json:"isSenior"`
  27. // 是否开通豪华战令
  28. IsLuxury bool `json:"isLuxury"`
  29. // 看广告获得双倍积分计数
  30. AdCount int64 `json:"adCount"`
  31. // 看广告获得双倍积分标志
  32. AdDoubleFlag bool `json:"adDoubleFlag"`
  33. // 今日获得积分统计
  34. DayPointCount int64 `json:"dayCountPoint"`
  35. // 周期内积分总数
  36. PointTotal int64 `json:"totalPoint"`
  37. // 已领取的最大免费奖励等级
  38. FreeLevel int64 `json:"freeLevel"`
  39. // 已领取的最大高级奖励等级
  40. SeniorLevel int64 `json:"seniorLevel"`
  41. // 已领取的最大豪华奖励等级
  42. LuxuryLevel int64 `json:"luxuryLevel"`
  43. }
  44. // GetWarOrderGradeStatus 获取等级战令
  45. type GetWarOrderGradeStatus struct {
  46. PlayerId int64 `json:"userId"`
  47. }
  48. type ResponseGetWarOrderGradeStatus struct {
  49. ErrCode int `json:"errCode"`
  50. Msg string `json:"msg,omitempty"`
  51. Data *model.GeneralWarOrder `json:"data"`
  52. }
  53. // GetWarOrderLineStatus 获取主线战令
  54. type GetWarOrderLineStatus struct {
  55. PlayerId int64 `json:"userId"`
  56. }
  57. type ResponseGetWarOrderLineStatus struct {
  58. ErrCode int `json:"errCode"`
  59. Msg string `json:"msg,omitempty"`
  60. Data *model.GeneralWarOrder `json:"data"`
  61. }
  62. // 领取战令奖励
  63. type ClaimWarOrderAward struct {
  64. PlayerId int64 `json:"userId"`
  65. AcType int64 `json:"acType"` // 战令类型 1:活跃 2:等级 3:主线
  66. PlayerLevel int64 `json:"playerLevel"`
  67. UnlockWarOrderLine []int64 `json:"unlockWarOrderLine"`
  68. }
  69. type ResponseClaimWarOrderAward struct {
  70. ErrCode int `json:"errCode"`
  71. Msg string `json:"msg,omitempty"`
  72. Data *ClaimWarOrderAwardData `json:"data"`
  73. }
  74. type ClaimWarOrderAwardData struct {
  75. Bundles *model.DropedBundle `json:"bundles"`
  76. ActiveAcStatus *GetWarOrderActiveStatusData `json:"activeAcStatus,omitempty"`
  77. GradeAcStatus *model.GeneralWarOrder `json:"gradeAcStatus,omitempty"`
  78. PrincipalLineAcStatus *model.GeneralWarOrder `json:"principalLineAcStatus,omitempty"`
  79. }
  80. // 7日签到状态
  81. type SevenDaySignInStatus struct {
  82. PlayerId int64 `json:"userId"`
  83. }
  84. type ResponseSevenDaySignInStatus struct {
  85. ErrCode int `json:"errCode"`
  86. Msg string `json:"msg,omitempty"`
  87. Data *model.SevenDaySignInStatus `json:"data"`
  88. }
  89. // 7日签到
  90. type SevenDaySignIn struct {
  91. PlayerId int64 `json:"userId"`
  92. Day int64 `json:"day"`
  93. }
  94. type SevenDaySignInData struct {
  95. Bundles *model.DropedBundle `json:"bundles"`
  96. SignInStatus *model.SevenDaySignInStatus `json:"signInStatus"`
  97. }
  98. type ResponseSevenDaySignIn struct {
  99. ErrCode int `json:"errCode"`
  100. Msg string `json:"msg,omitempty"`
  101. Data *SevenDaySignInData `json:"data"`
  102. }
  103. // 获取月卡状态
  104. type GetMonthCardsStatus struct {
  105. PlayerId int64 `json:"userId"`
  106. }
  107. type ResponseGetMonthCardsStatus struct {
  108. ErrCode int `json:"errCode"`
  109. Msg string `json:"msg,omitempty"`
  110. Data *MonthCards `json:"data"`
  111. }
  112. type MonthCards struct {
  113. DailyRewardFlag bool `json:"dailyRewardFlag"` // 每日福利领取标志
  114. CardsStatus map[int64]*MonthCardStatus `json:"cardsStatus"` // 月卡状态
  115. }
  116. type MonthCardStatus struct {
  117. // 剩余时间
  118. RemainTime int64 `json:"remainTime"`
  119. // 是否已领取奖励
  120. IsGetAward bool `json:"isGetAward"`
  121. }
  122. const (
  123. MonthCardWelfareTypeViewing = 1 // 观影月卡福利
  124. MonthCardWelfareTypeSuper = 2 // 超值月卡福利
  125. MonthCardWelfareTypeDaily = 3 // 每日福利福利
  126. )
  127. // 领取月卡福利
  128. type GetMonthCardReward struct {
  129. PlayerId int64 `json:"userId"`
  130. Type int64 `json:"type"` // 福利类型 1:观影月卡 2:超值月卡 3:每日福利
  131. }
  132. type GetMonthCardRewardData struct {
  133. MonthCards *MonthCards `json:"monthCards"`
  134. Bundles *model.DropedBundle `json:"bundles"`
  135. }
  136. type ResponseGetMonthCardReward struct {
  137. ErrCode int `json:"errCode"`
  138. Msg string `json:"msg,omitempty"`
  139. Data *GetMonthCardRewardData `json:"data"`
  140. }
  141. // 购买月卡
  142. //type BuyMonthCard struct {
  143. // PlayerId int64 `json:"userId"`
  144. // ClientPlat string `json:"clientPlat"`
  145. // Type int64 `json:"type"` // 月卡类型 1:观影月卡 2:超值月卡
  146. //}
  147. //type ResponseBuyMonthCard struct {
  148. // ErrCode int `json:"errCode"`
  149. // Msg string `json:"msg,omitempty"`
  150. // Data *GetMonthCardRewardData `json:"data"`
  151. //}
  152. // 获取特权卡状态
  153. type GetPrivilegeCardsStatus struct {
  154. PlayerId int64 `json:"userId"`
  155. }
  156. type ResponseGetPrivilegeCardsStatus struct {
  157. ErrCode int `json:"errCode"`
  158. Msg string `json:"msg,omitempty"`
  159. Data map[int64]int64 `json:"data"`
  160. }
  161. // 购买特权卡
  162. //type BuyPrivilegeCard struct {
  163. // PlayerId int64 `json:"userId"`
  164. // ClientPlat string `json:"clientPlat"`
  165. // Type int64 `json:"type"` // 特权卡类型 1:永久钻石卡 2:永久巡逻卡
  166. //}
  167. //type ResponseBuyPrivilegeCard struct {
  168. // ErrCode int `json:"errCode"`
  169. // Msg string `json:"msg,omitempty"`
  170. // Data map[int64]int64 `json:"data"`
  171. //}
  172. // 更新活跃战令积分
  173. type UpdateWarOrderActivePoint struct {
  174. PlayerId int64 `json:"userId"`
  175. Point int64 `json:"point"`
  176. }
  177. // 更新等级战令等级
  178. type UpdateWarOrderGradeLv struct {
  179. PlayerId int64 `json:"userId"`
  180. Level int64 `json:"level"`
  181. }
  182. // 更新主线战令章节
  183. type UpdateWarOrderLineChapter struct {
  184. PlayerId int64 `json:"userId"`
  185. Chapter int64 `json:"chapter"`
  186. }
  187. // 购买战令
  188. type BuyWarOrder struct {
  189. PlayerId int64 `json:"userId"`
  190. AcType int64 `json:"acType"` // 战令类型 1:活跃 2:等级 3:主线
  191. AwardType int64 `json:"awardType"` // 奖励类型 2:高级 3:豪华
  192. }
  193. type BuyWarOrderData struct {
  194. WarOrderActiveStatus *GetWarOrderActiveStatusData `json:"warOrderActiveStatus,omitempty"`
  195. WarOrderGradeStatus *model.GeneralWarOrder `json:"warOrderGradeStatus,omitempty"`
  196. WarOrderLineStatus *model.GeneralWarOrder `json:"warOrderLineStatus,omitempty"`
  197. }
  198. type ResponseBuyWarOrder struct {
  199. ErrCode int `json:"errCode"`
  200. Msg string `json:"msg,omitempty"`
  201. Data *BuyWarOrderData `json:"data"`
  202. }
  203. // 更新活跃战令看广告状态
  204. type WarOrderActiveAd struct {
  205. PlayerId int64 `json:"userId"`
  206. }
  207. type ResponseWarOrderActiveAd struct {
  208. ErrCode int `json:"errCode"`
  209. Msg string `json:"msg,omitempty"`
  210. Data *GetWarOrderActiveStatusData `json:"data"`
  211. }
  212. // 更新7日签到当日活跃度
  213. type UpdateSevenDaySignInDayActive struct {
  214. PlayerId int64 `json:"userId"`
  215. ActiveNum int64 `json:"activeNum"`
  216. }
  217. // 初始化精彩活动
  218. type InitAc struct {
  219. PlayerId int64 `json:"userId"`
  220. }
  221. // 获取每日特惠状态
  222. type GetDailyDeal struct {
  223. PlayerId int64 `json:"userId"`
  224. }
  225. type ResponseGetDailyDeal struct {
  226. ErrCode int `json:"errCode"`
  227. Msg string `json:"msg,omitempty"`
  228. Data *model.DailyDealStatus `json:"data"`
  229. }
  230. // 领取每日特惠
  231. type ClaimDailyDeal struct {
  232. PlayerId int64 `json:"userId"`
  233. ClientPlat string `json:"clientPlat"`
  234. Uid int64 `json:"uid"`
  235. }
  236. type ClaimDailyDealData struct {
  237. Bundles *model.DropedBundle `json:"bundles"`
  238. Cost map[int64]int64 `json:"cost"`
  239. DailyDealStatus *model.DailyDealStatus `json:"dailyDealInfo"`
  240. }
  241. type ResponseClaimDailyDeal struct {
  242. ErrCode int `json:"errCode"`
  243. Msg string `json:"msg,omitempty"`
  244. Data *ClaimDailyDealData `json:"data"`
  245. }
  246. // 获取特惠礼包状态
  247. type GetDiscountPack struct {
  248. PlayerId int64 `json:"userId"`
  249. }
  250. type GetDiscountPackData struct {
  251. DiscountPack *DiscountPackStatus `json:"discountPack,omitempty"`
  252. DiscountDayPack *DiscountPackStatus `json:"discountDayPack,omitempty"`
  253. DiscountWeekPack *DiscountPackStatus `json:"discountWeekPack,omitempty"`
  254. DiscountMoonPack *DiscountPackStatus `json:"discountMoonPack,omitempty"`
  255. }
  256. type DiscountPackStatus struct {
  257. // 剩余时间
  258. RemainTs int64 `json:"remainTs"`
  259. // {Uid:周期内购买次数}
  260. BuyStatus map[int64]int64 `json:"buyStatus"`
  261. }
  262. type ResponseGetDiscountPack struct {
  263. ErrCode int `json:"errCode"`
  264. Msg string `json:"msg,omitempty"`
  265. Data *GetDiscountPackData `json:"data"`
  266. }
  267. // 领取特惠礼包
  268. const (
  269. // 特惠礼包类型 1:新手礼包 2:每日礼包 3:每周礼包 4:每月礼包
  270. DiscountPackTypeBeginner = 1
  271. DiscountPackTypeDay = 2
  272. DiscountPackTypeWeek = 3
  273. DiscountPackTypeMoon = 4
  274. )
  275. type ClaimDiscountPack struct {
  276. PlayerId int64 `json:"userId"`
  277. ClientPlat string `json:"clientPlat"`
  278. Uid int64 `json:"uid"`
  279. Type int64 `json:"type"`
  280. }
  281. type ClaimDiscountPackData struct {
  282. Bundles *model.DropedBundle `json:"bundles"`
  283. Cost map[int64]int64 `json:"cost"`
  284. DiscountPackStatus *GetDiscountPackData `json:"discountPackStatus"`
  285. }
  286. type ResponseClaimDiscountPack struct {
  287. ErrCode int `json:"errCode"`
  288. Msg string `json:"msg,omitempty"`
  289. Data *ClaimDiscountPackData `json:"data"`
  290. }
  291. // 获取首充状态
  292. type GetFirstChargeStatus struct {
  293. PlayerId int64 `json:"userId"`
  294. }
  295. type GetFirstChargeStatusData struct {
  296. // 购买后的第几天
  297. BuyDay int64 `json:"buyDay"`
  298. // 已领取奖励的最后一个天数
  299. Reward int64 `json:"reward"`
  300. }
  301. type ResponseGetFirstChargeStatus struct {
  302. ErrCode int `json:"errCode"`
  303. Msg string `json:"msg,omitempty"`
  304. Data map[int64]*GetFirstChargeStatusData `json:"data"`
  305. }
  306. // 购买首充
  307. //type BuyFirstCharge struct {
  308. // PlayerId int64 `json:"userId"`
  309. // ClientPlat string `json:"clientPlat"`
  310. // PriceId int64 `json:"priceId"`
  311. //}
  312. //
  313. //type ResponseBuyFirstCharge struct {
  314. // ErrCode int `json:"errCode"`
  315. // Msg string `json:"msg,omitempty"`
  316. // Data map[int64]*GetFirstChargeStatusData `json:"data"`
  317. //}
  318. // 领取首充奖励
  319. type ClaimFirstChargeReward struct {
  320. PlayerId int64 `json:"userId"`
  321. PriceId int64 `json:"priceId"`
  322. }
  323. type ClaimFirstChargeRewardData struct {
  324. Bundles *model.DropedBundle `json:"bundles"`
  325. FirstChargeStatus map[int64]*GetFirstChargeStatusData `json:"firstChargeStatus"`
  326. }
  327. type ResponseClaimFirstChargeReward struct {
  328. ErrCode int `json:"errCode"`
  329. Msg string `json:"msg,omitempty"`
  330. Data *ClaimFirstChargeRewardData `json:"data"`
  331. }