SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [BadWord](
	[WordID] [int] IDENTITY(1,1) NOT NULL,
	[Word] [nvarchar](50) NULL,
	[Action] [int] NULL CONSTRAINT [DF_BadWord_Action]  DEFAULT ((1)),
	[ReplaceWord] [nvarchar](50) NULL CONSTRAINT [DF_BadWord_ReplaceWord]  DEFAULT (N'*'),
	[WordGroupID] [int] NULL CONSTRAINT [DF_BadWord_WordGroupID]  DEFAULT ((0)),
	[Editor] [nvarchar](50) NULL,
	[CreateTime] [datetime] NULL CONSTRAINT [DF_BadWord_CreateTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_BadWord] PRIMARY KEY CLUSTERED 
(
	[WordID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
) ON [PRIMARY]

GO
SET IDENTITY_INSERT [BadWord] ON 

INSERT [BadWord] ([WordID], [Word], [Action], [ReplaceWord], [WordGroupID], [Editor], [CreateTime]) VALUES (1, N'人民', 1, N'***', NULL, NULL, NULL)
SET IDENTITY_INSERT [BadWord] OFF
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自增长编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'WordID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要过滤的关键词' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'Word'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'过滤行为(1替换,2需要审核,3禁止入库)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'Action'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'要被替换的词,默认为*' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'ReplaceWord'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关键词分组编号(保留字段)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'WordGroupID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编辑人(保留字段)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'Editor'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'BadWord', @level2type=N'COLUMN',@level2name=N'CreateTime'
GO
