-
Notifications
You must be signed in to change notification settings - Fork 2
/
Data_DTask.sql
266 lines (236 loc) · 9.77 KB
/
Data_DTask.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
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
-- MySQL dump 10.13 Distrib 8.0.16, for Win64 (x86_64)
--
-- Host: localhost Database: dtask_db
-- ------------------------------------------------------
-- Server version 5.7.26-log
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
SET NAMES utf8 ;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!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 */;
--
-- Table structure for table `tb_child_menu`
--
DROP TABLE IF EXISTS `tb_child_menu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_child_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`url` varchar(45) COLLATE utf8_bin DEFAULT NULL,
`pObject` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`parentID` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_department`
--
DROP TABLE IF EXISTS `tb_department`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_department` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_email`
--
DROP TABLE IF EXISTS `tb_email`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_email` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`senderID` bigint(20) DEFAULT NULL,
`receiverID` bigint(20) DEFAULT NULL,
`title` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`content` text COLLATE utf8_bin,
`sendTime` datetime DEFAULT CURRENT_TIMESTAMP,
`hasRead` bit(1) DEFAULT b'0',
`isImportant` bit(1) DEFAULT NULL,
`attachment` varchar(1000) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_local_sub_task`
--
DROP TABLE IF EXISTS `tb_local_sub_task`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_local_sub_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taskID` int(11) DEFAULT NULL,
`name` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`content` text COLLATE utf8_bin,
`deadline` date DEFAULT NULL,
`status` int(11) DEFAULT NULL,
`startTime` date DEFAULT NULL,
`level` int(11) DEFAULT NULL,
`tag` text COLLATE utf8_bin,
`star` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_local_task`
--
DROP TABLE IF EXISTS `tb_local_task`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_local_task` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`creator` bigint(20) DEFAULT NULL,
`allowedMemberChangeStatus` bit(1) DEFAULT b'1',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=101 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_local_task_user`
--
DROP TABLE IF EXISTS `tb_local_task_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_local_task_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`taskID` int(11) DEFAULT NULL,
`userID` bigint(20) DEFAULT NULL,
`isAdmin` bit(1) DEFAULT b'0',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=156 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_parent_menu`
--
DROP TABLE IF EXISTS `tb_parent_menu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_parent_menu` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`pCategory` varchar(20) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_permission`
--
DROP TABLE IF EXISTS `tb_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`pCategory` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`pObject` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`pOperate` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`pDescribe` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_role`
--
DROP TABLE IF EXISTS `tb_role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_role` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_bin DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_role_permission`
--
DROP TABLE IF EXISTS `tb_role_permission`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_role_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`roleID` int(11) DEFAULT NULL,
`permissionID` int(11) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `role_idx` (`roleID`),
KEY `permission_idx` (`permissionID`),
CONSTRAINT `permission` FOREIGN KEY (`permissionID`) REFERENCES `tb_permission` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_settings`
--
DROP TABLE IF EXISTS `tb_settings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_settings` (
`id` int(11) NOT NULL,
`websiteName` varchar(45) COLLATE utf8_bin DEFAULT NULL,
`cache` int(11) DEFAULT NULL,
`maxLogin` int(11) DEFAULT NULL,
`taskLog` bit(1) DEFAULT NULL,
`userLog` bit(1) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_user`
--
DROP TABLE IF EXISTS `tb_user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_user` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`username` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
`pwd` varchar(100) CHARACTER SET utf8 DEFAULT NULL,
`status` int(11) DEFAULT '1',
`allowRemote` bit(1) DEFAULT b'0',
PRIMARY KEY (`id`),
KEY `permission_idx` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=10001 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `tb_user_info`
--
DROP TABLE IF EXISTS `tb_user_info`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
SET character_set_client = utf8mb4 ;
CREATE TABLE `tb_user_info` (
`id` bigint(20) NOT NULL,
`nickname` varchar(100) COLLATE utf8_bin DEFAULT NULL,
`profileUrl` varchar(500) COLLATE utf8_bin DEFAULT NULL,
`phone` varchar(20) COLLATE utf8_bin DEFAULT NULL,
`email` varchar(30) COLLATE utf8_bin DEFAULT NULL,
`onboardDate` date DEFAULT NULL,
`roleID` int(11) DEFAULT NULL,
`departmentID` int(11) DEFAULT NULL,
`birthday` date DEFAULT NULL,
`lastUpdateTime` datetime DEFAULT CURRENT_TIMESTAMP,
`available` bit(1) DEFAULT b'1',
PRIMARY KEY (`id`),
KEY `role_idx` (`roleID`),
KEY `departmentID_idx` (`departmentID`),
KEY `lastUpdateTime_idx` (`lastUpdateTime`),
CONSTRAINT `departmentID` FOREIGN KEY (`departmentID`) REFERENCES `tb_department` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `id` FOREIGN KEY (`id`) REFERENCES `tb_user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `role` FOREIGN KEY (`roleID`) REFERENCES `tb_role` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping routines for database 'dtask_db'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2021-01-27 17:18:46