SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [FormControlOption](
	[OptionID] [int] IDENTITY(1,1) NOT NULL,
	[OptionName] [nvarchar](100) NULL,
	[OptionValue] [nvarchar](100) NULL,
	[GroupID] [int] NULL,
	[Selected] [int] NULL CONSTRAINT [DF_Options_Selected]  DEFAULT ((0)),
	[CreateDate] [datetime] NULL CONSTRAINT [DF_Options_CreateDate]  DEFAULT (getdate()),
	[Sequence] [int] NULL CONSTRAINT [DF_FormControlOption_Sequence]  DEFAULT ((10)),
 CONSTRAINT [PK_Options] PRIMARY KEY CLUSTERED 
(
	[OptionID] 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 [FormControlOption] ON 

INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (5, N'2000', N'2000', 1, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (6, N'2001', N'2001', 1, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (9, N'个人', N'0', 3, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (10, N'中介', N'1', 3, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (11, N'男女不限', N'0', 5, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (12, N'限女生', N'1', 5, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (13, N'限男生', N'2', 5, 0, NULL, 3)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (14, N'在线交易', N'1', 6, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (15, N'快递', N'2', 6, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (19, N'同城交易', N'3', 6, 0, NULL, 3)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (20, N'当面交易', N'4', 6, 0, NULL, 4)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (23, N'出售', N'1', 7, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (24, N'求购', N'2', 7, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (25, N'朝阳区', N'1', 8, 1, NULL, 1)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (26, N'海淀区', N'2', 8, 0, NULL, 2)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (27, N'东城区', N'3', 8, 0, NULL, 3)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (28, N'西城区', N'4', 8, 0, NULL, 4)
INSERT [FormControlOption] ([OptionID], [OptionName], [OptionValue], [GroupID], [Selected], [CreateDate], [Sequence]) VALUES (29, N'丰台区', N'5', 8, 0, NULL, 5)
SET IDENTITY_INSERT [FormControlOption] OFF
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'多选项表自增长编号,主键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'OptionID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选项名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'OptionName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选项值' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'OptionValue'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选择项分组id,每一组下面有多个选项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'GroupID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选中状态,0未选中(默认),1选中,如果是单选或下拉框则使用最后一次选中状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'Selected'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序,默认10' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'FormControlOption', @level2type=N'COLUMN',@level2name=N'Sequence'
GO
