CREATE TABLE [dbo].[jcms_module_article] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Content] [ntext] NOT NULL ,
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_article] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_article_collitem] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[WebName] [nvarchar] (50) NULL ,
	[WebUrl] [nvarchar] (100) NULL ,
	[ItemDemo] [nvarchar] (200) NULL ,
	[ListStr] [nvarchar] (200) NULL ,
	[ListStart] [ntext] NULL ,
	[ListEnd] [ntext] NULL ,
	[LinkStart] [ntext] NULL ,
	[LinkEnd] [ntext] NULL ,
	[TitleStart] [ntext] NULL ,
	[TitleEnd] [ntext] NULL ,
	[SourceFromStart] [nvarchar](300) NULL,
	[SourceFromEnd] [nvarchar](300) NULL,
	[PubTimeStart] [nvarchar](300) NULL,
	[PubTimeEnd] [nvarchar](300) NULL,
	[ContentStart] [ntext] NULL ,
	[ContentEnd] [ntext] NULL ,
	[NPageStart] [ntext] NULL ,
	[NPageEnd] [ntext] NULL ,
	[AuthorStr] [nvarchar] (50) NULL ,
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Flag] [int] NOT NULL DEFAULT(0),
	[Script_Iframe] [int] NOT NULL DEFAULT(0),
	[Script_Object] [int] NOT NULL DEFAULT(0),
	[Script_Script] [int] NOT NULL DEFAULT(0),
	[Script_Div] [int] NOT NULL DEFAULT(0),
	[Script_Table] [int] NOT NULL DEFAULT(0),
	[Script_Span] [int] NOT NULL DEFAULT(0),
	[Script_Img] [int] NOT NULL DEFAULT(0),
	[Script_Font] [int] NOT NULL DEFAULT(0),
	[Script_A] [int] NOT NULL DEFAULT(0),
	[Script_Html] [int] NOT NULL DEFAULT(0),
	[CollecNewsNum] [int] NOT NULL DEFAULT(0),
	[SaveFiles] [int] NOT NULL DEFAULT(0),
	[CollecOrder] [int] NOT NULL DEFAULT(0),
	[ListWebEncode] [nvarchar] (50) NULL ,
	[ContentWebEncode] [nvarchar] (50) NULL ,
	[LastTime] [datetime] NOT NULL DEFAULT (getdate()),
	[AutoChecked] [int] NOT NULL DEFAULT(0),
	[IsRunning] [int] NOT NULL DEFAULT(0),
	[AutoCollect] [int] NOT NULL DEFAULT ((1)),
	[AutoCollectHours] [nvarchar](100) NOT NULL DEFAULT (',2,3,8,9,14,15,20,21,'),
	[AutoCollectNextTime] [datetime] NOT NULL DEFAULT (getdate()),
	[AutoCollectNum] [int] NOT NULL DEFAULT ((20)),
	[LastListHTML] [ntext] NOT NULL DEFAULT (''),
	[LinkBaseHref] [nvarchar](200) NOT NULL DEFAULT (''),
	[AutoChecked2] [int] NOT NULL DEFAULT(0),
	[CollecOrder2] [int] NOT NULL DEFAULT(0),
	[SaveFiles2] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_article_collitem] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_article_collfilters] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ItemId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (50) NULL ,
	[Filter_Object] [int] NOT NULL DEFAULT(0),
	[Filter_Type] [int] NOT NULL DEFAULT(0),
	[Filter_Content] [ntext] NULL ,
	[FisString] [ntext] NULL ,
	[FioString] [ntext] NULL ,
	[Filter_Rep] [ntext] NULL ,
	[Flag] [int] NOT NULL DEFAULT(0),
	[PublicTf] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_article_collfilters] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


CREATE TABLE [dbo].[jcms_module_article_collhistory] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ItemId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (100) NULL ,
	[CollectDate] [datetime] NOT NULL DEFAULT (getdate()),
	[NewsUrl] [nvarchar] (200) NULL ,
	[ResultStr] [nvarchar] (200) NULL ,
	[Result] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_article_collhistory] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_document] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[PageNumber] [int] NULL ,
	[Points] [int] NULL ,
	[DocumentUrl] [ntext] NOT NULL DEFAULT ('') ,
	[PageSize] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_document] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_document_downlogs] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[DocumentId] [int] NOT NULL DEFAULT(0),
	[Points] [int] NOT NULL DEFAULT(0),
	[DownTime] [datetime] NOT NULL DEFAULT (getdate()),
	[DownIP] [nvarchar] (16) NULL ,
	[DownDegree] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_document_downlogs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_paper] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[PageNumber] [int] NULL ,
	[Points] [int] NULL ,
	[PaperUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	[SwfFile] [nvarchar] (150) NOT NULL DEFAULT (''),
	[PageSize] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_paper] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_paper_downlogs] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[PaperId] [int] NOT NULL DEFAULT(0),
	[Points] [int] NOT NULL DEFAULT(0),
	[DownTime] [datetime] NOT NULL DEFAULT (getdate()),
	[DownIP] [nvarchar] (16) NULL ,
	[DownDegree] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_paper_downlogs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_photo] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[PhotoUrl] [ntext] NOT NULL DEFAULT ('') ,
	[PageSize] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_photo] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_module_soft] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Version] [nvarchar] (100) NOT NULL DEFAULT (''),
	[OperatingSystem] [nvarchar] (255) NULL ,
	[UnZipPass] [nvarchar] (100) NOT NULL DEFAULT (''),
	[DemoUrl] [nvarchar] (255) NULL ,
	[RegUrl] [nvarchar] (255) NULL ,
	[SSize] [varchar] (20) NULL ,
	[Points] [int] NOT NULL DEFAULT(0),
	[DownUrl] [ntext] NOT NULL DEFAULT ('') ,
	[DownNum] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_soft] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


CREATE TABLE [dbo].[jcms_module_soft_downlogs] (
	[Id] [bigint] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[SoftId] [int] NOT NULL DEFAULT(0),
	[Points] [int] NOT NULL DEFAULT(0),
	[DownTime] [datetime] NOT NULL DEFAULT (getdate()),
	[DownIP] [nvarchar] (16) NULL ,
	[DownDegree] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_module_soft_downlogs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[jcms_module_video] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[ClassId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[TColor] [nvarchar] (8) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Summary] [ntext] NOT NULL DEFAULT ('') ,
	[Editor] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Tags] [nvarchar] (60) NOT NULL DEFAULT (''),
	[ViewNum] [int] NOT NULL DEFAULT(0),
	[IsPass] [int] NOT NULL DEFAULT(0),
	[IsImg] [int] NOT NULL DEFAULT(0),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[IsFocus] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	[SourceFrom] [nvarchar] (30) NOT NULL DEFAULT (''),
	[VideoUrl] [ntext] NOT NULL DEFAULT ('') ,
	[PageSize] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_module_video] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_adminlogs] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[AdminId] [int] NOT NULL ,
	[OperInfo] [nvarchar] (200) NOT NULL DEFAULT (''),
	[OperTime] [datetime] NOT NULL DEFAULT (getdate()),
	[OperIP] [nvarchar] (15) NULL ,
	CONSTRAINT [PK_normal_adminlogs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO


CREATE TABLE [dbo].[jcms_normal_channel] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL ,
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[ClassDepth] [int] NOT NULL DEFAULT(0),
	[Dir] [nvarchar] (20) NOT NULL ,
	[pId] [int] NOT NULL DEFAULT(0),
	[ItemName] [nvarchar] (4) NOT NULL DEFAULT (''),
	[ItemUnit] [nvarchar] (2) NULL ,
	[TemplateId] [int] NOT NULL DEFAULT(0),
	[Type] [nvarchar] (10) NOT NULL DEFAULT (''),
	[Enabled] [int] NOT NULL DEFAULT(0),
	[DefaultThumbs] [int] NOT NULL DEFAULT(0),
	[IsPost] [int] NOT NULL DEFAULT(0),
	[IsNav] [int] NOT NULL DEFAULT(0),
	[IsHtml] [int] NOT NULL DEFAULT(0),
	[UploadPath] [nvarchar](100) NOT NULL DEFAULT (''),
	[UploadType] [nvarchar](50) NOT NULL DEFAULT (''),
	[UploadSize] [bigint] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_channel] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('新闻中心',2,'news',1,'内容','篇',2,'article',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.jpg;*.gif;*.rar;*.zip;',10240)
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('图片中心',2,'photo',2,'图片','组',8,'photo',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.jpg;*.bmp;*.gif;*.png;',1024)
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('下载中心',2,'dow',3,'文件','个',5,'soft',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.rar;*.zip;*.7z;',5120)
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('视频中心',2,'video',4,'视频','个',11,'video',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.flv;*.avi;*.swf;',10240)
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('文档中心',2,'document',5,'文档','篇',14,'document',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.rar;*.zip;*.7z;*.pdf;*.doc;',10240)
GO
INSERT [jcms_normal_channel] ([Title],[ClassDepth],[Dir],[pId],[ItemName],[ItemUnit],[TemplateId],[Type],[Enabled],[DefaultThumbs],[IsPost],[IsNav],[IsHtml],[UploadPath],[UploadType],[UploadSize]) VALUES ('在线文库',2,'paper',6,'文件','篇',17,'paper',1,1,1,0,1,'<#SiteDir#><#ChannelDir#>/uploadfiles/','*.pdf;',5120)
GO


CREATE TABLE [dbo].[jcms_normal_class] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL ,
	[ParentId] [int] NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL ,
	[Info] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[SortRank] [int] NOT NULL DEFAULT(0),
	[Folder] [nvarchar] (50) NOT NULL DEFAULT (''),
	[FilePath] [nvarchar] (150) NOT NULL DEFAULT (''),
	[Code] [nvarchar] (40) NOT NULL DEFAULT (''),
	[IsPost] [int] NOT NULL DEFAULT(0),
	[IsTop] [int] NOT NULL DEFAULT(0),
	[TopicNum] [int] NOT NULL DEFAULT(0),
	[TemplateId] [int] NOT NULL DEFAULT(0),
	[ContentTemp] [int] NOT NULL DEFAULT(0),
	[PageSize] [int] NOT NULL DEFAULT(0),
	[IsOut] [int] NOT NULL DEFAULT(0),
	[OutUrl] [nvarchar] (150) NOT NULL DEFAULT (''),
	[ReadGroup] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_class] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_extends] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Name] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Author] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Type] [int] NOT NULL DEFAULT(0),
	[pId] [int] NOT NULL ,
	[BaseTable] [nvarchar] (200) NOT NULL DEFAULT (''),
	[ManageUrl] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Enabled] [int] NOT NULL DEFAULT(0),
	[Locked] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_extends] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('内容顶客','Digg','jumbot','官方插件',0,1,'','jcms_extends_digg',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('用户留言','Feedback','jumbot','官方插件',1,2,'jcms_extends_feedback','admin.aspx',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('友情链接','Link','jumbot','官方插件',0,3,'jcms_extends_link','admin.aspx',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('网站公告','Placard','jumbot','官方插件',0,4,'jcms_extends_placard','admin.aspx',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('内容评论','Review','jumbot','官方插件',1,5,'jcms_extends_review','admin.aspx',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('投票调查','Vote','jumbot','官方插件',0,6,'jcms_extends_vote','admin.aspx',1,0)
GO
INSERT INTO [jcms_normal_extends] ([Title],[Name],[Author],[Info],[Type],[pId],[BaseTable],[ManageUrl],[Enabled],[Locked]) VALUES ('QQ在线客服','QQOnline','jumbot','官方插件',0,7,'jcms_extends_qqonline','admin.aspx',1,0)
GO

CREATE TABLE [dbo].[jcms_normal_forbidip] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[StartIP] [bigint] NULL ,
	[StartIP2] [nvarchar] (16) NULL ,
	[EndIP] [bigint] NULL ,
	[EndIP2] [nvarchar] (16) NULL ,
	[ExpireDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Enabled] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_forbidip] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_mtag] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Img] [nvarchar] (150) NOT NULL DEFAULT (''),
	[Proclaim] [nvarchar] (200) NOT NULL DEFAULT (''),
	[JoinPower] [int] NOT NULL DEFAULT(0),
	[ViewPower] [int] NOT NULL DEFAULT(0),
	[CloseApply] [int] NOT NULL DEFAULT(0),
	[SortId] [int] NOT NULL DEFAULT(0),
	[MemberTotal] [int] NOT NULL DEFAULT(0),
	[UpdateTime] [datetime] NOT NULL DEFAULT (getdate()),
	[UserId] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_mtag] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_mtag_member] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[UserId] [int] NOT NULL ,
	[MTagId] [int] NOT NULL ,
	[Power] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_mtag_member] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_mtag_thread] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Content] [ntext] NOT NULL DEFAULT ('') ,
	[MTagId] [int] NOT NULL ,
	[IsGood] [int] NOT NULL DEFAULT(0),
	[IsHead] [int] NOT NULL DEFAULT(0),
	[AddTime] [datetime] NOT NULL DEFAULT (getdate()),
	[ReplyCount] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_mtag_thread] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_mtag_thread_reply] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Content] [nvarchar] (1000) NOT NULL DEFAULT (''),
	[MTagId] [int] NOT NULL ,
	[ThreadId] [int] NOT NULL ,
	[AddTime] [datetime] NOT NULL DEFAULT (getdate()),
	[UserId] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_mtag_thread_reply] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_mtag_sort] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[State] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_mtag_sort] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_mtag_sort] (Title,Info,State) values('自由联盟','自由联盟',1);
INSERT INTO [dbo].[jcms_normal_mtag_sort] (Title,Info,State) values('兴趣联盟','兴趣联盟',1);
INSERT INTO [dbo].[jcms_normal_mtag_sort] (Title,Info,State) values('技术交流','技术交流',1);
INSERT INTO [dbo].[jcms_normal_mtag_sort] (Title,Info,State) values('协同合作','协同合作',1);

CREATE TABLE [dbo].[jcms_normal_modules] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL ,
	[Type] [nvarchar] (10) NOT NULL DEFAULT (''),
	[ItemName] [nvarchar] (4) NOT NULL DEFAULT (''),
	[ItemUnit] [nvarchar] (2) NULL ,
	[PId] [int] NOT NULL DEFAULT(0),
	[Enabled] [int] NOT NULL DEFAULT(0),
	[Locked] [int] NOT NULL DEFAULT(0),
	[SearchFieldValues] [nvarchar] (200) NOT NULL DEFAULT (''),
	[SearchFieldTexts] [nvarchar] (200) NULL ,
	CONSTRAINT [PK_normal_modules] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('文章','article',1,1,1,'title,summary','标题,简介','内容','篇');
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('图片','photo',2,1,1,'title,summary','标题,简介','图片','组');
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('下载','soft',3,1,1,'title,summary','标题,简介','文件','个');
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('视频','video',4,1,1,'title,summary','标题,简介','视频','个');
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('文档','document',5,1,1,'title,summary','标题,简介','文档','篇');
INSERT INTO [dbo].[jcms_normal_modules] (Title,Type,pId,Enabled,Locked,SearchFieldValues,SearchFieldTexts,ItemName,ItemUnit) values('文库','paper',6,1,1,'title,summary','标题,简介','文件','篇');


CREATE TABLE [jcms_normal_order] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[OrderNum] [nvarchar] (30) NOT NULL DEFAULT (''),
	[OrderType] [nvarchar] (10) NOT NULL DEFAULT (''),
	[Money] [int] NOT NULL DEFAULT(0),
	[OrderTime] [datetime] NOT NULL DEFAULT (getdate()),
	[State] [int] NOT NULL DEFAULT(0),
	[UserId] [int] NOT NULL DEFAULT(0)
)
GO

CREATE TABLE [dbo].[jcms_normal_page] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL DEFAULT (''),
	[SId] [int] NOT NULL DEFAULT(0),
	[Source] [nvarchar] (50) NULL ,
	CONSTRAINT [PK_normal_page] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_page] (Title,SId,Source) values('关于我们',1,'index.html')
INSERT INTO [dbo].[jcms_normal_page] (Title,SId,Source) values('商业服务',1,'service.html')
INSERT INTO [dbo].[jcms_normal_page] (Title,SId,Source) values('联系方式',1,'contactus.html')
INSERT INTO [dbo].[jcms_normal_page] (Title,SId,Source) values('会员帮助',2,'index.html')

CREATE TABLE [dbo].[jcms_normal_page_sort] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[Dir] [nvarchar] (50) NULL ,
	CONSTRAINT [PK_normal_page_sort] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_page_sort] (Title,Info,Dir) values('本站介绍','','about')
INSERT INTO [dbo].[jcms_normal_page_sort] (Title,Info,Dir) values('帮助中心','','help')

CREATE TABLE [dbo].[jcms_normal_pointscard] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[CardNumber] [nvarchar] (16) NULL ,
	[CardPassword] [nvarchar] (32) NULL ,
	[UserId] [int] NOT NULL DEFAULT(0),
	[Points] [int] NOT NULL,
	[LimitedDate] [datetime] NOT NULL DEFAULT (getdate()),
	[ActiveTime] [datetime] NOT NULL DEFAULT (getdate()),
	[ActiveIP] [nvarchar] (15) NULL ,
	[State] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_pointscard] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_pointscard_sort] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Points] [int] NOT NULL ,
	CONSTRAINT [PK_normal_pointscard_sort] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_pointscard_sort] (Title,Points) values('50元=>50点',50);
INSERT INTO [dbo].[jcms_normal_pointscard_sort] (Title,Points) values('100元=>100点',100);
INSERT INTO [dbo].[jcms_normal_pointscard_sort] (Title,Points) values('200元=>200点',200);
INSERT INTO [dbo].[jcms_normal_pointscard_sort] (Title,Points) values('500元=>500点',500);
INSERT INTO [dbo].[jcms_normal_pointscard_sort] (Title,Points) values('1000元=>1000点',1000);

CREATE TABLE [dbo].[jcms_normal_theme] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Source] [nvarchar] (50) NOT NULL DEFAULT (''),
	[BodyWidth] [int] NOT NULL DEFAULT(0),
	[LeftWidth] [int] NOT NULL DEFAULT(0),
	[RightWidth] [int] NOT NULL DEFAULT(0),
	[TitleColor] [nvarchar] (10) NOT NULL DEFAULT (''),
	[TextColor] [nvarchar] (10) NOT NULL DEFAULT (''),
	[AnchorColor] [nvarchar] (10) NOT NULL DEFAULT (''),
	[AnchorHoverColor] [nvarchar] (10) NOT NULL DEFAULT (''),
	[BorderColor] [nvarchar] (10) NOT NULL DEFAULT (''),
	[TintBackground] [nvarchar] (10) NOT NULL DEFAULT (''),
	[DarkBackground] [nvarchar] (10) NULL ,
	CONSTRAINT [PK_normal_theme] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_theme] (Title,Source,BodyWidth,LeftWidth,RightWidth,TitleColor,TextColor,AnchorColor,AnchorHoverColor,BorderColor,TintBackground,DarkBackground) values('默认主题','default',932,252,670,'#00599B','#00599B','#00599B','#FF5500','#AACCEE','#F4F9FD','#316395')
GO


CREATE TABLE [dbo].[jcms_normal_special] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[Source] [nvarchar] (50) NULL ,
	CONSTRAINT [PK_normal_special] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_specialcontent] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[sId] [int] NOT NULL ,
	[ChannelId] [int] NOT NULL ,
	[ContentId] [int] NOT NULL ,
	CONSTRAINT [PK_normal_specialcontent] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [jcms_normal_tag] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0) ,
	[Title] [nvarchar] (15) NOT NULL ,
	[ClickTimes] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_normal_tag] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_template] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[PId] [int] NOT NULL DEFAULT(0),
	[Type] [nvarchar] (50) NOT NULL DEFAULT (''),
	[SType] [nvarchar] (50) NOT NULL DEFAULT (''),
	[IsDefault] [int] NOT NULL DEFAULT(0),
	[Source] [nvarchar] (50) NOT NULL DEFAULT (''),
	[ThemeId] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_template] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板站点首页',1,'system','index',1,'system_index.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文章频道页',1,'article','channel',1,'article_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文章列表页',1,'article','class',1,'article_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文章内容页',1,'article','content',1,'article_content.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板下载频道页',1,'soft','channel',1,'soft_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板下载列表页',1,'soft','class',1,'soft_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板下载内容页',1,'soft','content',1,'soft_content.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板图片频道页',1,'photo','channel',1,'photo_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板图片列表页',1,'photo','class',1,'photo_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板图片内容页',1,'photo','content',1,'photo_content.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板视频频道页',1,'video','channel',1,'video_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板视频列表页',1,'video','class',1,'video_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板视频内容页',1,'video','content',1,'video_content.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文档频道页',1,'document','channel',1,'document_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文档列表页',1,'document','class',1,'document_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文档内容页',1,'document','content',1,'document_content.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文库频道页',1,'paper','channel',1,'paper_channel.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文库列表页',1,'paper','class',1,'paper_class.htm',1);
INSERT INTO [dbo].[jcms_normal_template] (Title,pId,Type,sType,IsDefault,Source,ThemeId) values('默认模板文库内容页',1,'paper','content',1,'paper_content.htm',1);


CREATE TABLE [dbo].[jcms_normal_templatelabel] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[PId] [int] NOT NULL DEFAULT(0),
	[Sort] [int] NOT NULL DEFAULT(0),
	[Source] [nvarchar] (100) NOT NULL DEFAULT ('') ,
	CONSTRAINT [PK_normal_templatelabel] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_templateproject] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	[Dir] [nvarchar] (50) NOT NULL DEFAULT (''),
	[IsDefault] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_templateproject] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_templateproject] (Title,Info,Dir,isDefault) values('默认模板','','default',1);


CREATE TABLE [dbo].[jcms_normal_thumbs] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0),
	[Title] [nvarchar] (30) NOT NULL DEFAULT (''),
	[iWidth] [int] NOT NULL DEFAULT(0),
	[iHeight] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_thumbs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'360X270',360,270);
INSERT INTO [dbo].[jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'240X180',240,180);
INSERT INTO [dbo].[jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'150X120',150,120);
INSERT INTO [dbo].[jcms_normal_thumbs] (ChannelId,Title,iWidth,iHeight) Values (0,'128X96',128,96);

CREATE TABLE [dbo].[jcms_normal_user] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[GUID] [nvarchar] (40) NOT NULL DEFAULT (''),
	[UserName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[NickName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[UserPass] [nvarchar] (40) NOT NULL DEFAULT (''),
	[TrueName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Question] [nvarchar] (30) NOT NULL DEFAULT (''),
	[Answer] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Sex] [int] NOT NULL ,
	[Email] [nvarchar] (80) NOT NULL DEFAULT (''),
	[Group] [int] NOT NULL DEFAULT(0),
	[State] [int] NOT NULL DEFAULT(0),
	[Cookies] [nvarchar] (10) NOT NULL DEFAULT (''),
	[RegTime] [datetime] NOT NULL DEFAULT (getdate()),
	[RegIp] [nvarchar] (15) NULL ,
	[LastTime] [datetime] NOT NULL DEFAULT (getdate()),
	[LastIp] [nvarchar] (15) NULL ,
	[HomePage] [nvarchar] (100) NOT NULL DEFAULT (''),
	[QQ] [nvarchar] (50) NOT NULL DEFAULT (''),
	[ICQ] [nvarchar] (50) NOT NULL DEFAULT (''),
	[MSN] [nvarchar] (50) NOT NULL DEFAULT (''),
	[BirthDay] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Signature] [nvarchar] (30) NOT NULL DEFAULT (''),
	[ProvinceCity] [nvarchar] (40) NOT NULL DEFAULT ('北京-西城'),
	[Login] [int] NOT NULL DEFAULT(0),
	[Points] [int] NOT NULL DEFAULT(0),
	[IDType] [int] NOT NULL DEFAULT(0),
	[IDCard] [nvarchar] (30) NOT NULL DEFAULT (''),
	[WorkUnit] [nvarchar] (100) NOT NULL DEFAULT (''),
	[Address] [nvarchar] (100) NOT NULL DEFAULT (''),
	[ZipCode] [nvarchar] (10) NOT NULL DEFAULT (''),
	[Telephone] [nvarchar] (20) NOT NULL DEFAULT (''),
	[MobileTel] [nvarchar] (11) NULL ,
	[IsVIP] [int] NOT NULL DEFAULT(0),
	[VIPTime] [datetime] NOT NULL DEFAULT (getdate()),
	[Integral] [int] NOT NULL DEFAULT(0),
	[UserSign] [nvarchar] (64) NULL ,
	[AdminId] [int] NOT NULL DEFAULT(0),
	[AdminName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[AdminPass] [nvarchar] (32) NULL ,
	[Setting] [text] NOT NULL DEFAULT (''),
	[LastTime2] [datetime] NOT NULL DEFAULT (getdate()),
	[LastIp2] [nvarchar] (15) NULL ,
	[Cookiess] [nvarchar] (10) NOT NULL DEFAULT (''),
	[AdminSign] [nvarchar] (64) NULL ,
	[AdminState] [int] NOT NULL DEFAULT(0),
	[ForumName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[ForumPass] [nvarchar] (32) NULL DEFAULT (''),
	[ServiceId] [int] NOT NULL DEFAULT(0),
	[ServiceName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[LastTime3] [datetime] NOT NULL DEFAULT (getdate()),
	[LastIp3] [nvarchar] (15) NULL ,
	CONSTRAINT [PK_normal_user] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_logs] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[UserId] [int] NOT NULL ,
	[OperInfo] [nvarchar] (200) NOT NULL DEFAULT (''),
	[OperType] [int] NOT NULL DEFAULT(0),
	[OperTime] [datetime] NOT NULL DEFAULT (getdate()),
	[OperIP] [nvarchar] (15) NULL ,
	CONSTRAINT [PK_normal_user_logs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_apply] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[UserId] [int] NOT NULL ,
	[ApplyInfo] [nvarchar] (200) NOT NULL DEFAULT (''),
	[ApplyType] [int] NOT NULL DEFAULT(0),
	[ApplyTime] [datetime] NOT NULL DEFAULT (getdate()),
	[ApplyIP] [nvarchar] (15) NULL ,
	[UserSign] [nvarchar] (64) NULL ,
	[ApplyNumber] [int] NOT NULL DEFAULT(0),
	[Checked] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_user_apply] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_friends] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[UserId] [int] NOT NULL ,
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[FriendId] [int] NOT NULL ,
	CONSTRAINT [PK_normal_user_friends] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_message] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Content] [ntext] NOT NULL DEFAULT ('') ,
	[SendIP] [nvarchar] (15) NULL ,
	[SendUserId] [int] NOT NULL ,
	[ReceiveUserId] [int] NOT NULL ,
	[ReceiveUserName] [nvarchar] (20) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[State] [int] NOT NULL DEFAULT(0),
	[ReadTime] [datetime] NOT NULL DEFAULT (getdate()),
	CONSTRAINT [PK_normal_user_message] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_favorite] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (150) NOT NULL DEFAULT (''),
	[ModuleType] [nvarchar] (20) NOT NULL DEFAULT (''),
	[ChannelId] [int] NOT NULL ,
	[ContentId] [int] NOT NULL ,
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[UserId] [int] NOT NULL ,
	CONSTRAINT [PK_normal_user_favorite] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_user_notice] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Content] [nvarchar] (250) NOT NULL DEFAULT (''),
	[NoticeType] [nvarchar] (16) NULL ,
	[UserId] [int] NOT NULL ,
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[State] [int] NOT NULL DEFAULT(0),
	[ReadTime] [datetime] NOT NULL DEFAULT (getdate()),
	CONSTRAINT [PK_normal_user_notice] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_usergroup] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupName] [nvarchar] (50) NOT NULL DEFAULT (''),
	[Setting] [nvarchar] (250) NOT NULL DEFAULT (''),
	[IsLogin] [int] NOT NULL DEFAULT(0),
	[UserTotal] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_usergroup] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_usergroup] (GroupName,Setting,IsLogin,UserTotal) Values('临时用户','1,1,1,0|23,1,10,10,1,0,1,1,5,1,1,5,1,1,5,',1,0);
INSERT INTO [dbo].[jcms_normal_usergroup] (GroupName,Setting,IsLogin,UserTotal) Values('初级用户','1,1,1,0|23,1,10,10,1,0,1,1,10,1,1,10,1,1,10,',1,0);
INSERT INTO [dbo].[jcms_normal_usergroup] (GroupName,Setting,IsLogin,UserTotal) Values('中级用户','1,1,1,0|23,1,10,10,1,0,1,1,50,1,1,50,1,1,50,',1,0);
INSERT INTO [dbo].[jcms_normal_usergroup] (GroupName,Setting,IsLogin,UserTotal) Values('高级用户','1,1,1,0|23,1,10,10,1,0,1,1,100,1,1,100,1,1,100,',1,0);
INSERT INTO [dbo].[jcms_normal_usergroup] (GroupName,Setting,IsLogin,UserTotal) Values('管理用户','1,1,1,0|23,1,10,10,1,0,1,1,100,1,1,100,1,1,100,',1,0);


---------2010-02-04
CREATE TABLE [dbo].[jcms_normal_email] (
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[NickName] [nvarchar] (20) NULL DEFAULT (''),
	[EmailAddress] [nvarchar] (80) NOT NULL DEFAULT (''),
	[State] [int] NOT NULL DEFAULT(0),
	[GroupId] [int] NOT NULL DEFAULT(0),
	[EzineId] [int] NOT NULL DEFAULT(0),
	[SignCode] [nvarchar] (64) NOT NULL DEFAULT (''),
        [SuccessTimes] [int] NOT NULL DEFAULT(0),
        [FailureTimes] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_email] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_emailserver] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[FromAddress] [varchar] (100) NOT NULL ,
	[FromName] [nvarchar] (30) NOT NULL DEFAULT (''),
	[FromPwd] [varchar] (32) NOT NULL DEFAULT (''),
	[SmtpHost] [varchar] (60) NOT NULL DEFAULT (''),
	[Enabled] [int] NOT NULL DEFAULT(1) ,
	CONSTRAINT [PK_normal_emailserver] PRIMARY KEY CLUSTERED
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_emailgroup] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[GroupName] [nvarchar] (50) NOT NULL DEFAULT (''),
	[EmailTotal] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_emailgroup] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO
INSERT INTO [dbo].[jcms_normal_emailgroup] (GroupName,EmailTotal) Values('临时用户',0);
INSERT INTO [dbo].[jcms_normal_emailgroup] (GroupName,EmailTotal) Values('初级用户',0);
INSERT INTO [dbo].[jcms_normal_emailgroup] (GroupName,EmailTotal) Values('中级用户',0);
INSERT INTO [dbo].[jcms_normal_emailgroup] (GroupName,EmailTotal) Values('高级用户',0);

---------2010-02-02
CREATE TABLE [dbo].[jcms_normal_ezine] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[PId] [int] NOT NULL DEFAULT(0),
	[Source] [nvarchar] (50) NOT NULL DEFAULT (''),
	[IsDefault] [int] DEFAULT(0) NOT NULL,
	CONSTRAINT [PK_normal_ezine] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY]
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_ezinecontent] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT (''),
	[SortId] [int] NOT NULL ,
	[eId] [int] NOT NULL ,
	[Content] [ntext] NOT NULL ,
	CONSTRAINT [PK_normal_ezinecontent] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_ezine_sort] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (30) NOT NULL DEFAULT (''),
	[PId] [int] NOT NULL DEFAULT(0),
	[Info] [nvarchar] (200) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_normal_ezine_sort] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [dbo].[jcms_normal_ezine_sort] (Title,pId,Info) values('本站动态',1,'');
INSERT INTO [dbo].[jcms_normal_ezine_sort] (Title,pId,Info) values('行业动态',2,'');

CREATE TABLE [dbo].[jcms_normal_emaillogs] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[AdminId] [int] NOT NULL ,
	[SendTitle] [nvarchar] (80) NOT NULL DEFAULT (''),
	[SendUsers] [ntext] NOT NULL DEFAULT (''),
	[SendTime] [datetime] NOT NULL DEFAULT (getdate()),
	[SendIP] [nvarchar] (15) NULL ,
	CONSTRAINT [PK_normal_emaillogs] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


--------2011-04-06新增
CREATE TABLE [dbo].[jcms_normal_adminpower] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (20) NOT NULL DEFAULT (''),
	[Code] [nvarchar] (30) NOT NULL DEFAULT (''),
	[PId] [int] NOT NULL DEFAULT(0),
	[Enabled] [int] NOT NULL DEFAULT(1),
	CONSTRAINT [PK_normal_adminpower] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('采集策略管理',1,'collect-mng')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('模块管理',2,'templateinclude-mng')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('专题管理',3,'special-mng')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('广告管理',4,'adv-mng')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('外站调用管理',5,'js-mng')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('数据备份管理',6,'data-backup')
INSERT INTO [jcms_normal_adminpower] ([Title],[PId],[Code]) VALUES ('数据恢复管理',7,'data-restore')



CREATE TABLE [dbo].[jcms_normal_templateinclude] (
	[Id] [int]  IDENTITY (1, 1)  NOT NULL,
	[Title] [nvarchar]  (100) NOT NULL DEFAULT (''),
	[Info] [nvarchar]  (200) NOT NULL DEFAULT (''),
	[PId] [int]  NOT NULL DEFAULT(0),
	[Sort] [int]  NOT NULL DEFAULT(0),
	[NeedBuild] [int]  NOT NULL DEFAULT(0),
	[Source] [nvarchar]  (100) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_normal_templateinclude] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [jcms_normal_templateinclude] (Title,PId,Sort,NeedBuild,Source) VALUES ('公用头部文件',1,1,1,'header.htm')
INSERT INTO [jcms_normal_templateinclude] (Title,PId,Sort,NeedBuild,Source) VALUES ('工具箱头部文件',1,1,1,'header2.htm')
INSERT INTO [jcms_normal_templateinclude] (Title,PId,Sort,NeedBuild,Source) VALUES ('公用尾部文件',1,2,1,'footer.htm')
INSERT INTO [jcms_normal_templateinclude] (Title,PId,Sort,NeedBuild,Source) VALUES ('公用尾部文件2',1,3,1,'footer2.htm')
INSERT INTO [jcms_normal_templateinclude] (Title,PId,Sort,NeedBuild,Source) VALUES ('便民工具箱导航',1,4,1,'tools_nav.htm')


CREATE TABLE [dbo].[jcms_normal_javascript] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL ,
	[Code] [nvarchar] (64) NOT NULL ,
	[TemplateContent] [ntext] NOT NULL DEFAULT (''),
	CONSTRAINT [PK_normal_javascript] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_normal_advclass] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (10) NOT NULL DEFAULT (''),
	[Code] [nvarchar] (10) NOT NULL DEFAULT (''),
	CONSTRAINT [PK_normal_advclass] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [dbo].[jcms_normal_advclass] (Title,Code) values('图片','img')
GO
INSERT INTO [dbo].[jcms_normal_advclass] (Title,Code) values('动画','flash')
GO
INSERT INTO [dbo].[jcms_normal_advclass] (Title,Code) values('植入网页','iframe')
GO
INSERT INTO [dbo].[jcms_normal_advclass] (Title,Code) values('嵌入代码','html')
GO


CREATE TABLE [dbo].[jcms_normal_adv] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT (''),
	[AddDate] [datetime] NOT NULL DEFAULT (getdate()),
	[Content] [ntext] NOT NULL DEFAULT ('') ,
	[State] [int] NOT NULL DEFAULT(0),
	[AdvType] [nvarchar] (10) NOT NULL DEFAULT (''),
	[Url] [nvarchar] (250) NOT NULL DEFAULT (''),
	[Picurl] [nvarchar] (250) NOT NULL DEFAULT (''),
	[Width] [int] NOT NULL DEFAULT(0),
	[Height] [int] NOT NULL DEFAULT(0),
	CONSTRAINT [PK_normal_adv] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO


INSERT INTO [jcms_normal_adv] (Title,AddDate,Content,State,AdvType,Url,Picurl,Width,Height) VALUES ('google468x60','2011-2-14 11:10:38','<script>
google_ad_client = "pub-6117841416763262";
google_ad_slot = "8858973439";
google_ad_width = 468;
google_ad_height = 60;
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>',1,'html','','',468,60)
GO

INSERT INTO [jcms_normal_adv] (Title,AddDate,Content,State,AdvType,Url,Picurl,Width,Height) VALUES ('google728x15','2011-2-14 11:10:38','<script>
google_ad_client = "pub-6117841416763262";
google_ad_slot = "0453230926";
google_ad_width = 728;
google_ad_height = 15;
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>',1,'html','','',728,15)
GO

INSERT INTO [jcms_normal_adv] (Title,AddDate,Content,State,AdvType,Url,Picurl,Width,Height) VALUES ('google468x15','2011-2-14 11:10:38','<script>
google_ad_client = "pub-6117841416763262";
google_ad_slot = "3976506009";
google_ad_width = 468;
google_ad_height = 15;
</script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>',1,'html','','',468,15)
GO

CREATE TABLE [dbo].[jcms_extends_digg] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ContentId] [int] NOT NULL DEFAULT(0) ,
	[ChannelType] [varchar] (10) NOT NULL DEFAULT ('') ,
	[DiggNum] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_digg] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_feedback] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ParentId] [int] NOT NULL DEFAULT(0) ,
	[AddDate] [datetime] NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT ('') ,
	[Content] [nvarchar] (250) NOT NULL DEFAULT ('') ,
	[IP] [varchar] (15) NOT NULL DEFAULT ('') ,
	[UserName] [nvarchar] (50) NOT NULL DEFAULT ('') ,
	[UserId] [int] NOT NULL DEFAULT(0) ,
	[ClassId] [int] NOT NULL DEFAULT(0) ,
	[IsPass] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_feedback] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_link] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (50) NOT NULL DEFAULT ('') ,
	[Url] [nvarchar] (150) NOT NULL DEFAULT ('') ,
	[ImgPath] [nvarchar] (150) NOT NULL DEFAULT ('') ,
	[Info] [nvarchar] (250) NOT NULL DEFAULT ('') ,
	[OrderNum] [int] NOT NULL DEFAULT(0) ,
	[State] [int] NOT NULL DEFAULT(0) ,
	[Style] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_link] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_placard] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (150) NOT NULL DEFAULT ('') ,
	[Content] [text] NOT NULL DEFAULT ('') ,
	[AddTime] [datetime] NULL ,
	[State] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_placard] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_review] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[ChannelId] [int] NOT NULL DEFAULT(0) ,
	[ParentId] [int] NOT NULL DEFAULT(0)  ,
	[ContentId] [int] NOT NULL DEFAULT(0) ,
	[AddDate] [datetime] NULL ,
	[Content] [nvarchar] (250) NOT NULL DEFAULT ('') ,
	[IP] [nvarchar] (15) NOT NULL DEFAULT ('') ,
	[UserName] [nvarchar] (50) NOT NULL DEFAULT ('') ,
	[IsPass] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_review] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_vote] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Title] [nvarchar] (100) NOT NULL DEFAULT ('') ,
	[VoteText] [text] NOT NULL DEFAULT ('') ,
	[VoteNum] [nvarchar] (50) NOT NULL DEFAULT ('') ,
	[VoteTotal] [int] NOT NULL DEFAULT(0) ,
	[Type] [int] NOT NULL DEFAULT(0) ,
	[Lock] [int] NOT NULL DEFAULT(0) ,
	CONSTRAINT [PK_extends_vote] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [dbo].[jcms_extends_qqonline] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[QQID] [nvarchar] (14) NOT NULL DEFAULT ('') ,
	[Title] [nvarchar] (10) NOT NULL DEFAULT ('') ,
	[TColor] [nvarchar] (8) NOT NULL DEFAULT ('') ,
	[Face] [nvarchar] (4) NOT NULL DEFAULT ('') ,
	[OrderNum] [int] NOT NULL DEFAULT(0) ,
	[State] [int] NOT NULL DEFAULT(0)
	CONSTRAINT [PK_extends_qqonline] PRIMARY KEY CLUSTERED 
	(
		[Id]
	) ON [PRIMARY] 
) ON [PRIMARY]
GO

INSERT INTO [jcms_extends_qqonline] ([QQID],[Title],[TColor],[Face],[OrderNum],[State]) VALUES ('4259024','售前咨询','#FF3300','1',3,1)
GO
INSERT INTO [jcms_extends_qqonline] ([QQID],[Title],[TColor],[Face],[OrderNum],[State]) VALUES ('112561265','售后支持','#111111','1',3,1)
GO