首页 > 代码库 > 构建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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘类别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘说明‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘排序‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Type‘, @level2type=N‘COLUMN‘,@level2name=N‘Sort‘GO/****** 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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘字段标题‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Title‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘字段英文名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘文本,日期,数字,多行文本‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘AttrType‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘校验脚本‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘CheckJS‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘所属类别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘TypeId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘下拉框的值‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘OptionList‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘是否必填‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormAttr‘, @level2type=N‘COLUMN‘,@level2name=N‘IsValid‘GO/****** 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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘是否完成流程‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Form‘, @level2type=N‘COLUMN‘,@level2name=N‘State‘GO/****** 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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘步骤名称‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Name‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘步骤说明‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘排序‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Sort‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘所属表单‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘FormId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘流转规则‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘FlowRule‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘该流程的 发起人/创建者 是否可以 自行选择 该步骤的审批者‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsCustom‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘当规则或者角色被选择为多人时候,是否启用多人审核才通过‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsAllCheck‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘执行者与规则对应‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘Execution‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘是否可以强制完成整个流程‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘CompulsoryOver‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘审核者是否可以编辑发起者的附件‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_Step‘, @level2type=N‘COLUMN‘,@level2name=N‘IsEditAttr‘GO/****** 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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘发起用户‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘UserId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘对应表单‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘FormId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘公文级别‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘FormLevel‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_FormContent‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘GO/****** 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=N‘MS_Description‘, @value=http://www.mamicode.com/N‘ID‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘Id‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘所属公文‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘ContentId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘所属步骤‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘StepId‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘0不通过1通过null审核中‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘State‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘附加内容‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘Remark‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘附件‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘AttrFile‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘创建时间‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘CreateTime‘GOEXEC sys.sp_addextendedproperty @name=N‘MS_Description‘, @value=http://www.mamicode.com/N‘印章位置‘ , @level0type=N‘SCHEMA‘,@level0name=N‘dbo‘, @level1type=N‘TABLE‘,@level1name=N‘Flow_StepState‘, @level2type=N‘COLUMN‘,@level2name=N‘TheSeal‘GO/****** 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
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。