Repository navigation
Expand file tree
/
Copy pathonepvp.sql
More file actions
531 lines (495 loc) · 22.8 KB
/
Copy pathonepvp.sql
File metadata and controls
531 lines (495 loc) · 22.8 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
/*
Navicat Premium Data Transfer
Source Server : MySQL
Source Server Type : MySQL
Source Server Version : 50610
Source Host : 127.0.0.1:3306
Source Schema : onepvp
Target Server Type : MySQL
Target Server Version : 50610
File Encoding : 65001
Date: 18/01/2018 15:06:37
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for alive_ip
-- ----------------------------
DROP TABLE IF EXISTS `alive_ip`;
CREATE TABLE `alive_ip` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`userid` int(11) NOT NULL,
`ip` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE,
INDEX `datetime`(`datetime`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for announcement
-- ----------------------------
DROP TABLE IF EXISTS `announcement`;
CREATE TABLE `announcement` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`date` datetime(0) NOT NULL,
`content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`markdown` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for auto
-- ----------------------------
DROP TABLE IF EXISTS `auto`;
CREATE TABLE `auto` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`type` int(11) NOT NULL,
`value` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`sign` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `datetime`(`datetime`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for blockip
-- ----------------------------
DROP TABLE IF EXISTS `blockip`;
CREATE TABLE `blockip` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`ip` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `ip`(`ip`) USING BTREE,
INDEX `nodeid`(`nodeid`) USING BTREE,
INDEX `datetime`(`datetime`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for bought
-- ----------------------------
DROP TABLE IF EXISTS `bought`;
CREATE TABLE `bought` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userid` bigint(20) NOT NULL,
`shopid` bigint(20) NOT NULL,
`datetime` bigint(20) NOT NULL,
`renew` bigint(11) NOT NULL,
`coupon` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`price` decimal(12, 2) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for code
-- ----------------------------
DROP TABLE IF EXISTS `code`;
CREATE TABLE `code` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`code` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`type` int(11) NOT NULL,
`number` decimal(11, 2) NOT NULL,
`isused` int(11) NOT NULL DEFAULT 0,
`userid` bigint(20) NOT NULL,
`usedatetime` datetime(0) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for coupon
-- ----------------------------
DROP TABLE IF EXISTS `coupon`;
CREATE TABLE `coupon` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`code` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`onetime` int(11) NOT NULL,
`expire` bigint(20) NOT NULL,
`shop` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`credit` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for detect_list
-- ----------------------------
DROP TABLE IF EXISTS `detect_list`;
CREATE TABLE `detect_list` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`text` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`regex` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`type` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for detect_log
-- ----------------------------
DROP TABLE IF EXISTS `detect_log`;
CREATE TABLE `detect_log` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`list_id` bigint(20) NOT NULL,
`datetime` bigint(20) NOT NULL,
`node_id` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for disconnect_ip
-- ----------------------------
DROP TABLE IF EXISTS `disconnect_ip`;
CREATE TABLE `disconnect_ip` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userid` bigint(20) NOT NULL,
`ip` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for email_verify
-- ----------------------------
DROP TABLE IF EXISTS `email_verify`;
CREATE TABLE `email_verify` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`email` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ip` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`code` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`expire_in` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `email`(`email`) USING BTREE,
INDEX `ip`(`ip`) USING BTREE,
INDEX `code`(`code`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for link
-- ----------------------------
DROP TABLE IF EXISTS `link`;
CREATE TABLE `link` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`type` int(11) NOT NULL,
`address` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`port` int(11) NOT NULL,
`token` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ios` int(11) NOT NULL DEFAULT 0,
`userid` bigint(20) NOT NULL,
`isp` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`geo` int(11) DEFAULT NULL,
`method` text CHARACTER SET utf8 COLLATE utf8_general_ci,
PRIMARY KEY (`id`) USING BTREE,
INDEX `token`(`token`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for login_ip
-- ----------------------------
DROP TABLE IF EXISTS `login_ip`;
CREATE TABLE `login_ip` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userid` bigint(20) NOT NULL,
`ip` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
`type` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for payback
-- ----------------------------
DROP TABLE IF EXISTS `payback`;
CREATE TABLE `payback` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`total` decimal(12, 2) NOT NULL,
`userid` bigint(20) NOT NULL,
`ref_by` bigint(20) NOT NULL,
`ref_get` decimal(12, 2) NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for paylist
-- ----------------------------
DROP TABLE IF EXISTS `paylist`;
CREATE TABLE `paylist` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`userid` bigint(20) NOT NULL,
`total` decimal(12, 2) NOT NULL,
`status` int(11) NOT NULL DEFAULT 0,
`tradeno` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`datetime` bigint(20) NOT NULL DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for radius_ban
-- ----------------------------
DROP TABLE IF EXISTS `radius_ban`;
CREATE TABLE `radius_ban` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userid` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `userid`(`userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for relay
-- ----------------------------
DROP TABLE IF EXISTS `relay`;
CREATE TABLE `relay` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`source_node_id` bigint(20) NOT NULL,
`dist_node_id` bigint(20) NOT NULL,
`dist_ip` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`port` int(11) NOT NULL,
`priority` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`, `source_node_id`, `dist_node_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for shop
-- ----------------------------
DROP TABLE IF EXISTS `shop`;
CREATE TABLE `shop` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`price` decimal(12, 2) NOT NULL,
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`auto_renew` int(11) NOT NULL,
`auto_reset_bandwidth` int(11) NOT NULL DEFAULT 0,
`status` int(11) NOT NULL DEFAULT 1,
`plan` varchar(11) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'A',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for speedtest
-- ----------------------------
DROP TABLE IF EXISTS `speedtest`;
CREATE TABLE `speedtest` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`nodeid` int(11) NOT NULL,
`datetime` bigint(20) NOT NULL,
`telecomping` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`telecomeupload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`telecomedownload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`unicomping` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`unicomupload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`unicomdownload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`cmccping` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`cmccupload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`cmccdownload` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for ss_invite_code
-- ----------------------------
DROP TABLE IF EXISTS `ss_invite_code`;
CREATE TABLE `ss_invite_code` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`user_id` int(11) NOT NULL,
`created_at` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP(0),
`updated_at` timestamp(0) NOT NULL DEFAULT '2016-06-01 08:00:00',
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`) USING BTREE,
INDEX `code`(`code`, `user_id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for ss_node
-- ----------------------------
DROP TABLE IF EXISTS `ss_node`;
CREATE TABLE `ss_node` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`type` int(3) NOT NULL,
`server` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`method` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`info` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`status` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`sort` int(3) NOT NULL,
`custom_method` tinyint(1) NOT NULL DEFAULT 0,
`traffic_rate` float NOT NULL DEFAULT 1,
`node_class` int(11) NOT NULL DEFAULT 0,
`node_speedlimit` decimal(12, 2) NOT NULL DEFAULT 0.00,
`node_connector` int(11) NOT NULL DEFAULT 0,
`node_bandwidth` bigint(20) NOT NULL DEFAULT 0,
`node_bandwidth_limit` bigint(20) NOT NULL DEFAULT 0,
`bandwidthlimit_resetday` int(11) NOT NULL DEFAULT 0,
`node_heartbeat` bigint(20) NOT NULL DEFAULT 0,
`node_ip` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
`node_group` int(11) NOT NULL DEFAULT 0,
`custom_rss` int(11) NOT NULL DEFAULT 0,
`mu_only` int(11) DEFAULT 0,
PRIMARY KEY (`id`) USING BTREE,
INDEX `type`(`type`, `sort`, `node_class`, `node_group`) USING BTREE,
INDEX `node_ip`(`node_ip`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;
INSERT INTO `onepvp`.`ss_node`(`id`, `name`, `type`, `server`, `method`, `info`, `status`, `sort`, `custom_method`, `traffic_rate`, `node_class`, `node_speedlimit`, `node_connector`, `node_bandwidth`, `node_bandwidth_limit`, `bandwidthlimit_resetday`, `node_heartbeat`, `node_ip`, `node_group`, `custom_rss`, `mu_only`) VALUES (1, '统一验证登陆', 0, 'onepvp.com', 'radius', '统一登陆验证', '可用', 999, 0, 1, 0, 0.00, 0, 0, 0, 0, 0, NULL, 0, 0, 0);
INSERT INTO `onepvp`.`ss_node`(`id`, `name`, `type`, `server`, `method`, `info`, `status`, `sort`, `custom_method`, `traffic_rate`, `node_class`, `node_speedlimit`, `node_connector`, `node_bandwidth`, `node_bandwidth_limit`, `bandwidthlimit_resetday`, `node_heartbeat`, `node_ip`, `node_group`, `custom_rss`, `mu_only`) VALUES (2, 'VPN 统一流量结算', 0, 'onepvp.com', 'radius', 'VPN 统一流量结算', '可用', 999, 0, 1, 0, 0.00, 0, 0, 0, 0, 0, NULL, 0, 0, 0);
-- ----------------------------
-- Table structure for ss_node_info
-- ----------------------------
DROP TABLE IF EXISTS `ss_node_info`;
CREATE TABLE `ss_node_info` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`node_id` int(11) NOT NULL,
`uptime` float NOT NULL,
`load` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`log_time` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `node_id`(`node_id`) USING BTREE,
INDEX `log_time`(`log_time`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for ss_node_online_log
-- ----------------------------
DROP TABLE IF EXISTS `ss_node_online_log`;
CREATE TABLE `ss_node_online_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`node_id` int(11) NOT NULL,
`online_user` int(11) NOT NULL,
`log_time` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `node_id`(`node_id`) USING BTREE,
INDEX `log_time`(`log_time`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Fixed;
-- ----------------------------
-- Table structure for ss_password_reset
-- ----------------------------
DROP TABLE IF EXISTS `ss_password_reset`;
CREATE TABLE `ss_password_reset` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`email` varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`token` varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`init_time` int(11) NOT NULL,
`expire_time` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `token`(`token`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for telegram_session
-- ----------------------------
DROP TABLE IF EXISTS `telegram_session`;
CREATE TABLE `telegram_session` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`user_id` bigint(20) NOT NULL,
`type` int(11) NOT NULL,
`session_content` char(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `session_content`(`session_content`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 0 CHARACTER SET = latin1 COLLATE = latin1_swedish_ci ROW_FORMAT = Compact;
-- ----------------------------
-- Table structure for ticket
-- ----------------------------
DROP TABLE IF EXISTS `ticket`;
CREATE TABLE `ticket` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`title` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`content` longtext CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`rootid` bigint(20) NOT NULL,
`userid` bigint(20) NOT NULL,
`datetime` bigint(20) NOT NULL,
`status` int(11) NOT NULL DEFAULT 1,
PRIMARY KEY (`id`) USING BTREE,
INDEX `rootid`(`rootid`, `userid`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for unblockip
-- ----------------------------
DROP TABLE IF EXISTS `unblockip`;
CREATE TABLE `unblockip` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`ip` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`datetime` bigint(20) NOT NULL,
`userid` bigint(20) NOT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`email` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`pass` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`passwd` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`t` int(11) NOT NULL DEFAULT 0,
`u` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`plan` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
`transfer_enable` bigint(20) NOT NULL,
`port` int(11) NOT NULL,
`switch` tinyint(4) NOT NULL DEFAULT 1,
`enable` tinyint(4) NOT NULL DEFAULT 1,
`type` tinyint(4) NOT NULL DEFAULT 1,
`last_get_gift_time` int(11) NOT NULL DEFAULT 0,
`last_check_in_time` int(11) NOT NULL DEFAULT 0,
`last_rest_pass_time` int(11) NOT NULL DEFAULT 0,
`reg_date` datetime(0) NOT NULL,
`invite_num` int(8) NOT NULL,
`money` decimal(12, 2) NOT NULL,
`ref_by` int(11) NOT NULL DEFAULT 0,
`expire_time` int(11) NOT NULL DEFAULT 0,
`method` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'chacha20',
`is_email_verify` tinyint(4) NOT NULL DEFAULT 0,
`reg_ip` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '127.0.0.1',
`node_speedlimit` decimal(12, 2) NOT NULL DEFAULT 0.00,
`node_connector` int(11) NOT NULL DEFAULT 0,
`is_admin` int(2) NOT NULL DEFAULT 0,
`im_type` int(11) DEFAULT 1,
`im_value` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`last_day_t` bigint(20) NOT NULL DEFAULT 0,
`sendDailyMail` int(11) NOT NULL DEFAULT 0,
`class` int(11) NOT NULL DEFAULT 0,
`class_expire` datetime(0) NOT NULL DEFAULT '1989-06-04 00:05:00',
`expire_in` datetime(0) NOT NULL DEFAULT '2099-06-04 00:05:00',
`theme` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ga_token` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`ga_enable` int(11) NOT NULL DEFAULT 0,
`pac` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci,
`node_group` int(11) NOT NULL DEFAULT 0,
`auto_reset_day` int(11) NOT NULL DEFAULT 0,
`auto_reset_bandwidth` decimal(12, 2) NOT NULL DEFAULT 0.00,
`protocol` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'auth_sha1_v2',
`protocol_param` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`obfs` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'tls1.2_ticket_auth',
`obfs_param` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL,
`forbidden_ip` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`forbidden_port` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`disconnect_ip` longtext CHARACTER SET utf8 COLLATE utf8_general_ci,
`is_hide` int(11) NOT NULL DEFAULT 0,
`is_multi_user` int(11) NOT NULL DEFAULT 0,
`telegram_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `email`(`email`, `telegram_id`) USING BTREE,
INDEX `t`(`t`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_token
-- ----------------------------
DROP TABLE IF EXISTS `user_token`;
CREATE TABLE `user_token` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`token` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`user_id` int(11) NOT NULL,
`create_time` int(11) NOT NULL,
`expire_time` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `token`(`token`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for user_traffic_log
-- ----------------------------
DROP TABLE IF EXISTS `user_traffic_log`;
CREATE TABLE `user_traffic_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`user_id` int(11) NOT NULL,
`u` bigint(20) NOT NULL,
`d` bigint(20) NOT NULL,
`node_id` int(11) NOT NULL,
`rate` float NOT NULL,
`traffic` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
`log_time` int(11) NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `user_id`(`user_id`, `node_id`) USING BTREE,
INDEX `log_time`(`log_time`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 0 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic;
SET FOREIGN_KEY_CHECKS = 1;