datadef.go
17.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
package logic
type UserLoginReq struct {
Lype int `json:"type"`
UserId int `json:"userId"`
Fromid int `json:"fromid"`
}
type UserLoginData struct {
UserId string `json:"userId"`
AccessToken string `json:"accessToken"`
LoginType int `json:"loginType"`
Nickname string `json:"nickname"`
HeadImg string `json:"headImg"`
}
type UserLoginResp struct {
Code int `json:"code"`
Data UserLoginData `json:"data"`
Message string `json:"message"`
}
type GetUserDataReq struct {
//Uuid int `json:"uuid"`
}
type offlineRewardDesc struct {
OfflineTime int `json:"offlineTime"`
Income string `json:"income"`
}
type GetUserDataData struct {
TimingReward bool `json:"timingReward"`
OfflineReward offlineRewardDesc `json:"offlineReward"`
Output string `json:"output"`
Coin string `json:"coin"`
Now int `json:"now"`
}
type GetUserDataResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data GetUserDataData `json:"data"`
}
type DataDesc struct {
Pos int `json:"pos"`
Catlv int `json:"cat_lv"`
Countdown int `json:"countdown"`
}
type ExchangePosReq struct {
//Uuid int `json:"uuid"`
From int `json:"from"`
To int `json:"to"`
}
type ExchangePosData struct {
CatList []CatPosInfo `json:"catList"`
Coin DoBuyCatCoin `json:"coin"`
NewCat int `json:"newCat"`
Reward float32 `json:"reward"`
}
type ExchangePosResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data ExchangePosData `json:"data"`
}
type ClickBoxReq struct {
//Uuid int `json:"uuid"`
Pos int `json:"pos"`
}
type ClickBoxResp struct {
Code int `json:"code"`
Message string `json:"message"`
Pos int `json:"pos"`
Lv int `json:"lv"`
}
type UpgradeBoxReq struct {
//Uuid int `json:"uuid"`
}
type UpgradeBoxResp struct {
Code int `json:"code"`
Message string `json:"message"`
Boxlv int `json:"boxlv"`
}
type GenerateBoxReq struct {
//Uuid int `json:"uuid"`
Pos int `json:"pos"`
}
type GenerateBoxResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type AcclecteReq struct {
//Uuid int `json:"uuid"`
}
type AcclectData struct {
LeftTimes int `json:"leftTimes"`
Coin DoBuyCatCoin `json:"coin"`
}
type AcclecteResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data AcclectData `json:"data"`
}
type WatchAdsGetGoldData struct {
Reward string `json:"reward"`
LeftTimes int `json:"leftTimes"`
Coin DoBuyCatCoin `json:"coin"`
}
type WatchAdsGetGoldResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data WatchAdsGetGoldData `json:"data"`
}
type RecvTimingRewardData struct {
Reward string `json:"reward"`
}
type RecvTimingRewardResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data RecvTimingRewardData `json:"data"`
}
type RecoveryReq struct {
Position int `json:"position"`
}
type RecoveryData struct {
Coin DoBuyCatCoin `json:"coin"`
}
type RecoveryResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data RecoveryData `json:"data"`
}
type ComposeReq struct {
PositionList []int `json:"positionList"`
}
type ComposeData struct {
CatList []CatPosInfo `json:"catList"`
Coin DoBuyCatCoin `json:"coin"`
}
type ComposeResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data ComposeData `json:"data"`
}
type RecvRedCatReq struct {
Rtype int `json:"type"`
RedCatId int `json:"redCatId"`
}
type RecvRedCatData struct {
Num float32 `json:"num"`
}
type RecvRedCatResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data RecvRedCatData `json:"data"`
}
type LimitCatListData struct {
CatId int `json:"catId"`
Cash float32 `json:"cash"`
Status int `json:"status"`
Date string `json:"date"`
}
type LimitCatListResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []LimitCatListData `json:"data"`
}
type QueryTurntableData struct {
TicketCount int `json:"ticketCount"`
LeftTime int `json:"leftTime"`
LimitTicket int `json:"limitTicket"`
}
type QueryTurntableResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data QueryTurntableData `json:"data"`
}
type AddTicketData struct {
}
type AddTicketResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data AddTicketData `json:"data"`
}
type MultipleData struct {
}
type MultipleReq struct {
RewardId int `json:"rewardId"`
}
type MultipleResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data MultipleData `json:"data"`
}
type DrawTableData struct {
RewardId int `json:"rewardId"`
Coin string `json:"coin"`
}
type DrawTableResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data DrawTableData `json:"data"`
}
type QueryFlopData struct {
LeftTimes int `json:"leftTimes"`
}
type QueryFlopResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data QueryFlopData `json:"data"`
}
type DoFlopRespReward struct {
RewardId int `json:"rewardId"`
CatId int `json:"catId"`
Coin string `json:"coin"`
}
type DoFlopRespData struct {
Reward DoFlopRespReward `json:"reward"`
LeftTimes int `json:"leftTimes"`
Coin DoBuyCatCoin `json:"coin"`
}
type DoFlopResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data DoFlopRespData `json:"data"`
}
type AcclecteBoxResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type AutomergeReq struct {
//Uuid int `json:"uuid"`
}
type AutomergeResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type QueryBuyCatReq struct {
//Uuid int `json:"uuid"`
}
type QueryBuyCatResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []BuyCatDesc `json:"data"`
}
type LeftRateTimesDesc struct {
LeftTimes int `json:"leftTimes"`
LimitTimes int `json:"limitTimes"`
}
type LeftRateTimesResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data LeftRateTimesDesc `json:"data"`
}
type BuyCatDesc struct {
CatId int `json:"catId"`
Coin string `json:"coin"`
}
type ClickRandGiftReq struct {
//Uuid int `json:"uuid"`
}
type ClickRandGiftResp struct {
Code int `json:"code"`
Message string `json:"message"`
Gold int64 `json:"gold"`
Lefttime int `json:"lefttime"`
}
type DoBuyCatReq struct {
CatId int `json:"catId"`
}
type DoBuyCatCoin struct {
UserId int `json:"userId"`
UpdateTime int `json:"updateTime"`
Coin string `json:"coin"`
IcomeRate string `json:"icomeRate"`
}
type DoBuyCatData struct {
Position int `json:"position"`
Price string `json:"price"`
Coin DoBuyCatCoin `json:"coin"`
}
type DoBuyCatResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data DoBuyCatData `json:"data"`
}
type QueryWareHouseResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []DataDesc `json:"data"`
}
type QueryAutomergeResp struct {
Code int `json:"code"`
Message string `json:"message"`
Goldrate int64 `json:"goldrate"`
Higestlv int `json:"higestlv"`
Curcatjianum int `json:"curcatjianum"`
Data []DataDesc `json:"data"`
}
type PutWareHouseReq struct {
Pos int `json:"pos"`
}
type PutWareHouseResp struct {
Code int `json:"code"`
Message string `json:"message"`
Warepos int `json:"warepos"`
}
type TakeWareHouseReq struct {
Warepos int `json:"warepos"`
}
type TakeWareHouseResp struct {
Code int `json:"code"`
Message string `json:"message"`
Pos int `json:"pos"`
}
type CatRoomDesc struct {
Pos int `json:"pos"`
Catlv int `json:"cat_lv"`
}
type QueryCatRoomInfoResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []CatRoomDesc `json:"data"`
}
type BuyCatRoomReq struct {
Lv int `json:"lv"`
}
type BuyCatRoomResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type UpCattoRoomReq struct {
Roompos int `json:"roompos"`
Callv int `json:"callv"`
Optype int `json:"optype"`
}
type UpCattoRoommResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type QueryCatShopInfoResp struct {
Code int `json:"code"`
Message string `json:"message"`
Chapter int `json:"chapter"`
Section int `json:"section"`
Lefttime int `json:"lefttime"`
Canwatch int `json:"canwatch"`
Storyhappen int `json:"storyhappen"`
}
type CatShoPlayReq struct {
Catlv int `json:"catlv"`
}
type CatShoPlayResp struct {
Code int `json:"code"`
Message string `json:"message"`
Lefttime int `json:"lefttime"`
Canwatch int `json:"canwatch"`
}
type GetCatShopRewardReq struct {
Optype int `json:"optype"`
}
type GetCatShopRewardResp struct {
Code int `json:"code"`
Message string `json:"message"`
Love int64 `json:"love"`
}
type AcclecteCatStoryResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type UpdateUserInfoReq struct {
Headurl string `json:"headurl"`
Nickname string `json:"nickname"`
Realname string `json:"realname"`
}
type UpdateUserInfoResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type RankInfoDesc struct {
Rank int `json:"rank"`
UserId int `json:"userId"`
Headurl string `json:"headurl"`
Nickname string `json:"nickname"`
CatName string `json:"text"`
Income int64 `json:"income"`
}
type QueryPlayerRankResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []RankInfoDesc `json:"data"`
}
type CatPosInfo struct {
Position int `json:"position"`
Cat int `json:"cat"`
RedPacket float32 `json:"redPacket"`
Time int `json:"time"`
StartTime int `json:"startTime"`
}
type adRateData struct {
Multiple int `json:"multiple"`
EndTime int `json:"endTime"`
}
type GetMainPageInfoData struct {
LimitCatList []int `json:"limitCatList"`
CatList []CatPosInfo `json:"catList"`
Coin DoBuyCatCoin `json:"coin"`
AdRate adRateData `json:"adRate"`
}
type GetMainPageInfoResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data GetMainPageInfoData `json:"data"`
}
type QueryCompleteTaskDesc struct {
Taskid int `json:"taskid"`
}
type QueryOnlienTaskDesc struct {
Taskid int `json:"taskid"`
Lefttime int64 `json:"lefttime"`
}
type QueryCompleteTaskResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []QueryCompleteTaskDesc `json:"data"`
Online []QueryOnlienTaskDesc `json:"online"`
}
type QueryCompleteAchievementDesc struct {
Achieveid int `json:"achieveid"`
}
type QueryCompleteAchievementResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data []QueryCompleteAchievementDesc `json:"data"`
}
type GetTaskRewardReq struct {
Taskid int `json:"taskid"`
}
type GetTaskRewardResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type GetAchieveRewardReq struct {
Achieveid int `json:"achieveid"`
}
type GetAchieveRewardResp struct {
Code int `json:"code"`
Message string `json:"message"`
}
type StartOnlineTaskReq struct {
Taskid int `json:"taskid"`
}
type StartOnlineTaskResp struct {
Code int `json:"code"`
Message string `json:"message"`
Lefttime int `json:"lefttime"`
}
type GetOfflineRewardReq struct {
Reward int `json:"reward"`
Optype int `json:"type"`
}
type GetOfflineRewardData struct {
}
type GetOfflineRewardResp struct {
Code int `json:"code"`
Message string `json:"message"`
Data GetOfflineRewardData `json:"data"`
}
//**********************************************************************************************************
type PosData struct {
Pos int
Catlv int
Countdown int //倒计时 为0表示没有
//UpPos int //上阵的位置 0表示未上阵
}
//玩家购买猫详情
type BuyCatInfoData struct {
Buytime int //购买次数
IsMaxBuytime int //是否达到涨价上线 1是0否
CurPrice int64 //当前价格
}
//猫咖店家具数据
type CatRoomData struct {
LvCatlv int //入住猫的等级
}
//猫咖门店数据
type CatShopData struct {
Chapter int //当前所处进度 对应shopcaofig的id
Section int //当前小节进度 ,即当前大章节第几次故事
IsPlaying int //是否处于探险模式 1是0否
LeftTime int //探险剩余时间
PlayTimes int //当前为第几次探险
DayNum int //当天日期,用于判断跨天
TotalWatchNumLeft int //当天剩余看视频次数
ThisIsWatch int //本次探险是否已经看过视频
IsMax int //是否已经通关 1是0否
CurCatLv int //参加探险的猫等级
IsStoryHappen int //此次是否触发故事
}
//玩家排行榜数据
type UserRankInfo struct {
Gold int64 //金币
Head string //头像地址
NickName string //昵称
Highestlv int //当前最高猫等级
Uuid int //uuid
}
//玩家任务数据 每日清零
type TaskData struct {
//StartOnline int //开始计算在线时间
StartOnline map[int]int64 //记录对应takid 和开始计时的时间
BuyCatTime int //商店购买猫次数
MergeTime int //合成猫次数
PlayWithTime int //陪玩次数
WatchAddTime int //看广告次数
CompleteId map[int]int //已经完成的任务的id,对应task表的id value无用
HaveComplete map[int]int //记录当日已完成的任务,已完成则不再完成
}
//玩家成就数据
type AchieveMentData struct {
GetNewCatTime int //累计解锁新猫次数
GetAllJia int //累计获得猫爬架次数
GetRoomJu int //累计解锁新家具次数
StoryTime int //累计解锁故事
ShopTime int //累计解锁店铺
CompleteId map[int]int //已经完成的任务的id,对应achievement表id value为无用
HaveComplete map[int]int //记录已完成成就已完成则不再触发
}
//玩家数据
type UserData struct {
UserId int //玩家id
RegTime int //注册时间
Gold int64 //金币
GoldSum int64 //玩家累计金币
Love int64 //爱心值
Goldrate int64 //金币生成速率
Loverate int64 //爱心生产速率
Highestlv int //当前最高猫等级
InviteId int //邀请者uid
CurBoxLv int //当前猫箱子等级
IsDouble int //当前加速标签 1表示3倍收益 0表示正常
StartDoubleTime int //开始双倍时间
DoubleLeftTimes int //剩余加速金币次数
GetWatchAdsGoldTime int //看广告领金币次数
DrawTicket int //抽奖券次数
DrawTicketTimes int //剩余增加抽奖券次数
DratMult int //下次抽奖的倍数
DrawLastRewardId int //上一次的奖励ID
DrawTableCount int //当前抽奖次数 5次以后归零
IsAuto int //当前是否自动合成
IsBoxAcc int //是否处于加速生成箱子状态
RandGiftNum int //当前剩余空投猫粮次数
RandGiftDay int //记录当前猫粮日期,当日期变化则重置RandGiftNum
RandGiftTime int //记录上一次空投猫粮时间
Redbag float32 //红包值 单位为分
Head string //头像地址
NickName string //昵称
RealName string //实名
IsFirstRedBgCat int //是否合成过红包猫 0表示否1表示是
OfflineGold int64 //离线金币
OfflineLove int64 //离线爱心
LastLoginTime int //上次登陆时间
LastTimingRewardHour int //上次领取整点奖励的时刻
FlopCardCnt int //翻牌次数计数
FlopCardLefCnt int //剩余翻拍次数
CatShopInfo CatShopData //猫咖门店数据
Taskinfo TaskData //任务数据
AchieveMent AchieveMentData //成就数据
PosInfo []CatPosInfo //位置信息 从0开始
BuyCatInfo []BuyCatInfoData //商店购买猫数据 第一个元素为1级猫 第二个为2级猫以此类推
CatRoomInfo []CatRoomData //猫咖店数据
}
//仓库数据详情
type WareHouseDesc struct {
Warelv int //红包猫等级 对应表id
}
//玩家仓库数据
type UserWareHouseData struct {
Info []WareHouseDesc //下标表示位置
}
const (
TASK_TYPE_ONLINE = 1 //在线
TASK_TYPE_BUYCAT = 2 //商店购买猫
TASK_TYPE_MERGE = 3 //合成猫
TASK_TYPE_PLAYWITHCAT = 4 //猫咪陪玩
TASK_TYPE_WATCHADD = 5 //观看广告
ACH_TYPE_GETCAT = 6 //累计解锁猫
ACH_TYPE_GETCATJIA = 7 //累计获得猫爬架
ACH_TYPE_GETCATROOMJIA = 8 //累计解锁新家具
ACH_TYPE_GETSTORY = 9 //累计解锁新故事
ACH_TYPE_GBESHOP = 10 //累计用于新店铺
)