Workflow data table Design

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.