CREATE TABLE ' Bk_workflow ' (
' id ' int (one) not NULL auto_increment,
' Name ' varchar (255) Not NULL COMMENT ' workflow name ',
' Description ' text not NULL COMMENT ' description ',
' Addtime ' int (one) not NULL DEFAULT ' 0 ' COMMENT ' data insertion time ',
' Code ' varchar (a) Not NULL COMMENT ' call string, used in conjunction with the program ',
' Type ' tinyint (1) Not NULL DEFAULT ' 0 ' COMMENT ' workflow type, 1 for multi-user class OA audit, 2 for auxiliary permissions ',
PRIMARY KEY (' id '),
UNIQUE KEY ' Code ' (' Code ') USING BTREE,
KEY ' type ' (' type ') USING BTREE
) Engine=innodb auto_increment=11 DEFAULT charset=utf8 comment= ' Workflow table ';
CREATE TABLE ' Bk_workflow_step ' (
' id ' int (one) not NULL auto_increment,
' workflow_id ' int (one) not NULL COMMENT ' belongs to the workflow ',
' Name ' varchar (255) Not NULL COMMENT ' workflow step name ',
' Description ' text not NULL COMMENT ' description of workflow step ',
' Step_level ' tinyint (4) not NULL DEFAULT ' 0 ' COMMENT ' The first step of the workflow step, if 99 represents already audited complete ',
' Code ' varchar (a) Not NULL COMMENT ' is primarily used for permission-assisted invocation ',
' Addtime ' int (one) not NULL COMMENT ' data increased date ',
PRIMARY KEY (' id '),
KEY ' workflow_id ' (' workflow_id ') USING BTREE,
KEY ' Step_level ' (' step_level ') USING BTREE,
KEY ' Code ' (' Code ') USING BTREE
) Engine=innodb auto_increment=16 DEFAULT Charset=utf8 comment= ' workflow detailed steps ';
CREATE TABLE ' Bk_workflow_user ' (
' id ' int (one) not NULL auto_increment,
' workflow_step_id ' int (one) not NULL COMMENT ' workflow step ID ',
' user_id ' int (one) not NULL COMMENT ' background administrator's ID ',
' workflow_id ' int (one) not NULL COMMENT ' workflow id ',
PRIMARY KEY (' id '),
KEY ' user_id ' (' user_id ') USING BTREE,
KEY ' workflow_step_id ' (' workflow_step_id ') USING BTREE,
KEY ' workflow_id ' (' workflow_id ') USING BTREE
) Engine=innodb auto_increment=29 DEFAULT Charset=utf8 comment= ' workflow operator ';
Workflow data table Design