forked from blackholll/loonflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloonflow_init.sql
582 lines (456 loc) · 26 KB
/
loonflow_init.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
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
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
# ************************************************************
# Sequel Pro SQL dump
# Version 4541
#
# http://www.sequelpro.com/
# https://github.com/sequelpro/sequelpro
#
# Host: 127.0.0.1 (MySQL 5.7.17)
# Database: loonflow_1_0
# Generation Time: 2020-03-15 02:06:25 +0000
# ************************************************************
/*!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 */;
/*!40101 SET NAMES utf8 */;
/*!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 */;
# Dump of table account_apptoken
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_apptoken`;
CREATE TABLE `account_apptoken` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`app_name` varchar(50) NOT NULL DEFAULT '' COMMENT '调用源应用名',
`token` varchar(50) NOT NULL DEFAULT '' COMMENT '调用令牌',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`workflow_ids` varchar(2000) NOT NULL DEFAULT '' COMMENT '有权限的工作流',
`ticket_sn_prefix` varchar(20) NOT NULL DEFAULT '' COMMENT '生成工单前缀',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table account_loondept
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_loondept`;
CREATE TABLE `account_loondept` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '部门名称',
`parent_dept_id` int(11) NOT NULL DEFAULT '0' COMMENT '上级部门id',
`leader` varchar(50) NOT NULL DEFAULT '' COMMENT '部门leader',
`approver` varchar(100) NOT NULL DEFAULT '0' COMMENT '部门审批人,逗号隔开的username',
`label` varchar(50) NOT NULL DEFAULT '' COMMENT '标签',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table account_loonrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_loonrole`;
CREATE TABLE `account_loonrole` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '角色名称',
`description` varchar(50) NOT NULL DEFAULT '' COMMENT '角色描述',
`label` varchar(50) NOT NULL DEFAULT '' COMMENT '标签',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table account_loonuser
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_loonuser`;
CREATE TABLE `account_loonuser` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`password` varchar(128) NOT NULL DEFAULT '' COMMENT '密码',
`last_login` datetime DEFAULT NULL DEFAULT '0001-01-01 00:00:00' COMMENT '最后登录时间',
`username` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名',
`alias` varchar(50) NOT NULL DEFAULT '' COMMENT '中文(昵称)',
`email` varchar(255) NOT NULL DEFAULT '' COMMENT '邮箱',
`phone` varchar(13) NOT NULL DEFAULT '' COMMENT '手机号',
`dept_id` int(11) NOT NULL DEFAULT '0' COMMENT '所属部门id',
`is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT '在职',
`is_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '超级管理员',
`creator` varchar(50) NOT NULL DEFAULT '' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`is_workflow_admin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '工作流管理员',
PRIMARY KEY (`id`),
UNIQUE KEY `username` (`username`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `account_loonuser` WRITE;
/*!40000 ALTER TABLE `account_loonuser` DISABLE KEYS */;
INSERT INTO `account_loonuser` (`id`, `password`, `last_login`, `username`, `alias`, `email`, `phone`, `dept_id`, `is_active`, `is_admin`, `creator`, `gmt_created`, `gmt_modified`, `is_deleted`, `is_workflow_admin`)
VALUES
(1,'pbkdf2_sha256$100000$wZONVjuD1eMK$QM6m9gBR44Elj+Qx65kwzPleULawmgzCQm08xMOyZOQ=','2020-03-15 09:57:33.726154','admin','超级管理员','[email protected]','',0,1,1,'','2020-03-15 09:57:07.090009','2020-03-15 09:57:07.094560',0,0);
/*!40000 ALTER TABLE `account_loonuser` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table account_loonuserrole
# ------------------------------------------------------------
DROP TABLE IF EXISTS `account_loonuserrole`;
CREATE TABLE `account_loonuserrole` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`user_id` int(11) NOT NULL DEFAULT '0' COMMENT '用户id',
`role_id` int(11) NOT NULL DEFAULT '0' COMMENT '角色id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table auth_group
# ------------------------------------------------------------
DROP TABLE IF EXISTS `auth_group`;
CREATE TABLE `auth_group` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(80) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table auth_group_permissions
# ------------------------------------------------------------
DROP TABLE IF EXISTS `auth_group_permissions`;
CREATE TABLE `auth_group_permissions` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`group_id` int(11) NOT NULL,
`permission_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_group_permissions_group_id_permission_id_0cd325b0_uniq` (`group_id`,`permission_id`),
KEY `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` (`permission_id`),
CONSTRAINT `auth_group_permissio_permission_id_84c5c92e_fk_auth_perm` FOREIGN KEY (`permission_id`) REFERENCES `auth_permission` (`id`),
CONSTRAINT `auth_group_permissions_group_id_b120cbf9_fk_auth_group_id` FOREIGN KEY (`group_id`) REFERENCES `auth_group` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table auth_permission
# ------------------------------------------------------------
DROP TABLE IF EXISTS `auth_permission`;
CREATE TABLE `auth_permission` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`content_type_id` int(11) NOT NULL,
`codename` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `auth_permission_content_type_id_codename_01ab375a_uniq` (`content_type_id`,`codename`),
CONSTRAINT `auth_permission_content_type_id_2f476e4b_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table django_admin_log
# ------------------------------------------------------------
DROP TABLE IF EXISTS `django_admin_log`;
CREATE TABLE `django_admin_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`action_time` datetime NOT NULL,
`object_id` longtext,
`object_repr` varchar(200) NOT NULL,
`action_flag` smallint(5) unsigned NOT NULL,
`change_message` longtext NOT NULL,
`content_type_id` int(11) DEFAULT NULL,
`user_id` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `django_admin_log_content_type_id_c4bce8eb_fk_django_co` (`content_type_id`),
KEY `django_admin_log_user_id_c564eba6_fk_account_loonuser_id` (`user_id`),
CONSTRAINT `django_admin_log_content_type_id_c4bce8eb_fk_django_co` FOREIGN KEY (`content_type_id`) REFERENCES `django_content_type` (`id`),
CONSTRAINT `django_admin_log_user_id_c564eba6_fk_account_loonuser_id` FOREIGN KEY (`user_id`) REFERENCES `account_loonuser` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table django_content_type
# ------------------------------------------------------------
DROP TABLE IF EXISTS `django_content_type`;
CREATE TABLE `django_content_type` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app_label` varchar(100) NOT NULL,
`model` varchar(100) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `django_content_type_app_label_model_76bd3d3b_uniq` (`app_label`,`model`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `django_content_type` WRITE;
/*!40000 ALTER TABLE `django_content_type` DISABLE KEYS */;
INSERT INTO `django_content_type` (`id`, `app_label`, `model`)
VALUES
(20,'account','apptoken'),
(8,'account','loondept'),
(7,'account','loonrole'),
(9,'account','loonuser'),
(6,'account','loonuserrole'),
(1,'admin','logentry'),
(2,'auth','group'),
(3,'auth','permission'),
(4,'contenttypes','contenttype'),
(5,'sessions','session'),
(12,'ticket','ticketcustomfield'),
(13,'ticket','ticketflowlog'),
(10,'ticket','ticketrecord'),
(11,'ticket','ticketstatelastman'),
(21,'ticket','ticketuser'),
(16,'workflow','customfield'),
(14,'workflow','customnotice'),
(17,'workflow','state'),
(19,'workflow','transition'),
(18,'workflow','workflow'),
(22,'workflow','workflowadmin'),
(15,'workflow','workflowscript');
/*!40000 ALTER TABLE `django_content_type` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table django_migrations
# ------------------------------------------------------------
DROP TABLE IF EXISTS `django_migrations`;
CREATE TABLE `django_migrations` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`app` varchar(255) NOT NULL,
`name` varchar(255) NOT NULL,
`applied` datetime NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table django_session
# ------------------------------------------------------------
DROP TABLE IF EXISTS `django_session`;
CREATE TABLE `django_session` (
`session_key` varchar(40) NOT NULL,
`session_data` longtext NOT NULL,
`expire_date` datetime NOT NULL,
PRIMARY KEY (`session_key`),
KEY `django_session_expire_date_a5c62663` (`expire_date`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
LOCK TABLES `django_session` WRITE;
/*!40000 ALTER TABLE `django_session` DISABLE KEYS */;
INSERT INTO `django_session` (`session_key`, `session_data`, `expire_date`)
VALUES
('gnq8ua2c47at1m055h67qj6ml0sc8bmy','ZWUzZTM3NGMyMTkwOGU0ZDEzY2U4ZDYxZDFjNTM3Y2Q2YzhiZDZmNTp7Il9hdXRoX3VzZXJfaWQiOiI0OCIsIl9hdXRoX3VzZXJfYmFja2VuZCI6ImRqYW5nby5jb250cmliLmF1dGguYmFja2VuZHMuTW9kZWxCYWNrZW5kIiwiX2F1dGhfdXNlcl9oYXNoIjoiYWVhMWFmNDFmNjM4NDcyOWRmMzdjOWFiY2JjOWIzOGI4ZTBhOGMyNyJ9','2020-03-29 09:57:33.734736');
/*!40000 ALTER TABLE `django_session` ENABLE KEYS */;
UNLOCK TABLES;
# Dump of table ticket_ticketcustomfield
# ------------------------------------------------------------
DROP TABLE IF EXISTS `ticket_ticketcustomfield`;
CREATE TABLE `ticket_ticketcustomfield` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`field_key` varchar(50) NOT NULL DEFAULT '' COMMENT '字段标识',
`ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单id',
`field_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '字段类型',
`char_value` varchar(1000) NOT NULL DEFAULT '' COMMENT '字符串值',
`int_value` int(11) NOT NULL DEFAULT '0' COMMENT '整形值',
`float_value` double NOT NULL DEFAULT '0' COMMENT '浮点值',
`bool_value` tinyint(1) NOT NULL DEFAULT '0' COMMENT '布尔值',
`date_value` date NOT NULL DEFAULT '1000-00-01' COMMENT '日期值',
`datetime_value` datetime NOT NULL DEFAULT '1000-00-01 00:00:00' COMMENT '日期时间值',
`time_value` time(6) NOT NULL DEFAULT '00:00:01' COMMENT '时间值',
`radio_value` varchar(50) NOT NULL DEFAULT '' COMMENT '单选框值',
`checkbox_value` varchar(50) NOT NULL DEFAULT '' COMMENT '复选框值',
`select_value` varchar(50) NOT NULL DEFAULT '' COMMENT '单选下拉列表值',
`multi_select_value` varchar(50) NOT NULL DEFAULT '' COMMENT '多选下拉列表值',
`text_value` longtext NOT NULL DEFAULT '' COMMENT '文本域值',
`username_value` varchar(50) NOT NULL DEFAULT '' COMMENT '用户名值',
`multi_username_value` varchar(1000) NOT NULL DEFAULT '' COMMENT '多选用户名值',
PRIMARY KEY (`id`),
KEY `idx_ticket_id_field_key` (`ticket_id`,`field_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table ticket_ticketflowlog
# ------------------------------------------------------------
DROP TABLE IF EXISTS `ticket_ticketflowlog`;
CREATE TABLE `ticket_ticketflowlog` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单id',
`transition_id` int(11) NOT NULL DEFAULT '0' COMMENT '流转id',
`suggestion` varchar(1000) NOT NULL DEFAULT '0' COMMENT '处理意见',
`participant_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '参与人类型',
`participant` varchar(50) NOT NULL DEFAULT '' COMMENT '参与人',
`state_id` int(11) NOT NULL DEFAULT '0' COMMENT '状态id',
`intervene_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '干预类型',
`ticket_data` varchar(10000) NOT NULL DEFAULT '' COMMENT '工单数据',
PRIMARY KEY (`id`),
KEY `idx_ticket_id` (`ticket_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table ticket_ticketrecord
# ------------------------------------------------------------
DROP TABLE IF EXISTS `ticket_ticketrecord`;
CREATE TABLE `ticket_ticketrecord` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`title` varchar(500) NOT NULL DEFAULT 'admin' COMMENT '标题',
`workflow_id` int(11) NOT NULL DEFAULT '0' COMMENT '工作流id',
`sn` varchar(25) NOT NULL DEFAULT '' COMMENT '工单流水号',
`state_id` int(11) NOT NULL DEFAULT '0' COMMENT '状态id',
`parent_ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '父工单id',
`parent_ticket_state_id` int(11) NOT NULL DEFAULT '0' COMMENT '对应父工单状态id',
`participant_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '参与人类型id',
`participant` varchar(100) NOT NULL DEFAULT '' COMMENT '参与人',
`relation` varchar(1000) NOT NULL DEFAULT '' COMMENT '工单关系人',
`in_add_node` tinyint(1) NOT NULL DEFAULT '0' COMMENT '加签中',
`add_node_man` varchar(50) NOT NULL DEFAULT '' COMMENT '加签对象',
`script_run_last_result` tinyint(1) NOT NULL DEFAULT '1' COMMENT '脚本/hook执行状态',
`multi_all_person` varchar(1000) NOT NULL DEFAULT '{}' COMMENT '多人全部处理进展',
`act_state_id` int(11) NOT NULL DEFAULT '1' COMMENT '进行状态',
PRIMARY KEY (`id`),
KEY `idx_act_state_id` (`act_state_id`),
KEY `idx_sn` (`sn`),
KEY `idx_workflow_id` (`workflow_id`),
KEY `idx_creator` (`creator`),
KEY `idx_gmt_created` (`gmt_created`),
KEY `idx_parent_ticket_id` (`parent_ticket_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table ticket_ticketuser
# ------------------------------------------------------------
DROP TABLE IF EXISTS `ticket_ticketuser`;
CREATE TABLE `ticket_ticketuser` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`username` varchar(100) NOT NULL DEFAULT '' COMMENT '用户名',
`in_process` tinyint(1) NOT NULL DEFAULT '0' COMMENT '处理中',
`worked` tinyint(1) NOT NULL DEFAULT '0' COMMENT '处理过的',
`ticket_id` int(11) NOT NULL DEFAULT '0' COMMENT '工单id',
PRIMARY KEY (`id`),
KEY `idx_ticket_id` (`ticket_id`),
KEY `idx_username_in_process` (`username`,`in_process`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_customfield
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_customfield`;
CREATE TABLE `workflow_customfield` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`workflow_id` int(11) NOT NULL DEFAULT '0' COMMENT '工作流id',
`field_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '字段类型id',
`field_key` varchar(50) NOT NULL DEFAULT '' COMMENT '字段标识',
`field_name` varchar(50) NOT NULL DEFAULT '' COMMENT '字段名称',
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '顺序id',
`default_value` varchar(100) DEFAULT NULL DEFAULT '' COMMENT '默认值',
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '描述',
`field_template` longtext NOT NULL DEFAULT '' COMMENT '字段模板',
`boolean_field_display` varchar(100) NOT NULL DEFAULT '{}' COMMENT '布尔类型显示',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`field_choice` varchar(1000) NOT NULL DEFAULT '{}' COMMENT '布尔类型显示',
`label` varchar(100) NOT NULL DEFAULT '{}' COMMENT '布尔类型显示',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_customnotice
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_customnotice`;
CREATE TABLE `workflow_customnotice` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`description` varchar(100) DEFAULT NULL DEFAULT '' COMMENT '描述',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`hook_token` varchar(100) DEFAULT NULL DEFAULT '' COMMENT 'hook令牌',
`hook_url` varchar(100) DEFAULT NULL DEFAULT '' COMMENT 'hook地址',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_state
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_state`;
CREATE TABLE `workflow_state` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '状态名称',
`workflow_id` int(11) NOT NULL DEFAULT '0' COMMENT '工作id',
`is_hidden` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否隐藏',
`order_id` int(11) NOT NULL DEFAULT '0' COMMENT '顺序id',
`type_id` int(11) NOT NULL DEFAULT '0' COMMENT '类型id',
`participant_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '参与人类型id',
`participant` varchar(100) NOT NULL DEFAULT '' COMMENT '参与人',
`distribute_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '分配类型id',
`state_field_str` varchar(1000) NOT NULL DEFAULT '{}' COMMENT '状态表单字段',
`label` varchar(1000) NOT NULL DEFAULT '{}' COMMENT '状态表单字段',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`remember_last_man_enable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '记忆最后处理人',
`enable_retreat` tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发起人撤回',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_transition
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_transition`;
CREATE TABLE `workflow_transition` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '流转名称',
`workflow_id` int(11) NOT NULL DEFAULT '0' COMMENT '工作流id',
`transition_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '流转类型id',
`source_state_id` int(11) NOT NULL DEFAULT '0' COMMENT '源状态id',
`destination_state_id` int(11) NOT NULL DEFAULT '0' COMMENT '目标状态id',
`alert_enable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '点击弹窗提示',
`alert_text` varchar(100) NOT NULL DEFAULT '' COMMENT '点击弹窗提示的内容',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`field_require_check` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否校验必填项',
`timer` int(11) NOT NULL DEFAULT '0' COMMENT '定时器时长(单位:秒)',
`attribute_type_id` int(11) NOT NULL DEFAULT '0' COMMENT '属性类型id',
`condition_expression` varchar(1000) NOT NULL DEFAULT '[]' COMMENT '条件表达式',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_workflow
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_workflow`;
CREATE TABLE `workflow_workflow` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`description` varchar(50) NOT NULL DEFAULT '' COMMENT '描述',
`display_form_str` varchar(10000) NOT NULL DEFAULT '[]' COMMENT '展现表单字段',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`view_permission_check` tinyint(1) NOT NULL DEFAULT '0' COMMENT '查看权限校验',
`limit_expression` varchar(1000) NOT NULL DEFAULT '{}' COMMENT '限制表达式',
`notices` varchar(50) NOT NULL DEFAULT '' COMMENT '通知',
`content_template` varchar(1000) DEFAULT '' COMMENT '内容模板',
`title_template` varchar(50) DEFAULT '' COMMENT '标题模板',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_workflowadmin
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_workflowadmin`;
CREATE TABLE `workflow_workflowadmin` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
`username` varchar(100) NOT NULL DEFAULT '' COMMENT '用户名',
`workflow_id` int(11) NOT NULL DEFAULT '0' COMMENT '工作流id',
PRIMARY KEY (`id`),
KEY `idx_workflow_id` (`workflow_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
# Dump of table workflow_workflowscript
# ------------------------------------------------------------
DROP TABLE IF EXISTS `workflow_workflowscript`;
CREATE TABLE `workflow_workflowscript` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键id',
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '名称',
`saved_name` varchar(100) NOT NULL DEFAULT '' COMMENT '保存的文件名',
`description` varchar(100) DEFAULT NULL DEFAULT '' COMMENT '描述',
`is_active` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
`creator` varchar(50) NOT NULL DEFAULT 'admin' COMMENT '创建人',
`gmt_created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`gmt_modified` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`is_deleted` tinyint(1) NOT NULL DEFAULT '0' COMMENT '已删除',
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_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 */;