-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathiJF_database.sql
175 lines (142 loc) · 8.17 KB
/
iJF_database.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
/*
SQLyog Ultimate v12.08 (64 bit)
MySQL - 5.7.24-log : Database - jfbz
*********************************************************************
*/
/*!40101 SET NAMES utf8 */;
/*!40101 SET SQL_MODE=''*/;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
CREATE DATABASE /*!32312 IF NOT EXISTS*/`jfbz` /*!40100 DEFAULT CHARACTER SET utf8mb4 */;
USE `jfbz`;
/*Table structure for table `app_access_log` */
DROP TABLE IF EXISTS `app_access_log`;
CREATE TABLE `app_access_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uid` bigint(20) NOT NULL DEFAULT '0' COMMENT 'uid',
`referer_url` varchar(255) NOT NULL DEFAULT '' COMMENT '当前访问的refer',
`target_url` varchar(255) NOT NULL DEFAULT '' COMMENT '访问的url',
`query_params` text NOT NULL COMMENT 'get和post参数',
`ua` varchar(255) NOT NULL DEFAULT '' COMMENT '访问ua',
`ip` varchar(32) NOT NULL DEFAULT '' COMMENT '访问ip',
`note` varchar(1000) NOT NULL DEFAULT '' COMMENT 'json格式备注字段',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='用户访问记录表';
/*Table structure for table `app_error_log` */
DROP TABLE IF EXISTS `app_error_log`;
CREATE TABLE `app_error_log` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`referer_url` varchar(255) NOT NULL DEFAULT '' COMMENT '当前访问的refer',
`target_url` varchar(255) NOT NULL DEFAULT '' COMMENT '访问的url',
`query_params` text NOT NULL COMMENT 'get和post参数',
`content` longtext NOT NULL COMMENT '日志内容',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3127 DEFAULT CHARSET=utf8mb4 COMMENT='app错误日表';
/*Table structure for table `image` */
DROP TABLE IF EXISTS `image`;
CREATE TABLE `image` (
`id` int(255) unsigned NOT NULL AUTO_INCREMENT,
`member_id` int(255) NOT NULL,
`file_key` varchar(60) NOT NULL DEFAULT '',
`random_code` varchar(255) NOT NULL COMMENT '报障单唯一随机码,用于区分不同报障单',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=50 DEFAULT CHARSET=utf8mb4;
/*Table structure for table `member` */
DROP TABLE IF EXISTS `member`;
CREATE TABLE `member` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`nickname` varchar(100) NOT NULL DEFAULT '' COMMENT '会员名',
`mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '会员手机号码',
`sex` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别 1:男 2:女',
`avatar` varchar(200) NOT NULL DEFAULT '' COMMENT '会员头像',
`salt` varchar(32) NOT NULL DEFAULT '' COMMENT '随机salt',
`reg_ip` varchar(100) NOT NULL DEFAULT '' COMMENT '注册ip',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1:有效 0:无效',
`updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次更新时间',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='会员表';
/*Table structure for table `oauth_member_bind` */
DROP TABLE IF EXISTS `oauth_member_bind`;
CREATE TABLE `oauth_member_bind` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL DEFAULT '0' COMMENT '会员id',
`client_type` varchar(20) NOT NULL DEFAULT '' COMMENT '客户端来源类型。qq,weibo,weixin',
`type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '类型 type 1:wechat ',
`openid` varchar(80) NOT NULL DEFAULT '' COMMENT '第三方id',
`unionid` varchar(100) NOT NULL DEFAULT '',
`extra` text NOT NULL COMMENT '额外字段',
`updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后更新时间',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
PRIMARY KEY (`id`),
KEY `idx_type_openid` (`type`,`openid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='第三方登录绑定关系';
/*Table structure for table `operational_records_log` */
DROP TABLE IF EXISTS `operational_records_log`;
CREATE TABLE `operational_records_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`nickname` varchar(255) NOT NULL COMMENT 'member_nickname',
`report_id` int(11) NOT NULL COMMENT '保障表的id',
`uid` bigint(20) NOT NULL DEFAULT '0' COMMENT 'member_uid',
`operation` varchar(255) NOT NULL DEFAULT '' COMMENT '进行了哪些操作',
`change_remark` varchar(255) DEFAULT NULL COMMENT '改变的备注',
`ua` varchar(255) NOT NULL DEFAULT '' COMMENT '访问ua',
`ip` varchar(32) NOT NULL DEFAULT '' COMMENT '访问ip',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `idx_uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8mb4 COMMENT='队员操作记录表';
/*Table structure for table `report` */
DROP TABLE IF EXISTS `report`;
CREATE TABLE `report` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`member_id` int(11) NOT NULL COMMENT '0为网页报障用户',
`attribute` int(11) NOT NULL DEFAULT '0' COMMENT '1:教师 0:学生',
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '会员名',
`student_id` bigint(255) DEFAULT '0' COMMENT '学号',
`class_name` varchar(500) DEFAULT '' COMMENT '班级',
`mobile` varchar(11) NOT NULL DEFAULT '' COMMENT '会员手机号码',
`main_image` varchar(100) DEFAULT '' COMMENT '图片',
`address` varchar(500) NOT NULL DEFAULT '' COMMENT '具体地址',
`description` varchar(1000) NOT NULL DEFAULT '' COMMENT '问题描述',
`unable_deal_reason` varchar(1000) DEFAULT '' COMMENT '无法处理的原因,对应状态值:0',
`remark` varchar(1000) DEFAULT '' COMMENT '备注 (内部填写)',
`random_code` varchar(255) DEFAULT '0' COMMENT '图片随机码(用于标识存放图片的表)',
`status` tinyint(4) NOT NULL DEFAULT '-8' COMMENT '1:处理完成 0 无法处理 -9 延期处理 -8 待处理 -7 处理中',
`updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次更新时间',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=70 DEFAULT CHARSET=utf8mb4 COMMENT='报障表';
/*Table structure for table `report_classification` */
DROP TABLE IF EXISTS `report_classification`;
CREATE TABLE `report_classification` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`attribute` varchar(255) NOT NULL DEFAULT '' COMMENT '报障分类',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '1:正常 2:删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='属性表';
/*Table structure for table `user` */
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`uid` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '用户uid',
`nickname` varchar(100) NOT NULL DEFAULT '' COMMENT '用户名',
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '手机号码',
`login_name` varchar(20) NOT NULL DEFAULT '' COMMENT '登录用户名',
`login_pwd` varchar(32) NOT NULL DEFAULT '' COMMENT '登录密码',
`login_salt` varchar(32) NOT NULL DEFAULT '' COMMENT '登录密码的随机加密秘钥',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1:有效 0:无效',
`updated_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后一次更新时间',
`created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '插入时间',
PRIMARY KEY (`uid`),
UNIQUE KEY `login_name` (`login_name`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COMMENT='用户表(管理员)';
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;