create database HaTeam_Dd
go
USE [HaTeam_Dd]
GO
/****** Object:  Table [dbo].[Dd_Music]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dd_Music](
	[Music_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Music_Address] [nvarchar](1000) NULL,
	[Music_Description] [nvarchar](1000) NULL,
	[Music_Tag] [varchar](100) NULL,
	[Music_OriginId] [int] NULL,
	[Music_PublishMode] [int] NULL,
	[Music_PutTop] [bit] NULL,
	[Music_Fever] [int] NULL,
	[Music_Guid] [nchar](36) NULL,
	[Music_Datetime] [datetime] NULL,
	[Music_UpDatetime] [datetime] NULL,
	[Music_Verify] [int] NULL,
	[Music_Lock] [int] NULL,
	[Music_State] [int] NULL,
	[Music_Delete] [int] NULL,
	[Music_Count] [int] NULL,
	[Music_Order] [int] NULL,
	[Music_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Music__2BBE9FD11B0907CE] PRIMARY KEY CLUSTERED 
(
	[Music_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐的唯一标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐的拥有者用户ID作外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Address'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐的描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'音乐标签' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Tag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布状态1立即发布2保存在草稿3加入到自动发布列表4紧自己可见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_PublishMode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否置顶默认置顶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_PutTop'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热度即浏览量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Fever'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Music', @level2type=N'COLUMN',@level2name=N'Music_Remark'
GO
/****** Object:  Table [dbo].[Dd_Link]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dd_Link](
	[Link_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Link_Title] [nvarchar](30) NULL,
	[Link_Address] [nvarchar](100) NULL,
	[Link_Description] [nvarchar](1000) NULL,
	[Link_Tag] [varchar](100) NULL,
	[Link_OriginId] [int] NULL,
	[Link_PublishMode] [int] NULL,
	[Link_PutTop] [bit] NULL,
	[Link_Fever] [int] NULL,
	[Link_Guid] [nchar](36) NULL,
	[Link_Datetime] [datetime] NULL,
	[Link_UpDatetime] [datetime] NULL,
	[Link_Verify] [int] NULL,
	[Link_Lock] [int] NULL,
	[Link_State] [int] NULL,
	[Link_Delete] [int] NULL,
	[Link_Count] [int] NULL,
	[Link_Order] [int] NULL,
	[Link_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Link__6C34E1F51FCDBCEB] PRIMARY KEY CLUSTERED 
(
	[Link_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接的唯一标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接的拥有者用户ID作外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接的标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Address'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接的描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'链接标签' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Tag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布状态1立即发布2保存在草稿3加入到自动发布列表4紧自己可见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_PublishMode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否置顶默认置顶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_PutTop'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热度即浏览量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Fever'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Link', @level2type=N'COLUMN',@level2name=N'Link_Remark'
GO
/****** Object:  Table [dbo].[Dd_Like]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Like](
	[Like_ID] [int] IDENTITY(1,1) NOT NULL,
	[Like_TypeID] [int] NOT NULL,
	[Like_ArticleID] [int] NOT NULL,
	[Like_UserID] [int] NOT NULL,
	[Like_Guid] [nchar](36) NULL,
	[Like_Datetime] [datetime] NULL,
	[Like_UpDatetime] [datetime] NULL,
	[Like_Verify] [int] NULL,
	[Like_Lock] [int] NULL,
	[Like_State] [int] NULL,
	[Like_Delete] [int] NULL,
	[Like_Count] [int] NULL,
	[Like_Order] [int] NULL,
	[Like_Remark] [ntext] NULL,
PRIMARY KEY CLUSTERED 
(
	[Like_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'喜欢的类型0文章1、图片2、音乐3、链接4、视频' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Like', @level2type=N'COLUMN',@level2name=N'Like_TypeID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'喜欢类型的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Like', @level2type=N'COLUMN',@level2name=N'Like_ArticleID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'喜欢的用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Like', @level2type=N'COLUMN',@level2name=N'Like_UserID'
GO
/****** Object:  Table [dbo].[Dd_Attention]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Attention](
	[Attention_ID] [int] IDENTITY(1,1) NOT NULL,
	[Attention_UerID] [int] NULL,
	[Attented_By_user] [int] NULL,
	[Attention_BlackList] [int] NULL,
	[Attention_Guid] [nchar](1) NULL,
	[Attention_Datetime] [datetime] NULL,
	[Attention_UpDatetime] [datetime] NULL,
	[Attention_Verify] [int] NULL,
	[Attention_Lock] [int] NULL,
	[Attention_State] [int] NULL,
	[Attention_Delete] [int] NULL,
	[Attention_Count] [int] NULL,
	[Attention_Order] [int] NULL,
	[Attention_Remark] [ntext] NULL,
PRIMARY KEY CLUSTERED 
(
	[Attention_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'本博客的主人的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_UerID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'本博客主人所关注的人的ＩＤ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attented_By_user'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'黑名单' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_BlackList'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Attention', @level2type=N'COLUMN',@level2name=N'Attention_Remark'
GO
/****** Object:  Table [dbo].[Dd_Admin]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Admin](
	[Admin_ID] [int] IDENTITY(1,1) NOT NULL,
	[Admin_Name] [nvarchar](50) NULL,
	[Admin_Pwd] [nvarchar](50) NULL,
	[Admin_Guid] [nchar](36) NULL,
	[Admin_Datetime] [datetime] NULL,
	[Admin_UpDatetime] [datetime] NULL,
	[Admin_Verify] [int] NULL,
	[Admin_Lock] [int] NULL,
	[Admin_State] [int] NULL,
	[Admin_Delete] [int] NULL,
	[Admin_Count] [int] NULL,
	[Admin_Order] [int] NULL,
	[Admin_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Admin__4A30011733D4B598] PRIMARY KEY CLUSTERED 
(
	[Admin_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理员编号，后台管理员表，创建人：***' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登录密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Pwd'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Admin', @level2type=N'COLUMN',@level2name=N'Admin_Remark'
GO
/****** Object:  StoredProcedure [dbo].[UP_GetRecordByPage]    Script Date: 12/28/2011 13:56:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create  PROCEDURE [dbo].[UP_GetRecordByPage]
@tblName varchar(255), -- 表名
@fldName varchar(255), -- 主键字段名
@PageSize int , -- 页尺寸
@PageIndex int , -- 页码
@IsReCount bit, -- 返回记录总数, 非 0 值则返回
@OrderType bit, -- 设置排序类型, 非 0 值则降序
@strWhere varchar(1000) = '' -- 查询条件 (注意: 不要加 where)
AS
declare @strSQL varchar(6000) -- 主语句
declare @strTmp varchar(2000) -- 临时变量(查询条件过长时可能会出错，可修改100为1000)
declare @strOrder varchar(400) -- 排序类型
if @OrderType != 0
begin
set @strTmp = '<(select min'
set @strOrder = ' order by [' + @fldName +'] desc'
end
else
begin
set @strTmp = '>(select max'
set @strOrder = ' order by [' + @fldName +'] asc'
end
set @strSQL = 'select top ' + str(@PageSize) + ' * from ['
+ @tblName + '] where [' + @fldName + ']' + @strTmp + '(['
+ @fldName + ']) from (select top ' + str((@PageIndex-1)*@PageSize) + ' ['
+ @fldName + '] from [' + @tblName + ']' + @strOrder + ') as tblTmp)'
+ @strOrder
if @strWhere != ''
set @strSQL = 'select top ' + str(@PageSize) + ' * from ['
+ @tblName + '] where [' + @fldName + ']' + @strTmp + '(['
+ @fldName + ']) from (select top ' + str((@PageIndex-1)*@PageSize) + ' ['
+ @fldName + '] from [' + @tblName + '] where ' + @strWhere + ' '
+ @strOrder + ') as tblTmp) and ' + @strWhere + ' ' + @strOrder
if @PageIndex = 1
begin
set @strTmp =''
if @strWhere != ''
set @strTmp = ' where ' + @strWhere
set @strSQL = 'select top ' + str(@PageSize) + ' * from ['
+ @tblName + ']' + @strTmp + ' ' + @strOrder
end
if @IsReCount != 0
set @strSQL = 'select count(*) as Total from [' + @tblName + ']'+' where ' + @strWhere
exec (@strSQL)
GO
/****** Object:  Table [dbo].[Dd_Video]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dd_Video](
	[Video_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Video_Address] [nvarchar](100) NULL,
	[Video_Radiourl] [nvarchar](100) NULL,
	[Video_Imageurl] [nvarchar](150) NULL,
	[Video_Description] [nvarchar](1000) NULL,
	[Video_Tag] [varchar](100) NULL,
	[Video_OriginId] [int] NULL,
	[Video_PublishMode] [int] NULL,
	[Video_PutTop] [bit] NULL,
	[Video_Fever] [int] NULL,
	[Video_Guid] [nchar](36) NULL,
	[Video_Datetime] [datetime] NULL,
	[Video_UpDatetime] [datetime] NULL,
	[Video_Verify] [int] NULL,
	[Video_Lock] [int] NULL,
	[Video_State] [int] NULL,
	[Video_Delete] [int] NULL,
	[Video_Count] [int] NULL,
	[Video_Order] [int] NULL,
	[Video_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Video__D8F765E924927208] PRIMARY KEY CLUSTERED 
(
	[Video_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频的唯一标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频的拥有者用户ID作外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频链接地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Address'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频播放地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Radiourl'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频预览地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Imageurl'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频的描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Description'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'视频标签' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Tag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布状态1立即发布2保存在草稿3加入到自动发布列表4紧自己可见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_PublishMode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否置顶默认置顶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_PutTop'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热度即浏览量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Fever'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型视频（默认4）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型视频（4）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Video', @level2type=N'COLUMN',@level2name=N'Video_Remark'
GO
/****** Object:  Table [dbo].[Dd_User]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_User](
	[User_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_BlogName] [nvarchar](50) NULL,
	[User_Email] [nvarchar](50) NULL,
	[User_OriginPsw] [nvarchar](50) NULL,
	[User_Passwd] [nvarchar](50) NULL,
	[User_Attetion] [nvarchar](1000) NULL,
	[User_ActivCondition] [int] NOT NULL,
	[User_HeadPhoto] [nvarchar](100) NULL,
	[User_isSet] [int] NULL,
	[User_BlackList] [nvarchar](1000) NULL,
	[User_LikeArticle] [nvarchar](1000) NULL,
	[User_Guid] [nchar](36) NULL,
	[User_Datetime] [datetime] NULL,
	[User_UpDatetime] [datetime] NULL,
	[User_Verify] [int] NULL,
	[User_Lock] [int] NULL,
	[User_State] [int] NULL,
	[User_Delete] [int] NULL,
	[User_Count] [int] NULL,
	[User_Order] [int] NULL,
	[User_Remark] [ntext] NULL,
 CONSTRAINT [PK_Dd_User] PRIMARY KEY CLUSTERED 
(
	[User_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户的唯一标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户blog名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_BlogName'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户的注册邮箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Email'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户的密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Passwd'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户关注对象存放User_Guid逗号隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Attetion'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户激活状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_ActivCondition'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户头像路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_HeadPhoto'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存放用户拉黑的用户User_Guid逗号隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_BlackList'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'存放用户喜欢的文章|文章类型，文章ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_LikeArticle'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_User', @level2type=N'COLUMN',@level2name=N'User_Remark'
GO
/****** Object:  Table [dbo].[Dd_Text]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Text](
	[Text_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Text_Title] [nvarchar](50) NULL,
	[Text_Content] [nvarchar](4000) NULL,
	[Text_Tag] [nvarchar](100) NULL,
	[Text_OriginId] [int] NULL,
	[Text_PublishMode] [int] NULL,
	[Text_PutTop] [bit] NULL,
	[Text_Fever] [int] NULL,
	[Text_Guid] [nchar](36) NULL,
	[Text_Datetime] [datetime] NULL,
	[Text_UpDatetime] [datetime] NULL,
	[Text_Verify] [int] NULL,
	[Text_Lock] [int] NULL,
	[Text_State] [int] NULL,
	[Text_Delete] [int] NULL,
	[Text_Count] [int] NULL,
	[Text_Order] [int] NULL,
	[Text_Remark] [ntext] NULL,
	[Text_Empty] [nvarchar](50) NULL,
 CONSTRAINT [PK__Dd_Text__4F62C0F43D5E1FD2] PRIMARY KEY CLUSTERED 
(
	[Text_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型文章（0）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Text', @level2type=N'COLUMN',@level2name=N'Text_Order'
GO
/****** Object:  Table [dbo].[Dd_Suggest]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Suggest](
	[Suggest_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Suggest_Content] [nvarchar](1000) NULL,
	[Suggest_Guid] [nchar](36) NULL,
	[Suggest_Datetime] [datetime] NULL,
	[Suggest_UpDatetime] [datetime] NULL,
	[Suggest_Verify] [int] NULL,
	[Suggest_Lock] [int] NULL,
	[Suggest_State] [int] NULL,
	[Suggest_Delete] [int] NULL,
	[Suggest_Count] [int] NULL,
	[Suggest_Order] [int] NULL,
	[Suggest_Remark] [ntext] NULL,
PRIMARY KEY CLUSTERED 
(
	[Suggest_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'建议的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发表建议的用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户建议内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Suggest', @level2type=N'COLUMN',@level2name=N'Suggest_Remark'
GO
/****** Object:  Table [dbo].[Dd_Reprint]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Dd_Reprint](
	[Reprint_ID] [int] IDENTITY(1,1) NOT NULL,
	[Reprint_ArticleID] [int] NOT NULL,
	[Reprint_type] [int] NOT NULL,
	[Reprint_UserID] [int] NOT NULL,
	[Reprint_CopyFrom] [int] NOT NULL,
	[Reprint_OriginID] [int] NOT NULL,
	[Reprint_Guid] [nchar](36) NULL,
	[Reprint_Datetime] [datetime] NULL,
	[Reprint_UpDatetime] [datetime] NULL,
	[Reprint_Verify] [int] NULL,
	[Reprint_Lock] [int] NULL,
	[Reprint_State] [int] NULL,
	[Reprint_Delete] [int] NULL,
	[Reprint_Count] [int] NULL,
	[Reprint_Order] [int] NULL,
	[Reprint_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Repri__15DA0CFF3C69FB99] PRIMARY KEY CLUSTERED 
(
	[Reprint_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/****** Object:  Table [dbo].[Dd_Reply]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dd_Reply](
	[Reply_ID] [int] IDENTITY(1,1) NOT NULL,
	[Reply_UserID] [int] NOT NULL,
	[Reply_Content] [nvarchar](200) NULL,
	[Reply_ArticleID] [char](12) NULL,
	[Reply_Type] [int] NULL,
	[Reply_Guid] [nchar](36) NULL,
	[Reply_Datetime] [datetime] NULL,
	[Reply_UpDatetime] [datetime] NULL,
	[Reply_Verify] [int] NULL,
	[Reply_Lock] [int] NULL,
	[Reply_State] [int] NULL,
	[Reply_Delete] [int] NULL,
	[Reply_Count] [int] NULL,
	[Reply_Order] [int] NULL,
	[Reply_Remark] [ntext] NULL,
 CONSTRAINT [PK__Dd_Reply__B66332E42D27B809] PRIMARY KEY CLUSTERED 
(
	[Reply_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回应的ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回应人ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_UserID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回应的内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Content'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被回应的文章ID包含文章类型ID和文章ID逗号隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_ArticleID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'评价类型（0文章1图片2音乐3链接4视频）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Type'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Reply', @level2type=N'COLUMN',@level2name=N'Reply_Remark'
GO
/****** Object:  Table [dbo].[Dd_Picture]    Script Date: 12/28/2011 13:56:53 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[Dd_Picture](
	[Picture_ID] [int] IDENTITY(1,1) NOT NULL,
	[User_ID] [int] NOT NULL,
	[Picture_Address] [nvarchar](1000) NULL,
	[Picture_Discription] [nvarchar](1000) NULL,
	[Picture_Tag] [varchar](100) NULL,
	[Picture_OriginId] [int] NULL,
	[Picture_PublishMode] [int] NULL,
	[Picture_PutTop] [bit] NULL,
	[Picture_Fever] [int] NULL,
	[Picture_Guid] [nchar](36) NULL,
	[Picture_Datetime] [datetime] NULL,
	[Picture_UpDatetime] [datetime] NULL,
	[Picture_Verify] [int] NULL,
	[Picture_Lock] [int] NULL,
	[Picture_State] [int] NULL,
	[Picture_Delete] [int] NULL,
	[Picture_Count] [int] NULL,
	[Picture_Order] [int] NULL,
	[Picture_Remark] [ntext] NULL,
	[Picture_Empty] [nvarchar](50) NULL,
 CONSTRAINT [PK_Dd_Picture] PRIMARY KEY CLUSTERED 
(
	[Picture_ID] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
SET ANSI_PADDING OFF
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片的唯一标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片的拥有者用户ID作外键' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'User_ID'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'多张图片用字符隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Address'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片的描述信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Discription'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图片标签' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Tag'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发布状态1立即发布2保存在草稿3加入到自动发布列表4紧自己可见' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_PublishMode'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否置顶默认置顶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_PutTop'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'热度即浏览量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Fever'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库表唯一性标识' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Guid'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间(本记录的创建时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Datetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新时间(本记录最近修改时间)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_UpDatetime'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否审核(0未审核,1已审核)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Verify'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定(0未锁定,1锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据状态(0正常,1不正常)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_State'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否删除(0未删除,1已删除)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Delete'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'使用次数(本记录使用次数)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Count'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'记录排序(记录显示的顺序)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Order'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注说明信息' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Dd_Picture', @level2type=N'COLUMN',@level2name=N'Picture_Remark'
GO
/****** Object:  StoredProcedure [dbo].[Dd_pagePicture]    Script Date: 12/28/2011 13:56:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
create proc [dbo].[Dd_pagePicture]
(
@PageNum int ,    --第几页
@OnePageCount int --一页显示多少条
)
as
begin
select Picture_Address,Picture_Tag from
(select ROW_NUMBER() over(order by Picture_UpDatetime desc) id,* from Dd_Picture )newddpic 
where id between (@PageNum-1)*@OnePageCount+1 and @PageNum*@OnePageCount
end
GO
/****** Object:  StoredProcedure [dbo].[SP_time]    Script Date: 12/28/2011 13:56:52 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE proc [dbo].[SP_time]
(@userID int,
@datetime datetime
)
as
begin
	if(select User_Datetime+7 from Dd_User where User_ID=@userID)>=@datetime
		begin
			if(select User_ActivCondition from Dd_User where User_ID=@userID)='1'
				return '01';
			else
				update Dd_User set User_ActivCondition=1 where User_ID=@userID
				return '11';
		end
	else
		return '00'
end
GO
/****** Object:  View [dbo].[view_tables]    Script Date: 12/28/2011 13:56:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE view [dbo].[view_tables]
as
select Text_ID TypeID,User_ID,Text_Title Title,Text_Content Content,Text_Empty Discript,Text_Tag Lable,Text_Fever Fever,Text_OriginId OriginID,Text_Datetime Datetime, Text_Order Orders from Dd_Text where Text_Delete=0  
union all 
select Picture_ID,User_ID,Picture_Address,Picture_Discription,Picture_Empty,Picture_Tag,Picture_Fever,Picture_OriginId OriginID,Picture_Datetime,Picture_Order from Dd_Picture  where Picture_Delete=0
union all
select Link_ID,User_ID,Link_Title,Link_Address,Link_Description,Link_Tag,Link_Fever,Link_OriginId OriginID,Link_Datetime,Link_Order from Dd_Link where Link_Delete=0
union all
select Video_ID,User_ID,Video_Radiourl,Video_Imageurl,Video_Description,Video_Tag,Video_Fever,Video_OriginId OriginID,Video_Datetime,Video_Order from Dd_Video where Video_Delete=0
GO
/****** Object:  View [dbo].[view_fever]    Script Date: 12/28/2011 13:56:54 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE view  [dbo].[view_fever]
as
select distinct  TypeID,User_ID,Title,Content,Discript,Lable,
((select COUNT(*) from Dd_Reply where Dd_Reply.Reply_ArticleID=view_tables.TypeID and Dd_Reply.Reply_Type=view_tables.Orders)+
(select COUNT(*) from Dd_Like where Like_ArticleID=view_tables.TypeID and Like_TypeID=view_tables.Orders)+
(select COUNT(Reprint_CopyFrom) from Dd_Reprint where Reprint_OriginID=(select distinct Reprint_OriginID from Dd_Reprint where Dd_Reprint.Reprint_ArticleID =view_tables.TypeID and Dd_Reprint.Reprint_type=view_tables.Orders )and Reprint_CopyFrom!=0)) Fever,OriginID,
Datetime,Orders,(select COUNT(*) from Dd_Reply where Dd_Reply.Reply_ArticleID=view_tables.TypeID and Dd_Reply.Reply_Type=view_tables.Orders) 'rly_Count' from Dd_Reply,view_tables
GO
/****** Object:  Default [DF_Dd_Admin_Admin_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Admin] ADD  CONSTRAINT [DF_Dd_Admin_Admin_Guid]  DEFAULT (newid()) FOR [Admin_Guid]
GO
/****** Object:  Default [DF_Dd_Admin_Admin_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Admin] ADD  CONSTRAINT [DF_Dd_Admin_Admin_Datetime]  DEFAULT (getdate()) FOR [Admin_Datetime]
GO
/****** Object:  Default [DF_Dd_Admin_Admin_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Admin] ADD  CONSTRAINT [DF_Dd_Admin_Admin_UpDatetime]  DEFAULT (getdate()) FOR [Admin_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Like_Like_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Like] ADD  CONSTRAINT [DF_Dd_Like_Like_Guid]  DEFAULT (newid()) FOR [Like_Guid]
GO
/****** Object:  Default [DF_Dd_Like_Like_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Like] ADD  CONSTRAINT [DF_Dd_Like_Like_Datetime]  DEFAULT (getdate()) FOR [Like_Datetime]
GO
/****** Object:  Default [DF_Dd_Like_Like_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Like] ADD  CONSTRAINT [DF_Dd_Like_Like_UpDatetime]  DEFAULT (getdate()) FOR [Like_UpDatetime]
GO
/****** Object:  Default [DF__Dd_Link__Link_Pu__21B6055D]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Link] ADD  CONSTRAINT [DF__Dd_Link__Link_Pu__21B6055D]  DEFAULT ((0)) FOR [Link_PutTop]
GO
/****** Object:  Default [DF_Dd_Link_Link_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Link] ADD  CONSTRAINT [DF_Dd_Link_Link_Guid]  DEFAULT (newid()) FOR [Link_Guid]
GO
/****** Object:  Default [DF_Dd_Link_Link_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Link] ADD  CONSTRAINT [DF_Dd_Link_Link_Datetime]  DEFAULT (getdate()) FOR [Link_Datetime]
GO
/****** Object:  Default [DF_Dd_Link_Link_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Link] ADD  CONSTRAINT [DF_Dd_Link_Link_UpDatetime]  DEFAULT (getdate()) FOR [Link_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Link_Link_Order]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Link] ADD  CONSTRAINT [DF_Dd_Link_Link_Order]  DEFAULT ((3)) FOR [Link_Order]
GO
/****** Object:  Default [DF__Dd_Music__Music___1CF15040]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Music] ADD  CONSTRAINT [DF__Dd_Music__Music___1CF15040]  DEFAULT ((0)) FOR [Music_PutTop]
GO
/****** Object:  Default [DF_Dd_Music_Music_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Music] ADD  CONSTRAINT [DF_Dd_Music_Music_Guid]  DEFAULT (newid()) FOR [Music_Guid]
GO
/****** Object:  Default [DF_Dd_Music_Music_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Music] ADD  CONSTRAINT [DF_Dd_Music_Music_Datetime]  DEFAULT (getdate()) FOR [Music_Datetime]
GO
/****** Object:  Default [DF_Dd_Music_Music_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Music] ADD  CONSTRAINT [DF_Dd_Music_Music_UpDatetime]  DEFAULT (getdate()) FOR [Music_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_PublishMode]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_PublishMode]  DEFAULT ((1)) FOR [Picture_PublishMode]
GO
/****** Object:  Default [DF__Dd_Pictur__Pictu__182C9B23]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF__Dd_Pictur__Pictu__182C9B23]  DEFAULT ((0)) FOR [Picture_PutTop]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_Fever]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_Fever]  DEFAULT ((0)) FOR [Picture_Fever]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_Guid]  DEFAULT (newid()) FOR [Picture_Guid]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_Datetime]  DEFAULT (getdate()) FOR [Picture_Datetime]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_UpDatetime]  DEFAULT (getdate()) FOR [Picture_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Picture_Picture_Order]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Picture] ADD  CONSTRAINT [DF_Dd_Picture_Picture_Order]  DEFAULT ((1)) FOR [Picture_Order]
GO
/****** Object:  Default [DF_Dd_Reply_Reply_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Reply] ADD  CONSTRAINT [DF_Dd_Reply_Reply_Guid]  DEFAULT (newid()) FOR [Reply_Guid]
GO
/****** Object:  Default [DF_Dd_Reply_Reply_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Reply] ADD  CONSTRAINT [DF_Dd_Reply_Reply_Datetime]  DEFAULT (getdate()) FOR [Reply_Datetime]
GO
/****** Object:  Default [DF_Dd_Reply_Reply_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Reply] ADD  CONSTRAINT [DF_Dd_Reply_Reply_UpDatetime]  DEFAULT (getdate()) FOR [Reply_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Reprint_Reprint_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Reprint] ADD  CONSTRAINT [DF_Dd_Reprint_Reprint_Guid]  DEFAULT (newid()) FOR [Reprint_Guid]
GO
/****** Object:  Default [DF_Dd_Suggest_Suggest_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Suggest] ADD  CONSTRAINT [DF_Dd_Suggest_Suggest_Guid]  DEFAULT (newid()) FOR [Suggest_Guid]
GO
/****** Object:  Default [DF_Dd_Suggest_Suggest_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Suggest] ADD  CONSTRAINT [DF_Dd_Suggest_Suggest_Datetime]  DEFAULT (getdate()) FOR [Suggest_Datetime]
GO
/****** Object:  Default [DF_Dd_Suggest_Suggest_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Suggest] ADD  CONSTRAINT [DF_Dd_Suggest_Suggest_UpDatetime]  DEFAULT (getdate()) FOR [Suggest_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Text_Text_PublishMode]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_PublishMode]  DEFAULT ((1)) FOR [Text_PublishMode]
GO
/****** Object:  Default [DF_Dd_Text_Text_PutTop]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_PutTop]  DEFAULT ((0)) FOR [Text_PutTop]
GO
/****** Object:  Default [DF_Dd_Text_Text_Fever]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_Fever]  DEFAULT ((0)) FOR [Text_Fever]
GO
/****** Object:  Default [DF_Dd_Text_Text_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_Guid]  DEFAULT (newid()) FOR [Text_Guid]
GO
/****** Object:  Default [DF_Dd_Text_Text_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_Datetime]  DEFAULT (getdate()) FOR [Text_Datetime]
GO
/****** Object:  Default [DF_Dd_Text_Text_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_UpDatetime]  DEFAULT (getdate()) FOR [Text_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Text_Text_Order]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Text] ADD  CONSTRAINT [DF_Dd_Text_Text_Order]  DEFAULT ((0)) FOR [Text_Order]
GO
/****** Object:  Default [DF_Dd_User_User_ActivCondition]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_User] ADD  CONSTRAINT [DF_Dd_User_User_ActivCondition]  DEFAULT ((0)) FOR [User_ActivCondition]
GO
/****** Object:  Default [DF_Dd_User_User_isSet]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_User] ADD  CONSTRAINT [DF_Dd_User_User_isSet]  DEFAULT ((0)) FOR [User_isSet]
GO
/****** Object:  Default [DF_Dd_User_User_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_User] ADD  CONSTRAINT [DF_Dd_User_User_Datetime]  DEFAULT (getdate()) FOR [User_Datetime]
GO
/****** Object:  Default [DF_Dd_User_User_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_User] ADD  CONSTRAINT [DF_Dd_User_User_UpDatetime]  DEFAULT (getdate()) FOR [User_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Video_Video_PublishMode]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_PublishMode]  DEFAULT ((0)) FOR [Video_PublishMode]
GO
/****** Object:  Default [DF__Dd_Video__Video___267ABA7A]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF__Dd_Video__Video___267ABA7A]  DEFAULT ((0)) FOR [Video_PutTop]
GO
/****** Object:  Default [DF_Dd_Video_Video_Fever]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_Fever]  DEFAULT ((0)) FOR [Video_Fever]
GO
/****** Object:  Default [DF_Dd_Video_Video_Guid]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_Guid]  DEFAULT (newid()) FOR [Video_Guid]
GO
/****** Object:  Default [DF_Dd_Video_Video_Datetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_Datetime]  DEFAULT (getdate()) FOR [Video_Datetime]
GO
/****** Object:  Default [DF_Dd_Video_Video_UpDatetime]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_UpDatetime]  DEFAULT (getdate()) FOR [Video_UpDatetime]
GO
/****** Object:  Default [DF_Dd_Video_Video_Order]    Script Date: 12/28/2011 13:56:53 ******/
ALTER TABLE [dbo].[Dd_Video] ADD  CONSTRAINT [DF_Dd_Video_Video_Order]  DEFAULT ((4)) FOR [Video_Order]
GO

--插入数据
SET IDENTITY_INSERT [dbo].[Dd_User] ON
INSERT [dbo].[Dd_User] ([User_ID], [User_BlogName], [User_Email], [User_OriginPsw], [User_Passwd], [User_Attetion], [User_ActivCondition], [User_HeadPhoto], [User_BlackList], [User_LikeArticle], [User_Guid], [User_Datetime], [User_UpDatetime], [User_Verify], [User_Lock], [User_State], [User_Delete], [User_Count], [User_Order], [User_Remark]) VALUES (2, N'服务人员', N'htrj@htrj.com', N'htrj', N'4E455D3088D694821E349141FC37C85B', NULL, 1, NULL, NULL, NULL, N'01886c9a-c4e6-46ba-ae0f-cc6db790f917', CAST(0x00009FB4009A814C AS DateTime), CAST(0x00009FB4009A814C AS DateTime), 0, 0, 0, 0, 0, 0, NULL)
SET IDENTITY_INSERT [dbo].[Dd_User] OFF
go	
SET IDENTITY_INSERT [dbo].[Dd_Admin] ON
INSERT [dbo].[Dd_Admin] ([Admin_ID], [Admin_Name], [Admin_Pwd], [Admin_Guid], [Admin_Datetime], [Admin_UpDatetime], [Admin_Verify], [Admin_Lock], [Admin_State], [Admin_Delete], [Admin_Count], [Admin_Order], [Admin_Remark]) VALUES (1, N'admin', N'21232f297a57a5a743894a0e4a801fc3', N'8AF5D386-D91C-4F82-AEF6-28DC63F609E5', CAST(0x00009FB40099501A AS DateTime), CAST(0x00009FB40099501A AS DateTime), NULL, NULL, NULL, NULL, NULL, NULL, NULL)
SET IDENTITY_INSERT [dbo].[Dd_Admin] OFF
go
SET IDENTITY_INSERT [dbo].[Dd_Text] ON
INSERT [dbo].[Dd_Text] ([Text_ID], [User_ID], [Text_Title], [Text_Content], [Text_Tag], [Text_OriginId], [Text_PublishMode], [Text_PutTop], [Text_Fever], [Text_Guid], [Text_Datetime], [Text_UpDatetime], [Text_Verify], [Text_Lock], [Text_State], [Text_Delete], [Text_Count], [Text_Order], [Text_Remark], [Text_Empty]) VALUES (1, 2, N'海天软件简介', N'</h1>
<strong><span style="color:#666666;">1.&nbsp;山东海天软件技术有限公司是由中国海天集团总公司控股的高新技术信息产业公司。中国海天集团成立于1996年，现以教育、软件开发和技术服务业务为主，是一家集计算机认证教育、网络教育、学历教育、软件研发、软件销售，企业技术服务为一体的集团性企业，成员机构有山东海天软件工程学院、山东软件工程师培养基地、山东海天信息技术有限公司、济南海天英才软件技术有限公司、山东海天科技发展有限公司青岛分公司和江苏苏州基地（筹）等，并与海天软件（北京）有限公司和上海龙德信息技术有限公司等搭建大陆业务集群。经过十年的稳健发展，海天的在教育业和软件业的发展成为国内知名的IT解决方案提供商，形成了产、学、 研一体的集团体系，现已成为华东地区规模最大、体系最完善的IT教育及技术服务提供商。</span><br />
<span style="color:#666666;">2.&nbsp;海天在发展壮大中与国内外著名厂商，政府权威机构等紧密合作，先后引进Microsoft、Novell、Sylvan、Cisco、NIIT、清华大学认证项目。做为微软金牌技术服务中心，微软金牌解决方案提供商，印度国家信息技术学院战略合作伙伴，韩国舟城大学项目合作伙伴等，我们与厂商保持紧密合作和技术同步。　　凭借海天完善的运营体系，社会各界给予了巨大荣誉：蝉联2003、2004、2005全国十大影响力培训品牌称号；CBI华东最佳增值服务提供商；诚信企业；就业服务杰出贡献奖等。集团不仅关注企业发展同时也对社会效益进行了投入，先后培养了2万多名各类专业技术人员，遍布祖国大地。2005年同共青团山东省委、省科技厅、信息产业厅等发起了“山东青年软件技术人才就业工程”，为解决大学生就业探索了一条全新的思路，为政府解忧，为社会减负，显示了海天大气天成的企业性格。　　同时集团投入一千万美元在高新开发区兴建大型教育科研园区，吸引外资建立省内最大的软件产学研基地。</span><br />
<span style="color:#666666;">3.&nbsp;海天软件公司是致力于计算机软件开发的高科技校园企业，公司依托学院丰厚的教师资源和学生资源，拥有雄厚的研发能力，积极把握世界高端科技发展方向，吸取先进技术和管理经验，探索和体会软件开发的需求，开发出适合国内实际情况的高水平软件。 公司主要产品包括：企业管理软件、CRM、中小企业ERP、人力资源软件、财务软件、行业管理软件、网上考试考核系统、呼叫中心（call center）系统、办公自动化系统、电子政务综合解决方案、数字化校园管理系统、SNS交流系统、上网管理系统、招聘系统、系统集成综合解决方案、人力资源外包解决方案、企业培训解决方案、微软解决方案服务商、医院his系统等一系列成熟产品。</span><br />
<strong><span style="color:#666666;">&nbsp;服务项目：</span><br />
<span style="color:#666666;">一 .&nbsp;软件外包</span><br />
<p><span style="color:#666666;">海天软件专业团队从事软件外包服务，业务领域涵盖软件开发和BPO。</span><br />
<span style="color:#666666;">近年来海天软件服务外包业务发展迅速，目前已形成了一支百余人的服务外包专业团队。</span></p>
<span style="color:#666666;">二.&nbsp;软件开发</span><br />
<p><span style="color:#666666;">主要由海天软件-山东海天软件研究院为主体，以政府集成、电子政务、 企事业单位协同办公和企业项目管理为主要业务方向。</span></p>
<span style="color:#666666;">三.&nbsp;企业团体定制培训</span><br />
<p><span style="color:#666666;">企业采取集中培训的方式，可以使培训课程更有针对性，快速提高员工的技术能力。瑞通的团体培训服务主要包括如下方式：</span><span style="color:#666666;" class="Apple-converted-space">&nbsp;</span><br />
<span style="color:#666666;">3.1、上门培训服务。需要客户提供有关教学设施。部分设备也可以从东方瑞通租用。</span><span style="color:#666666;" class="Apple-converted-space">&nbsp;</span><br />
<span style="color:#666666;">3.2、团体包教室培训。瑞通拥有高质量的教学设施，提供专业的实验、演示环境，能够最大限度的达到教学效果。可以帮助企业进行培训的组织（包括食宿和往来交通等）。</span><br />
<span style="color:#666666;">3.3、出租教室。部分IT厂商或开发商在不定期的为客户、合作伙伴或员工提供专业技术培训或者管理培训时，可以租用东方瑞通的培训场地及设施；</span><span style="color:#666666;" class="Apple-converted-space">&nbsp;</span><br />
</p>
<span style="color:#666666;">四.&nbsp;集成业务</span><br />
<span style="color:#666666;">主要以海天网络为主体，向广大用户提供成熟、先进的城域网、 校园网、视频会议、监控、信息安全方案。</span></strong></strong></span>', N'海天软件简介', NULL, 1, 0, 0, N'21fcec4c-6729-44cd-af62-8d4d34479dbb', CAST(0x00009FB4009B7EC3 AS DateTime), CAST(0x00009FB4009B7EC3 AS DateTime), 0, 0, 0, 0, 0, 0, NULL, NULL)
INSERT [dbo].[Dd_Text] ([Text_ID], [User_ID], [Text_Title], [Text_Content], [Text_Tag], [Text_OriginId], [Text_PublishMode], [Text_PutTop], [Text_Fever], [Text_Guid], [Text_Datetime], [Text_UpDatetime], [Text_Verify], [Text_Lock], [Text_State], [Text_Delete], [Text_Count], [Text_Order], [Text_Remark], [Text_Empty]) VALUES (2, 2, N'更新日志', N'<div><span style="font-size:14px;">1、忘记密码的功能，用户可以通过忘记密码找回自己的账号</span></div>
<div><span style="font-size:14px;">2、实现了后台对前台页面的控制，方面管理员对前台页面的的管理。</span></div>
<div><span style="font-size:14px;">3、实现了转载的功能</span></div>
<div><span style="font-size:14px;">4、实现了热度图像的绑定</span></div>
<div><span style="font-size:14px;">5、实现了个人昵称修改时的检测</span></div>
<div><span style="font-size:14px;">6、初步实现音乐的在线试听</span></div>
<div><span style="font-size:14px;">7、修改了登录界面IE7下样式错位的问题。</span></div>
<div><span style="font-size:14px;">8、添加了注册界面中的用户注册时昵称的检测</span></div>
<div><span style="font-size:14px;">9、修改首页中我的关注鼠标划上去浮动的问题</span></div>
<div><span style="font-size:14px;">10、修改了视频分享中的链接不支持的问题。</span></div>
<div><span style="font-size:14px;">11、修改图片保存数据库异常的问题</span></div>
<div><span style="font-size:14px;">12、激活页面 按钮图片修改为：立即激活</span></div>
<div><span style="font-size:14px;">13、JS提取到单独的文件中</span></div>
<div><span style="font-size:14px;">14、解决首页数据加载的异常</span></div>', N'更新', 2, 1, 0, 0, N'3abe1123-2476-4a46-9490-05d01b531227', CAST(0x00009FC700F387EF AS DateTime), CAST(0x00009FC700F387EF AS DateTime), 0, 0, 0, 0, 0, 0, NULL, NULL)
SET IDENTITY_INSERT [dbo].[Dd_Text] OFF
/****** Object:  Table [dbo].[Dd_Suggest]    Script Date: 12/09/2011 09:37:53 ******/
SET ANSI_NULLS ON