```
/****** Object: Table [dbo].[dt_blogroll] Script Date: 10/09/2017 16:43:18 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[dt_blogroll](
[id] [int] IDENTITY(1,1) NOT NULL,
[site_path] [nvarchar](100) NULL,
[title] [nvarchar](255) NULL,
[user_id] [int] NULL,
[user_name] [nvarchar](100) NULL,
[user_tel] [nvarchar](20) NULL,
[email] [nvarchar](50) NULL,
[site_url] [nvarchar](255) NULL,
[img_url] [nvarchar](255) NULL,
[is_image] [int] NOT NULL,
[sort_id] [int] NOT NULL,
[click] [int] NOT NULL,
[status] [tinyint] NOT NULL,
[is_msg] [tinyint] NOT NULL,
[is_top] [tinyint] NOT NULL,
[is_red] [tinyint] NOT NULL,
[is_hot] [tinyint] NOT NULL,
[is_slide] [tinyint] NOT NULL,
[is_lock] [tinyint] NOT NULL,
[add_time] [datetime] NOT NULL,
[add_ip] [nvarchar](50) NULL,
[add_area] [nvarchar](100) NULL,
[update_time] [datetime] NULL,
[update_ip] [nvarchar](50) NULL,
[update_area] [nvarchar](100) NULL,
CONSTRAINT [PK_dt_blogroll] PRIMARY KEY CLUSTERED
(
[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]
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'站点' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'site_path'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'title'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @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'dt_blogroll', @level2type=N'COLUMN',@level2name=N'user_name'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'user_tel'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'email'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站链接' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'site_url'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站Logo地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'img_url'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否图片链接' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_image'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'sort_id'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'click'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'状态(0正常1未审核2锁定)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'status'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许评论' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_msg'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否置顶' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_top'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否推荐' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_red'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否热门' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_hot'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否幻灯片' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_slide'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否锁定' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'is_lock'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'add_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'add_ip'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建区域' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'add_area'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'修改时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'update_time'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'update_ip'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'更新区域' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll', @level2type=N'COLUMN',@level2name=N'update_area'
GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'友情链接' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'dt_blogroll'
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_image] DEFAULT ((0)) FOR [is_image]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_sort_id] DEFAULT ((99)) FOR [sort_id]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_click] DEFAULT ((0)) FOR [click]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_status] DEFAULT ((0)) FOR [status]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_msg] DEFAULT ((0)) FOR [is_msg]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_top] DEFAULT ((0)) FOR [is_top]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_red] DEFAULT ((0)) FOR [is_red]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_hot] DEFAULT ((0)) FOR [is_hot]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_slide] DEFAULT ((0)) FOR [is_slide]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_is_lock] DEFAULT ((0)) FOR [is_lock]
GO
ALTER TABLE [dbo].[dt_blogroll] ADD CONSTRAINT [DF_dt_blogroll_add_time] DEFAULT (getdate()) FOR [add_time]
GO
```