datadef.go 8.68 KB
package logic

type UserLoginReq struct {
	Fromid    int    `json:"fromid"`
	Sharetype int    `json:"sharetype"`
	Gameid    string `json:"gameid"`
	Channel   string `json:"channel"`
}

type UserLoginData struct {
	Walletgold int `json:"walletgold"`
	Leftads    int `json:"leftads"`
	Guangold   int `json:"guangold"`
	Userlv     int `json:"userlv"`
	Userexp    int `json:"userexp"`
}

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"`
	Leftads        int `json:"leftads"`
	Guangold       int `json:"guangold"`
	Userlv         int `json:"userlv"`
	Userexp        int `json:"userexp"`
	Leftfreeredbag int `json:"leftfreeredbag"`
}

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"`
}

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

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

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"`
}

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"`
}

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

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"`
}

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

type QuerytaskinfoReq struct {
	Tasktype int `json:"tasktype"`
}

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 {
	Lv         int `json:"lv"`
	Rewardstar int `json:"rewardstar"`
	Chuiitem   int `json:"chuiitem"`
	Shuaitem   int `json:"shuaitem"`
	Swapitem   int `json:"swapitem"`
	Eliminitem int `json:"eliminitem"`
	Goldnum    int `json:"goldnum"`
}
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 {
	Signround     int `json:"signround"`
	Continuessign int `json:"continuessign"`
	IssignToday   int `json:"issignToday"`
}

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

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

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

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

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

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

//其中提取次数和当日登陆在userdata中记录
type TaskInfo struct {
	OnlineMin    int //在线分钟数
	PassLevel    int //通过关卡数
	UseItemCnt   int //使用道具次数
	GetRedbagCnt int //领取红包次数
	GetGuanGold  int //收集金币数
}

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

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

//提现记录结构
type WithDrawRecord struct {
	Withdrawtime  int     `json:"wichdrawtime"`
	Withdrawmoney float32 `json:"withdrawmoney"`
}

type WithDrawInfo struct {
	Cashdata []WithDrawDesc `json:"cashdata"`
}

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

//玩家数据
type UserData struct {
	Userid           int             //玩家id
	Lv               int             //玩家当前等级
	LvRewardGet      int             //当前等级奖励是否已经领取 1未领取 2普通领取 3双倍领取
	Exp              int             //玩家当前经验值
	GuanGold         int             //玩家存钱罐中金币数量
	RealGold         int             //玩家实际金币数量(可用于提现的)
	WatchAddsTime    int             //当天观看激励视频次数
	LastLoginTime    int             //上次登陆时间
	ContinueLoginDay int             //连续登录天数
	GetFromGuanCnt   int             //当天从存钱款提取金币次数
	SignRound        int             //签到轮数
	SignSum          int             //累计签到天数
	IsSignToday      int             //今日是否已经签到 1是 0否
	LeftFreeRB       int             //剩余免费红包次数
	WithDraw         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"`
}

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"`
}