-
Notifications
You must be signed in to change notification settings - Fork 0
/
struct.go
146 lines (136 loc) · 6.65 KB
/
struct.go
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 model
type AdminRecharge struct {
Id int64
AgentId int64 `xorm:"not null BIGINT(20) default"`
AgentName string `xorm:"not null VARCHAR(32) default"`
AgentAccount string `xorm:"not null VARCHAR(32) default"`
AdminId string `xorm:"not null VARCHAR(32) default"`
AdminName string `xorm:"not null VARCHAR(32) default"`
AdminAccount string `xorm:"not null VARCHAR(32) default"`
Extra string `xorm:"not null VARCHAR(255) default"`
CreateAt int64 `xorm:"not null BIGINT(20) default"`
CardCount int64 `xorm:"not null BIGINT(20) default"`
}
type Agent struct {
Id int64
Name string `xorm:"not null VARCHAR(32) default"`
Account string `xorm:"not null VARCHAR(32) default"`
Password string `xorm:"not null VARCHAR(64) default"`
Phone string `xorm:"not null VARCHAR(11) default"`
Wechat string `xorm:"not null VARCHAR(32) default"`
Salt string `xorm:"not null VARCHAR(32) default"`
Role int `xorm:"not null TINYINT(4) default"`
Status int `xorm:"not null TINYINT(4) default"`
Extra string `xorm:"not null VARCHAR(255) default"`
CreateAt int64 `xorm:"not null BIGINT(20) default"`
DeleteAt int64 `xorm:"not null BIGINT(20) default"`
DeleteAccount string `xorm:"not null VARCHAR(32) default"`
CreateAccount string `xorm:"not null VARCHAR(32) default"`
ConfirmAccount string `xorm:"not null VARCHAR(32) default"`
CardCount int64 `xorm:"not null BIGINT(20) default"`
Level int `xorm:"not null INT(20) default"`
Discount int `xorm:"not null INT(20) default"`
}
type Desk struct {
Id int64
Mode int `xorm:"not null INT(11) default 5"`
DeskNo string `xorm:"not null index VARCHAR(6) default"`
Player0 int64 `xorm:"not null index BIGINT(20) default 0"`
Player1 int64 `xorm:"not null index BIGINT(20) default 0"`
Player2 int64 `xorm:"not null index BIGINT(20) default 0"`
Player3 int64 `xorm:"not null index BIGINT(20) default 0"`
Player4 int64 `xorm:"not null index BIGINT(20) default 0"`
PlayerName0 string `xorm:"not null VARCHAR(255) default ''"`
PlayerName1 string `xorm:"not null VARCHAR(255) default ''"`
PlayerName2 string `xorm:"not null VARCHAR(255) default ''"`
PlayerName3 string `xorm:"not null VARCHAR(255) default ''"`
PlayerName4 string `xorm:"not null VARCHAR(255) default ''"`
ScoreChange0 int `xorm:"not null INT(255) default 0"`
ScoreChange1 int `xorm:"not null INT(255) default 0"`
ScoreChange2 int `xorm:"not null INT(255) default 0"`
ScoreChange3 int `xorm:"not null INT(255) default 0"`
ScoreChange4 int `xorm:"not null INT(255) default 0"`
CreatedAt int64 `xorm:"not null index BIGINT(255) default 0"`
}
type History struct {
Id int64
DeskId int64 `xorm:"not null index BIGINT(20) default 0"`
Mode int `xorm:"not null index INT(255) default 3"`
BeginAt int64 `xorm:"not null BIGINT(255) default 0 "`
EndAt int64 `xorm:"not null BIGINT(255) default 0 "`
PlayerName0 string `xorm:"not null VARCHAR(255) default"`
PlayerName1 string `xorm:"not null VARCHAR(255) default"`
PlayerName2 string `xorm:"not null VARCHAR(255) default"`
PlayerName3 string `xorm:"not null VARCHAR(255) default"`
PlayerName4 string `xorm:"not null VARCHAR(255) default"`
ScoreChange0 int `xorm:"not null INT(255) default 0"`
ScoreChange1 int `xorm:"not null INT(255) default 0"`
ScoreChange2 int `xorm:"not null INT(255) default 0"`
ScoreChange3 int `xorm:"not null INT(255) default 0"`
ScoreChange4 int `xorm:"not null INT(255) default 0"`
Snapshot string `xorm:"not null TEXT default"`
}
type Login struct {
Id int64
Uid int64 `xorm:"not null index BIGINT(20) default"`
Remote string `xorm:"not null VARCHAR(40) default"`
Ip string `xorm:"not null VARCHAR(40) default"`
Model string `xorm:"not null VARCHAR(64) default"`
Imei string `xorm:"not null VARCHAR(32) default"`
Os string `xorm:"not null VARCHAR(64) default"`
AppId string `xorm:"not null VARCHAR(64) default"`
ChannelId string `xorm:"not null VARCHAR(32) default"`
LoginAt int64 `xorm:"not null BIGINT(11) default"`
LogoutAt int64 `xorm:"not null BIGINT(11) default"`
}
type Online struct {
Id int64
Time int64 `xorm:"not null BIGINT(20) default"`
UserCount int `xorm:"not null INT(20) default"`
DeskCount int `xorm:"not null INT(11) default"`
}
type Register struct {
Id int64
Uid int64 `xorm:"not null index BIGINT(20) default"`
Remote string `xorm:"not null VARCHAR(40) default"`
Ip string `xorm:"not null VARCHAR(40) default"`
Imei string `xorm:"not null VARCHAR(128) default"`
Os string `xorm:"not null VARCHAR(20) default"`
Model string `xorm:"not null VARCHAR(20) default"`
AppId string `xorm:"not null index VARCHAR(32) default"`
ChannelId string `xorm:"not null index VARCHAR(32) default"`
RegisterAt int64 `xorm:"not null index BIGINT(11) default"`
RegisterType int `xorm:"not null index TINYINT(8) default"`
}
type ThirdAccount struct {
Id int64
ThirdAccount string `xorm:"not null index VARCHAR(128) default"`
Uid int64 `xorm:"not null BIGINT(20) default"`
Platform string `xorm:"not null index VARCHAR(32) default"`
ThirdName string `xorm:"not null VARCHAR(64) default"`
HeadUrl string `xorm:"not null VARCHAR(512) default"`
Sex int `xorm:"not null TINYINT(4) default 0"`
}
type User struct {
Id int64
Algo string `xorm:"not null VARCHAR(16) default"`
Hash string `xorm:"not null VARCHAR(64) default"`
Salt string `xorm:"not null VARCHAR(64) default"`
Role int `xorm:"not null TINYINT(3) default 1"`
Status int `xorm:"not null TINYINT(3) default 1"`
IsOnline int `xorm:"not null TINYINT(1) default 1"`
LastLoginAt int64 `xorm:"not null index BIGINT(11) default"`
PrivKey string `xorm:"not null VARCHAR(512) default"`
PubKey string `xorm:"not null VARCHAR(128) default"`
Coin int64 `xorm:"not null BIGINT(20) default 0"`
RegisterAt int64 `xorm:"not null index BIGINT(20) default 0"`
FirstRechargeAt int64 `xorm:"not null index BIGINT(20) default 0"`
Debug int `xorm:"not null index TINYINT(1) default 0"`
}
type Uuid struct {
Id int64
UidInUse int64 `xorm:"not null index BIGINT(20) default 0"`
UidOrigin int64 `xorm:"not null BIGINT(20) default 0"`
Appid string `xorm:"not null index VARCHAR(32) default"`
Uuid string `xorm:"not null VARCHAR(64) default"`
}