/*
 Navicat Premium Data Transfer

 Source Server         : 118.178.224.202-SqlServer
 Source Server Type    : SQL Server
 Source Server Version : 10501600
 Source Host           : 118.178.224.202:1433
 Source Catalog        : Nbcqb2
 Source Schema         : dbo

 Target Server Type    : SQL Server
 Target Server Version : 10501600
 File Encoding         : 65001

 Date: 29/09/2021 18:22:48
*/


-- ----------------------------
-- Table structure for ProjectsStep
-- ----------------------------
IF EXISTS (SELECT * FROM sys.all_objects WHERE object_id = OBJECT_ID(N'[dbo].[ProjectsStep]') AND type IN ('U'))
	DROP TABLE [dbo].[ProjectsStep]
GO

CREATE TABLE [dbo].[ProjectsStep] (
  [ID] uniqueidentifier NOT NULL,
  [ProjectID] uniqueidentifier NULL,
  [StepNameID] uniqueidentifier NULL,
  [StepName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL,
  [StepSort] int NULL,
  [StepCode] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL,
  [StartTime] datetime NULL,
  [EndTime] datetime NULL,
  [IsFinish] bit NULL,
  [CreateUserId] uniqueidentifier NULL,
  [CreateUserName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL,
  [CreateTime] datetime NULL,
  [UpdateUserId] uniqueidentifier NULL,
  [UpdateUserName] nvarchar(50) COLLATE Chinese_PRC_CI_AS NULL,
  [UpdateTime] datetime NULL
)
GO

ALTER TABLE [dbo].[ProjectsStep] SET (LOCK_ESCALATION = TABLE)
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目ID',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'ProjectID'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段名称ID',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'StepNameID'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段名称',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'StepName'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段顺序',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'StepSort'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段惟一代码',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'StepCode'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段开始时间',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'StartTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'项目阶段结束时间',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'EndTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'是否结束',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'IsFinish'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建人ID',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'CreateUserId'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建人姓名',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'CreateUserName'
GO

EXEC sp_addextendedproperty
'MS_Description', N'创建时间',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'CreateTime'
GO

EXEC sp_addextendedproperty
'MS_Description', N'修改人ID',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'UpdateUserId'
GO

EXEC sp_addextendedproperty
'MS_Description', N'修改人姓名',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'UpdateUserName'
GO

EXEC sp_addextendedproperty
'MS_Description', N'修改时间',
'SCHEMA', N'dbo',
'TABLE', N'ProjectsStep',
'COLUMN', N'UpdateTime'
GO


-- ----------------------------
-- Primary Key structure for table ProjectsStep
-- ----------------------------
ALTER TABLE [dbo].[ProjectsStep] ADD CONSTRAINT [PK_ProjectsStep] PRIMARY KEY CLUSTERED ([ID])
WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON)  
ON [PRIMARY]
GO

