datadef.go
4.45 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
package logic
//微信url定义
const (
URL_WEIXINMSG_CHECK = "https://api.weixin.qq.com/wxa/msg_sec_check"
URL_WEIXINGETACCESS_TOKEN = "https://api.weixin.qq.com/cgi-bin/token"
)
//登录类型枚举
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 TextCheckReq struct{
Token string `json:"token"`
Text string `json:"text"`
}
type TextCheckResp struct {
Status string `json:"status"`
Result CommonResult `json:"result"`
}
type MsgCheckDesc struct {
Content string `json:"content"`
}
type MsgCheckResp struct {
Errcode string `json:"errcode"`
Errmsg string `json:"errmsg"`
}
type GetAccessTokenResp struct {
Access_token string `json:"access_token"`
Expires_in string `json:"expires_in"`
}
type CreateTeamReq struct{
Token string `json:"token"`
Name string `json:"name"`
Is_open int `json:"is_open"`
Limit int `json:"limit"`
}
type CreateTeamInfo struct {
Id int `json:"id"`
Name string `json:"name"`
Is_open int `json:"is_open"`
Num int `json:"num"`
Assets int `json:"assets"`
Least int `json:"least"`
Captain_id int `json:"captain_id"`
Creator_id int `json:"creator_id"`
Status int `json:"status"`
Create_time int `json:"create_time"`
Update_time int `json:"update_time"`
}
type CreateTeamDesc struct {
Team_data CreateTeamInfo `json:"team_data"`
}
type CreateTeamData struct {
Code int `json:"code"`
Data CreateTeamDesc `json:"data"`
}
type CreateTeamResp struct {
Status string `json:"status"`
Result CreateTeamData `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
}