SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE TABLE [dbo].[Advert](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[name] [nvarchar](200) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Advert_name]  DEFAULT (''),
	[url] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Advert_url]  DEFAULT (''),
	[width] [nvarchar](10) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Advert_width]  DEFAULT (''),
	[height] [nvarchar](10) COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Advert_height]  DEFAULT (''),
	[code] [text] COLLATE Chinese_PRC_CI_AS NOT NULL CONSTRAINT [DF_Advert_code]  DEFAULT (''),
	[addtime] [datetime] NOT NULL,
	[updatetime] [datetime] NOT NULL,
	[starttime] [datetime] NOT NULL,
	[endtime] [datetime] NOT NULL,
 CONSTRAINT [PK_Advert] PRIMARY KEY CLUSTERED 
(
	[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) 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'Advert', @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'Advert', @level2type=N'COLUMN', @level2name=N'name'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(链接地址)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'url'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(广告宽度)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'width'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(广告高度)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'height'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(生成代码)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'code'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(添加时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'addtime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(更新时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'updatetime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(开始时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'starttime'

GO
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'广告模型-记录表(结束时间)' ,@level0type=N'SCHEMA', @level0name=N'dbo', @level1type=N'TABLE', @level1name=N'Advert', @level2type=N'COLUMN', @level2name=N'endtime'
