SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Message]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Message](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[title] [nvarchar](50) NULL,
	[remark] [nvarchar](2000) NULL,
	[addTime] [datetime] NULL CONSTRAINT [DF_Ws_Message_addTime]  DEFAULT (getdate()),
	[haveRead] [tinyint] NULL CONSTRAINT [DF_Ws_Message_haveRead]  DEFAULT ((0)),
	[fromUserID] [int] NULL,
	[fromUserName] [nvarchar](50) NULL,
	[toUserID] [int] NULL,
	[toUserName] [nvarchar](50) NULL,
 CONSTRAINT [PK_Ws_Message] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'title'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'title'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'haveRead'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已读' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'haveRead'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'fromUserID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'fromUserID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'fromUserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发送者帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'fromUserName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'toUserID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接受者ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'toUserID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Message', N'COLUMN',N'toUserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接受者帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Message', @level2type=N'COLUMN',@level2name=N'toUserName'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Link]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Link](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[linkText] [nvarchar](50) NULL,
	[linkClass] [tinyint] NULL,
	[LOGOURL] [nvarchar](255) NULL,
	[URL] [nvarchar](255) NULL,
	[addTime] [datetime] NULL,
	[orderId] [int] NULL,
 CONSTRAINT [PK_Ws_Link] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'连接编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'linkText'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接文本' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'linkText'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'linkClass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'linkClass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'LOGOURL'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'LOGO地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'LOGOURL'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'URL'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'URL'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Link', N'COLUMN',N'orderId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排列序号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Link', @level2type=N'COLUMN',@level2name=N'orderId'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Advertisement]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Advertisement](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[adClass] [tinyint] NULL,
	[adCode] [nvarchar](2000) NULL,
	[constName] [nvarchar](50) NULL,
 CONSTRAINT [PK_Ws_Advertisement] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Advertisement', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Advertisement', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Advertisement', N'COLUMN',N'adClass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Advertisement', @level2type=N'COLUMN',@level2name=N'adClass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Advertisement', N'COLUMN',N'adCode'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告代码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Advertisement', @level2type=N'COLUMN',@level2name=N'adCode'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Advertisement', N'COLUMN',N'constName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Advertisement', @level2type=N'COLUMN',@level2name=N'constName'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Admin]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Admin](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[loginName] [nvarchar](50) NULL,
	[password] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[chinaName] [nvarchar](50) NULL,
	[adminRight] [nvarchar](50) NULL,
 CONSTRAINT [PK_Ws_Admin] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'loginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'loginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'password'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'password'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'email'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电邮' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'chinaName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'chinaName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Admin', N'COLUMN',N'adminRight'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员权限' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Admin', @level2type=N'COLUMN',@level2name=N'adminRight'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_blockSet]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_blockSet](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[blockName] [varchar](50) NULL,
	[tableName] [varchar](50) NULL,
	[columnNames] [nvarchar](255) NOT NULL,
	[cssClass] [nvarchar](2000) NULL,
	[sortItem] [varchar](50) NULL,
	[m_where] [nvarchar](255) NULL,
	[itemCount] [int] NULL,
	[cacheTimeOut] [int] NULL CONSTRAINT [DF_Ws_blockSet_cacheTimeOut]  DEFAULT ((20)),
	[isStatic] [tinyint] NULL CONSTRAINT [DF_Ws_blockSet_isStatic]  DEFAULT ((0)),
 CONSTRAINT [PK_Ws_blockSet] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'设置编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'blockName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模块名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'blockName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'tableName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'表名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'tableName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'columnNames'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'字段列表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'columnNames'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'cssClass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'样式' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'cssClass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'sortItem'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序依据' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'sortItem'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'm_where'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'条件语句' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'm_where'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'itemCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'列表条数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'itemCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'cacheTimeOut'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'超时时间（分钟）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'cacheTimeOut'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_blockSet', N'COLUMN',N'isStatic'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否静态模块' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_blockSet', @level2type=N'COLUMN',@level2name=N'isStatic'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Collect]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Collect](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[rolename] [nvarchar](50) NULL,
	[addtime] [datetime] NULL,
	[remark] [ntext] NULL,
 CONSTRAINT [PK_Ws_Collect] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Collect', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'规则编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Collect', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Collect', N'COLUMN',N'rolename'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'规则名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Collect', @level2type=N'COLUMN',@level2name=N'rolename'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Collect', N'COLUMN',N'addtime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Collect', @level2type=N'COLUMN',@level2name=N'addtime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Collect', N'COLUMN',N'remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Collect', @level2type=N'COLUMN',@level2name=N'remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Group]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Group](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[groupName] [nvarchar](50) NULL,
	[favLimitCount] [int] NULL,
 CONSTRAINT [PK_Ws_Group] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Group', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'群组编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Group', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Group', N'COLUMN',N'groupName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'群组名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Group', @level2type=N'COLUMN',@level2name=N'groupName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Group', N'COLUMN',N'favLimitCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏夹数量限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Group', @level2type=N'COLUMN',@level2name=N'favLimitCount'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Log]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Log](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[logClass] [tinyint] NULL,
	[addtime] [datetime] NULL,
	[adderID] [int] NULL,
	[adderLoginName] [nvarchar](50) NULL,
	[IPAddress] [nvarchar](50) NULL,
	[remark] [nvarchar](2000) NULL,
 CONSTRAINT [PK_Ws_Log] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'logClass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志类别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'logClass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'addtime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'addtime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'adderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加者ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'adderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'adderLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加者帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'adderLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'IPAddress'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'IPAddress'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Log', N'COLUMN',N'remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Log', @level2type=N'COLUMN',@level2name=N'remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Reply]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Reply](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[softID] [int] NULL,
	[userID] [int] NULL,
	[userLoginName] [nvarchar](50) NULL,
	[IPAddress] [nvarchar](50) NULL,
	[addTime] [datetime] NULL,
	[replyContent] [nvarchar](1000) NULL,
	[rating] [int] NULL,
	[hasAud] [tinyint] NULL CONSTRAINT [DF_Ws_Reply_hasAud]  DEFAULT ((1)),
 CONSTRAINT [PK_Ws_Reply] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'softID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'softID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'userID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论者ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'userID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'userLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论者帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'userLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'IPAddress'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'IPAddress'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'replyContent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评论内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'replyContent'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'rating'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'打分分数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'rating'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Reply', N'COLUMN',N'hasAud'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'已经审核' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Reply', @level2type=N'COLUMN',@level2name=N'hasAud'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareClass]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_SoftwareClass](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[className] [nvarchar](50) NULL,
	[parentClassID] [int] NULL,
	[lastCountTime] [datetime] NULL CONSTRAINT [DF_Ws_SoftwareClass_lastCountTime]  DEFAULT (getdate()),
	[remark] [nvarchar](1000) NULL,
 CONSTRAINT [PK_Ws_SoftwareClass] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareClass', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareClass', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareClass', N'COLUMN',N'className'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareClass', @level2type=N'COLUMN',@level2name=N'className'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareClass', N'COLUMN',N'parentClassID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'父类别ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareClass', @level2type=N'COLUMN',@level2name=N'parentClassID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareClass', N'COLUMN',N'lastCountTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后统计时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareClass', @level2type=N'COLUMN',@level2name=N'lastCountTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareClass', N'COLUMN',N'remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareClass', @level2type=N'COLUMN',@level2name=N'remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareURL]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_SoftwareURL](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[serviceProvider] [tinyint] NULL,
	[softID] [int] NULL,
	[serverName] [nvarchar](50) NULL,
	[URL] [nvarchar](255) NULL,
 CONSTRAINT [PK_Ws_SoftwareURL] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareURL', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件地址ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareURL', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareURL', N'COLUMN',N'serviceProvider'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'服务商类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareURL', @level2type=N'COLUMN',@level2name=N'serviceProvider'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareURL', N'COLUMN',N'softID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareURL', @level2type=N'COLUMN',@level2name=N'softID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareURL', N'COLUMN',N'serverName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'服务器名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareURL', @level2type=N'COLUMN',@level2name=N'serverName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareURL', N'COLUMN',N'URL'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareURL', @level2type=N'COLUMN',@level2name=N'URL'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Software]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Software](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[softName] [nvarchar](50) NULL,
	[softClass] [int] NULL,
	[softClassName] [nvarchar](50) NULL,
	[addTime] [datetime] NULL,
	[adderID] [int] NULL,
	[adderLoginName] [nvarchar](50) NULL,
	[softLanguage] [nvarchar](50) NULL,
	[fileType] [nvarchar](50) NULL,
	[rightType] [nvarchar](50) NULL,
	[runTimeEnvironment] [nvarchar](50) NULL,
	[needPointCount] [int] NULL,
	[remark] [nvarchar](1000) NULL,
	[staticPageURL] [nvarchar](200) NULL,
	[firstChar] [nchar](10) NULL,
	[fileSize] [nvarchar](50) NULL,
	[softImage] [nvarchar](255) NULL,
	[officialWebsite] [nvarchar](255) NULL,
	[downCount] [int] NULL CONSTRAINT [DF_Ws_Software_downCount]  DEFAULT ((0)),
	[replyCount] [int] NULL CONSTRAINT [DF_Ws_Software_replyCount]  DEFAULT ((0)),
	[isAudit] [int] NULL,
	[softwareURL] [nvarchar](50) NULL,
	[softwareURLids] [nvarchar](200) NULL,
 CONSTRAINT [PK_Ws_Software] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softClass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softClass'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softClassName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类别名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softClassName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'adderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加者ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'adderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'adderLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加者帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'adderLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softLanguage'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件语言' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softLanguage'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'fileType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'fileType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'rightType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'授权类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'rightType'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'runTimeEnvironment'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'运行环境' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'runTimeEnvironment'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'needPointCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载所需点数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'needPointCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'remark'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'staticPageURL'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'静态页面地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'staticPageURL'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'firstChar'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'首字母' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'firstChar'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'fileSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件大小' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'fileSize'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softImage'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件图片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softImage'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'officialWebsite'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'官方网址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'officialWebsite'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'downCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'downCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'replyCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回复数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'replyCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'isAudit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'isAudit'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softwareURL'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件URL' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softwareURL'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Software', N'COLUMN',N'softwareURLids'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件URLid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Software', @level2type=N'COLUMN',@level2name=N'softwareURLids'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_UserDownRecord]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_UserDownRecord](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[addTime] [datetime] NULL,
	[userID] [int] NULL,
	[userLoginName] [nvarchar](50) NULL,
	[softwareID] [int] NULL,
	[softwareName] [nvarchar](50) NULL,
 CONSTRAINT [PK_Ws_UserDownRecord] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载记录编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'userID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'userID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'userLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'userLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'softwareID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'softwareID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserDownRecord', N'COLUMN',N'softwareName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserDownRecord', @level2type=N'COLUMN',@level2name=N'softwareName'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_UserFav]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_UserFav](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[addTime] [datetime] NULL,
	[userID] [int] NULL,
	[userLoginName] [nvarchar](50) NULL,
	[softwareName] [nvarchar](50) NULL,
	[softwareID] [int] NULL,
 CONSTRAINT [PK_Ws_UserFav] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏夹Id' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'addTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'addTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'userID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'userID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'userLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'userLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'softwareName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'softwareName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserFav', N'COLUMN',N'softwareID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserFav', @level2type=N'COLUMN',@level2name=N'softwareID'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_UserPayRecord]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_UserPayRecord](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[userID] [int] NULL,
	[userLoginName] [nvarchar](50) NULL,
	[payTime] [datetime] NULL,
	[amount] [decimal](18, 2) NULL,
 CONSTRAINT [PK_Ws_UserPayRecord] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserPayRecord', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户缴费编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserPayRecord', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserPayRecord', N'COLUMN',N'userID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserPayRecord', @level2type=N'COLUMN',@level2name=N'userID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserPayRecord', N'COLUMN',N'userLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserPayRecord', @level2type=N'COLUMN',@level2name=N'userLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserPayRecord', N'COLUMN',N'payTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'缴费时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserPayRecord', @level2type=N'COLUMN',@level2name=N'payTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_UserPayRecord', N'COLUMN',N'amount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'缴费金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_UserPayRecord', @level2type=N'COLUMN',@level2name=N'amount'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Vote]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_Vote](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[addtime] [datetime] NULL,
	[adderID] [int] NULL,
	[adderLoginName] [nvarchar](50) NULL,
	[voteTile] [nvarchar](50) NULL,
	[deadTime] [datetime] NULL,
	[remark] [nvarchar](2000) NULL,
 CONSTRAINT [PK_Ws_Vote] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'addtime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'addtime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'adderID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'添加者' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'adderID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'adderLoginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'adderLoginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'voteTile'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'voteTile'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'deadTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'结束时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'deadTime'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_Vote', N'COLUMN',N'remark'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'详细说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_Vote', @level2type=N'COLUMN',@level2name=N'remark'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_VoteItem]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_VoteItem](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[voteID] [int] NULL,
	[item] [nvarchar](100) NULL,
	[voteCount] [int] NULL,
	[votePersent] [int] NULL,
 CONSTRAINT [PK_Ws_VoteItem] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_VoteItem', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'选项编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_VoteItem', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_VoteItem', N'COLUMN',N'voteID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_VoteItem', @level2type=N'COLUMN',@level2name=N'voteID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_VoteItem', N'COLUMN',N'item'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票项' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_VoteItem', @level2type=N'COLUMN',@level2name=N'item'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_VoteItem', N'COLUMN',N'voteCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'投票数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_VoteItem', @level2type=N'COLUMN',@level2name=N'voteCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_VoteItem', N'COLUMN',N'votePersent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所占百分比' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_VoteItem', @level2type=N'COLUMN',@level2name=N'votePersent'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_User]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_User](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[loginName] [nvarchar](50) NULL,
	[password] [nvarchar](50) NULL,
	[email] [nvarchar](50) NULL,
	[chinaName] [nvarchar](50) NULL,
	[qqNum] [nvarchar](50) NULL,
	[msnNum] [nvarchar](50) NULL,
	[phone] [nvarchar](50) NULL,
	[mobilePhone] [nvarchar](50) NULL,
	[homePage] [nvarchar](255) NULL,
	[address] [nvarchar](255) NULL,
	[intro] [nvarchar](1000) NULL,
	[favCount] [int] NULL,
	[groupID] [int] NULL,
	[groupName] [nvarchar](50) NULL,
	[moneyCount] [money] NULL,
	[pointCount] [int] NULL,
	[userStatus] [tinyint] NULL CONSTRAINT [DF_Ws_User_userStatus]  DEFAULT ((0)),
	[question] [nvarchar](255) NULL,
	[answer] [nvarchar](255) NULL,
 CONSTRAINT [PK_Ws_User] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'loginName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'loginName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'password'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'password'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'email'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电邮' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'email'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'chinaName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'chinaName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'qqNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'qq号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'qqNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'msnNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'msn帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'msnNum'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'phone'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电话号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'phone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'mobilePhone'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'mobilePhone'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'homePage'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主页地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'homePage'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'address'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'address'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'intro'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'个人简介' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'intro'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'favCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'收藏夹数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'favCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'groupID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所在群组ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'groupID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'groupName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所在群组名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'groupName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'moneyCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'帐户余额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'moneyCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'pointCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'剩余点数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'pointCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'userStatus'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'userStatus'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'question'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码提示问题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'question'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_User', N'COLUMN',N'answer'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'密码提示答案' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_User', @level2type=N'COLUMN',@level2name=N'answer'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_blockSet_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_blockSet_Insert]
(
@blockName varchar(25),
@tableName varchar(25),
@columnNames nvarchar(255),
@cssClass nvarchar(2000),
@sortItem varchar(25),
@m_where nvarchar(255),
@itemCount int,
@cacheTimeOut int,
@isStatic tinyint
)
 AS
Declare @id int
INSERT INTO Ws_blockSet(blockName,tableName,columnNames,cssClass,sortItem,m_where,itemCount,cacheTimeOut,isStatic)
Values(@blockName,@tableName,@columnNames,@cssClass,@sortItem,@m_where,@itemCount,@cacheTimeOut,@isStatic)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_blockSet_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_blockSet_Update]
(
@id int,
@blockName varchar(25),
@tableName varchar(25),
@columnNames nvarchar(255),
@cssClass nvarchar(2000),
@sortItem varchar(25),
@m_where nvarchar(255),
@itemCount int,
@cacheTimeOut int,
@isStatic tinyint
)
 AS
Update Ws_blockSet SET blockName=@blockName,tableName=@tableName,columnNames=@columnNames,cssClass=@cssClass,sortItem=@sortItem,m_where=@m_where,itemCount=@itemCount,cacheTimeOut=@cacheTimeOut,isStatic=@isStatic where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareCount]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Ws_SoftwareCount](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[softName] [nvarchar](50) NULL,
	[SoftWareID] [int] NULL,
	[downCount] [int] NULL,
	[downYearCount] [int] NULL,
	[downMonthCount] [int] NULL,
	[downWeekCount] [int] NULL,
	[downDayCount] [int] NULL,
	[recommendCount] [int] NULL,
	[lastCountTime] [datetime] NULL,
 CONSTRAINT [PK_Ws_SoftWareCount] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (PAD_INDEX  = OFF, IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
END
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'id'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'自动编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'id'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'softName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'softName'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'SoftWareID'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'软件编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'SoftWareID'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'downCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载统计' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'downCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'downYearCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'年下载数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'downYearCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'downMonthCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月下载数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'downMonthCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'downWeekCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'周下载数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'downWeekCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'downDayCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日下载数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'downDayCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'recommendCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'推荐次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'recommendCount'
GO
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Ws_SoftwareCount', N'COLUMN',N'lastCountTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最后统计时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Ws_SoftwareCount', @level2type=N'COLUMN',@level2name=N'lastCountTime'
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Link_Delete]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Link_Delete]
(
@id int
)
 AS
Delete From Ws_Link  where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Link_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Link_Update]
(
@id int,
@linkText nvarchar(50),
@linkClass tinyint,
@LOGOURL nvarchar(255),
@URL nvarchar(255),
@addTime datetime,
@orderId int
)
 AS
Update Ws_Link SET linkText=@linkText,linkClass=@linkClass,LOGOURL=@LOGOURL,URL=@URL,addTime=@addTime,orderId=@orderId where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Link_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Link_Insert]
(
@linkText nvarchar(50),
@linkClass tinyint,
@LOGOURL nvarchar(255),
@URL nvarchar(255),
@addTime datetime,
@orderId int
)
 AS
Declare @id int
INSERT INTO Ws_Link(linkText,linkClass,LOGOURL,URL,addTime,orderId)
Values(@linkText,@linkClass,@LOGOURL,@URL,@addTime,@orderId)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Advertisement_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'CREATE Procedure [dbo].[Ws_Advertisement_Insert]
(
@adClass tinyint,
@adCode nvarchar(2000),
@constName nvarchar(50)
)
 AS
Declare @id int
INSERT INTO Ws_Advertisement(adClass,adCode,constName)
Values(@adClass,@adCode,@constName)
SELECT @@IDENTITY
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Advertisement_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Advertisement_Update]
(
@id int,
@adClass tinyint,
@adCode nvarchar(2000),
@constName nvarchar(50)
)
 AS
Update Ws_Advertisement SET adClass=@adClass,adCode=@adCode,constName=@constName where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Admin_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Admin_Insert]
(
@loginName nvarchar(50),
@password nvarchar(50),
@email nvarchar(50),
@chinaName nvarchar(50),
@adminRight nvarchar(50)
)
 AS
Declare @id int
INSERT INTO Ws_Admin(loginName,password,email,chinaName,adminRight)
Values(@loginName,@password,@email,@chinaName,@adminRight)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Admin_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Admin_Update]
(
@id int,
@loginName nvarchar(50),
@password nvarchar(50),
@email nvarchar(50),
@chinaName nvarchar(50),
@adminRight nvarchar(50)
)
 AS
Update Ws_Admin SET loginName=@loginName,password=@password,email=@email,chinaName=@chinaName,adminRight=@adminRight where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Collect_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Collect_Insert]
(
@rolename nvarchar(50),
@addtime datetime,
@remark ntext
)
 AS
Declare @id int
INSERT INTO Ws_Collect(rolename,addtime,remark)
Values(@rolename,@addtime,@remark)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Collect_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Collect_Update]
(
@id int,
@rolename nvarchar(50),
@addtime datetime,
@remark ntext
)
 AS
Update Ws_Collect SET rolename=@rolename,addtime=@addtime,remark=@remark where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Group_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Group_Insert]
(
@groupName nvarchar(50),
@favLimitCount int
)
 AS
Declare @id int
INSERT INTO Ws_Group(groupName,favLimitCount)
Values(@groupName,@favLimitCount)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Group_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Group_Update]
(
@id int,
@groupName nvarchar(50),
@favLimitCount int
)
 AS
Update Ws_Group SET groupName=@groupName,favLimitCount=@favLimitCount where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Log_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Log_Insert]
(
@logClass tinyint,
@addtime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@IPAddress nvarchar(50),
@remark nvarchar(2000)
)
 AS
Declare @id int
INSERT INTO Ws_Log(logClass,addtime,adderID,adderLoginName,IPAddress,remark)
Values(@logClass,@addtime,@adderID,@adderLoginName,@IPAddress,@remark)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Log_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Log_Update]
(
@id int,
@logClass tinyint,
@addtime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@IPAddress nvarchar(50),
@remark nvarchar(2000)
)
 AS
Update Ws_Log SET logClass=@logClass,addtime=@addtime,adderID=@adderID,adderLoginName=@adderLoginName,IPAddress=@IPAddress,remark=@remark where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Reply_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Reply_Insert]
(
@softID int,
@userID int,
@userLoginName nvarchar(50),
@IPAddress nvarchar(50),
@addTime datetime,
@replyContent nvarchar(1000),
@rating int,
@hasAud tinyint
)
 AS
Declare @id int
INSERT INTO Ws_Reply(softID,userID,userLoginName,IPAddress,addTime,replyContent,rating,hasAud)
Values(@softID,@userID,@userLoginName,@IPAddress,@addTime,@replyContent,@rating,@hasAud)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Reply_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Reply_Update]
(
@id int,
@softID int,
@userID int,
@userLoginName nvarchar(50),
@IPAddress nvarchar(50),
@addTime datetime,
@replyContent nvarchar(1000),
@rating int,
@hasAud tinyint
)
 AS
Update Ws_Reply SET softID=@softID,userID=@userID,userLoginName=@userLoginName,IPAddress=@IPAddress,addTime=@addTime,replyContent=@replyContent,rating=@rating,hasAud=@hasAud where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareClass_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'





CREATE Procedure [dbo].[Ws_SoftwareClass_Insert]
(
@className nvarchar(50),
@parentClassID int,
@lastCountTime datetime,
@remark nvarchar(1000)
)
 AS
Declare @id int
INSERT INTO Ws_SoftwareClass(className,parentClassID,lastCountTime,remark)
Values(@className,@parentClassID,@lastCountTime,@remark)
select @@IDENTITY




' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareURL_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_SoftwareURL_Insert]
(
@serviceProvider tinyint,
@softID int,
@serverName nvarchar(50),
@URL nvarchar(255)
)
 AS
Declare @id int
INSERT INTO Ws_SoftwareURL(serviceProvider,softID,serverName,URL)
Values(@serviceProvider,@softID,@serverName,@URL)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareURL_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_SoftwareURL_Update]
(
@id int,
@serviceProvider tinyint,
@softID int,
@serverName nvarchar(50),
@URL nvarchar(255)
)
 AS
Update Ws_SoftwareURL SET serviceProvider=@serviceProvider,softID=@softID,serverName=@serverName,URL=@URL where id= @id' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Software_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'

CREATE Procedure [dbo].[Ws_Software_Insert]
(
@softName nvarchar(50),
@softClass int,
@softClassName nvarchar(50),
@addTime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@softLanguage nvarchar(50),
@fileType nvarchar(50),
@rightType nvarchar(50),
@runTimeEnvironment nvarchar(50),
@needPointCount int,
@remark nvarchar(1000),
@staticPageURL nvarchar(200),
@firstChar nchar(10),
@fileSize nvarchar(50),
@softImage nvarchar(255),
@officialWebsite nvarchar(255),
@downCount int,
@replyCount int,
@isAudit int,
@softwareURL nvarchar(50),
@softwareURLids nvarchar(200)
)
 AS
Declare @id int
INSERT INTO Ws_Software(softName,softClass,softClassName,addTime,adderID,adderLoginName,softLanguage,fileType,rightType,runTimeEnvironment,needPointCount,remark,staticPageURL,firstChar,fileSize,softImage,officialWebsite,downCount,replyCount,isAudit,softwareURL,softwareURLids)
Values(@softName,@softClass,@softClassName,@addTime,@adderID,@adderLoginName,@softLanguage,@fileType,@rightType,@runTimeEnvironment,@needPointCount,@remark,@staticPageURL,@firstChar,@fileSize,@softImage,@officialWebsite,@downCount,@replyCount,@isAudit,@softwareURL,@softwareURLids)
SELECT @@IDENTITY

' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Software_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE Procedure [dbo].[Ws_Software_Update]
(
@id int,
@softName nvarchar(50),
@softClass int,
@softClassName nvarchar(50),
@addTime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@softLanguage nvarchar(50),
@fileType nvarchar(50),
@rightType nvarchar(50),
@runTimeEnvironment nvarchar(50),
@needPointCount int,
@remark nvarchar(1000),
@staticPageURL nvarchar(200),
@firstChar nchar(10),
@fileSize nvarchar(50),
@softImage nvarchar(255),
@officialWebsite nvarchar(255),
@downCount int,
@replyCount int,
@isAudit int,
@softwareURL nvarchar(50),
@softwareURLids nvarchar(200)
)
 AS
Update Ws_Software SET softName=@softName,softClass=@softClass,softClassName=@softClassName,addTime=@addTime,adderID=@adderID,adderLoginName=@adderLoginName,softLanguage=@softLanguage,fileType=@fileType,rightType=@rightType,runTimeEnvironment=@runTimeEnvironment,needPointCount=@needPointCount,remark=@remark,staticPageURL=@staticPageURL,firstChar=@firstChar,fileSize=@fileSize,softImage=@softImage,officialWebsite=@officialWebsite,downCount=@downCount,replyCount=@replyCount,isAudit=@isAudit,softwareURL=@softwareURL,softwareURLids=@softwareURLids where id= @id


' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Vote_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Vote_Insert]
(
@addtime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@voteTile nvarchar(50),
@deadTime datetime,
@remark nvarchar(2000)
)
 AS
Declare @id int
INSERT INTO Ws_Vote(addtime,adderID,adderLoginName,voteTile,deadTime,remark)
Values(@addtime,@adderID,@adderLoginName,@voteTile,@deadTime,@remark)
SELECT @id = SCOPE_IDENTITY()
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_Vote_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_Vote_Update]
(
@id int,
@addtime datetime,
@adderID int,
@adderLoginName nvarchar(50),
@voteTile nvarchar(50),
@deadTime datetime,
@remark nvarchar(2000)
)
 AS
Update Ws_Vote SET addtime=@addtime,adderID=@adderID,adderLoginName=@adderLoginName,voteTile=@voteTile,deadTime=@deadTime,remark=@remark where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_User_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_User_Insert]
(
@loginName nvarchar(50),
@password nvarchar(50),
@email nvarchar(50),
@chinaName nvarchar(50),
@qqNum nvarchar(50),
@msnNum nvarchar(50),
@phone nvarchar(50),
@mobilePhone nvarchar(50),
@homePage nvarchar(255),
@address nvarchar(255),
@intro nvarchar(1000),
@favCount int,
@groupID int,
@groupName nvarchar(50),
@moneyCount money,
@pointCount int,
@userStatus tinyint,
@question nvarchar(255),
@answer nvarchar(255)
)
 AS
Declare @id int
INSERT INTO Ws_User(loginName,password,email,chinaName,qqNum,msnNum,phone,mobilePhone,homePage,address,intro,favCount,groupID,groupName,moneyCount,pointCount,userStatus,question,answer)
Values(@loginName,@password,@email,@chinaName,@qqNum,@msnNum,@phone,@mobilePhone,@homePage,@address,@intro,@favCount,@groupID,@groupName,@moneyCount,@pointCount,@userStatus,@question,@answer)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_User_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_User_Update]
(
@id int,
@loginName nvarchar(50),
@password nvarchar(50),
@email nvarchar(50),
@chinaName nvarchar(50),
@qqNum nvarchar(50),
@msnNum nvarchar(50),
@phone nvarchar(50),
@mobilePhone nvarchar(50),
@homePage nvarchar(255),
@address nvarchar(255),
@intro nvarchar(1000),
@favCount int,
@groupID int,
@groupName nvarchar(50),
@moneyCount money,
@pointCount int,
@userStatus tinyint,
@question nvarchar(255),
@answer nvarchar(255)
)
 AS
Update Ws_User SET loginName=@loginName,password=@password,email=@email,chinaName=@chinaName,qqNum=@qqNum,msnNum=@msnNum,phone=@phone,mobilePhone=@mobilePhone,homePage=@homePage,address=@address,intro=@intro,favCount=@favCount,groupID=@groupID,groupName=@groupName,moneyCount=@moneyCount,pointCount=@pointCount,userStatus=@userStatus,question=@question,answer=@answer where id= @id
' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareCount_Insert]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'Create Procedure [dbo].[Ws_SoftwareCount_Insert]
(
@softName nvarchar(50),
@SoftWareID int,
@downCount int,
@downYearCount int,
@downMonthCount int,
@downWeekCount int,
@downDayCount int,
@recommendCount int,
@lastCountTime datetime
)
 AS
Declare @id int
INSERT INTO Ws_SoftwareCount(softName,SoftWareID,downCount,downYearCount,downMonthCount,downWeekCount,downDayCount,recommendCount,lastCountTime)
Values(@softName,@SoftWareID,@downCount,@downYearCount,@downMonthCount,@downWeekCount,@downDayCount,@recommendCount,@lastCountTime)
SELECT @id = SCOPE_IDENTITY()' 
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Ws_SoftwareCount_Update]') AND type in (N'P', N'PC'))
BEGIN
EXEC dbo.sp_executesql @statement = N'
CREATE Procedure [dbo].[Ws_SoftwareCount_Update]
(
@id int,
@softName nvarchar(50),
@downCount int,
@downYearCount int,
@downMonthCount int,
@downWeekCount int,
@downDayCount int,
@recommendCount int,
@lastCountTime datetime
)
 AS
Update Ws_SoftwareCount SET softName=@softName,downCount=@downCount,downYearCount=@downYearCount,downMonthCount=@downMonthCount,downWeekCount=@downWeekCount,downDayCount=@downDayCount,recommendCount=@recommendCount,lastCountTime=@lastCountTime where id= @id

' 
END

INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 1,'广告','AD1')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','首页顶部广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advNor.jpg" width="510" height="80" alt="" /></div>','首页右侧广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','首页底部广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advSmall.jpg" width="302" height="108" alt="" /></div>','首页左侧广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','软件页顶部广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','软件页底部广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','软件页面底部广告')
INSERT [Ws_Advertisement] ([adClass],[adCode],[constName]) VALUES ( 0,'<div class="bannerAdv"><img name="" src="../images/advBig.jpg" width="820" height="100" alt="" /></div>','软件页底部广告')

INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ('newupdate','Ws_Software','id,softName,softClass,softClassName,addTime','<div class="item_box">
<h2>最新更新</h2>
<ul id="topList" class="list">
{$for}
<li><span>{$添加时间}</span><a href="/{$类别ID}/index.[网页扩展名]">[{$类别名}]</a><a href="soft{$软件编号}.[网页扩展名]" class="softTitle">{$软件名}</a></li>
{$endfor}
</ul></div>','addTime,desc',11,30,0)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[m_where],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'praise','Ws_Software','id,softName,remark,softImage','<ul class="block list">
{$for}
<li>
              <p><a href="soft{$软件编号}.aspx"><img src="{$软件图片}" /></a><a href="soft{$软件编号}.aspx">{$软件名}</a><br />
              {$说明}</p>
              <div class="line"></div></li>
{$endfor}</ul>',0,0,1)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'historyDownload','Ws_SoftwareCount','softName,SoftWareID','<div class="box float_l">
<h2>历史下载排行</h2>
<ul id="" class="">
{$for}
<li><span><a href="soft{$软件编号}.[网页扩展名]">{$软件名称}</a></span></li>
{$endfor}
</ul></div>','downCount,desc',10,10,0)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'DayDownload','Ws_SoftwareCount','softName,SoftWareID','<div class="box float_r">
<h2>本日下载排行</h2>
<ul id="" class="">
{$for}
<li><span><a href="soft{$软件编号}.[网页扩展名]">{$软件名称}</a></span></li>
{$endfor}
</ul></div>','downDayCount,desc',10,10,0)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'WeekDownload','Ws_SoftwareCount','softName,SoftWareID','<div class="box float_r">
<h2>本周下载排行</h2>
<ul id="" class="">
{$for}
<li><span><a href="soft{$软件编号}.[网页扩展名]">{$软件名称}</a></span></li>
{$endfor}
</ul></div>','downWeekCount,asc',10,10,0)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'MonthDownload','Ws_SoftwareCount','softName,SoftWareID','<div class="box float_r">
<h2>本月下载排行</h2>
<ul id="" class="">
{$for}
<li><span><a href="soft{$软件编号}.[网页扩展名]">{$软件名称}</a></span></li>
{$endfor}
</ul></div>','downMonthCount,desc',10,10,0)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[m_where],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'hotdownload','Ws_Software','id,softName,remark,softImage','<ul class="list">
{$for}
<li>
              <p><a href="soft{$软件编号}.aspx"><img src="{$软件图片}" /></a><a href="soft{$软件编号}.aspx">{$软件名}</a><br />
              {$说明}</p>
              <div class="line"></div></li>
{$endfor}</ul>',0,0,1)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[m_where],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'Computer','Ws_Software','id,softName,remark,softImage','<ul class="list">
{$for}
<li>
              <p><a href="soft{$软件编号}.aspx"><img src="{$软件图片}" /></a><a href="soft{$软件编号}.[网页扩展名]">{$软件名}</a><br />
              {$说明}</p>
              <div class="line"></div></li>
{$endfor}</ul>',0,0,1)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[m_where],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'good','Ws_Software','id,softName,remark,softImage','<ul class="list">
{$for}
<li>
              <p><a href="soft{$软件编号}.aspx"><img src="{$软件图片}" /></a><a href="soft{$软件编号}.[网页扩展名]">{$软件名}</a><br />
              {$说明}</p>
              <div class="line"></div></li>
{$endfor}</ul>',0,0,1)
INSERT [Ws_blockSet] ([blockName],[tableName],[columnNames],[cssClass],[sortItem],[itemCount],[cacheTimeOut],[isStatic]) VALUES ( 'XiangGuan','Ws_Software','id,softName','<div class="box">
<h2>相关软件</h2>
<ul>
{$for}
<li><span><a href="/Soft{$软件编号}.[网页扩展名]">{$软件名}</a></span></li>
{$endfor}
</ul>
</div>','id,desc',10,30,0)

INSERT [Ws_Group] ( [groupName] , [favLimitCount] ) VALUES ( '默认用户组' , 0 )
INSERT [Ws_Link] ([linkText],[linkClass],[URL],[addTime],[orderId]) VALUES ( '奇文软件',0,'http://www.wanersoft.com/','2009-12-1 11:52:10',1)
INSERT [Ws_Admin] ([loginName],[password],[email],[chinaName],[adminRight]) VALUES ( 'admin','21232f297a57a5a743894a0e4a801fc3','wanernet@yahoo.com.cn','奇文管理员','1')
INSERT [Ws_Collect] ([rolename],[addtime],[remark]) VALUES ( 'skycn','2009-12-24 23:59:42','天空采集规则')

