datadef.go 15 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
package logic

//"101":"免费任务升级",
//"102":"任务",
//"103":"免费红包",
//"104":"付费任务升级",
//"105":"存钱罐",
//"106":"付费红包",
//"107":"签到罐"

type UserLoginReq struct {
	Nickname    string    `json:"nickname"`
	Headurl string    `json:"headurl"`
	Gameid    string `json:"gameid"`
	Channel   string `json:"channel"`
}

type UserLoginData struct {
	Walletgold    int `json:"walletgold"`
	Leftredbagcnt int `json:"leftredbagcnt"`
	Guangold      int `json:"guangold"`
	Userlv        int `json:"userlv"`
	Userexp       int `json:"userexp"`
	Sumloginday   int `json:"sumloginday"`
	Shakeleftcnt  int `json:"shakeleftcnt"`
	IsNew         int `json:"isnew"`
	Issignshow   int        `json:"issignshow"`
	//Leftredbagnum   int        `json:"leftredbagnum"`
}

type UserLoginResp struct {
	Code    int           `json:"code"`
	Message string        `json:"message"`
	Data    UserLoginData `json:"data"`
}

type GetuserdataReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type GetuserdataData struct {
	Walletgold     int `json:"walletgold"`
	Leftredbagcnt  int `json:"leftredbagcnt"`
	Guangold       int `json:"guangold"`
	Userlv         int `json:"userlv"`
	Userexp        int `json:"userexp"`
	Leftfreeredbag int `json:"leftfreeredbag"`
	Sumloginday    int `json:"sumloginday"`
	Shakeleftcnt   int `json:"shakeleftcnt"`
}

type GetuserdataResp struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    GetuserdataData `json:"data"`
}

type WatchadsData struct {
	Leftads int `json:"leftads"`
}

type WatchadsResp struct {
	Code    int          `json:"code"`
	Message string       `json:"message"`
	Data    WatchadsData `json:"data"`
}

type QueryguaninfoData struct {
	Leftcnt       int `json:"leftcnt"`
	Totalcnt      int `json:"totalcnt"`
	Guangold      int `json:"guangold"`
	Minget        int `json:"minget"`
	Maxget        int `json:"maxget"`
	Loginday      int `json:"loginday"`
	Totalfetchcnt int `json:"totalfetchcnt"`
}

type QueryguaninfoResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    QueryguaninfoData `json:"data"`
}

type GetguangoldReq struct {
	Goldnum int    `json:"goldnum"`
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type GetguangoldData struct {
	Guangold int `json:"guangold"`
}

type GetguangoldResp struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    GetguangoldData `json:"data"`
}

type DrawguangoldReq struct {
	Goldnum int    `json:"goldnum"`
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type DrawguangoldData struct {
	Guangold      int `json:"guangold"`
	Wallgold      int `json:"wallgold"`
	Totalfetchcnt int `json:"totalfetchcnt"`
	Getgoldnum    int `json:"getgoldnum"`
}

type DrawguangoldResp struct {
	Code    int              `json:"code"`
	Message string           `json:"message"`
	Data    DrawguangoldData `json:"data"`
}

type QuerdrawinfoResp struct {
	Code    int          `json:"code"`
	Message string       `json:"message"`
	Data    WithDrawInfo `json:"data"`
}

type GetcashReq struct {
	Gameid   string  `json:"gameid"`
	Channel  string  `json:"channel"`
	Money    float32 `json:"money"`
	Openid   string  `json:"openid"`
	Nickname string  `json:"nickname"`
	Headurl  string  `json:"headurl"`
	Ver      string  `json:"ver"`
	Ctype    int     `json:"ctype"`
}

type GetCashWechatData struct {
	Cdkey string `json:"cdkey"`
}

type GetCashWechatResp struct {
	Code string            `json:"code"`
	Data GetCashWechatData `json:"data"`
	Msg  string            `json:"msg"`
}

type CommReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type GetcashData struct {
	Walletgold int `json:"walletgold"`
}
type GetcashResp struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    GetcashData `json:"data"`
}

type GetcashwechatData struct {
	Cdkey string `json:"cdkey"`
}
type GetcashwechatResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    GetcashwechatData `json:"data"`
}

type GetcashwechatReq struct {
	Gameid   string  `json:"gameid"`
	Channel  string  `json:"channel"`
	Money    float32 `json:"money"`
	Openid   string  `json:"openid"`
	Nickname string  `json:"nickname"`
	Headurl  string  `json:"headurl"`
	Ver      string  `json:"ver"`
	Ctype    int     `json:"ctype"`
}

type GetcashrecordReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type GetcashrecordResp struct {
	Code    int          `json:"code"`
	Message string       `json:"message"`
	Data    WithDrawList `json:"data"`
}

type OnlinentfResp struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type UpdatetaskReq struct {
	Tasktype int    `json:"tasktype"`
	Value    int    `json:"value"`
	Gameid   string `json:"gameid"`
	Channel  string `json:"channel"`
}

type UpdatetaskResp struct {
	Code    int    `json:"code"`
	Message string `json:"message"`
}

type QuerytaskinfoReq struct {
	Gameid   string `json:"gameid"`
	Channel  string `json:"channel"`
}

type QuerytaskinfoResp struct {
	Code    int      `json:"code"`
	Message string   `json:"message"`
	Data    TaskList `json:"data"`
}

type GettaskrewardReq struct {
	Tasktype int    `json:"tasktype"`
	Taskid   int    `json:"taskid"`
	Gameid   string `json:"gameid"`
	Channel  string `json:"channel"`
}

type GettaskrewardData struct {
	Totalrednum    int `json:"totalrednum"`
	Getrednum    int `json:"getrednum"`
}
type GettaskrewardResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    GettaskrewardData `json:"data"`
}

type GetnewlevelrewardReq struct {
	Rewardtype int    `json:"rewardtype"`
	Gameid     string `json:"gameid"`
	Channel    string `json:"channel"`
}

type GetnewlevelrewardData struct {
	Goldnum int `json:"goldnum"`
}
type GetnewlevelrewardResp struct {
	Code    int                   `json:"code"`
	Message string                `json:"message"`
	Data    GetnewlevelrewardData `json:"data"`
}

type QuerysigndataData struct {
	Curday     int `json:"curday"`
	Issigntaday   int `json:"issigntaday"`
}

type QueryReadGoldData struct {
	Goldnum int `json:"goldnum"`
}

type QueryReadGoldResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    QueryReadGoldData `json:"data"`
}

type FetchreadgoldData struct {
	Curgoldnum int `json:"curgoldnum"`
	Getgoldnum int `json:"getgoldnum"`
}

type FetchreadgoldResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    FetchreadgoldData `json:"data"`
}

type QuerysigndataResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    QuerysigndataData `json:"data"`
}

type FetchredbagReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
	Bagnum int `json:"bagnum"`
}

type FetchredbagData struct {
	Getgoldnum int `json:"getgoldnum"`
	Walletgold int `json:"walletgold"`
	Leftredbagnum int `json:"leftredbagnum"`
}
type FetchredbagResp struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    FetchredbagData `json:"data"`
}

type SavadataReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
	Key string `json:"key"`
	Value string `json:"value"`
}

type SavadataResp struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
}

type UploadhigestscoreReq struct {
	Iscorrect int64 `json:"iscorrect"`
	Gameid string `json:"gameid"`
	Channel string `json:"channel"`
}

type UploadhigestscoreData struct {
}

type UploadhigestscoreResp struct {
	Code    int                   `json:"code"`
	Message string                `json:"message"`
	Data    UploadhigestscoreData `json:"data"`
}

type Queryrankinfolist struct {
	Rank     int    `json:"rank"`
	Nickname string `json:"nickname"`
	Headurl  string `json:"headurl"`
	Socre    int64  `json:"socre"`
	UniqueId string `json:"uniqueId"`
}

type QueryrankinfoData struct {
	Selfrank  int                 `json:"selfrank"`
	Selfsocre int64               `json:"selfsocre"`
	Ranklist  []Queryrankinfolist `json:"ranklist"`
}

type QueryrankinfoResp struct {
	Code    int               `json:"code"`
	Message string            `json:"message"`
	Data    QueryrankinfoData `json:"data"`
}

type GetdataReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
	Key string `json:"key"`
}

type GetdataData struct {
	Value string `json:"value"`
}

type GetdataResp struct {
	Code    int             `json:"code"`
	Message string          `json:"message"`
	Data    GetdataData `json:"data"`
}

type UsersignReq struct {
	Gameid  string `json:"gameid"`
	Channel string `json:"channel"`
}

type UsersignData struct {
	Curday      int `json:"curday"`
	Issigntaday int `json:"issigntaday"`
	Walletgold  int `json:"walletgold"`
	Getgold     int `json:"getgold"`
}
type UsersignResp struct {
	Code    int          `json:"code"`
	Message string       `json:"message"`
	Data    UsersignData `json:"data"`
}

type ReadNumUploadReq struct {
	Uid     string `json:"uid"`
	Readnum int    `json:"readnum"`
	//Gameid  string `json:"gameid"`
	//Channel string `json:"channel"`
}

type ReadNumUploadResp struct {
	Code      int    `json:"code"`
	Message   string `json:"message"`
	Timestamp int    `json:"timestamp"`
}

//**********************************************************************************************************

type TaskListDesc struct {
	Taskid       int `json:"taskid"`
	Taskstatus   int `json:"taskstatus"`
	Taskprogress int `json:"taskprogress"`
}

type TaskList struct {
	Taskdata   []TaskListDesc `json:"taskdata"`
	Fetchrdnum int            `json:"fetchrdnum"`
}

//其中提取次数和当日登陆在userdata中记录
type TaskInfo struct {
	OnlineMin    int //在线分钟数
	GuessSong    int //合成次数
	WatchAds   int //观看广告次数
}

//
type AchieveMentInfo struct {
	WatchAdsCnt   int //观看广告数
	KillStar      int //消除星星数
	SumGetGuan    int //存钱罐累计提取
	SumUseItemCnt int //使用道具次数累计
}

type WithDrawList struct {
	Withdata []WithDrawRecord `json:"withdata"`
}

//提现记录结构
type WithDrawRecord struct {
	Coin        int    `json:"coin"`
	Create_time int    `json:"create_time"`
	Money       int    `json:"money"`
	No          string `json:"no"`
	Status      int    `json:"status"`
	Statusmsg   string `json:"statusmsg"`
	Typ         int    `json:"typ"`
}

type WithDrawDescs []WithDrawDesc

func (v WithDrawDescs) Len() int {
	return len(v)
}

func (v WithDrawDescs) Swap(i, j int) {
	v[i], v[j] = v[j], v[i]
}

func (v WithDrawDescs) Less(i, j int) bool {

	return v[i].Cid < v[j].Cid
}

type CashCdKeyInfo struct {
	Id    int     `json:"id"`
	Money float32 `json:"money"`
	Cdkey string  `json:"cdkey"`
}

type WithDrawInfo struct {
	Cashdata        WithDrawDescs `json:"cashdata"`
	SpecialCashdata WithDrawDescs `json:"specialcashdata"`
	Cdkeycashdata   []CashCdKeyInfo `json:"cdkeycashdata"`
}

type WithDrawDesc struct {
	Cid       int     `json:"cid"`
	Cnum      float32 `json:"cnum"`
	Isnew     int     `json:"isnew"`
	Limitlv   int     `json:"limitlv"`
	Preisfind int     `json:"preisfind"`
	Day       int     `json:"day"`
}

//玩家数据
type UserData struct {
	Userid           int          //玩家id
	Lv               int          //玩家当前等级
	LvRewardGet      int          //当前等级奖励是否已经领取 1未领取 2普通领取 3双倍领取
	Exp              int          //玩家当前经验值
	GuanGold         int          //玩家存钱罐中金币数量
	RealGold         int          //玩家实际金币数量(可用于提现的)
	WatchAddsTime    int          //当天剩余红包次数  初始化50次
	LastLoginTime    int          //上次登陆时间
	ContinueLoginDay int          //连续登录天数
	SumLoginDay      int          //累计登陆天数
	GetFromGuanCnt   int          //当天从存钱款提取金币次数
	SignRound        int          //签到轮数
	SignSum          int          //累计签到天数
	IsSignToday      int          //今日是否已经签到 1是 0否
	LeftFreeRB       int          //剩余免费红包次数
	UpLvCostTime     int          //上一个等级升级时间
	UpLvCostTimeSec  int          //上一个等级升级的时间点时刻
	ReadNum          int          //玩家微转发阅读量
	GetCashCnt       int          //当天提现次数
	ShakeTime        int          //摇一摇
	FetchRedCnt      int          //领取红包次数计数
	IsNew            int          //新手状态
	FetchRdBagNum    int          //当天已领的红包
	Hfen			int64			//当日最高积分 用于计算排行榜
	Nickname		string			//逆臣
	HeadUrl			string			//头像
	SignShow           int              //是否弹出签到
	Sunti				int				//总答题数
	Coti 				int				//正确提数
	WithDraw         WithDrawInfo //提现记录信息
	Cdkeys           []CashCdKeyInfo //记录提现的cdkeys
	//SpecialWithDraw  WithDrawInfo    //活跃提现记录信息
	Task    TaskInfo        //玩家任务完成相关信息
	Achieve AchieveMentInfo //玩家成就完成相关数据
}

//----------------------------------------------------------------------------------------------------------------------

type TixianDesc struct {
	Sign       string `json:"sign"`
	Sign_type  string `json:"sign_type"`
	Time_stamp string `json:"time_stamp"`
	Gameid     string `json:"gameid"`
	Channel    string `json:"channel"`
	Uid        int    `json:"uid"`
	Typ        int    `json:"typ"`
	Money      int    `json:"money"`
	Openid     string `json:"openid"`
	Nickname   string `json:"nickname"`
	Headurl    string `json:"headurl"`
	Editcoin   int    `json:"editcoin"`
	Ver        string `json:"ver"`
	Checkcoin  int    `json:"checkcoin"`
}

type AddCoinDesc struct {
	Sign       string `json:"sign"`
	Sign_type  string `json:"sign_type"`
	Time_stamp string `json:"time_stamp"`
	Gameid     string `json:"gameid"`
	Channel    string `json:"channel"`
	Uid        int    `json:"uid"`
	Coin       int    `json:"coin"`
	Typ        int    `json:"typ"`
}

type AddCoinResultData struct {
	Mycoin int `json:"mycoin"`
}

type AddCoinResp struct {
	Code string            `json:"code"`
	Msg  string            `json:"msg"`
	Data AddCoinResultData `json:"data"`
}

type GetCoinDesc struct {
	Sign       string `json:"sign"`
	Sign_type  string `json:"sign_type"`
	Time_stamp string `json:"time_stamp"`
	Gameid     string `json:"gameid"`
	Channel    string `json:"channel"`
	Uid        int    `json:"uid"`
}

type GetCashResp struct {
	Code string `json:"code"`
	Msg  string `json:"msg"`
}

type GetCashListDesc struct {
	Sign       string `json:"sign"`
	Sign_type  string `json:"sign_type"`
	Time_stamp string `json:"time_stamp"`
	Gameid     string `json:"gameid"`
	Channel    string `json:"channel"`
	Uid        int    `json:"uid"`
	Start      int    `json:"start"`
	Number     int    `json:"number"`
}

type GetCashListResp struct {
	Code string           `json:"code"`
	Msg  string           `json:"msg"`
	Data []WithDrawRecord `json:"data"`
}