-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxdwlbx.sql
222 lines (204 loc) · 7.01 KB
/
xdwlbx.sql
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
/*
Navicat MySQL Data Transfer
Source Server : wlbx_mgr
Source Server Version : 50552
Source Host : wlbx.xidian.edu.cn:3306
Source Database : xdwlbx
Target Server Type : MYSQL
Target Server Version : 50552
File Encoding : 65001
Date: 2020-03-15 13:51:47
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for feedback
-- ----------------------------
DROP TABLE IF EXISTS `feedback`;
CREATE TABLE `feedback` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` text NOT NULL,
`identity` text NOT NULL,
`contact` text NOT NULL,
`detail` longtext NOT NULL,
`time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=75 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Table structure for inflist
-- ----------------------------
DROP TABLE IF EXISTS `inflist`;
CREATE TABLE `inflist` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`repairid` tinytext NOT NULL,
`status` tinyint(4) NOT NULL,
`updatetime` datetime NOT NULL,
`remark` text,
`exptime` tinytext,
`processer` tinytext,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17391 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for jsexe
-- ----------------------------
DROP TABLE IF EXISTS `jsexe`;
CREATE TABLE `jsexe` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pagename` tinytext NOT NULL,
`jstype` tinytext NOT NULL,
`jscontent` longtext,
`jslocation` text,
`enable` tinyint(4) NOT NULL,
`remark` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for jsmgr
-- ----------------------------
DROP TABLE IF EXISTS `jsmgr`;
CREATE TABLE `jsmgr` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pagename` tinytext NOT NULL,
`jstype` tinytext NOT NULL,
`jscontent` longtext,
`jslocation` text,
`enable` tinyint(4) NOT NULL,
`remark` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for pagemgr
-- ----------------------------
DROP TABLE IF EXISTS `pagemgr`;
CREATE TABLE `pagemgr` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pagename` tinytext NOT NULL,
`pagecontent` longtext,
`pagelocation` text,
`enable` tinyint(4) NOT NULL,
`remark` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for qiangpiao
-- ----------------------------
DROP TABLE IF EXISTS `qiangpiao`;
CREATE TABLE `qiangpiao` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1 NOT NULL,
`name_hash` text CHARACTER SET latin1 NOT NULL,
`stuid` text CHARACTER SET latin1 NOT NULL,
`stuid_hash` text CHARACTER SET latin1 NOT NULL,
`tel` text CHARACTER SET latin1 NOT NULL,
`tel_hash` text CHARACTER SET latin1 NOT NULL,
`wechat` text CHARACTER SET latin1 NOT NULL,
`qp_chang` int(11) NOT NULL,
`qp_ci` int(11) NOT NULL,
`qp_time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=193 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for qiangpiao_idx
-- ----------------------------
DROP TABLE IF EXISTS `qiangpiao_idx`;
CREATE TABLE `qiangpiao_idx` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` text CHARACTER SET latin1 NOT NULL,
`chang` int(11) NOT NULL,
`ci` int(11) NOT NULL,
`begin_time` datetime NOT NULL,
`end_time` datetime NOT NULL,
`qp_limit` int(11) NOT NULL,
`qp_count` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for queue
-- ----------------------------
DROP TABLE IF EXISTS `queue`;
CREATE TABLE `queue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`repairid` tinytext NOT NULL,
`wechatid` tinytext NOT NULL,
`usrid` int(10) unsigned NOT NULL,
`freetime` tinytext NOT NULL,
`buildnum` tinytext NOT NULL,
`floor` tinytext NOT NULL,
`section` tinytext NOT NULL,
`roomnum` tinytext NOT NULL,
`roomside` tinytext NOT NULL,
`nowstage` int(10) unsigned NOT NULL,
`description` text NOT NULL,
`qstatus` tinyint(4) NOT NULL,
`processer` tinytext,
`remark` text,
`finishtime` int(10) unsigned DEFAULT NULL COMMENT '添加时间完成时间戳',
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3818 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for routerscan
-- ----------------------------
DROP TABLE IF EXISTS `routerscan`;
CREATE TABLE `routerscan` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(64) CHARACTER SET latin1 NOT NULL,
`loss` tinyint(4) NOT NULL,
`rtt` tinyint(8) NOT NULL,
`condition` tinyint(1) NOT NULL,
`time` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=347551 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for token
-- ----------------------------
DROP TABLE IF EXISTS `token`;
CREATE TABLE `token` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`token` text NOT NULL,
`time` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3771 DEFAULT CHARSET=latin1;
-- ----------------------------
-- Table structure for usr
-- ----------------------------
DROP TABLE IF EXISTS `usr`;
CREATE TABLE `usr` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`realname` text NOT NULL,
`namehash` tinytext NOT NULL,
`stuid` text NOT NULL,
`stuidhash` tinytext NOT NULL,
`tel` text NOT NULL,
`telhash` tinytext NOT NULL,
`wechatid` tinytext NOT NULL,
`groups` tinytext NOT NULL,
`enable` tinyint(4) NOT NULL,
`remark` text,
PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2601 DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for wechatbind
-- ----------------------------
DROP TABLE IF EXISTS `wechatbind`;
CREATE TABLE `wechatbind` (
`key` tinytext NOT NULL,
`wechatid` tinytext,
`time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
PRIMARY KEY (`key`(32))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Event structure for auto_delete_token
-- ----------------------------
DROP EVENT IF EXISTS `auto_delete_token`;
DELIMITER ;;
CREATE DEFINER=`xdwlbx`@`localhost` EVENT `auto_delete_token` ON SCHEDULE EVERY 1 DAY STARTS '2019-03-14 19:14:09' ON COMPLETION NOT PRESERVE ENABLE COMMENT '每天清理前一天的token信息 5 删 3' DO DELETE from token WHERE time<now()-INTERVAL 1 day
;;
DELIMITER ;
-- ----------------------------
-- Event structure for auto_delete_wechatbind_1_month_ago
-- ----------------------------
DROP EVENT IF EXISTS `auto_delete_wechatbind_1_month_ago`;
DELIMITER ;;
CREATE DEFINER=`xdwlbx`@`localhost` EVENT `auto_delete_wechatbind_1_month_ago` ON SCHEDULE EVERY 1 DAY STARTS '2019-03-14 19:18:40' ON COMPLETION NOT PRESERVE ENABLE DO DELETE from wechatbind WHERE time<now()- INTERVAL 1 MONTH
;;
DELIMITER ;
SET FOREIGN_KEY_CHECKS=1;