datadef.go
3.07 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
package logic
//登录类型枚举
const (
LOGIN_TYPE_TOURIST = 1 //游客登录
LOGIN_TYPE_ACCOUNT = 2 //账号密码登录
LOGIN_TYPE_WECHAT = 3 //微信登录
)
type UserLoginReq struct {
Channel_id int `json:"channel_id"`
Invite_type int `json:"invite_type"`
Invite_res_id int `json:"invite_res_id"`
User_invite_uid int `json:"user_invite_uid"`
Scene int `json:"scene"`
RefAppId int `json:"refAppId"`
Code string `json:"code"`
Token string `json:"token"`
Logintype int `json:"logintype"`
Useraccount string `json:"useraccount"`
Userpwd string `json:"userpwd"`
Version string `json:"version"`
}
type UserBaseData struct {
User_id int `json:"user_id"`
User_gender int `json:"user_gender"`
User_nickname string `json:"user_nickname"`
User_openid string `json:"user_openid"`
User_avatar_url string `json:"user_avatar_url"`
User_city string `json:"user_city"`
User_token string `json:"user_token"`
}
type UserExtData struct {
User_id int `json:"user_id"`
Hot int `json:"hot"`
Coin int64 `json:"coin"`
LoveExp int `json:"loveExp"`
Bean int `json:"bean"`
ShopNum int `json:"shopNum"`
Lv int `json:"lv"`
Exp int `json:"exp"`
User_invite_uid int `json:"user_invite_uid"`
User_reg_time int `json:"user_reg_time"`
User_channel int `json:"user_channel"`
User_is_black int `json:"user_is_black"`
User_scene int `json:"user_scene"`
Reg_time int `json:"reg_time"`
Invite_uid int `json:"invite_uid"`
}
type UserLoginData struct {
Dasedata UserBaseData `json:"UserBaseData"`
Extdata UserExtData `json:"user_ext_data"`
}
type UserLoginResult struct {
Code int `json:"code"`
Data UserLoginData `json:"data"`
}
type UserLoginResp struct {
Status string `json:"status"`
Result UserLoginResult `json:"result"`
}
type SaveUserDataReq struct{
Token string `json:"token"`
Hot int `json:"hot"`
Coin int64 `json:"coin"`
Loveexp int `json:"loveexp"`
Bean int `json:"bean"`
Shopnum int `json:"shopnum"`
}
type SaveUserDataResp struct {
Status string `json:"status"`
Result UserLoginResult `json:"result"`
}
type CommonResult struct {
Code int `json:"code"`
Data string `json:"data"`
}
type SaveDataReq struct{
Token string `json:"token"`
Field string `json:"field"`
Value string `json:"value"`
}
type SaveDataResp struct {
Status string `json:"status"`
Result CommonResult `json:"result"`
}
type GetDataDesc struct {
Base_data string `json:"base_data"`
}
type GetDataResult struct {
Code int `json:"code"`
Data GetDataDesc `json:"data"`
}
type GetDataReq struct{
Token string `json:"token"`
Field string `json:"field"`
}
type GetDataResp struct {
Status string `json:"status"`
Result GetDataResult `json:"result"`
}
//**********************************************************************************************************
//玩家数据
type UserData struct {
Userid int //玩家id
Hot int
Coin int64 //金币
Loevexp int
Bean int //咖啡豆
Shopnum int //店铺数量
Lv int
Exp int
UserInviteId int
Userregtime int
Channel int
Isblack int
Scene int
Regtime int
InviteUid int
}