首页 > 代码库 > 构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-工作流设计01

构建ASP.NET MVC4+EF5+EasyUI+Unity2.x注入的后台管理系统(41)-工作流设计01

工作流在实际应用中还是比较广泛,网络中存在很多工作流的图形化插件,可以做到拉拽的工作流设计,非常简便,再配合第三方编辑器,可以直接生成表单,我没有刻意的浏览很多工作流的实际设计,我认为工作流只要有动态可修改的流转,有时可按角色,部门,上级或者职位流转即是比较好的正常工作流!

工作流其实有几种,也可以设计得很简单:

1.固定的工作流,很小的公司,很固定的流程!

2.自定义表单和字段,有时候可以校验表单

3.自定义流转的人员,即按角色流转,用户每一次提交工作流都必须在步骤中添加要转的人员

4.直接设置职位和部门,然后根据人员所属的部门、职位或者上级进行流转

上面可以是一个交集,只有4点合起来才能做一个比较动态的工作流,否则可以直接用固定的工作流即可

这是本次要做的一般大众化工作流

当生成表单之后,用户将直接用此表单的模版,并提交公文到下一步,最后流程完成后,反馈给发起人

数据库的设计也有这巧妙之处

Flow_Form:表单模版

Flow_Step:表单的流转步骤,如请假天数小于3天直接上级审批,大于3天需要进行第二步的老总审批

Flow_StepRule:根据字段决定流转的条件

Flow_StepState:正在进行的步骤状态,如第一步是否完成

Flow_Type:工作流种类,如行政管理

Flow_FormAttr:字段,如请假的标题,请假的天数

Flow_FormCentent:根据模版提交的内容

USE [AppDB]GO/****** Object:  Table [dbo].[Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_Type](    [Id] [varchar](50) NOT NULL,    [Name] [varchar](50) NOT NULL,    [Remark] [varchar](500) NULL,    [CreateTime] [datetime] NOT NULL,    [Sort] [int] NOT NULL, CONSTRAINT [PK_Flow_Type] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N类别 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Type, @level2type=NCOLUMN,@level2name=NNameGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N说明 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Type, @level2type=NCOLUMN,@level2name=NRemarkGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N创建时间 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Type, @level2type=NCOLUMN,@level2name=NCreateTimeGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N排序 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Type, @level2type=NCOLUMN,@level2name=NSortGO/****** Object:  Table [dbo].[Flow_FormAttr]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_FormAttr](    [Id] [varchar](50) NOT NULL,    [Title] [varchar](50) NOT NULL,    [Name] [varchar](50) NOT NULL,    [AttrType] [varchar](50) NOT NULL,    [CheckJS] [varchar](500) NULL,    [TypeId] [varchar](50) NOT NULL,    [CreateTime] [datetime] NULL,    [OptionList] [varchar](500) NULL,    [IsValid] [bit] NULL, CONSTRAINT [PK_Flow_FormAttr] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/NID , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N字段标题 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NTitleGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N字段英文名称 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NNameGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N文本,日期,数字,多行文本 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NAttrTypeGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N校验脚本 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NCheckJSGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N所属类别 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NTypeIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N下拉框的值 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NOptionListGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N是否必填 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormAttr, @level2type=NCOLUMN,@level2name=NIsValidGO/****** Object:  Table [dbo].[Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_Form](    [Id] [varchar](50) NOT NULL,    [Name] [varchar](100) NOT NULL,    [Remark] [varchar](500) NULL,    [UsingDep] [varchar](2000) NULL,    [TypeId] [varchar](50) NOT NULL,    [State] [bit] NOT NULL,    [CreateTime] [datetime] NULL,    [HtmlForm] [text] NULL,    [AttrA] [varchar](50) NULL,    [AttrB] [varchar](50) NULL,    [AttrC] [varchar](50) NULL,    [AttrD] [varchar](50) NULL,    [AttrE] [varchar](50) NULL,    [AttrF] [varchar](50) NULL,    [AttrG] [varchar](50) NULL,    [AttrH] [varchar](50) NULL,    [AttrI] [varchar](50) NULL,    [AttrJ] [varchar](50) NULL,    [AttrK] [varchar](50) NULL,    [AttrL] [varchar](50) NULL,    [AttrM] [varchar](50) NULL,    [AttrN] [varchar](50) NULL,    [AttrO] [varchar](50) NULL,    [AttrP] [varchar](50) NULL,    [AttrQ] [varchar](50) NULL,    [AttrR] [varchar](50) NULL,    [AttrS] [varchar](50) NULL,    [AttrT] [varchar](50) NULL,    [AttrU] [varchar](50) NULL,    [AttrV] [varchar](50) NULL,    [AttrW] [varchar](50) NULL,    [AttrX] [varchar](50) NULL,    [AttrY] [varchar](50) NULL,    [AttrZ] [varchar](50) NULL, CONSTRAINT [PK_Flow_Form] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N是否完成流程 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Form, @level2type=NCOLUMN,@level2name=NStateGO/****** Object:  Table [dbo].[Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_Step](    [Id] [varchar](50) NOT NULL,    [Name] [varchar](50) NOT NULL,    [Remark] [varchar](500) NULL,    [Sort] [int] NOT NULL,    [FormId] [varchar](50) NOT NULL,    [FlowRule] [varchar](50) NOT NULL,    [IsCustom] [bit] NOT NULL,    [IsAllCheck] [bit] NOT NULL,    [Execution] [varchar](4000) NULL,    [CompulsoryOver] [bit] NOT NULL,    [IsEditAttr] [bit] NOT NULL, CONSTRAINT [PK_Flow_Step] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N步骤名称 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NNameGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N步骤说明 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NRemarkGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N排序 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NSortGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N所属表单 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NFormIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N流转规则 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NFlowRuleGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N该流程的 发起人/创建者 是否可以 自行选择 该步骤的审批者 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NIsCustomGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N当规则或者角色被选择为多人时候,是否启用多人审核才通过 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NIsAllCheckGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N执行者与规则对应 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NExecutionGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N是否可以强制完成整个流程 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NCompulsoryOverGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N审核者是否可以编辑发起者的附件 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_Step, @level2type=NCOLUMN,@level2name=NIsEditAttrGO/****** Object:  Table [dbo].[Flow_FormContent]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_FormContent](    [Id] [varchar](50) NOT NULL,    [UserId] [varchar](50) NOT NULL,    [FormId] [varchar](50) NOT NULL,    [FormLevel] [varchar](50) NOT NULL,    [CreateTime] [datetime] NOT NULL,    [AttrA] [varchar](2048) NULL,    [AttrB] [varchar](2048) NULL,    [AttrC] [varchar](2048) NULL,    [AttrD] [varchar](2048) NULL,    [AttrE] [varchar](2048) NULL,    [AttrF] [varchar](2048) NULL,    [AttrG] [varchar](2048) NULL,    [AttrH] [varchar](2048) NULL,    [AttrI] [varchar](2048) NULL,    [AttrJ] [varchar](2048) NULL,    [AttrK] [varchar](2048) NULL,    [AttrL] [varchar](2048) NULL,    [AttrM] [varchar](2048) NULL,    [AttrN] [varchar](2048) NULL,    [AttrO] [varchar](2048) NULL,    [AttrP] [varchar](2048) NULL,    [AttrQ] [varchar](2048) NULL,    [AttrR] [varchar](2048) NULL,    [AttrS] [varchar](2048) NULL,    [AttrT] [varchar](2048) NULL,    [AttrU] [varchar](2048) NULL,    [AttrV] [varchar](2048) NULL,    [AttrW] [varchar](2048) NULL,    [AttrX] [varchar](2048) NULL,    [AttrY] [varchar](2048) NULL,    [AttrZ] [varchar](2048) NULL, CONSTRAINT [PK_Flow_FormContent] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/NID , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormContent, @level2type=NCOLUMN,@level2name=NIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N发起用户 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormContent, @level2type=NCOLUMN,@level2name=NUserIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N对应表单 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormContent, @level2type=NCOLUMN,@level2name=NFormIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N公文级别 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormContent, @level2type=NCOLUMN,@level2name=NFormLevelGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N创建时间 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_FormContent, @level2type=NCOLUMN,@level2name=NCreateTimeGO/****** Object:  Table [dbo].[Flow_StepState]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_StepState](    [Id] [varchar](50) NOT NULL,    [ContentId] [varchar](50) NOT NULL,    [StepId] [varchar](50) NOT NULL,    [State] [int] NULL,    [Remark] [varchar](2000) NULL,    [AttrFile] [varchar](200) NULL,    [CreateTime] [datetime] NULL,    [TheSeal] [varchar](200) NULL, CONSTRAINT [PK_Flow_StepState] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/NID , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N所属公文 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NContentIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N所属步骤 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NStepIdGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N0不通过1通过null审核中 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NStateGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N附加内容 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NRemarkGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N附件 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NAttrFileGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N创建时间 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NCreateTimeGOEXEC sys.sp_addextendedproperty @name=NMS_Description, @value=http://www.mamicode.com/N印章位置 , @level0type=NSCHEMA,@level0name=Ndbo, @level1type=NTABLE,@level1name=NFlow_StepState, @level2type=NCOLUMN,@level2name=NTheSealGO/****** Object:  Table [dbo].[Flow_StepRule]    Script Date: 08/05/2014 10:24:41 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOSET ANSI_PADDING ONGOCREATE TABLE [dbo].[Flow_StepRule](    [Id] [varchar](50) NOT NULL,    [StepId] [varchar](50) NOT NULL,    [AttrId] [varchar](50) NOT NULL,    [Operator] [varchar](10) NOT NULL,    [Result] [varchar](50) NOT NULL, CONSTRAINT [PK_Flow_StepRule] PRIMARY KEY CLUSTERED (    [Id] ASC)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]) ON [PRIMARY]GOSET ANSI_PADDING OFFGO/****** Object:  Default [DF_Flow_FormContent_DrafText_Time]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_FormContent] ADD  CONSTRAINT [DF_Flow_FormContent_DrafText_Time]  DEFAULT (getdate()) FOR [CreateTime]GO/****** Object:  ForeignKey [FK_Flow_Form_Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_Form]  WITH CHECK ADD  CONSTRAINT [FK_Flow_Form_Flow_Type] FOREIGN KEY([TypeId])REFERENCES [dbo].[Flow_Type] ([Id])GOALTER TABLE [dbo].[Flow_Form] CHECK CONSTRAINT [FK_Flow_Form_Flow_Type]GO/****** Object:  ForeignKey [FK_Flow_FormAttr_Flow_Type]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_FormAttr]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormAttr_Flow_Type] FOREIGN KEY([TypeId])REFERENCES [dbo].[Flow_Type] ([Id])GOALTER TABLE [dbo].[Flow_FormAttr] CHECK CONSTRAINT [FK_Flow_FormAttr_Flow_Type]GO/****** Object:  ForeignKey [FK_Flow_FormContent_Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_FormContent]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormContent_Flow_Form] FOREIGN KEY([FormId])REFERENCES [dbo].[Flow_Form] ([Id])GOALTER TABLE [dbo].[Flow_FormContent] CHECK CONSTRAINT [FK_Flow_FormContent_Flow_Form]GO/****** Object:  ForeignKey [FK_Flow_FormContent_SysUser]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_FormContent]  WITH CHECK ADD  CONSTRAINT [FK_Flow_FormContent_SysUser] FOREIGN KEY([UserId])REFERENCES [dbo].[SysUser] ([Id])GOALTER TABLE [dbo].[Flow_FormContent] CHECK CONSTRAINT [FK_Flow_FormContent_SysUser]GO/****** Object:  ForeignKey [FK_Flow_Step_Flow_Form]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_Step]  WITH CHECK ADD  CONSTRAINT [FK_Flow_Step_Flow_Form] FOREIGN KEY([FormId])REFERENCES [dbo].[Flow_Form] ([Id])GOALTER TABLE [dbo].[Flow_Step] CHECK CONSTRAINT [FK_Flow_Step_Flow_Form]GO/****** Object:  ForeignKey [FK_Flow_StepRule_Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_StepRule]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepRule_Flow_Step] FOREIGN KEY([StepId])REFERENCES [dbo].[Flow_Step] ([Id])GOALTER TABLE [dbo].[Flow_StepRule] CHECK CONSTRAINT [FK_Flow_StepRule_Flow_Step]GO/****** Object:  ForeignKey [FK_Flow_StepState_Flow_Step]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_StepState]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepState_Flow_Step] FOREIGN KEY([StepId])REFERENCES [dbo].[Flow_Step] ([Id])GOALTER TABLE [dbo].[Flow_StepState] CHECK CONSTRAINT [FK_Flow_StepState_Flow_Step]GO/****** Object:  ForeignKey [FK_Flow_StepState_Flow_StepState]    Script Date: 08/05/2014 10:24:41 ******/ALTER TABLE [dbo].[Flow_StepState]  WITH CHECK ADD  CONSTRAINT [FK_Flow_StepState_Flow_StepState] FOREIGN KEY([ContentId])REFERENCES [dbo].[Flow_FormContent] ([Id])GOALTER TABLE [dbo].[Flow_StepState] CHECK CONSTRAINT [FK_Flow_StepState_Flow_StepState]GO
数据字典