-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path1_init_table_mysql.sql
More file actions
278 lines (230 loc) · 9.6 KB
/
Copy path1_init_table_mysql.sql
File metadata and controls
278 lines (230 loc) · 9.6 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
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2016-07-28 星期四 10:46:08 */
/*==============================================================*/
drop table if exists buss;
drop table if exists chatRecord;
drop table if exists installPackage;
drop table if exists job;
drop table if exists menu;
drop table if exists org;
drop table if exists orgExt;
drop table if exists permission;
drop table if exists processAgencySet;
drop table if exists processSet;
drop table if exists registryTable;
drop table if exists registryType;
drop table if exists role;
drop table if exists rolePermission;
drop table if exists systemUser;
drop table if exists userExt;
drop table if exists userOrg;
drop table if exists userRole;
/*==============================================================*/
/* Table: buss */
/*==============================================================*/
create table buss
(
name varchar(64) not null,
description varchar(128),
script text not null,
primary key (name)
);
/*==============================================================*/
/* Table: chatRecord */
/*==============================================================*/
create table chatRecord
(
id int not null auto_increment,
fromAccount varchar(128) not null,
fromName varchar(128) not null,
toAccount varchar(128) not null,
toName varchar(128) not null,
content varchar(512) not null,
sendTime datetime not null,
primary key (id)
);
/*==============================================================*/
/* Table: installPackage */
/*==============================================================*/
create table installPackage
(
installVersion varchar(32) not null,
detail varchar(512) not null,
fileName varchar(64) not null,
newest tinyint not null,
publishDate varchar(32) not null,
primary key (installVersion)
);
/*==============================================================*/
/* Table: job */
/*==============================================================*/
create table job
(
id int not null auto_increment,
name varchar(64) not null comment '名称',
description varchar(256) comment '描述',
cronExpression varchar(128) comment 'cron表达式',
startTime varchar(64) comment '开始执行时间',
endTime varchar(64) comment '结束执行时间',
exeCount int comment '执行次数',
maxExeCount int comment '最大执行次数',
status varchar(16) comment '状态',
className varchar(256) not null comment '完整类路径',
methodName varchar(128) not null comment '执行类方法名',
delayTime int comment '延迟时间',
intervalTime int comment '间隔时间',
primary key (id)
);
alter table job comment '任务';
/*==============================================================*/
/* Table: menu */
/*==============================================================*/
create table menu
(
id int not null auto_increment,
text varchar(64) not null,
parentID int not null,
url varchar(256),
orderNo int,
primary key (id)
);
alter table menu comment '菜单';
/*==============================================================*/
/* Table: org */
/*==============================================================*/
create table org
(
id int not null auto_increment comment '机构ID',
text varchar(128) not null comment '名称',
parentID int not null comment '父机构ID',
orderNo int comment '排序',
primary key (id)
);
alter table org comment '机构';
/*==============================================================*/
/* Table: orgExt */
/*==============================================================*/
create table orgExt
(
id int not null comment '机构ID',
primary key (id)
);
alter table orgExt comment '机构扩展';
/*==============================================================*/
/* Table: permission */
/*==============================================================*/
create table permission
(
id int not null auto_increment,
text varchar(64) not null,
url varchar(512),
parentID int not null,
primary key (id)
);
/*==============================================================*/
/* Table: processAgencySet */
/*==============================================================*/
create table processAgencySet
(
id int not null auto_increment,
startTime varchar(32) not null comment '开始时间',
endTime varchar(32) not null comment '结束时间',
account varchar(64) not null comment '设置人',
agencyAccount varchar(64) not null comment '代理人',
primary key (id)
);
alter table processAgencySet comment '流程代办设置';
/*==============================================================*/
/* Table: processSet */
/*==============================================================*/
create table processSet
(
id varchar(16) not null comment '流程ID',
sendType varchar(32) binary not null comment '发送类型',
allStart tinyint not null comment '是否所有人员都可以启动流程',
primary key (id)
);
alter table processSet comment '流程设置';
/*==============================================================*/
/* Table: registryTable */
/*==============================================================*/
create table registryTable
(
id int not null auto_increment,
code varchar(64) not null comment '编码',
value varchar(128) not null comment '值',
typeID int not null comment '类型ID',
description varchar(128) comment '描述',
primary key (id)
);
alter table registryTable comment '注册表';
/*==============================================================*/
/* Table: registryType */
/*==============================================================*/
create table registryType
(
id int not null auto_increment,
text varchar(128) not null comment '名称',
parentID int not null comment '父ID',
primary key (id)
);
alter table registryType comment '注册类型';
/*==============================================================*/
/* Table: role */
/*==============================================================*/
create table role
(
name varchar(64) not null,
description varchar(64),
primary key (name)
);
/*==============================================================*/
/* Table: rolePermission */
/*==============================================================*/
create table rolePermission
(
id int not null auto_increment,
roleName varchar(64) not null,
permissionID int not null,
primary key (id)
);
/*==============================================================*/
/* Table: systemUser */
/*==============================================================*/
create table systemUser
(
account varchar(64) not null,
name varchar(64) not null,
pwd varchar(256) not null,
primary key (account)
);
/*==============================================================*/
/* Table: userExt */
/*==============================================================*/
create table userExt
(
userAccount varchar(64) not null comment '用户账号',
primary key (userAccount)
);
alter table userExt comment '用户扩展';
/*==============================================================*/
/* Table: userOrg */
/*==============================================================*/
create table userOrg
(
id int not null auto_increment,
userAccount varchar(64) not null comment '用户账号',
orgID int not null comment '机构ID',
primary key (id)
);
alter table userOrg comment '用户机构';
/*==============================================================*/
/* Table: userRole */
/*==============================================================*/
create table userRole
(
userAccount varchar(64) not null,
roleName varchar(64) not null,
primary key (userAccount, roleName)
);