SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Setting]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Setting](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SiteName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SiteName]  DEFAULT (''),
	[SiteTitle] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SiteTitle]  DEFAULT (''),
	[keywords] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_keywords]  DEFAULT (''),
	[description] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_description]  DEFAULT (''),
	[FootContact] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Setting_FootContact]  DEFAULT (''),
	[SmtpServer] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SmtpServer]  DEFAULT (''),
	[SmtpUserName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SmtpUserName]  DEFAULT (''),
	[SmtpPass] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SmtpPass]  DEFAULT (''),
	[SmtpSender] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SmtpSender]  DEFAULT (''),
	[OpenMail] [bit] NOT NULL CONSTRAINT [DF_Qz_Setting_OpenMail]  DEFAULT ((0)),
	[AdminMail] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_AdminMail]  DEFAULT (''),
	[OpenPayOnline] [bit] NOT NULL CONSTRAINT [DF_Qz_Setting_OpenPayOnline]  DEFAULT ((0)),
	[vCurrency] [int] NOT NULL CONSTRAINT [DF_Qz_Setting_vCurrency]  DEFAULT ((0)),
	[BackMoney] [int] NOT NULL CONSTRAINT [DF_Qz_Setting_BackMoney]  DEFAULT ((0)),
	[UseActivation] [bit] NOT NULL CONSTRAINT [DF_Qz_Setting_UseActivation]  DEFAULT ((0)),
	[RegUserAgreement] [int] NOT NULL,
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Setting_UserId]  DEFAULT ((0)),
	[BindDomain] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Setting_BindDomain]  DEFAULT (''),
	[MailTemplate] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Setting_MailTemplate]  DEFAULT (''),
	[SiteTel] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Setting_SiteTel]  DEFAULT (''),
	[SiteLogo] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Setting_SiteLog]  DEFAULT (''),
	[FunctionSwitch] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Setting_FunctionSwitch]  DEFAULT (''),
	[TemplateId] [int] NOT NULL CONSTRAINT [DF_Qz_Setting_TemplateId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Setting] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'SiteName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'SiteName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'keywords'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站关键字' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'keywords'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'description'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'description'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'FootContact'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站底部内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'FootContact'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'SmtpServer'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SMTP地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'SmtpServer'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'SmtpUserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SMTP登录名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'SmtpUserName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'SmtpPass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SMTP密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'SmtpPass'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'SmtpSender'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'发件人' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'SmtpSender'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'OpenMail'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否打开邮局发送' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'OpenMail'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'AdminMail'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理接收帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'AdminMail'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'OpenPayOnline'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否开启在线支付' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'OpenPayOnline'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'BackMoney'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'返现比例' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'BackMoney'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Setting', N'COLUMN',N'UseActivation'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'帐号是否需要激活' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Setting', @level2type=N'COLUMN',@level2name=N'UseActivation'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Product]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Product](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ProductName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Product_ProdcutName]  DEFAULT (N'新建产品'),
	[ProductInfo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Product_ProductInfo]  DEFAULT (''),
	[ProductSN] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Product_ProductSN]  DEFAULT (''),
	[FacePic] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Product_FacePic]  DEFAULT (''),
	[ClassType] [int] NOT NULL CONSTRAINT [DF_Qz_Product_ClassType]  DEFAULT ((0)),
	[ClassId] [int] NOT NULL CONSTRAINT [DF_Qz_Product_ClassId]  DEFAULT ((0)),
	[TempId] [int] NOT NULL CONSTRAINT [DF_Qz_Product_TempId]  DEFAULT ((0)),
	[vCurrency] [bit] NOT NULL CONSTRAINT [DF_Qz_Product_vCurrency]  DEFAULT ((0)),
	[DisAgent] [bit] NOT NULL CONSTRAINT [DF_Qz_Product_DisAgent]  DEFAULT ((0)),
	[BuyAgreement] [int] NOT NULL CONSTRAINT [DF_Qz_Product_BuyAgreement]  DEFAULT ((0)),
	[CanUpdate] [bit] NOT NULL CONSTRAINT [DF_Qz_Product_CanUpdate]  DEFAULT ((0)),
	[BeSlp] [bit] NOT NULL CONSTRAINT [DF_Qz_Product_BeSlp]  DEFAULT ((0)),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_Product_Orders]  DEFAULT ((0)),
	[PlaceIds] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Product_PlaceIds]  DEFAULT (''),
	[SellNum] [int] NOT NULL CONSTRAINT [DF_Qz_Product_SellNum]  DEFAULT ((0)),
	[FreeDays] [int] NOT NULL CONSTRAINT [DF_Qz_Product_FreeDays]  DEFAULT ((0)),
	[IsOneOf] [bit] NOT NULL CONSTRAINT [DF_Qz_Product_IsOneOf]  DEFAULT ((0)),
	[TitleColor] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_Product_TitleColor]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Product] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'ProductName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'ProductName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'ProductSN'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品编号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'ProductSN'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'FacePic'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'缩略图' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'FacePic'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'ClassType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'ClassType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'ClassId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'ClassId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'TempId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'TempId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'vCurrency'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'除系统消费额度外，赠送额外积分' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'vCurrency'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'DisAgent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许代理出售' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'DisAgent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'BuyAgreement'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'购买合同' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'BuyAgreement'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'CanUpdate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许升级' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'CanUpdate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'BeSlp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为促销产品' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'BeSlp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'Orders'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品排序' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'Orders'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Product', N'COLUMN',N'FreeDays'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'试用天数，0为不支持' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Product', @level2type=N'COLUMN',@level2name=N'FreeDays'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_DomainList]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_DomainList](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ProductName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainList_ProductName]  DEFAULT (''),
	[DomainRoot] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainList_DomainRoot]  DEFAULT (''),
	[DefaultCheck] [bit] NOT NULL CONSTRAINT [DF_Qz_DomainList_DefaultCheck]  DEFAULT ((0)),
	[DisAgent] [bit] NOT NULL CONSTRAINT [DF_Qz_DomainList_AgentShow]  DEFAULT ((0)),
	[DomainType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainList_DomainType]  DEFAULT ((0)),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_DomainList_OrderBy]  DEFAULT ((0)),
	[TitleColor] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_DomainList_TitleColor]  DEFAULT (''),
 CONSTRAINT [PK_Qz_DomainList] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainList', N'COLUMN',N'ProductName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainList', @level2type=N'COLUMN',@level2name=N'ProductName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainList', N'COLUMN',N'DomainRoot'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainList', @level2type=N'COLUMN',@level2name=N'DomainRoot'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainList', N'COLUMN',N'DefaultCheck'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'默认选中' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainList', @level2type=N'COLUMN',@level2name=N'DefaultCheck'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainList', N'COLUMN',N'DisAgent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理是否允许出售' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainList', @level2type=N'COLUMN',@level2name=N'DisAgent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainList', N'COLUMN',N'DomainType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainList', @level2type=N'COLUMN',@level2name=N'DomainType'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_ProductPrice]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_ProductPrice](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserGrade] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_UserGrade]  DEFAULT ((0)),
	[MonPrice] [money] NOT NULL,
	[ThPrice] [money] NOT NULL,
	[HfPrice] [money] NOT NULL,
	[YearPrice] [money] NOT NULL,
	[PriceType] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_PriceType]  DEFAULT ((0)),
	[ArtType] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_ArtType]  DEFAULT ((0)),
	[PriceId] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_PriceId]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_AgentUserId]  DEFAULT ((0)),
	[PlaceId] [int] NOT NULL CONSTRAINT [DF_Qz_ProductPrice_PlaceId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_ProductPrice] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'UserGrade'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'UserGrade'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'MonPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月付价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'MonPrice'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'ThPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'季付价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'ThPrice'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'HfPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'半年价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'HfPrice'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'YearPrice'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'年付价格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'YearPrice'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'PriceType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'PriceType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'ArtType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'物品类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'ArtType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'PriceId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'PriceId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ProductPrice', N'COLUMN',N'PlaceId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'虚拟主机、邮局、数据库、VPS为服务器ID，租用、托管、机房为机房ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ProductPrice', @level2type=N'COLUMN',@level2name=N'PlaceId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_HostDomainBindVerify]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_HostDomainBindVerify](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PlaceId] [int] NOT NULL CONSTRAINT [DF_Qz_HostDomainBindVerify_PlaceId]  DEFAULT ((0)),
	[BindType] [int] NOT NULL CONSTRAINT [DF_Qz_HostDomainBindVerify_BindType]  DEFAULT ((0)),
	[BindDomain] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_HostDomainBindVerify_BindDomain]  DEFAULT (''),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_HostDomainBindVerify_AddTime]  DEFAULT (getdate()),
	[BindPath] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostDomainBindVerify_BindPath]  DEFAULT (''),
 CONSTRAINT [PK_Qz_HostDomainBindVerify] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Service]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Service](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserId] [int] NOT NULL CONSTRAINT [DF_Qz_Service_UserName]  DEFAULT ((0)),
	[Title] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Service_Title]  DEFAULT (''),
	[Description] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Service_Description]  DEFAULT (''),
	[State] [int] NOT NULL CONSTRAINT [DF_Qz_Service_State]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_Service_AddTime]  DEFAULT (getdate()),
	[MastId] [int] NOT NULL CONSTRAINT [DF_Qz_Service_MastId]  DEFAULT ((0)),
	[ClassId] [int] NOT NULL CONSTRAINT [DF_Qz_Service_ClassId]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Service_AgentUser]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Service] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MailTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MailTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_MailTemp_ModelName]  DEFAULT ('新建邮局模版'),
	[mxUser] [int] NOT NULL CONSTRAINT [DF_Qz_MailTemp_mxUser]  DEFAULT ((10)),
	[mxSize] [int] NOT NULL CONSTRAINT [DF_Qz_MailTemp_mxSize]  DEFAULT ((100)),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_MailTemp_Diy]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MailTemp] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailTemp', N'COLUMN',N'ModelName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailTemp', @level2type=N'COLUMN',@level2name=N'ModelName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailTemp', N'COLUMN',N'mxUser'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大用户数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailTemp', @level2type=N'COLUMN',@level2name=N'mxUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailTemp', N'COLUMN',N'mxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大容量，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailTemp', @level2type=N'COLUMN',@level2name=N'mxSize'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_EvenLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_EvenLog](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[EvenInfo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_EvenLog_EvenInfo]  DEFAULT (''),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_EvenLog_AddTime]  DEFAULT (getdate()),
	[RoleType] [int] NOT NULL CONSTRAINT [DF_Qz_EvenLog_RoleType]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_EvenLog] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_EvenLog', N'COLUMN',N'EvenInfo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'事件描述' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_EvenLog', @level2type=N'COLUMN',@level2name=N'EvenInfo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_SqlTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_SqlTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_SqlTemp_ModelName]  DEFAULT ('新建SQL模版'),
	[db_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_SqlTemp_db_MaxSize]  DEFAULT ((20)),
	[lg_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_SqlTemp_lg_MaxSize]  DEFAULT ((10)),
	[SQLFilePath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_SqlTemp_SQLFilePath]  DEFAULT ('d:\SqlUser'),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_SqlTemp_Diy]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_SqlTemp] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SqlTemp', N'COLUMN',N'ModelName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SqlTemp', @level2type=N'COLUMN',@level2name=N'ModelName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SqlTemp', N'COLUMN',N'db_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库最大值，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SqlTemp', @level2type=N'COLUMN',@level2name=N'db_MaxSize'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SqlTemp', N'COLUMN',N'lg_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'日志最大值，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SqlTemp', @level2type=N'COLUMN',@level2name=N'lg_MaxSize'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SqlTemp', N'COLUMN',N'SQLFilePath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库存放路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SqlTemp', @level2type=N'COLUMN',@level2name=N'SQLFilePath'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Comment]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Comment](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CommentContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Comment_CommentContent]  DEFAULT (''),
	[StarNum] [int] NOT NULL CONSTRAINT [DF_Qz_Comment_StarNum]  DEFAULT ((0)),
	[ProductId] [int] NOT NULL CONSTRAINT [DF_Qz_Comment_ProductId]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_Comment_AddTime]  DEFAULT (getdate()),
	[SiteUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Comment_SiteUrl]  DEFAULT (''),
	[OrderId] [int] NOT NULL CONSTRAINT [DF_Qz_Comment_OrderId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Comment] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_AppPoolTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_AppPoolTemp](
	[ID] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_ModelName]  DEFAULT (N'新建模版'),
	[AppPoolQueueLength] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_AppPoolQueueLength]  DEFAULT ((4000)),
	[CPULimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_CPULimit]  DEFAULT ((0)),
	[CPUResetInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_CPUResetInterval]  DEFAULT ((5)),
	[CPUAction] [int] NOT NULL,
	[PeriodicRestartPrivateMemory] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PeriodicRestartPrivateMemory]  DEFAULT ((512)),
	[PeriodicRestartMemory] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PeriodicRestartMemory]  DEFAULT ((512)),
	[PeriodicRestartRequests] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PeriodicRestartRequests]  DEFAULT ((35000)),
	[PingingEnabled] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PingingEnabled]  DEFAULT ((1)),
	[PingInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PingInterval]  DEFAULT ((30)),
	[RapidFailProtection] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_RapidFailProtection]  DEFAULT ((1)),
	[StartupTimeLimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_StartupTimeLimit]  DEFAULT ((90)),
	[ShutdownTimeLimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_ShutdownTimeLimit]  DEFAULT ((90)),
	[PeriodicRestartSchedule] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_PeriodicRestartSchedule]  DEFAULT ('06:00|TP|12:00|TP|18:00|TP|00:00'),
	[RapidFailProtectionInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_RapidFailProtectionInterval]  DEFAULT ((5)),
	[RapidFailProtectionMaxCrashes] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolMode_RapidFailProtectionMaxCrashes]  DEFAULT ((5)),
	[enable32BitAppOnWin64] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolTemp_enable32BitAppOnWin64]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_AppPoolMode] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'ModelName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'ModelName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'AppPoolQueueLength'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'核心请求队列限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'AppPoolQueueLength'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'CPULimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU百分比' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'CPULimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'CPUResetInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU刷新时间，也就是说CPU持续超出CPULimit时间则，触发CPUAction，单位：分钟' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'CPUResetInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'CPUAction'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU超出限制操作：0无操作，1关闭池，2当达到 CPU 限制的 80% 时，启用应用程序池的容量跟踪。' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'CPUAction'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PeriodicRestartPrivateMemory'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'属性指定了应用程序池在回收前能使用的内存量，单位：MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PeriodicRestartPrivateMemory'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PeriodicRestartMemory'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大虚拟内存，单位：MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PeriodicRestartMemory'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PeriodicRestartRequests'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回收工作进程(请求数目)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PeriodicRestartRequests'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PingingEnabled'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用PING，监视工作进程，以确保它们正在运行且运行正常。' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PingingEnabled'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PingInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'PING时间间隔（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PingInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'RapidFailProtection'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用快速失败保护' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'RapidFailProtection'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'StartupTimeLimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启动时间限制（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'StartupTimeLimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'ShutdownTimeLimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关闭时间限制（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'ShutdownTimeLimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'PeriodicRestartSchedule'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序池回收时间，字符串数组，组成“|TP|”隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'PeriodicRestartSchedule'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'RapidFailProtectionInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定时间内失败的时间间隔，单位：分钟' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'RapidFailProtectionInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolTemp', N'COLUMN',N'RapidFailProtectionMaxCrashes'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定分钟内允许的最多失败次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolTemp', @level2type=N'COLUMN',@level2name=N'RapidFailProtectionMaxCrashes'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_AgentUserAPI]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_AgentUserAPI](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[MemberId] [int] NOT NULL CONSTRAINT [DF_Qz_AgentUserAPI_AgentUserId]  DEFAULT ((0)),
	[AppKey] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_AgentUserAPI_APIKey]  DEFAULT (''),
	[IpList] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AgentUserAPI_IpList]  DEFAULT (''),
 CONSTRAINT [PK_Qz_AgentUserAPI] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_MCT]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_MCT](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[MCTName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_MCT_MCTName]  DEFAULT ('新建机柜'),
	[MCTType] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_MCT_MCTType]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_MCT_Memo]  DEFAULT (''),
	[Power] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_MCT_Power]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_MCT] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_MCT', N'COLUMN',N'MCTType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机柜类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_MCT', @level2type=N'COLUMN',@level2name=N'MCTType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_MCT', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_MCT', @level2type=N'COLUMN',@level2name=N'Memo'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_MCT', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电源' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_MCT', @level2type=N'COLUMN',@level2name=N'Power'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VPath]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_VPath](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PathName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_VPath_PathName]  DEFAULT (''),
	[BindPath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_VPath_BindPath]  DEFAULT (''),
	[BindDomain] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_VPath_BindDomain]  DEFAULT (''),
	[HostUserId] [int] NOT NULL CONSTRAINT [DF_Qz_VPath_HostUserId]  DEFAULT ((0)),
	[IISVer] [nvarchar](20) NOT NULL CONSTRAINT [DF_Qz_VPath_IISVer]  DEFAULT (''),
 CONSTRAINT [PK_Qz_VPath] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_DDR]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_DDR](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[DDRName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_CPUName]  DEFAULT (''),
	[DDRType] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_zhupin]  DEFAULT (''),
	[zhupin] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_zongxian]  DEFAULT (''),
	[rongliang] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_yiji]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_DDR_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_DDR] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_DDR', N'COLUMN',N'DDRName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_DDR', @level2type=N'COLUMN',@level2name=N'DDRName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_DDR', N'COLUMN',N'DDRType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_DDR', @level2type=N'COLUMN',@level2name=N'DDRType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_DDR', N'COLUMN',N'zhupin'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主频' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_DDR', @level2type=N'COLUMN',@level2name=N'zhupin'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_DDR', N'COLUMN',N'rongliang'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'容量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_DDR', @level2type=N'COLUMN',@level2name=N'rongliang'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_DDR', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_DDR', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_TradeNO]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_TradeNO](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[trade] [nvarchar](32) NOT NULL CONSTRAINT [DF_Qz_TradeNO_trade]  DEFAULT (''),
	[uid] [int] NOT NULL CONSTRAINT [DF_Qz_TradeNO_uid]  DEFAULT ((0)),
	[apitype] [int] NOT NULL CONSTRAINT [DF_Qz_TradeNO_apitype]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_TradeNO] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Download]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Download](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[DownloadName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Download_DownloadName]  DEFAULT (''),
	[FileUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Download_AgentUser1]  DEFAULT (''),
	[FileICO] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Download_FileICO]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Download_AgentUser]  DEFAULT ((0)),
	[IsShare] [bit] NOT NULL CONSTRAINT [DF_Qz_Download_IsShare]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_Download_AddTime]  DEFAULT (getdate()),
	[DownNum] [int] NOT NULL CONSTRAINT [DF_Qz_Download_DownNum]  DEFAULT ((0)),
	[DownInfo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Download_DownInfo]  DEFAULT (''),
	[ClassId] [int] NOT NULL CONSTRAINT [DF_Qz_Download_ClassId]  DEFAULT ((0)),
	[TitleColor] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_Download_TitleColor]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Download] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'DownloadName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'DownloadName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'FileUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文件URL' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'FileUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'FileICO'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'图标' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'FileICO'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'IsShare'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为共享' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'IsShare'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', 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'Qz_Download', @level2type=N'COLUMN',@level2name=N'AddTime'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'DownNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'下载次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'DownNum'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Download', N'COLUMN',N'ClassId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Download', @level2type=N'COLUMN',@level2name=N'ClassId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_SysArticle]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_SysArticle](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ArtContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_SysArticle_ArtContent]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_SysArticle_AgentUserId]  DEFAULT ((0)),
	[SysArticleType] [int] NOT NULL CONSTRAINT [DF_Qz_SysArticle_SysArticleType]  DEFAULT ((0)),
	[ReadCount] [int] NOT NULL CONSTRAINT [DF_Qz_SysArticle_ReadCount]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_SysArticle] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MoneyCard]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MoneyCard](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CardNO] [nvarchar](16) NOT NULL CONSTRAINT [DF_Qz_MoneyCard_CardNO]  DEFAULT (''),
	[CardMoney] [money] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_CardMoney]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_AddTime]  DEFAULT (getdate()),
	[IsUsed] [bit] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_IsUsed]  DEFAULT ((0)),
	[UsedTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_UsedTime]  DEFAULT (getdate()),
	[UserName] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_MoneyCard_UserName]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_AgentUser]  DEFAULT ((0)),
	[ExpireTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_MoneyCard_ExpireTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_Qz_MoneyCard] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Template]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Template](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[TempName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Table_1_TemplateName]  DEFAULT (''),
	[FloderName] [nvarchar](255) NOT NULL,
	[TempPic] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Template_TempPic]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Template] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Message]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Message](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[MsgContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Message_MsgContent]  DEFAULT (''),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_Message_AddTime]  DEFAULT (getdate()),
	[MemberId] [int] NOT NULL CONSTRAINT [DF_Qz_Message_MemberId]  DEFAULT ((0)),
	[IsRead] [bit] NOT NULL CONSTRAINT [DF_Qz_Message_IsRead]  DEFAULT ((0)),
	[MsgTitle] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Message_MsgTitle]  DEFAULT (''),
	[SenderId] [int] NOT NULL CONSTRAINT [DF_Qz_Message_SenderId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Message] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_APISetting]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_APISetting](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[APIType] [int] NOT NULL CONSTRAINT [DF_Qz_APISetting_APIType]  DEFAULT ((0)),
	[APIUser] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_APISetting_APIUser]  DEFAULT (''),
	[APIPassWord] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_APISetting_APIPassWord]  DEFAULT (''),
	[APIEmail] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_APISetting_APIEmail]  DEFAULT (''),
	[UseThis] [bit] NOT NULL CONSTRAINT [DF_Qz_APISetting_UseThis]  DEFAULT ((0)),
	[DefaultAPI] [bit] NOT NULL CONSTRAINT [DF_Qz_APISetting_DefaultAPI]  DEFAULT ((0)),
	[UseType] [int] NOT NULL CONSTRAINT [DF_Qz_APISetting_UseType]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_APISetting_AgentUser]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_APISetting] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'APIType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'APIType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'APIUser'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'API用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'APIUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'APIPassWord'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'API密钥' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'APIPassWord'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'APIEmail'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'APIEMAIL' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'APIEmail'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'UseThis'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'UseThis'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_APISetting', N'COLUMN',N'DefaultAPI'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为默认API' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_APISetting', @level2type=N'COLUMN',@level2name=N'DefaultAPI'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Ad]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Ad](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[PicUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Ad_PicUrl]  DEFAULT (''),
	[link] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Ad_link]  DEFAULT (''),
	[adinfo] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Ad_adinfo]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Ad_AgentUser]  DEFAULT ((0)),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_Ad_Orders]  DEFAULT ((0)),
	[AdPlaceId] [int] NOT NULL CONSTRAINT [DF_Qz_Ad_TemplateId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Ad] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_RentUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_RentUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CPU] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_CPU]  DEFAULT (''),
	[DDR] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_DDR]  DEFAULT (''),
	[SATA] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_SATA]  DEFAULT (''),
	[CPT] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_CPT]  DEFAULT (''),
	[BW] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_BW]  DEFAULT ((0)),
	[ServerHome] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_ServerHome]  DEFAULT ((0)),
	[Ips] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_Ips]  DEFAULT (''),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_Flow]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_Memo]  DEFAULT (''),
	[Box] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_Box]  DEFAULT (''),
	[PTR] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_Mon_PTR]  DEFAULT (''),
	[State] [int] NOT NULL,
	[OKDate] [datetime] NOT NULL,
	[IpNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_RentUser_IpNum]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_RentUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'BW'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'带宽，Mbps' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'BW'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'ServerHome'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机房' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'ServerHome'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'Ips'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP列表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'Ips'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'Flow'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月流量，GB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'Flow'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'Box'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'Box'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_RentUser', N'COLUMN',N'PTR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产权' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_RentUser', @level2type=N'COLUMN',@level2name=N'PTR'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_CPT]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_CPT](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CPTName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_BoxName]  DEFAULT (''),
	[NetCard] [nvarchar](50) NOT NULL,
	[CardNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_CPT_CardNum]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_CPT_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_CPT] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPT', N'COLUMN',N'CPTName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主板名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPT', @level2type=N'COLUMN',@level2name=N'CPTName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPT', N'COLUMN',N'NetCard'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网卡' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPT', @level2type=N'COLUMN',@level2name=N'NetCard'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPT', N'COLUMN',N'CardNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'载板网卡数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPT', @level2type=N'COLUMN',@level2name=N'CardNum'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPT', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPT', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_AdPlace]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_AdPlace](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PlaceName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_AdPlace_PlaceName]  DEFAULT (''),
	[PlaceIndex] [int] NOT NULL CONSTRAINT [DF_Qz_AdPlace_PlaceIndex]  DEFAULT ((0)),
	[TemplateId] [int] NOT NULL CONSTRAINT [DF_Qz_AdPlace_TemplateId]  DEFAULT ((0)),
	[PicSizeInfo] [nvarchar](255) NOT NULL,
	[IsPlural] [bit] NOT NULL CONSTRAINT [DF_Qz_AdPlace_IsPlural]  DEFAULT ((1)),
 CONSTRAINT [PK_Qz_AdPlace] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_AppPoolUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_AppPoolUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[AppName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_ModelName]  DEFAULT (N'新建模版'),
	[AppPoolQueueLength] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_AppPoolQueueLength]  DEFAULT ((4000)),
	[CPULimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_CPULimit]  DEFAULT ((0)),
	[CPUResetInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_CPUResetInterval]  DEFAULT ((5)),
	[CPUAction] [int] NOT NULL,
	[PeriodicRestartPrivateMemory] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PeriodicRestartPrivateMemory]  DEFAULT ((512)),
	[PeriodicRestartMemory] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PeriodicRestartMemory]  DEFAULT ((512)),
	[PeriodicRestartRequests] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PeriodicRestartRequests]  DEFAULT ((35000)),
	[PingingEnabled] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PingingEnabled]  DEFAULT ((1)),
	[PingInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PingInterval]  DEFAULT ((30)),
	[RapidFailProtection] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_RapidFailProtection]  DEFAULT ((1)),
	[StartupTimeLimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_StartupTimeLimit]  DEFAULT ((90)),
	[ShutdownTimeLimit] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_ShutdownTimeLimit]  DEFAULT ((90)),
	[PeriodicRestartSchedule] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_PeriodicRestartSchedule]  DEFAULT ('06:00|TP|12:00|TP|18:00|TP|00:00'),
	[RapidFailProtectionInterval] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_RapidFailProtectionInterval]  DEFAULT ((5)),
	[RapidFailProtectionMaxCrashes] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_RapidFailProtectionMaxCrashes]  DEFAULT ((5)),
	[ServerId] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_ServerIds]  DEFAULT ((0)),
	[enable32BitAppOnWin64] [bit] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_enable32BitAppOnWin64]  DEFAULT ((0)),
	[DotNetEdition] [int] NOT NULL CONSTRAINT [DF_Qz_AppPoolUser_DotNetEdition]  DEFAULT ((2)),
 CONSTRAINT [PK_Qz_AppPoolUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'AppName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'AppName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'AppPoolQueueLength'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'核心请求队列限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'AppPoolQueueLength'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'CPULimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU百分比' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'CPULimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'CPUResetInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU刷新时间，也就是说CPU持续超出CPULimit时间则，触发CPUAction，单位：分钟' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'CPUResetInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'CPUAction'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU超出限制操作：0无操作，1关闭池，2当达到 CPU 限制的 80% 时，启用应用程序池的容量跟踪。' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'CPUAction'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PeriodicRestartPrivateMemory'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'属性指定了应用程序池在回收前能使用的内存量，单位：MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PeriodicRestartPrivateMemory'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PeriodicRestartMemory'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大虚拟内存，单位：MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PeriodicRestartMemory'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PeriodicRestartRequests'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'回收工作进程(请求数目)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PeriodicRestartRequests'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PingingEnabled'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否启用PING，监视工作进程，以确保它们正在运行且运行正常。' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PingingEnabled'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PingInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'PING时间间隔（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PingInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'RapidFailProtection'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启用快速失败保护' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'RapidFailProtection'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'StartupTimeLimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'启动时间限制（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'StartupTimeLimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'ShutdownTimeLimit'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'关闭时间限制（秒）' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'ShutdownTimeLimit'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'PeriodicRestartSchedule'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序池回收时间，字符串数组，组成“|TP|”隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'PeriodicRestartSchedule'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'RapidFailProtectionInterval'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定时间内失败的时间间隔，单位：分钟' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'RapidFailProtectionInterval'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'RapidFailProtectionMaxCrashes'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'指定分钟内允许的最多失败次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'RapidFailProtectionMaxCrashes'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AppPoolUser', N'COLUMN',N'ServerId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'适用服务器，每台服务器ID以,隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AppPoolUser', @level2type=N'COLUMN',@level2name=N'ServerId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_TTS]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_TTS](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[TTSName] [nvarchar](50) NOT NULL,
	[BW] [int] NOT NULL,
	[Ips] [int] NOT NULL,
	[Box] [int] NOT NULL,
	[MCT] [int] NOT NULL,
	[Memo] [nvarchar](max) NOT NULL,
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_TTS_Flow]  DEFAULT ((0)),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_IDC_TTS_Diy]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_TTS] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_AllClass]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_AllClass](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ClassType] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_ClassType]  DEFAULT ((0)),
	[ClassName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_AllClass_ClassName]  DEFAULT (''),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_Orders]  DEFAULT ((0)),
	[ParentId] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_ParentId]  DEFAULT ((0)),
	[ParentStr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AllClass_ParentStr]  DEFAULT ('0'),
	[Child] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_Child]  DEFAULT ((0)),
	[ChildStr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AllClass_ChildStr]  DEFAULT ('0'),
	[RootId] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_RootId]  DEFAULT ((0)),
	[Depth] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_Depth]  DEFAULT ((0)),
	[Info] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_AllClass_Info]  DEFAULT (''),
	[LinkUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_AllClass_LinkUrl]  DEFAULT (''),
	[Target] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_Target]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_AllClass_UserId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_AllClass] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AllClass', N'COLUMN',N'LinkUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'栏目链接分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AllClass', @level2type=N'COLUMN',@level2name=N'LinkUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_AllClass', N'COLUMN',N'Target'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'目标框架，0同窗口，1新建窗口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_AllClass', @level2type=N'COLUMN',@level2name=N'Target'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_HostTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_HostTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_HostTemp_ModelName]  DEFAULT ('新建虚拟主机模版'),
	[BandWidth] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_BandWidth]  DEFAULT ((100)),
	[defaultDOC] [nvarchar](512) NOT NULL CONSTRAINT [DF_Qz_HostTemp_defaultDOC]  DEFAULT ('default.aspx,default.asp,default.php,default.html,default.htm,index.aspx,index.asp,index.php,index.html,index.htm'),
	[IIS] [bigint] NOT NULL CONSTRAINT [DF_Qz_HostTemp_IIS]  DEFAULT ((100)),
	[HttpErrors] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_HostTemp_HttpErrors]  DEFAULT ('/404.html'),
	[AppPoolTempId] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_AppPoolTempId]  DEFAULT ((0)),
	[IsaloneApp] [bit] NOT NULL,
	[ShareSiteNum] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_ShareSiteNum]  DEFAULT ((10)),
	[SqlTempId] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_SqlTempId]  DEFAULT ((0)),
	[MySqlTempId] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_MySqlTempId]  DEFAULT ((0)),
	[FreeSQLType] [bit] NOT NULL,
	[MailTempId] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_MailTempId]  DEFAULT ((0)),
	[Space] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_Space]  DEFAULT ((100)),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_Flow]  DEFAULT ((0)),
	[vPath] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_vPath]  DEFAULT ((0)),
	[UserPath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_HostTemp_UserPath]  DEFAULT (N'd:\HostUser'),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_HostTemp_Diy]  DEFAULT ((0)),
	[DefaultExTempId] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostTemp_DefaultExTempId]  DEFAULT ((0)),
	[Port] [int] NOT NULL CONSTRAINT [DF_Qz_HostTemp_Port]  DEFAULT ((80)),
	[ScriptMaps] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostTemp_ScriptMaps]  DEFAULT (''),
 CONSTRAINT [PK_Qz_HostTemp] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'ModelName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'ModelName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'BandWidth'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'带宽，单位KB，4294967295为无限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'BandWidth'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'defaultDOC'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'默认文档' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'defaultDOC'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'IIS'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IIS连接数，4294967295为无限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'IIS'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'HttpErrors'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'404错误页面' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'HttpErrors'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'AppPoolTempId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序池模版' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'AppPoolTempId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'IsaloneApp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否独立程序池' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'IsaloneApp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'ShareSiteNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'非独立程序池共享站点数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'ShareSiteNum'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'SqlTempId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SQL模版ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'SqlTempId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'MySqlTempId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL模版ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'MySqlTempId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'FreeSQLType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'附属数据库产品是否二选一' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'FreeSQLType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'MailTempId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件模版' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'MailTempId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'Space'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'虚拟主机容量，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'Space'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'Flow'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月流量，0为不限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'Flow'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'vPath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子站个数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'vPath'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostTemp', N'COLUMN',N'UserPath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户存放位置' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostTemp', @level2type=N'COLUMN',@level2name=N'UserPath'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MySQLUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MySQLUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[LoginName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_MySQLUser_LoginName]  DEFAULT (''),
	[DBName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_MySQLUser_DBName]  DEFAULT (''),
	[LoginPass] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_MySQLUser_LoginPass]  DEFAULT (''),
	[db_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_MySQLUser_db_MaxSize]  DEFAULT ((0)),
	[ServerId] [int] NOT NULL CONSTRAINT [DF_Qz_MySQLUser_ServerId]  DEFAULT ((0)),
	[FreeClassType] [int] NOT NULL CONSTRAINT [DF_Qz_MySQLUser_FreeClassType]  DEFAULT ((0)),
	[FreeControlId] [int] NOT NULL CONSTRAINT [DF_Qz_MySQLUser_FreeControlId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MySQLUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySQLUser', 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'Qz_MySQLUser', @level2type=N'COLUMN',@level2name=N'LoginName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySQLUser', N'COLUMN',N'DBName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySQLUser', @level2type=N'COLUMN',@level2name=N'DBName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySQLUser', N'COLUMN',N'LoginPass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登录密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySQLUser', @level2type=N'COLUMN',@level2name=N'LoginPass'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySQLUser', N'COLUMN',N'db_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库容量，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySQLUser', @level2type=N'COLUMN',@level2name=N'db_MaxSize'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySQLUser', N'COLUMN',N'ServerId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属服务器' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySQLUser', @level2type=N'COLUMN',@level2name=N'ServerId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MessageSender]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MessageSender](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SendMsgTarget] [int] NOT NULL CONSTRAINT [DF_Qz_MessageSender_SendMsgTarget]  DEFAULT ((0)),
	[SendMail] [bit] NOT NULL CONSTRAINT [DF_Qz_MessageSender_SendMail]  DEFAULT ((0)),
	[ReciveUserName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_MessageSender_ReciveUserName]  DEFAULT (''),
	[Title] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_MessageSender_Title]  DEFAULT (''),
	[MsgContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_MessageSender_MsgContent]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_MessageSender_AgentUserId]  DEFAULT ((0)),
	[LastMaxMemberId] [int] NOT NULL CONSTRAINT [DF_Qz_MessageSender_LastMaxMemberId]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_MessageSender_AddTime]  DEFAULT (getdate()),
	[IsComplete] [bit] NOT NULL CONSTRAINT [DF_Qz_MessageSender_IsComplate]  DEFAULT ((0)),
	[AllUserNum] [int] NOT NULL CONSTRAINT [DF_Qz_MessageSender_AllUserNum]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MessageSender] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_TaskPlan]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_TaskPlan](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[PlanName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_TaskPlan_PlanName]  DEFAULT (''),
	[RunTime] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_TaskPlan_RunTime]  DEFAULT (''),
	[PlanType] [int] NOT NULL CONSTRAINT [DF_Qz_TaskPlan_PlanType]  DEFAULT ((0)),
	[PlanAction] [int] NOT NULL CONSTRAINT [DF_Qz_TaskPlan_PlanAction]  DEFAULT ((0)),
	[MeetNum] [int] NOT NULL CONSTRAINT [DF_Qz_TaskPlan_MeetNum]  DEFAULT ((0)),
	[intevalDay] [int] NOT NULL CONSTRAINT [DF_Qz_TaskPlan_intevalDay]  DEFAULT ((1)),
	[LastDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_TaskPlan_LastDate]  DEFAULT (getdate()),
 CONSTRAINT [PK_Qz_TaskPlan] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MailUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MailUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Domain] [nvarchar](255) NOT NULL,
	[PassWord] [nvarchar](255) NOT NULL,
	[Size] [int] NOT NULL,
	[Num] [int] NOT NULL,
	[ServerId] [int] NOT NULL,
	[FreeClassType] [int] NOT NULL CONSTRAINT [DF_Qz_MailUser_FreeClassType]  DEFAULT ((0)),
	[FreeControlId] [int] NOT NULL CONSTRAINT [DF_Qz_MailUser_FreeControlId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MailUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailUser', N'COLUMN',N'Domain'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮局域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailUser', @level2type=N'COLUMN',@level2name=N'Domain'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailUser', 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'Qz_MailUser', @level2type=N'COLUMN',@level2name=N'PassWord'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailUser', N'COLUMN',N'Size'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'容量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailUser', @level2type=N'COLUMN',@level2name=N'Size'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailUser', N'COLUMN',N'Num'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailUser', @level2type=N'COLUMN',@level2name=N'Num'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MailUser', N'COLUMN',N'ServerId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属服务器ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MailUser', @level2type=N'COLUMN',@level2name=N'ServerId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_SATA]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_SATA](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SATAName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_CPUName_1]  DEFAULT (''),
	[rongliang] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_zhupin_1]  DEFAULT (''),
	[jiekou] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_zongxian_1]  DEFAULT (''),
	[zhuansu] [nvarchar](50) NOT NULL CONSTRAINT [DF_Table_1_yiji_1]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_SATA_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_SATA] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_SATA', N'COLUMN',N'SATAName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'硬盘名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_SATA', @level2type=N'COLUMN',@level2name=N'SATAName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_SATA', N'COLUMN',N'rongliang'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'容量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_SATA', @level2type=N'COLUMN',@level2name=N'rongliang'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_SATA', N'COLUMN',N'jiekou'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_SATA', @level2type=N'COLUMN',@level2name=N'jiekou'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_SATA', N'COLUMN',N'zhuansu'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'转速' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_SATA', @level2type=N'COLUMN',@level2name=N'zhuansu'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_SATA', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_SATA', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_SystemSN]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_SystemSN](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[sn] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_SystemSN_sn]  DEFAULT (''),
 CONSTRAINT [PK_Qz_SystemSN] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_ShopTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_ShopTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[TempName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Shop_TempName]  DEFAULT (''),
	[IsDatePro] [bit] NOT NULL CONSTRAINT [DF_Qz_Shop_IsDatePro]  DEFAULT ((0)),
	[Attr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_ShopTemp_Attr]  DEFAULT (''),
	[UserAttr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_ShopTemp_UserAttr]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Shop] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_DomainInto]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_DomainInto](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[DomainName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainInto_DomainName]  DEFAULT (''),
	[UserId] [int] NOT NULL CONSTRAINT [DF_Qz_DomainInto_UserId]  DEFAULT ((0)),
	[IntoPassWord] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainInto_IntoPassWord]  DEFAULT (''),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_DomainInto_AddTime]  DEFAULT (getdate()),
	[IntoState] [int] NOT NULL CONSTRAINT [DF_Qz_DomainInto_State]  DEFAULT ((1)),
	[APIType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainInto_APIType]  DEFAULT ((0)),
	[LastTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_DomainInto_LastTime]  DEFAULT (getdate()),
	[remark] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_DomainInto_memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_DomainInto] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainInto', N'COLUMN',N'UserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainInto', @level2type=N'COLUMN',@level2name=N'UserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_Rent]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_Rent](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[RentName] [nvarchar](50) NOT NULL,
	[CPU] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_CPU]  DEFAULT ((0)),
	[DDR] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_DDR]  DEFAULT ((0)),
	[SATA] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_SATA]  DEFAULT ((0)),
	[CPT] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_CPT]  DEFAULT ((0)),
	[BW] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_BW]  DEFAULT ((0)),
	[Ips] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Ips]  DEFAULT ((0)),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Flow]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Memo]  DEFAULT (''),
	[Box] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Box]  DEFAULT ((0)),
	[Mon_PTR] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Mon_PTR]  DEFAULT (''),
	[Th_PTR] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Th_PTR]  DEFAULT (''),
	[Hf_PTR] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Hf_PTR]  DEFAULT (''),
	[Year_PTR] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Year_PTR]  DEFAULT (''),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_IDC_Rent_Diy]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_Rent] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Rent', N'COLUMN',N'Mon_PTR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月付产权' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Rent', @level2type=N'COLUMN',@level2name=N'Mon_PTR'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Rent', N'COLUMN',N'Th_PTR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'季付产权' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Rent', @level2type=N'COLUMN',@level2name=N'Th_PTR'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Rent', N'COLUMN',N'Hf_PTR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'半年付产权' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Rent', @level2type=N'COLUMN',@level2name=N'Hf_PTR'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Rent', N'COLUMN',N'Year_PTR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'年付产权' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Rent', @level2type=N'COLUMN',@level2name=N'Year_PTR'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_ServiceContact]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_ServiceContact](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_ServiceContent_AgentUserId]  DEFAULT ((0)),
	[ServiceType] [int] NOT NULL CONSTRAINT [DF_Qz_ServiceContent_ServiceType]  DEFAULT ((0)),
	[ServiceName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_ServiceContent_ServiceName]  DEFAULT (''),
	[ServiceValue] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_ServiceContent_ServiceValue]  DEFAULT (''),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_ServiceContact_Orders]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_ServiceContent] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_ShopUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_ShopUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[IsDatePro] [bit] NOT NULL CONSTRAINT [DF_Qz_ShopUser_IsDatePro]  DEFAULT ((0)),
	[Attr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_ShopUser_Attr]  DEFAULT (''),
	[UserAttr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_ShopUser_UserAttr]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_ShopUser_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_ShopUser] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_SQLUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_SQLUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[LoginName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_SQLUser_LoginName]  DEFAULT (''),
	[DBName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_SQLUser_DBName]  DEFAULT (''),
	[LoginPass] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_SQLUser_LoginPass]  DEFAULT (''),
	[db_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_db_MaxSize]  DEFAULT ((0)),
	[lg_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_lg_MaxSize]  DEFAULT ((0)),
	[ServerId] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_ServerId]  DEFAULT ((0)),
	[SQLEdition] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_SQLEdtion]  DEFAULT ((0)),
	[FilePath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_SQLUser_FilePath]  DEFAULT (''),
	[BackUpDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_SQLUser_BcakUpDate]  DEFAULT (getdate()),
	[BackUpFtp] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_SQLUser_BackUpFtp]  DEFAULT (''),
	[ReStoreDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_SQLUser_ReStoreDate]  DEFAULT (getdate()),
	[ReStoreFtp] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_SQLUser_ReStoreFtp]  DEFAULT (''),
	[FreeClassType] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_FreeClassType]  DEFAULT ((0)),
	[FreeControlId] [int] NOT NULL CONSTRAINT [DF_Qz_SQLUser_FreeControlId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_SQLUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', 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'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'LoginName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', N'COLUMN',N'DBName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'DBName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', N'COLUMN',N'LoginPass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'登录密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'LoginPass'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', N'COLUMN',N'db_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库容量，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'db_MaxSize'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', N'COLUMN',N'lg_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SQL日志最大值，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'lg_MaxSize'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_SQLUser', N'COLUMN',N'ServerId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属服务器' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_SQLUser', @level2type=N'COLUMN',@level2name=N'ServerId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_TTSUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_TTSUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[BW] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_BW]  DEFAULT ((0)),
	[ServerHome] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_ServerHome]  DEFAULT ((0)),
	[Ips] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_Ips]  DEFAULT (''),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_Flow]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_Memo]  DEFAULT (''),
	[Box] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_Box]  DEFAULT (''),
	[State] [int] NOT NULL,
	[OKDate] [datetime] NOT NULL,
	[IpNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_TTSUser_IpNum]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_TTSUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_TTSUser', N'COLUMN',N'BW'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'带宽，Mbps' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_TTSUser', @level2type=N'COLUMN',@level2name=N'BW'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_TTSUser', N'COLUMN',N'ServerHome'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机房' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_TTSUser', @level2type=N'COLUMN',@level2name=N'ServerHome'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_TTSUser', N'COLUMN',N'Ips'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP列表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_TTSUser', @level2type=N'COLUMN',@level2name=N'Ips'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_TTSUser', N'COLUMN',N'Flow'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月流量，GB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_TTSUser', @level2type=N'COLUMN',@level2name=N'Flow'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_TTSUser', N'COLUMN',N'Box'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机箱' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_TTSUser', @level2type=N'COLUMN',@level2name=N'Box'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Agreement]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Agreement](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[AgreeName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Agreement_AgreeName]  DEFAULT (''),
	[Contect] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Agreement_Contect]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Agreement_UserId]  DEFAULT ((0)),
	[TitleColor] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_Agreement_TitleColor]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Agreement] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Agreement', N'COLUMN',N'AgreeName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'协议标题' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Agreement', @level2type=N'COLUMN',@level2name=N'AgreeName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Agreement', N'COLUMN',N'Contect'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'协议内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Agreement', @level2type=N'COLUMN',@level2name=N'Contect'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Agreement', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Agreement', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_VPS]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_VPS](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[VPSName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_VPSName]  DEFAULT (''),
	[Server] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_Server]  DEFAULT (''),
	[CPUNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_CPUNum]  DEFAULT ((0)),
	[system] [nvarchar](2000) NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_system]  DEFAULT (''),
	[DDR] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_DDR]  DEFAULT ((0)),
	[SATA] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_SATA]  DEFAULT ((0)),
	[BW] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_BW]  DEFAULT ((0)),
	[Ips] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_Ips]  DEFAULT ((0)),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_Flow]  DEFAULT ((0)),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_Diy]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_VPS_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_VPS] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_Box]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_Box](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[BoxName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_Box_BoxName]  DEFAULT (''),
	[Power] [nvarchar](50) NOT NULL,
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_Box_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_Box] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Box', N'COLUMN',N'BoxName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机箱名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Box', @level2type=N'COLUMN',@level2name=N'BoxName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Box', N'COLUMN',N'Power'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电源规格' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Box', @level2type=N'COLUMN',@level2name=N'Power'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_Box', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_Box', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Success]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Success](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SiteName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Success_SiteName]  DEFAULT (''),
	[ClassId] [int] NOT NULL CONSTRAINT [DF_Qz_Success_ClassId]  DEFAULT ((0)),
	[SiteUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Success_SiteUrl]  DEFAULT (''),
	[PicUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Success_PicUrl]  DEFAULT (''),
	[Info] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Success_Info]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Success_AgentUser]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Success] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'SiteName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网站名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'SiteName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'ClassId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'ClassId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'SiteUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'SiteUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'PicUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'缩略图' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'PicUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'Info'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'介绍' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'Info'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Success', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Success', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_DomainUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_DomainUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Domain] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_Domain]  DEFAULT (''),
	[DomainRoot] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_DomainRoot]  DEFAULT (''),
	[State] [int] NOT NULL CONSTRAINT [DF_Qz_DomainUser_State]  DEFAULT ((0)),
	[AddDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_DomainUser_AddDate]  DEFAULT (getdate()),
	[RegDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_DomainUser_RegDate]  DEFAULT (getdate()),
	[uname1] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uname1]  DEFAULT (''),
	[uname2] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uname2]  DEFAULT (''),
	[uname3] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uname3]  DEFAULT (''),
	[uname4] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uname4]  DEFAULT (''),
	[location] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_location]  DEFAULT (''),
	[rname1] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_rname1]  DEFAULT (''),
	[rname2] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_rname2]  DEFAULT (''),
	[ust] [nvarchar](2) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ust]  DEFAULT (''),
	[CTCode] [nvarchar](6) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uprov]  DEFAULT (''),
	[uaddr1] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uaddr1]  DEFAULT (''),
	[uaddr2] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uaddr2]  DEFAULT (''),
	[uzip] [nvarchar](6) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uzip]  DEFAULT (''),
	[utelc] [nvarchar](3) NOT NULL CONSTRAINT [DF_Qz_DomainUser_utelc]  DEFAULT (''),
	[utela] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_utela]  DEFAULT (''),
	[uteln] [nvarchar](12) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uteln]  DEFAULT (''),
	[utele] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_utele]  DEFAULT (''),
	[ufaxc] [nvarchar](3) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ufaxc]  DEFAULT (''),
	[ufaxa] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ufaxa]  DEFAULT (''),
	[ufaxn] [nvarchar](12) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ufaxn]  DEFAULT (''),
	[ufaxe] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ufaxe]  DEFAULT (''),
	[uemail] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uemail]  DEFAULT (''),
	[trade] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_trade]  DEFAULT (N'S8'),
	[uincode] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_uincode]  DEFAULT (''),
	[certtype] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_certtype]  DEFAULT (''),
	[certcode] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_certcode]  DEFAULT (''),
	[entitytype] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_entitytype]  DEFAULT (''),
	[aname1] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_aname1]  DEFAULT (''),
	[aname2] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_aname2]  DEFAULT (''),
	[atelc] [nvarchar](3) NOT NULL CONSTRAINT [DF_Qz_DomainUser_atelc]  DEFAULT (''),
	[atela] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_atela]  DEFAULT (''),
	[ateln] [nvarchar](12) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ateln]  DEFAULT (''),
	[atele] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_atele]  DEFAULT (''),
	[afaxc] [nvarchar](3) NOT NULL CONSTRAINT [DF_Qz_DomainUser_afaxc]  DEFAULT (''),
	[afaxa] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_afaxa]  DEFAULT (''),
	[afaxn] [nvarchar](12) NOT NULL CONSTRAINT [DF_Qz_DomainUser_afaxn]  DEFAULT (''),
	[afaxe] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_afaxe]  DEFAULT (''),
	[aemail] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_aemail]  DEFAULT (''),
	[APIType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainUser_APIType]  DEFAULT ((0)),
	[PassWord] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainUser_PassWord]  DEFAULT (''),
	[dns1] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_dns1]  DEFAULT (''),
	[dns2] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_dns2]  DEFAULT (''),
	[ManageUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DomainUser_ManageUrl]  DEFAULT (''),
	[APIBackStr] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_DomainUser_APIBackStr]  DEFAULT (''),
	[DomainENC] [nvarchar](1) NOT NULL CONSTRAINT [DF_Qz_DomainUser_DomainENC]  DEFAULT (N'G'),
	[BuyTime] [int] NOT NULL CONSTRAINT [DF_Qz_DomainUser_BuyTime]  DEFAULT ((0)),
	[DomainType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainUser_DomainType]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_DomainUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'Domain'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'Domain'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'DomainRoot'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'DomainRoot'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'State'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单状态' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'State'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'AddDate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'创建时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'AddDate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'RegDate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开通时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'RegDate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uname1'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人中文单位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uname1'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uname2'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人英文单位名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uname2'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uname3'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册单位拼音，[.中国\通用网址必须] ---------- 必须为字母' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uname3'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uname4'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册单位缩写， [.中国\通用网址必须]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uname4'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'location'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人单位所在地[注册.中国\通用网址必须]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'location'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'rname1'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人|单位负责人中文名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'rname1'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'rname2'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人|单位负责人英文名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'rname2'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ust'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人英文国家名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ust'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'CTCode'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人英文省份名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'CTCode'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uaddr1'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人中文地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uaddr1'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uaddr2'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人英文地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uaddr2'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uzip'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人邮政编码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uzip'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'utelc'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人电话国家码，可以不填默认为86，长度不能大于3位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'utelc'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'utela'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人电话区号，如果为手机可以不填，此项不可为0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'utela'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uteln'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人电话号码， (区号+电话号码长度必须小于12)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uteln'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'utele'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人电话分机' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'utele'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ufaxc'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人传真国家码，可以不填默认为86，长度不能大于3位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ufaxc'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ufaxa'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人传真区号 ，如果为手机可以不填，此项不可为0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ufaxa'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ufaxn'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人传真号码，必须为数字 (区号+传真号码长度必须小于12)' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ufaxn'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ufaxe'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人传真分机' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ufaxe'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uemail'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人email地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uemail'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'trade'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册人所在行业英文编码 ，[如果不填，默认为商业S8]//此字段最好不填，如果填写，千万不能用小写S' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'trade'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'uincode'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'travel域名UIN编码，travel域名必须，其他域名不需要' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'uincode'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'certtype'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'asia域名证件类型，asia域名必须，其他域名不需要' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'certtype'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'certcode'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'asia域名证件号码，asia域名必须，其他域名不需要' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'certcode'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'entitytype'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'asia域名实体类型，asia域名必须，其他域名不需要' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'entitytype'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'aname1'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人中文名称， [国内域名必填]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'aname1'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'aname2'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人英文名称， [国际域名必填]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'aname2'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'atelc'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人电话国家码，可以不填默认为86，长度不能大于3位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'atelc'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'atela'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人电话区号，如果为手机可以不填' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'atela'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ateln'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人电话号码，区号+电话号码长度必须小于12' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ateln'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'atele'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人电话分机，可以不填，此项不可为0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'atele'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'afaxc'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人传真国家码，可以不填默认为86，长度不能大于3位' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'afaxc'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'afaxa'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人传真区号,如果为手机可以不填，可以不填，此项不可为0' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'afaxa'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'afaxn'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人传真号码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'afaxn'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'afaxe'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人传真分机' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'afaxe'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'aemail'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理联系人电子邮件地址 [必须]' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'aemail'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'APIType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'APIType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', 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'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'PassWord'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'dns1'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'DNS1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'dns1'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'dns2'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'DNS2' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'dns2'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'ManageUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'管理地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'ManageUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'APIBackStr'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'API返回字符串' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'APIBackStr'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'DomainENC'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'繁体中文B，简体中文G' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'DomainENC'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainUser', N'COLUMN',N'BuyTime'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册年限' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainUser', @level2type=N'COLUMN',@level2name=N'BuyTime'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MySqlTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MySqlTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ModelName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_MySqlTemp_ModelName]  DEFAULT ('新建MySql模版'),
	[db_MaxSize] [int] NOT NULL CONSTRAINT [DF_Qz_MySqlTemp_db_MaxSize]  DEFAULT ((20)),
	[Diy] [bit] NOT NULL CONSTRAINT [DF_Qz_MySqlTemp_Diy]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MySqlTemp] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySqlTemp', N'COLUMN',N'ModelName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'模版名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySqlTemp', @level2type=N'COLUMN',@level2name=N'ModelName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MySqlTemp', N'COLUMN',N'db_MaxSize'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'数据库最大容量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MySqlTemp', @level2type=N'COLUMN',@level2name=N'db_MaxSize'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MailNoticeNum]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MailNoticeNum](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[OrderId] [int] NOT NULL CONSTRAINT [DF_Qz_MailNoticeNum_OrderId]  DEFAULT ((0)),
	[PlanType] [int] NOT NULL CONSTRAINT [DF_Qz_MailNoticeNum_PlanType]  DEFAULT ((0)),
	[Num] [int] NOT NULL CONSTRAINT [DF_Qz_MailNoticeNum_Num]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MailNoticeNum] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_CT]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_CT](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CTCode] [nvarchar](6) NOT NULL,
	[CTName] [nvarchar](50) NOT NULL,
 CONSTRAINT [PK_Qz_CT] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Article]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Article](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ClassId] [int] NOT NULL CONSTRAINT [DF_Qz_Article_ClassId]  DEFAULT ((0)),
	[Title] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Article_Title]  DEFAULT (''),
	[ArtContent] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Article_ArtContent]  DEFAULT (''),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_Article_AddTime]  DEFAULT (getdate()),
	[ReadCount] [int] NOT NULL CONSTRAINT [DF_Qz_Article_ReadCount]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Article_AgentUser]  DEFAULT ((0)),
	[IsShare] [bit] NOT NULL,
	[ShowAddTime] [bit] NOT NULL CONSTRAINT [DF_Qz_Article_ShowAddTime]  DEFAULT ((1)),
	[SName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Article_SName]  DEFAULT (''),
	[TitleColor] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_Article_TitleColor]  DEFAULT (''),
	[LinkUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Article_LinkUrl]  DEFAULT (''),
 CONSTRAINT [PK_Qz_Article] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', N'COLUMN',N'ClassId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'分类ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Article', @level2type=N'COLUMN',@level2name=N'ClassId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', 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'Qz_Article', @level2type=N'COLUMN',@level2name=N'Title'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', N'COLUMN',N'ArtContent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'文章内容' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Article', @level2type=N'COLUMN',@level2name=N'ArtContent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', 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'Qz_Article', @level2type=N'COLUMN',@level2name=N'AddTime'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', N'COLUMN',N'ReadCount'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'浏览次数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Article', @level2type=N'COLUMN',@level2name=N'ReadCount'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Article', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属代理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Article', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_ScriptMaps]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_ScriptMaps](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[Extension] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_Extension]  DEFAULT (''),
	[ScriptProcessor] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_ScriptProcessor]  DEFAULT (''),
	[Flags] [int] NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_Flags]  DEFAULT ((0)),
	[IncludedVerbs] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_IncludedVerbs]  DEFAULT (''),
	[DotNetEdition] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_DotNetEdition]  DEFAULT (''),
	[ServerId] [int] NOT NULL CONSTRAINT [DF_Qz_ScriptMaps_ServerId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_ScriptMaps] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ScriptMaps', N'COLUMN',N'Extension'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'支持脚本' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ScriptMaps', @level2type=N'COLUMN',@level2name=N'Extension'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_ScriptMaps', N'COLUMN',N'ScriptProcessor'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'可执行文件地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_ScriptMaps', @level2type=N'COLUMN',@level2name=N'ScriptProcessor'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_CPU]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_CPU](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[CPUName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_CPTName]  DEFAULT (''),
	[zhupin] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_zhupin]  DEFAULT (''),
	[zongxian] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_CardNum]  DEFAULT (''),
	[yiji] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_yiji]  DEFAULT (''),
	[erji] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_erji]  DEFAULT (''),
	[hexinNum] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_hexinNum]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_CPU_Memo]  DEFAULT (''),
 CONSTRAINT [PK_Qz_IDC_CPU] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'CPUName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'CPUName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'zhupin'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'主频率' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'zhupin'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'zongxian'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'前端总线' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'zongxian'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'yiji'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'一级缓存' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'yiji'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'erji'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'二级缓存' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'erji'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'hexinNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'核心数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'hexinNum'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_CPU', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_CPU', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Order]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Order](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SN] [nvarchar](32) NOT NULL,
	[OrderName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Order_OrderName]  DEFAULT (''),
	[ClassType] [int] NOT NULL CONSTRAINT [DF_Qz_Order_ClassType]  DEFAULT ((0)),
	[UserId] [int] NOT NULL CONSTRAINT [DF_Qz_Order_UserName]  DEFAULT ((0)),
	[BuyDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_Order_BuyDate]  DEFAULT (getdate()),
	[EndDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_Order_EndDate]  DEFAULT (getdate()),
	[ControlId] [int] NOT NULL CONSTRAINT [DF_Qz_Order_ControlId]  DEFAULT ((0)),
	[CanUpdate] [bit] NOT NULL CONSTRAINT [DF_Qz_Order_CanUpdate]  DEFAULT ((0)),
	[DiyPar] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Order_PayPrice]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Order_UserId]  DEFAULT ((0)),
	[ProductId] [int] NOT NULL CONSTRAINT [DF_Qz_Order_ProductId]  DEFAULT ((0)),
	[PlaceId] [int] NOT NULL CONSTRAINT [DF_Qz_Order_PlaceId]  DEFAULT ((0)),
	[IsDate] [bit] NOT NULL CONSTRAINT [DF_Qz_Order_IsDate]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_id] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'OrderName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'OrderName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'ClassType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'订单类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'ClassType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'UserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'UserId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'BuyDate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开通时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'BuyDate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'EndDate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'到期时间' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'EndDate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'ControlId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'产品控制ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'ControlId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'CanUpdate'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否允许升级' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'CanUpdate'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Order', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'所属代理用户ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Order', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_ServerHome]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_ServerHome](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[HomeName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_ServerHome_HomeName]  DEFAULT ('新建机房'),
	[HomeInfo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_ServerHome_HomeInfo]  DEFAULT (''),
	[NetType] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_ServerHome_NetType]  DEFAULT (''),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_ServerHome_Memo]  DEFAULT (''),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_ServerHome_MastId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_ServerHome] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_ServerHome', N'COLUMN',N'HomeName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机房名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_ServerHome', @level2type=N'COLUMN',@level2name=N'HomeName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_ServerHome', N'COLUMN',N'HomeInfo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机房介绍' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_ServerHome', @level2type=N'COLUMN',@level2name=N'HomeInfo'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_ServerHome', N'COLUMN',N'NetType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'网络类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_ServerHome', @level2type=N'COLUMN',@level2name=N'NetType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_ServerHome', N'COLUMN',N'Memo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_ServerHome', @level2type=N'COLUMN',@level2name=N'Memo'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_VPSUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_IDC_VPSUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[BW] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_BW]  DEFAULT ((0)),
	[ServerHome] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_ServerHome]  DEFAULT ((0)),
	[Ips] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_Ips]  DEFAULT (''),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_Flow]  DEFAULT ((0)),
	[Memo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_Memo]  DEFAULT (''),
	[State] [int] NOT NULL,
	[OKDate] [datetime] NOT NULL,
	[CPUNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_CPUNum]  DEFAULT ((0)),
	[DDR] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_DDR]  DEFAULT ((0)),
	[SATA] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_SATA]  DEFAULT ((0)),
	[system] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_system]  DEFAULT (''),
	[IPNum] [int] NOT NULL CONSTRAINT [DF_Qz_IDC_VPSUser_IPNum]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_IDC_VPSUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'BW'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'带宽，Mbps' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'BW'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'ServerHome'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'机房' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'ServerHome'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'Ips'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'IP列表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'Ips'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'Flow'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月流量，GB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'Flow'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'CPUNum'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'CPU数量' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'CPUNum'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'DDR'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'内存大小，单位GB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'DDR'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_IDC_VPSUser', N'COLUMN',N'SATA'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'硬盘大小，单位GB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_IDC_VPSUser', @level2type=N'COLUMN',@level2name=N'SATA'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Servers]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Servers](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[ServerName] [nvarchar](16) NOT NULL CONSTRAINT [DF_Qz_Servers_ServerName]  DEFAULT (N'本地服务器'),
	[ServerIp] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Servers_ServerIp]  DEFAULT (N'127.0.0.1'),
	[ServerPort] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_ServerPort]  DEFAULT ((2390)),
	[ServerPass] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Servers_ServerPass]  DEFAULT ((123)),
	[ServerState] [bit] NOT NULL CONSTRAINT [DF_Qz_Servers_ServerState]  DEFAULT ((0)),
	[ServerInfo] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_ServerInfo]  DEFAULT (''),
	[BindIp] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Servers_BindIp]  DEFAULT (''),
	[Server_MailUrl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MailUrl]  DEFAULT (''),
	[Server_MailSetupPath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MailSetupPath]  DEFAULT (N'd:\winwebmail'),
	[Server_phpmyadminurl] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_phpmyadminurl]  DEFAULT (''),
	[DomainBindCheckBeian] [bit] NOT NULL CONSTRAINT [DF_Qz_Servers_DomainBindCheckBeian]  DEFAULT ((1)),
	[Server_SQLAdmin] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_SQLAdmin]  DEFAULT (N'sa'),
	[Server_SQLPwd] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_SQLPwd]  DEFAULT ((123)),
	[Server_SQLPort] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_SQLPort]  DEFAULT ((1433)),
	[Server_SQLEdition] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_SQLEdition]  DEFAULT ((1)),
	[Server_MySQLAdmin] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MySQLAdmin]  DEFAULT (N'root'),
	[Server_MySQLPwd] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MySQLPwd]  DEFAULT ((123)),
	[Server_MySQLPort] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MySQLPort]  DEFAULT ((3306)),
	[Server_MySQLDataPath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_MySQLDataPath]  DEFAULT (N'D:\Program Files\MySQL\MySQL Server 5.5\data'),
	[Server_HostRarMax] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_HostRarMax]  DEFAULT ((50)),
	[Server_HostUnRarMax] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_HostUnRarMax]  DEFAULT ((50)),
	[Server_HostBindDomain] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_Servers_Server_HostBindDomain]  DEFAULT (''),
	[Server_OpenRar] [bit] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_OpenRar]  DEFAULT ((1)),
	[Server_FTPFree] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_FTPFree]  DEFAULT ((10)),
	[Server_FTPMaxUp] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_FTPMaxUp]  DEFAULT ((500)),
	[Server_FTPMaxDown] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_FTPMaxDown]  DEFAULT ((500)),
	[Server_FTPSameip] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Server_FTPSameip]  DEFAULT ((5)),
	[Orders] [int] NOT NULL CONSTRAINT [DF_Qz_Servers_Orders]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_Servers] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', 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'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'ServerIp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被控IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerIp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'ServerPort'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被控端口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerPort'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'ServerPass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被控连接密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerPass'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'ServerState'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'被控状态，开启或者关闭' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerState'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'ServerInfo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'备注信息，如：IP介绍' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'ServerInfo'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'BindIp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名绑定IP列表' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'BindIp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_MailUrl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮局访问地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_MailUrl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_phpmyadminurl'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'phpmyadmin访问地址' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_phpmyadminurl'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'DomainBindCheckBeian'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否开启域名绑定审核' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'DomainBindCheckBeian'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_SQLPort'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SQL端口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_SQLPort'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_MySQLAdmin'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL管理帐号' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_MySQLAdmin'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_MySQLPwd'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL管理密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_MySQLPwd'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_MySQLPort'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL端口' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_MySQLPort'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_MySQLDataPath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL数据库路径' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_MySQLDataPath'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_HostRarMax'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大压缩值，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_HostRarMax'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_HostUnRarMax'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大解压值，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_HostUnRarMax'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_OpenRar'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'开启压缩功能' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_OpenRar'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_FTPFree'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTP空闲超时时间，单位：分钟' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_FTPFree'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_FTPMaxUp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'最大上传速率，单位KB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_FTPMaxUp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_FTPMaxDown'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTP最大下载速率，单位KB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_FTPMaxDown'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Servers', N'COLUMN',N'Server_FTPSameip'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTP同一IP同时连接数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Servers', @level2type=N'COLUMN',@level2name=N'Server_FTPSameip'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_MoneyLog]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_MoneyLog](
	[Id] [int] IDENTITY(1,1) NOT NULL,
	[MoneyType] [int] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_MoneyType]  DEFAULT ((0)),
	[UserId] [int] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_username]  DEFAULT ((0)),
	[LogMoney] [money] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_LogMoney]  DEFAULT ((0)),
	[NowMoney] [money] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_NowMoney]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_AddTime]  DEFAULT (getdate()),
	[Info] [nvarchar](500) NOT NULL CONSTRAINT [DF_Qz_MoneyLog_Info]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_MoneyLog_UserId]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_MoneyLog] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'MoneyType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'财务类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'MoneyType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'UserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'UserId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'LogMoney'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'操作金额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'LogMoney'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'NowMoney'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'当前账户余额' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'NowMoney'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', 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'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'AddTime'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'Info'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'财务说明' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'Info'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_MoneyLog', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_MoneyLog', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_Member]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_Member](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[UserName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Member_UserName]  DEFAULT (''),
	[PassWord] [nvarchar](32) NOT NULL CONSTRAINT [DF_Qz_Member_PassWord]  DEFAULT (''),
	[UserMoney] [money] NOT NULL CONSTRAINT [DF_Qz_Member_UserMoney]  DEFAULT ((0)),
	[vCurrency] [money] NOT NULL CONSTRAINT [DF_Qz_Member_vCurrency]  DEFAULT ((0)),
	[Name] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Member_Name]  DEFAULT (''),
	[Tel] [nvarchar](20) NOT NULL CONSTRAINT [DF_Qz_Member_Tel]  DEFAULT (''),
	[Mobile] [nvarchar](15) NOT NULL CONSTRAINT [DF_Qz_Member_Mobile]  DEFAULT (''),
	[QQ] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Member_QQ]  DEFAULT (''),
	[Email] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Member_Email]  DEFAULT (''),
	[Zip] [nvarchar](6) NOT NULL CONSTRAINT [DF_Qz_Member_Zip]  DEFAULT (''),
	[Address] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_Member_Address]  DEFAULT (''),
	[UserGrade] [int] NOT NULL CONSTRAINT [DF_Qz_Member_UserGrade]  DEFAULT ((0)),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_Member_MastUser]  DEFAULT ((0)),
	[IsAgent] [bit] NOT NULL CONSTRAINT [DF_Qz_Member_IsAgent]  DEFAULT ((0)),
	[Activation] [bit] NOT NULL CONSTRAINT [DF_Qz_Member_Activation]  DEFAULT ((0)),
	[AddTime] [datetime] NOT NULL,
	[RegIp] [nvarchar](15) NOT NULL,
	[CTCode] [nvarchar](6) NOT NULL,
	[IsCompany] [bit] NOT NULL CONSTRAINT [DF_Qz_Member_IsCompany]  DEFAULT ((0)),
	[Enabled] [bit] NOT NULL CONSTRAINT [DF_Qz_Member_Enabled]  DEFAULT ((1)),
 CONSTRAINT [PK_Qz_Member] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'UserName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'UserName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', 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'Qz_Member', @level2type=N'COLUMN',@level2name=N'PassWord'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'vCurrency'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'积分' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'vCurrency'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Name'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'姓名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Name'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Tel'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'电话' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Tel'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Mobile'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'手机' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Mobile'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'QQ'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'QQ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'QQ'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Email'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'E-Mail' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Email'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Zip'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮编' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Zip'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', 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'Qz_Member', @level2type=N'COLUMN',@level2name=N'Address'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'UserGrade'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'会员级别' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'UserGrade'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'上级用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'AgentUserId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'IsAgent'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否为代理' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'IsAgent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Activation'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否激活用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Activation'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', 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'Qz_Member', @level2type=N'COLUMN',@level2name=N'AddTime'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'RegIp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'注册IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'RegIp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_Member', N'COLUMN',N'Enabled'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'是否禁用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_Member', @level2type=N'COLUMN',@level2name=N'Enabled'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_HostUser]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_HostUser](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[HostName] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_HostUser_HostName]  DEFAULT (''),
	[BandWidth] [int] NOT NULL,
	[Domains] [nvarchar](max) NOT NULL,
	[defaultDOC] [nvarchar](512) NOT NULL,
	[IIS] [bigint] NOT NULL,
	[Scriptmaps] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostUser_Scriptmaps]  DEFAULT (''),
	[HttpErrors] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_HostUser_HttpErrors]  DEFAULT ('/404.html'),
	[AppPoolId] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_AppPoolTempId]  DEFAULT ((0)),
	[SQLId] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_SqlTempId]  DEFAULT ((0)),
	[MySQLId] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_MySqlTempId]  DEFAULT ((0)),
	[FreeSQLType] [bit] NOT NULL,
	[MailId] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_MailTempId]  DEFAULT ((0)),
	[Space] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_Space]  DEFAULT ((100)),
	[Flow] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_Flow]  DEFAULT ((0)),
	[vPath] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_vPath]  DEFAULT ((0)),
	[UserPath] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_HostUser_UserPath]  DEFAULT (N'd:\HostUser'),
	[FtpUser] [nvarchar](50) NOT NULL,
	[FtpPass] [nvarchar](255) NOT NULL,
	[Diy] [bit] NOT NULL,
	[ServerId] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_ServerIds]  DEFAULT ((0)),
	[DotNetEdition] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_HostUser_DotNetEdition]  DEFAULT (''),
	[DefaultExIds] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostUser_DefaultExTempId]  DEFAULT ((0)),
	[Port] [int] NOT NULL CONSTRAINT [DF_Qz_HostUser_Port]  DEFAULT ((80)),
	[BindIp] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_HostUser_BindIp]  DEFAULT (''),
	[MIME] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostUser_MIME]  DEFAULT (''),
	[ISAPI] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_HostUser_ISAPI]  DEFAULT (''),
	[IISVer] [nvarchar](20) NOT NULL CONSTRAINT [DF_Qz_HostUser_IISVer]  DEFAULT (''),
 CONSTRAINT [PK_Qz_HostUser] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'HostName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户站点名称' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'HostName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'Scriptmaps'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'每个绑定以|ST|隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'Scriptmaps'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'HttpErrors'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'404错误页面' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'HttpErrors'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'AppPoolId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序池模版' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'AppPoolId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'SQLId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'SQL模版ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'SQLId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'MySQLId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'MySQL模版ID' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'MySQLId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'FreeSQLType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'附属数据库产品是否二选一' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'FreeSQLType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'MailId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'邮件模版' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'MailId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'Space'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'虚拟主机容量，单位MB' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'Space'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'Flow'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'月流量，0为不限制' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'Flow'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'vPath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'子站个数' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'vPath'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'UserPath'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'用户存放位置' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'UserPath'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'FtpUser'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'FTP用户名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'FtpUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'FtpPass'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ftp密码' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'FtpPass'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'ServerId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'适用服务器，每台服务器ID以,隔开' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'ServerId'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_HostUser', N'COLUMN',N'BindIp'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'绑定IP' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_HostUser', @level2type=N'COLUMN',@level2name=N'BindIp'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_OrderRenew]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_OrderRenew](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[SN] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_OrderRenew_SN]  DEFAULT (''),
	[OrderSN] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_OrderRenew_OrderSN]  DEFAULT (''),
	[AddDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_OrderRenew_AddDate]  DEFAULT (getdate()),
	[OKDate] [datetime] NOT NULL CONSTRAINT [DF_Qz_OrderRenew_OKDate]  DEFAULT (getdate()),
	[Success] [bit] NOT NULL CONSTRAINT [DF_Qz_OrderRenew_Success]  DEFAULT ((0)),
	[Msg] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_OrderRenew_Msg]  DEFAULT (''),
	[BuyTime] [int] NOT NULL CONSTRAINT [DF_Qz_OrderRenew_BuyTime]  DEFAULT ((0)),
	[DateType] [int] NOT NULL CONSTRAINT [DF_Qz_OrderRenew_DateType]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_OrderRenew] 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]
END
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_DefaultExTemp]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_DefaultExTemp](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[ExName] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DefaultExTemp_ExName]  DEFAULT (''),
	[ExInfo] [nvarchar](max) NOT NULL CONSTRAINT [DF_Qz_DefaultExTemp_ExInfo]  DEFAULT (''),
	[ExFloder] [nvarchar](255) NOT NULL CONSTRAINT [DF_Qz_DefaultExTemp_ExFloder]  DEFAULT (''),
 CONSTRAINT [PK_Qz_DefaultEx] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DefaultExTemp', N'COLUMN',N'ExName'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DefaultExTemp', @level2type=N'COLUMN',@level2name=N'ExName'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DefaultExTemp', N'COLUMN',N'ExInfo'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序简介' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DefaultExTemp', @level2type=N'COLUMN',@level2name=N'ExInfo'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DefaultExTemp', N'COLUMN',N'ExFloder'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'程序目录' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DefaultExTemp', @level2type=N'COLUMN',@level2name=N'ExFloder'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Qz_DomainPrice]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Qz_DomainPrice](
	[id] [int] IDENTITY(1,1) NOT NULL,
	[APIType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_APIType_1]  DEFAULT ((0)),
	[Price] [money] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_Price_1]  DEFAULT ((0)),
	[UpdatePrice] [money] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_UpdatePrice]  DEFAULT ((0)),
	[UserGrade] [int] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_UserGrade]  DEFAULT ((0)),
	[DomainRoot] [nvarchar](50) NOT NULL CONSTRAINT [DF_Qz_DomainPrice_DomainRoot_1]  DEFAULT (''),
	[AgentUserId] [int] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_AgentUser_1]  DEFAULT ((0)),
	[DomainType] [int] NOT NULL CONSTRAINT [DF_Qz_DomainPrice_DomainType_1]  DEFAULT ((0)),
 CONSTRAINT [PK_Qz_DomainPrice_1] 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]
END
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainPrice', N'COLUMN',N'APIType'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'接口类型' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainPrice', @level2type=N'COLUMN',@level2name=N'APIType'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainPrice', N'COLUMN',N'Price'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'价格字符串' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainPrice', @level2type=N'COLUMN',@level2name=N'Price'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainPrice', N'COLUMN',N'DomainRoot'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'域名' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainPrice', @level2type=N'COLUMN',@level2name=N'DomainRoot'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_Description' , N'SCHEMA',N'dbo', N'TABLE',N'Qz_DomainPrice', N'COLUMN',N'AgentUserId'))
EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'代理用户' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Qz_DomainPrice', @level2type=N'COLUMN',@level2name=N'AgentUserId'
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VSetting]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VSetting]
AS
SELECT     dbo.Qz_Setting.id, dbo.Qz_Setting.SiteName, dbo.Qz_Setting.SiteTitle, dbo.Qz_Setting.keywords, dbo.Qz_Setting.description, dbo.Qz_Setting.FootContact, 
                      dbo.Qz_Setting.SmtpServer, dbo.Qz_Setting.SmtpUserName, dbo.Qz_Setting.SmtpPass, dbo.Qz_Setting.SmtpSender, dbo.Qz_Setting.OpenMail, 
                      dbo.Qz_Setting.AdminMail, dbo.Qz_Setting.OpenPayOnline, dbo.Qz_Setting.vCurrency, dbo.Qz_Setting.BackMoney, dbo.Qz_Setting.UseActivation, 
                      dbo.Qz_Setting.RegUserAgreement, dbo.Qz_Setting.BindDomain, dbo.Qz_Setting.MailTemplate, dbo.Qz_Setting.SiteTel, dbo.Qz_Member.IsAgent, 
                      dbo.Qz_Setting.AgentUserId, dbo.Qz_Member.PassWord, dbo.Qz_Member.UserName, dbo.Qz_Setting.SiteLogo, dbo.Qz_Setting.TemplateId, 
                      dbo.Qz_Template.TempName, dbo.Qz_Template.FloderName
FROM         dbo.Qz_Setting LEFT OUTER JOIN
                      dbo.Qz_Template ON dbo.Qz_Setting.TemplateId = dbo.Qz_Template.id LEFT OUTER JOIN
                      dbo.Qz_Member ON dbo.Qz_Setting.AgentUserId = dbo.Qz_Member.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VSetting', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_Setting"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 201
               Right = 227
            End
            DisplayFlags = 280
            TopColumn = 15
         End
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 6
               Left = 259
               Bottom = 202
               Right = 436
            End
            DisplayFlags = 280
            TopColumn = 12
         End
         Begin Table = "Qz_Template"
            Begin Extent = 
               Top = 62
               Left = 686
               Bottom = 170
               Right = 823
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 23
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
  ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VSetting'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VSetting', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'       Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VSetting'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VSetting', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VSetting'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VDomainList]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VDomainList]
AS
SELECT     b.Price, b.UpdatePrice, a.id, a.ProductName, a.DomainRoot, a.DefaultCheck, a.DisAgent, a.DomainType, a.Orders, b.UserGrade, b.AgentUserId, a.TitleColor
FROM         dbo.Qz_DomainList AS a LEFT OUTER JOIN
                          (SELECT     id, APIType, Price, UpdatePrice, UserGrade, DomainRoot, AgentUserId, DomainType
                            FROM          dbo.Qz_DomainPrice
                            WHERE      (APIType =
                                                       (SELECT     APIType
                                                         FROM          dbo.Qz_APISetting
                                                         WHERE      (DefaultAPI = 1) AND (UseType = 2)))) AS b ON a.DomainRoot = b.DomainRoot AND a.DomainType = b.DomainType
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainList', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[39] 4[15] 2[15] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "a"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 211
               Right = 192
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "b"
            Begin Extent = 
               Top = 6
               Left = 230
               Bottom = 114
               Right = 371
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 17
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainList'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainList', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainList'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VProductPrice]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VProductPrice]
AS
SELECT     id, UserGrade, MonPrice, ThPrice, HfPrice, YearPrice, PriceType, ArtType, PriceId, PlaceId, AgentUserId
FROM         dbo.Qz_ProductPrice
WHERE     (ArtType = 18) AND (PriceType = 1)
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProductPrice', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[9] 2[13] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1[50] 4[25] 3) )"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -96
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_ProductPrice"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 238
               Right = 204
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 14
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProductPrice'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProductPrice', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProductPrice'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VService]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VService]
AS
SELECT     dbo.Qz_AllClass.ClassName, dbo.Qz_Service.id, dbo.Qz_Service.UserId, dbo.Qz_Service.Title, dbo.Qz_Service.Description, dbo.Qz_Service.State, 
                      dbo.Qz_Service.AddTime, dbo.Qz_Service.MastId, dbo.Qz_Service.ClassId, dbo.Qz_Service.AgentUserId, dbo.Qz_Member.UserName
FROM         dbo.Qz_Service LEFT OUTER JOIN
                      dbo.Qz_AllClass ON dbo.Qz_Service.ClassId = dbo.Qz_AllClass.id LEFT OUTER JOIN
                      dbo.Qz_Member ON dbo.Qz_Service.UserId = dbo.Qz_Member.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VService', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[31] 4[17] 2[12] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_Service"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 126
               Right = 188
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_AllClass"
            Begin Extent = 
               Top = 6
               Left = 226
               Bottom = 126
               Right = 376
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 49
               Left = 493
               Bottom = 169
               Right = 643
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 12
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VService'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VService', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VService'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VHostTemp]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VHostTemp]
AS
SELECT     dbo.Qz_MySqlTemp.ModelName AS MySQLName, dbo.Qz_SqlTemp.ModelName AS SQLName, dbo.Qz_MailTemp.ModelName AS MailName, dbo.Qz_HostTemp.id, 
                      dbo.Qz_HostTemp.ModelName, dbo.Qz_HostTemp.BandWidth, dbo.Qz_HostTemp.defaultDOC, dbo.Qz_HostTemp.IIS, dbo.Qz_HostTemp.HttpErrors, 
                      dbo.Qz_HostTemp.AppPoolTempId, dbo.Qz_HostTemp.IsaloneApp, dbo.Qz_HostTemp.ShareSiteNum, dbo.Qz_HostTemp.SqlTempId, dbo.Qz_HostTemp.MySqlTempId, 
                      dbo.Qz_HostTemp.FreeSQLType, dbo.Qz_HostTemp.MailTempId, dbo.Qz_HostTemp.Space, dbo.Qz_HostTemp.Flow, dbo.Qz_HostTemp.vPath, 
                      dbo.Qz_HostTemp.UserPath, dbo.Qz_HostTemp.Diy, dbo.Qz_HostTemp.DefaultExTempId, dbo.Qz_HostTemp.Port, dbo.Qz_HostTemp.ScriptMaps
FROM         dbo.Qz_HostTemp LEFT OUTER JOIN
                      dbo.Qz_MailTemp ON dbo.Qz_HostTemp.MailTempId = dbo.Qz_MailTemp.id LEFT OUTER JOIN
                      dbo.Qz_MySqlTemp ON dbo.Qz_HostTemp.MySqlTempId = dbo.Qz_MySqlTemp.id LEFT OUTER JOIN
                      dbo.Qz_SqlTemp ON dbo.Qz_HostTemp.SqlTempId = dbo.Qz_SqlTemp.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostTemp', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[44] 4[19] 2[12] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_HostTemp"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 238
               Right = 182
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_MailTemp"
            Begin Extent = 
               Top = 87
               Left = 719
               Bottom = 195
               Right = 854
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_MySqlTemp"
            Begin Extent = 
               Top = 11
               Left = 250
               Bottom = 104
               Right = 387
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_SqlTemp"
            Begin Extent = 
               Top = 107
               Left = 398
               Bottom = 215
               Right = 535
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 28
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
       ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostTemp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostTemp', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'  Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostTemp'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostTemp', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostTemp'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VOrder]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VOrder]
AS
SELECT     b.Email, b.QQ, a.id, a.SN, a.OrderName, a.ClassType, a.BuyDate, a.EndDate, a.ControlId, a.CanUpdate, a.AgentUserId, a.UserId, b.UserName, a.ProductId, a.PlaceId, 
                      a.DiyPar, dbo.Qz_Comment.StarNum, dbo.Qz_Comment.CommentContent, dbo.Qz_Comment.SiteUrl, dbo.Qz_Comment.AddTime AS CommentAddTime
FROM         dbo.Qz_Order AS a LEFT OUTER JOIN
                      dbo.Qz_Comment ON a.id = dbo.Qz_Comment.OrderId LEFT OUTER JOIN
                      dbo.Qz_Member AS b ON a.UserId = b.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VOrder', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[20] 2[12] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1[50] 4[25] 3) )"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "a"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 226
               Right = 220
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "b"
            Begin Extent = 
               Top = 0
               Left = 386
               Bottom = 207
               Right = 596
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Comment"
            Begin Extent = 
               Top = 36
               Left = 697
               Bottom = 206
               Right = 871
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 21
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VOrder'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VOrder', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VOrder'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VOrder', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VOrder'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VComment]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VComment]
AS
SELECT     c.id, c.CommentContent, c.StarNum, c.ProductId, c.AddTime, c.SiteUrl, c.OrderId, c.UserId, dbo.Qz_Member.UserName
FROM         (SELECT     dbo.Qz_Comment.id, dbo.Qz_Comment.CommentContent, dbo.Qz_Comment.StarNum, dbo.Qz_Comment.ProductId, dbo.Qz_Comment.AddTime, 
                                              dbo.Qz_Comment.SiteUrl, dbo.Qz_Comment.OrderId, dbo.Qz_Order.UserId
                       FROM          dbo.Qz_Comment LEFT OUTER JOIN
                                              dbo.Qz_Order ON dbo.Qz_Comment.OrderId = dbo.Qz_Order.id) AS c LEFT OUTER JOIN
                      dbo.Qz_Member ON c.UserId = dbo.Qz_Member.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VComment', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "c"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 184
               Right = 228
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 31
               Left = 353
               Bottom = 175
               Right = 557
            End
            DisplayFlags = 280
            TopColumn = 15
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VComment'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VComment', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VComment'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VMember]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VMember]
AS
SELECT     dbo.Qz_AllClass.ClassName AS UserGradeName, dbo.Qz_Member.id, dbo.Qz_Member.UserName, dbo.Qz_Member.PassWord, dbo.Qz_Member.UserMoney, 
                      dbo.Qz_Member.vCurrency, dbo.Qz_Member.Name, dbo.Qz_Member.Tel, dbo.Qz_Member.Mobile, dbo.Qz_Member.QQ, dbo.Qz_Member.Email, dbo.Qz_Member.Zip, 
                      dbo.Qz_Member.Address, dbo.Qz_Member.UserGrade, dbo.Qz_Member.AgentUserId, dbo.Qz_Member.IsAgent, dbo.Qz_Member.Activation, dbo.Qz_Member.AddTime, 
                      dbo.Qz_Member.RegIp, dbo.Qz_Member.CTCode, dbo.Qz_Member.IsCompany, dbo.Qz_Member.Enabled, dbo.Qz_AgentUserAPI.MemberId, 
                      dbo.Qz_AgentUserAPI.IpList, dbo.Qz_AgentUserAPI.AppKey
FROM         dbo.Qz_Member LEFT OUTER JOIN
                      dbo.Qz_AgentUserAPI ON dbo.Qz_Member.id = dbo.Qz_AgentUserAPI.MemberId LEFT OUTER JOIN
                      dbo.Qz_AllClass ON dbo.Qz_Member.UserGrade = dbo.Qz_AllClass.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMember', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[33] 4[26] 2[16] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -96
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 222
               Right = 236
            End
            DisplayFlags = 280
            TopColumn = 10
         End
         Begin Table = "Qz_AgentUserAPI"
            Begin Extent = 
               Top = 39
               Left = 646
               Bottom = 147
               Right = 776
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_AllClass"
            Begin Extent = 
               Top = 9
               Left = 310
               Bottom = 208
               Right = 522
            End
            DisplayFlags = 280
            TopColumn = 5
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 22
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 2355
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMember'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMember', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMember'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMember', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMember'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_VTTS]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_IDC_VTTS]
AS
SELECT     dbo.Qz_IDC_Box.BoxName, dbo.Qz_IDC_MCT.MCTName, dbo.Qz_IDC_Box.Power AS Box_Power, dbo.Qz_IDC_TTS.id, dbo.Qz_IDC_TTS.TTSName, dbo.Qz_IDC_TTS.BW, dbo.Qz_IDC_TTS.Ips, 
                      dbo.Qz_IDC_TTS.Box, dbo.Qz_IDC_TTS.MCT, dbo.Qz_IDC_TTS.Memo, dbo.Qz_IDC_TTS.Flow, dbo.Qz_IDC_TTS.Diy
FROM         dbo.Qz_IDC_TTS LEFT OUTER JOIN
                      dbo.Qz_IDC_Box ON dbo.Qz_IDC_TTS.Box = dbo.Qz_IDC_Box.id LEFT OUTER JOIN
                      dbo.Qz_IDC_MCT ON dbo.Qz_IDC_TTS.MCT = dbo.Qz_IDC_MCT.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VTTS', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[36] 4[18] 2[18] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_TTS"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 177
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_Box"
            Begin Extent = 
               Top = 6
               Left = 215
               Bottom = 114
               Right = 345
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_MCT"
            Begin Extent = 
               Top = 83
               Left = 367
               Bottom = 191
               Right = 506
            End
            DisplayFlags = 280
            TopColumn = 1
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 11
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 1005
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VTTS'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VTTS', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VTTS'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VHostUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VHostUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_HostUser.id, dbo.Qz_HostUser.HostName, dbo.Qz_HostUser.BandWidth, dbo.Qz_HostUser.Domains, 
                      dbo.Qz_HostUser.defaultDOC, dbo.Qz_HostUser.IIS, dbo.Qz_HostUser.Scriptmaps, dbo.Qz_HostUser.HttpErrors, dbo.Qz_HostUser.AppPoolId, 
                      dbo.Qz_HostUser.SQLId, dbo.Qz_HostUser.MySQLId, dbo.Qz_HostUser.FreeSQLType, dbo.Qz_HostUser.MailId, dbo.Qz_HostUser.Space, dbo.Qz_HostUser.Flow, 
                      dbo.Qz_HostUser.vPath, dbo.Qz_HostUser.UserPath, dbo.Qz_HostUser.FtpUser, dbo.Qz_HostUser.FtpPass, dbo.Qz_HostUser.Diy, dbo.Qz_HostUser.ServerId, 
                      dbo.Qz_HostUser.DotNetEdition, dbo.Qz_HostUser.DefaultExIds, dbo.Qz_HostUser.Port, dbo.Qz_HostUser.BindIp, o.UserName, o.OrderName, o.id AS OrderId,
                          (SELECT     COUNT(id) AS PNum
                            FROM          dbo.Qz_VPath
                            WHERE      (HostUserId = o.ControlId)) AS VPathNum, dbo.Qz_HostUser.MIME, dbo.Qz_HostUser.ISAPI, dbo.Qz_AppPoolUser.AppName, o.Email, 
                      dbo.Qz_Servers.ServerInfo, o.QQ, o.AgentUserId, o.UserId, dbo.Qz_HostUser.IISVer, o.ProductId, o.PlaceId, o.DiyPar, o.CanUpdate
FROM         dbo.Qz_HostUser LEFT OUTER JOIN
                      dbo.Qz_Servers ON dbo.Qz_HostUser.ServerId = dbo.Qz_Servers.Id LEFT OUTER JOIN
                      dbo.Qz_AppPoolUser ON dbo.Qz_HostUser.AppPoolId = dbo.Qz_AppPoolUser.id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 1)) AS o ON dbo.Qz_HostUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[17] 2[8] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_HostUser"
            Begin Extent = 
               Top = 8
               Left = 27
               Bottom = 209
               Right = 211
            End
            DisplayFlags = 280
            TopColumn = 18
         End
         Begin Table = "Qz_Servers"
            Begin Extent = 
               Top = 26
               Left = 738
               Bottom = 146
               Right = 943
            End
            DisplayFlags = 280
            TopColumn = 2
         End
         Begin Table = "Qz_AppPoolUser"
            Begin Extent = 
               Top = 25
               Left = 548
               Bottom = 172
               Right = 721
            End
            DisplayFlags = 280
            TopColumn = 13
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 249
               Bottom = 114
               Right = 390
            End
            DisplayFlags = 280
            TopColumn = 12
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 63
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'= 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 720
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1935
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VHostUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VHostUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_VRent]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_IDC_VRent]
AS
SELECT     dbo.Qz_IDC_Box.BoxName, dbo.Qz_IDC_CPT.CPTName, dbo.Qz_IDC_DDR.DDRName, dbo.Qz_IDC_CPU.CPUName, dbo.Qz_IDC_SATA.SATAName, 
                      dbo.Qz_IDC_Box.Power AS Box_Power, dbo.Qz_IDC_CPT.NetCard AS CPT_NetCard, dbo.Qz_IDC_CPT.CardNum AS CPT_CardNum, 
                      dbo.Qz_IDC_CPU.hexinNum AS CPU_hexinNum, dbo.Qz_IDC_CPU.erji AS CPU_erji, dbo.Qz_IDC_CPU.yiji AS CPU_yiji, dbo.Qz_IDC_CPU.zongxian AS CPU_zongxian, 
                      dbo.Qz_IDC_CPU.zhupin AS CPU_zhupin, dbo.Qz_IDC_DDR.DDRType AS DDR_DDRType, dbo.Qz_IDC_DDR.zhupin AS DDR_zhupin, 
                      dbo.Qz_IDC_DDR.rongliang AS DDR_rongliang, dbo.Qz_IDC_SATA.rongliang AS SATA_rongliang, dbo.Qz_IDC_SATA.jiekou AS SATA_jiekou, 
                      dbo.Qz_IDC_SATA.zhuansu AS SATA_zhuansu, dbo.Qz_IDC_Rent.*
FROM         dbo.Qz_IDC_Rent LEFT OUTER JOIN
                      dbo.Qz_IDC_Box ON dbo.Qz_IDC_Rent.Box = dbo.Qz_IDC_Box.id LEFT OUTER JOIN
                      dbo.Qz_IDC_CPT ON dbo.Qz_IDC_Rent.CPT = dbo.Qz_IDC_CPT.id LEFT OUTER JOIN
                      dbo.Qz_IDC_CPU ON dbo.Qz_IDC_Rent.CPU = dbo.Qz_IDC_CPU.id LEFT OUTER JOIN
                      dbo.Qz_IDC_DDR ON dbo.Qz_IDC_Rent.DDR = dbo.Qz_IDC_DDR.id LEFT OUTER JOIN
                      dbo.Qz_IDC_SATA ON dbo.Qz_IDC_Rent.SATA = dbo.Qz_IDC_SATA.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VRent', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[34] 4[28] 2[13] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_Rent"
            Begin Extent = 
               Top = 5
               Left = 0
               Bottom = 113
               Right = 139
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_Box"
            Begin Extent = 
               Top = 2
               Left = 223
               Bottom = 150
               Right = 361
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_CPT"
            Begin Extent = 
               Top = 6
               Left = 383
               Bottom = 172
               Right = 519
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_CPU"
            Begin Extent = 
               Top = 6
               Left = 551
               Bottom = 183
               Right = 687
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_DDR"
            Begin Extent = 
               Top = 6
               Left = 719
               Bottom = 183
               Right = 849
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_IDC_SATA"
            Begin Extent = 
               Top = 44
               Left = 133
               Bottom = 191
               Right = 272
            End
            DisplayFlags = 280
            TopColumn = 1
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 24
         Width = 284
         Width = 1500
         Width' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VRent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VRent', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 1425
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VRent'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VRent', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VRent'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VAd]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VAd]
AS
SELECT     dbo.Qz_AdPlace.TemplateId, dbo.Qz_AdPlace.PlaceIndex, dbo.Qz_Ad.*
FROM         dbo.Qz_Ad INNER JOIN
                      dbo.Qz_AdPlace ON dbo.Qz_Ad.AdPlaceId = dbo.Qz_AdPlace.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VAd', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_Ad"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 181
               Right = 182
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_AdPlace"
            Begin Extent = 
               Top = 6
               Left = 217
               Bottom = 114
               Right = 351
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VAd'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VAd', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VAd'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VIDC_RentUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VIDC_RentUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_IDC_RentUser.id, dbo.Qz_IDC_RentUser.CPU, dbo.Qz_IDC_RentUser.DDR, dbo.Qz_IDC_RentUser.SATA, 
                      dbo.Qz_IDC_RentUser.CPT, dbo.Qz_IDC_RentUser.BW, dbo.Qz_IDC_RentUser.ServerHome, dbo.Qz_IDC_RentUser.Ips, dbo.Qz_IDC_RentUser.Flow, 
                      dbo.Qz_IDC_RentUser.Memo, dbo.Qz_IDC_RentUser.Box, dbo.Qz_IDC_RentUser.PTR, dbo.Qz_IDC_RentUser.State, dbo.Qz_IDC_RentUser.OKDate, o.UserName, 
                      o.OrderName, o.id AS OrderId, o.Email, o.QQ, o.AgentUserId, o.UserId, dbo.Qz_IDC_ServerHome.HomeName, o.CanUpdate, dbo.Qz_IDC_RentUser.IpNum
FROM         dbo.Qz_IDC_RentUser LEFT OUTER JOIN
                      dbo.Qz_IDC_ServerHome ON dbo.Qz_IDC_RentUser.ServerHome = dbo.Qz_IDC_ServerHome.id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 7)) AS o ON dbo.Qz_IDC_RentUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VIDC_RentUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[33] 4[18] 2[23] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_RentUser"
            Begin Extent = 
               Top = 18
               Left = 132
               Bottom = 126
               Right = 279
            End
            DisplayFlags = 280
            TopColumn = 11
         End
         Begin Table = "Qz_IDC_ServerHome"
            Begin Extent = 
               Top = 112
               Left = 357
               Bottom = 220
               Right = 491
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 0
               Left = 357
               Bottom = 108
               Right = 498
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 30
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 2910
         Alias = 900
         Table = 1170
         Ou' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VIDC_RentUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VIDC_RentUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'tput = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VIDC_RentUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VIDC_RentUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VIDC_RentUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VMySQLUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VMySQLUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_MySQLUser.id, dbo.Qz_MySQLUser.LoginName, dbo.Qz_MySQLUser.DBName, dbo.Qz_MySQLUser.LoginPass, 
                      dbo.Qz_MySQLUser.db_MaxSize, dbo.Qz_MySQLUser.ServerId, o.UserName, o.OrderName, o.id AS OrderId, dbo.Qz_Servers.Server_MySQLAdmin, 
                      dbo.Qz_Servers.Server_MySQLPwd, dbo.Qz_Servers.Server_MySQLPort, dbo.Qz_Servers.Server_MySQLDataPath, dbo.Qz_Servers.Server_phpmyadminurl, o.Email, 
                      o.QQ, o.AgentUserId, o.UserId, dbo.Qz_Servers.ServerInfo, dbo.Qz_Servers.BindIp, dbo.Qz_MySQLUser.FreeClassType, dbo.Qz_MySQLUser.FreeControlId, 
                      o.ProductId, o.PlaceId, o.DiyPar, o.CanUpdate
FROM         dbo.Qz_MySQLUser LEFT OUTER JOIN
                      dbo.Qz_Servers ON dbo.Qz_MySQLUser.ServerId = dbo.Qz_Servers.Id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 5)) AS o ON dbo.Qz_MySQLUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMySQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[15] 2[16] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_MySQLUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 202
               Right = 229
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Servers"
            Begin Extent = 
               Top = 12
               Left = 623
               Bottom = 197
               Right = 822
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 267
               Bottom = 114
               Right = 408
            End
            DisplayFlags = 280
            TopColumn = 8
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 23
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMySQLUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMySQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N' = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMySQLUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMySQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMySQLUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[QZ_VMailUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[QZ_VMailUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_MailUser.id, dbo.Qz_MailUser.Domain, dbo.Qz_MailUser.PassWord, dbo.Qz_MailUser.Size, dbo.Qz_MailUser.Num, 
                      dbo.Qz_MailUser.ServerId, o.UserName, o.OrderName, o.id AS OrderId, dbo.Qz_Servers.Server_MailUrl, dbo.Qz_Servers.ServerPass, dbo.Qz_Servers.BindIp, 
                      o.Email, o.QQ, o.AgentUserId, o.UserId, dbo.Qz_Servers.ServerInfo, dbo.Qz_MailUser.FreeClassType, dbo.Qz_MailUser.FreeControlId, o.ProductId, o.PlaceId, 
                      o.DiyPar, o.CanUpdate
FROM         dbo.Qz_MailUser LEFT OUTER JOIN
                      dbo.Qz_Servers ON dbo.Qz_MailUser.ServerId = dbo.Qz_Servers.Id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 3)) AS o ON dbo.Qz_MailUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VMailUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[31] 4[18] 2[14] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_MailUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 179
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Servers"
            Begin Extent = 
               Top = 12
               Left = 295
               Bottom = 120
               Right = 491
            End
            DisplayFlags = 280
            TopColumn = 16
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 529
               Bottom = 114
               Right = 670
            End
            DisplayFlags = 280
            TopColumn = 9
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 17
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VMailUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VMailUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VMailUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VDomainInto]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VDomainInto]
AS
SELECT     dbo.Qz_DomainInto.*, dbo.Qz_Member.UserName, dbo.Qz_Member.QQ, dbo.Qz_Member.Email, dbo.Qz_Member.Mobile, dbo.Qz_Member.Tel, dbo.Qz_Member.Name
FROM         dbo.Qz_DomainInto INNER JOIN
                      dbo.Qz_Member ON dbo.Qz_DomainInto.UserId = dbo.Qz_Member.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainInto', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_DomainInto"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 201
               Right = 214
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 14
               Left = 333
               Bottom = 181
               Right = 504
            End
            DisplayFlags = 280
            TopColumn = 1
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainInto'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainInto', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainInto'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VShopUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VShopUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_ShopUser.id, o.UserName, dbo.Qz_ShopUser.IsDatePro, dbo.Qz_ShopUser.Attr, dbo.Qz_ShopUser.UserAttr, 
                      o.OrderName, o.id AS OrderId, o.Email, o.QQ, o.AgentUserId, o.UserId, dbo.Qz_ShopUser.Memo
FROM         dbo.Qz_ShopUser LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 10)) AS o ON dbo.Qz_ShopUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VShopUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[21] 2[15] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_ShopUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 169
            End
            DisplayFlags = 280
            TopColumn = 1
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 207
               Bottom = 114
               Right = 348
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 15
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VShopUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VShopUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VShopUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[QZ_VSQLUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[QZ_VSQLUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_SQLUser.id, dbo.Qz_SQLUser.LoginName, dbo.Qz_SQLUser.DBName, dbo.Qz_SQLUser.LoginPass, 
                      dbo.Qz_SQLUser.db_MaxSize, dbo.Qz_SQLUser.lg_MaxSize, dbo.Qz_SQLUser.ServerId, dbo.Qz_SQLUser.SQLEdition, dbo.Qz_SQLUser.FilePath, o.UserName, 
                      o.OrderName, o.id AS OrderId, dbo.Qz_Servers.BindIp, dbo.Qz_Servers.Server_SQLEdition, dbo.Qz_Servers.Server_SQLPort, dbo.Qz_Servers.Server_SQLPwd, 
                      dbo.Qz_Servers.Server_SQLAdmin, dbo.Qz_SQLUser.BackUpDate, dbo.Qz_SQLUser.BackUpFtp, dbo.Qz_SQLUser.ReStoreDate, dbo.Qz_SQLUser.ReStoreFtp, 
                      o.Email, o.QQ, o.AgentUserId, o.UserId, dbo.Qz_Servers.ServerInfo, dbo.Qz_SQLUser.FreeClassType, dbo.Qz_SQLUser.FreeControlId, o.ProductId, o.PlaceId, 
                      o.DiyPar, o.CanUpdate
FROM         dbo.Qz_SQLUser LEFT OUTER JOIN
                      dbo.Qz_Servers ON dbo.Qz_SQLUser.ServerId = dbo.Qz_Servers.Id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 4)) AS o ON dbo.Qz_SQLUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VSQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[10] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1[50] 4[25] 3) )"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -288
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_SQLUser"
            Begin Extent = 
               Top = 294
               Left = 38
               Bottom = 488
               Right = 192
            End
            DisplayFlags = 280
            TopColumn = 6
         End
         Begin Table = "Qz_Servers"
            Begin Extent = 
               Top = 390
               Left = 233
               Bottom = 498
               Right = 429
            End
            DisplayFlags = 280
            TopColumn = 14
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 294
               Left = 467
               Bottom = 402
               Right = 608
            End
            DisplayFlags = 280
            TopColumn = 9
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 24
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 2010
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
      ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VSQLUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VSQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'   Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VSQLUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VSQLUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VSQLUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[QZ_VIDC_TTSUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[QZ_VIDC_TTSUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_IDC_TTSUser.id, dbo.Qz_IDC_TTSUser.BW, dbo.Qz_IDC_TTSUser.ServerHome, dbo.Qz_IDC_TTSUser.Ips, 
                      dbo.Qz_IDC_TTSUser.Flow, dbo.Qz_IDC_TTSUser.Memo, dbo.Qz_IDC_TTSUser.Box, dbo.Qz_IDC_TTSUser.State, dbo.Qz_IDC_TTSUser.OKDate, o.UserName, 
                      o.OrderName, o.id AS OrderId, o.QQ, o.Email, o.AgentUserId, o.UserId, dbo.Qz_IDC_ServerHome.HomeName, dbo.Qz_IDC_TTSUser.IpNum, o.CanUpdate
FROM         dbo.Qz_IDC_TTSUser LEFT OUTER JOIN
                      dbo.Qz_IDC_ServerHome ON dbo.Qz_IDC_TTSUser.ServerHome = dbo.Qz_IDC_ServerHome.id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 8)) AS o ON dbo.Qz_IDC_TTSUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VIDC_TTSUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[27] 4[34] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_TTSUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 177
            End
            DisplayFlags = 280
            TopColumn = 1
         End
         Begin Table = "Qz_IDC_ServerHome"
            Begin Extent = 
               Top = 40
               Left = 443
               Bottom = 148
               Right = 577
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 215
               Bottom = 114
               Right = 356
            End
            DisplayFlags = 280
            TopColumn = 12
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VIDC_TTSUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'QZ_VIDC_TTSUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'QZ_VIDC_TTSUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_IDC_VVPS]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_IDC_VVPS]
AS
SELECT     id, VPSName, Server, CPUNum, system, DDR, SATA, BW, Ips, Flow, Diy, Memo
FROM         dbo.Qz_IDC_VPS
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VVPS', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[21] 2[11] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_VPS"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 238
               Right = 220
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 13
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 2100
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VVPS'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_IDC_VVPS', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_IDC_VVPS'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VDomainUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VDomainUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_DomainUser.Domain, dbo.Qz_DomainUser.DomainRoot, dbo.Qz_DomainUser.State, dbo.Qz_DomainUser.AddDate, 
                      dbo.Qz_DomainUser.RegDate, dbo.Qz_DomainUser.uname1, dbo.Qz_DomainUser.uname2, dbo.Qz_DomainUser.uname3, dbo.Qz_DomainUser.uname4, 
                      dbo.Qz_DomainUser.location, dbo.Qz_DomainUser.rname1, dbo.Qz_DomainUser.rname2, dbo.Qz_DomainUser.ust, dbo.Qz_DomainUser.CTCode, 
                      dbo.Qz_DomainUser.uaddr1, dbo.Qz_DomainUser.uaddr2, dbo.Qz_DomainUser.uzip, dbo.Qz_DomainUser.utelc, dbo.Qz_DomainUser.utela, 
                      dbo.Qz_DomainUser.uteln, dbo.Qz_DomainUser.utele, dbo.Qz_DomainUser.ufaxc, dbo.Qz_DomainUser.ufaxa, dbo.Qz_DomainUser.ufaxn, 
                      dbo.Qz_DomainUser.ufaxe, dbo.Qz_DomainUser.uemail, dbo.Qz_DomainUser.trade, dbo.Qz_DomainUser.uincode, dbo.Qz_DomainUser.certtype, 
                      dbo.Qz_DomainUser.certcode, dbo.Qz_DomainUser.entitytype, dbo.Qz_DomainUser.aname1, dbo.Qz_DomainUser.aname2, dbo.Qz_DomainUser.atelc, 
                      dbo.Qz_DomainUser.atela, dbo.Qz_DomainUser.ateln, dbo.Qz_DomainUser.atele, dbo.Qz_DomainUser.afaxc, dbo.Qz_DomainUser.afaxa, dbo.Qz_DomainUser.afaxn,
                       dbo.Qz_DomainUser.afaxe, dbo.Qz_DomainUser.aemail, dbo.Qz_DomainUser.APIType, dbo.Qz_DomainUser.PassWord, dbo.Qz_DomainUser.dns1, 
                      dbo.Qz_DomainUser.dns2, dbo.Qz_DomainUser.ManageUrl, dbo.Qz_DomainUser.APIBackStr, dbo.Qz_DomainUser.DomainENC, dbo.Qz_DomainUser.BuyTime, 
                      dbo.Qz_DomainUser.DomainType, o.OrderName, dbo.Qz_DomainUser.id, o.id AS OrderId, o.Email, o.QQ, o.AgentUserId, o.UserId, o.UserName
FROM         dbo.Qz_DomainUser LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 2)) AS o ON dbo.Qz_DomainUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[43] 4[12] 2[21] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_DomainUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 194
               Right = 185
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 223
               Bottom = 241
               Right = 430
            End
            DisplayFlags = 280
            TopColumn = 4
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 64
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 150' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'0
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VDomainUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VDomainUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VOrderRenew]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VOrderRenew]
AS
SELECT     dbo.Qz_OrderRenew.id, dbo.Qz_OrderRenew.SN, dbo.Qz_OrderRenew.OrderSN, dbo.Qz_OrderRenew.AddDate, dbo.Qz_OrderRenew.OKDate, 
                      dbo.Qz_OrderRenew.Success, dbo.Qz_OrderRenew.Msg, dbo.Qz_OrderRenew.BuyTime, dbo.Qz_OrderRenew.DateType, dbo.Qz_Order.ControlId, 
                      dbo.Qz_Order.OrderName, dbo.Qz_Order.ClassType, dbo.Qz_Order.AgentUserId, dbo.Qz_Order.UserId, dbo.Qz_Order.EndDate
FROM         dbo.Qz_OrderRenew LEFT OUTER JOIN
                      dbo.Qz_Order ON dbo.Qz_OrderRenew.OrderSN = dbo.Qz_Order.SN
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VOrderRenew', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[32] 4[20] 2[12] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_OrderRenew"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 217
               Right = 199
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Order"
            Begin Extent = 
               Top = 6
               Left = 368
               Bottom = 213
               Right = 548
            End
            DisplayFlags = 280
            TopColumn = 4
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 15
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VOrderRenew'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VOrderRenew', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VOrderRenew'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VIDC_VPSUser]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VIDC_VPSUser]
AS
SELECT     o.SN, o.BuyDate, o.EndDate, o.ControlId, dbo.Qz_IDC_VPSUser.id, dbo.Qz_IDC_VPSUser.BW, dbo.Qz_IDC_VPSUser.ServerHome, dbo.Qz_IDC_VPSUser.Ips, 
                      dbo.Qz_IDC_VPSUser.Flow, dbo.Qz_IDC_VPSUser.Memo, dbo.Qz_IDC_VPSUser.State, dbo.Qz_IDC_VPSUser.OKDate, dbo.Qz_IDC_VPSUser.CPUNum, 
                      dbo.Qz_IDC_VPSUser.DDR, dbo.Qz_IDC_VPSUser.SATA, o.UserName, o.OrderName, o.id AS OrderId, o.Email, o.QQ, o.AgentUserId, o.UserId, 
                      dbo.Qz_IDC_VPSUser.system, dbo.Qz_IDC_ServerHome.HomeName, o.ProductId, o.CanUpdate, dbo.Qz_IDC_VPSUser.IPNum
FROM         dbo.Qz_IDC_VPSUser LEFT OUTER JOIN
                      dbo.Qz_IDC_ServerHome ON dbo.Qz_IDC_VPSUser.ServerHome = dbo.Qz_IDC_ServerHome.id LEFT OUTER JOIN
                          (SELECT     Email, QQ, id, SN, OrderName, ClassType, BuyDate, EndDate, ControlId, CanUpdate, AgentUserId, UserId, UserName, ProductId, PlaceId, DiyPar
                            FROM          dbo.Qz_VOrder
                            WHERE      (ClassType = 9)) AS o ON dbo.Qz_IDC_VPSUser.id = o.ControlId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VIDC_VPSUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[40] 4[20] 2[20] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_IDC_VPSUser"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 165
               Right = 183
            End
            DisplayFlags = 280
            TopColumn = 6
         End
         Begin Table = "Qz_IDC_ServerHome"
            Begin Extent = 
               Top = 31
               Left = 481
               Bottom = 139
               Right = 615
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "o"
            Begin Extent = 
               Top = 6
               Left = 221
               Bottom = 114
               Right = 362
            End
            DisplayFlags = 280
            TopColumn = 8
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 9
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 2445
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VIDC_VPSUser'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VIDC_VPSUser', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VIDC_VPSUser'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VMoneyLog]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VMoneyLog]
AS
SELECT     dbo.Qz_MoneyLog.Id, dbo.Qz_MoneyLog.MoneyType, dbo.Qz_MoneyLog.UserId, dbo.Qz_MoneyLog.LogMoney, dbo.Qz_MoneyLog.NowMoney, 
                      dbo.Qz_MoneyLog.AddTime, dbo.Qz_MoneyLog.Info, dbo.Qz_MoneyLog.AgentUserId, dbo.Qz_Member.UserName
FROM         dbo.Qz_MoneyLog LEFT OUTER JOIN
                      dbo.Qz_Member ON dbo.Qz_MoneyLog.UserId = dbo.Qz_Member.id
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMoneyLog', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[41] 4[21] 2[14] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_MoneyLog"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 179
            End
            DisplayFlags = 280
            TopColumn = 0
         End
         Begin Table = "Qz_Member"
            Begin Extent = 
               Top = 6
               Left = 217
               Bottom = 114
               Right = 358
            End
            DisplayFlags = 280
            TopColumn = 0
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 10
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMoneyLog'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VMoneyLog', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VMoneyLog'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VProduct]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VProduct]
AS
SELECT     b.MonPrice, b.ThPrice, b.HfPrice, b.YearPrice, b.PlaceId, b.UserGrade, a.id, a.ProductName, a.ProductInfo, a.ProductSN, a.FacePic, a.ClassType, a.ClassId, a.TempId, 
                      a.vCurrency, a.DisAgent, a.BuyAgreement, a.CanUpdate, a.BeSlp, a.Orders, a.PlaceIds, a.SellNum, a.FreeDays, b.AgentUserId, a.IsOneOf, a.TitleColor
FROM         dbo.Qz_Product AS a LEFT OUTER JOIN
                      dbo.Qz_VProductPrice AS b ON a.id = b.PriceId AND b.PlaceId = (CASE WHEN a.classtype IN (1, 3, 4, 5) THEN
                          (SELECT     TOP (1) Id
                            FROM          dbo.Qz_Servers
                            WHERE      ('','' + a.PlaceIds + '','' LIKE ''%,'' + CONVERT(nvarchar(255), Id) + '',%'' AND ServerState = 1)
                            ORDER BY Orders DESC) ELSE
                          (SELECT     TOP (1) Id
                            FROM          dbo.Qz_IDC_ServerHome
                            WHERE      ('','' + a.PlaceIds + '','' LIKE ''%,'' + CONVERT(nvarchar(255), Id) + '',%'')
                            ORDER BY Orders DESC) END)
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProduct', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[38] 4[19] 2[18] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = -192
         Left = 0
      End
      Begin Tables = 
         Begin Table = "a"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 238
               Right = 214
            End
            DisplayFlags = 280
            TopColumn = 7
         End
         Begin Table = "b"
            Begin Extent = 
               Top = 8
               Left = 394
               Bottom = 166
               Right = 544
            End
            DisplayFlags = 280
            TopColumn = 4
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 26
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
         GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProduct'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProduct', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=1 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProduct'
;
SET ANSI_NULLS ON
;
SET QUOTED_IDENTIFIER ON
;
IF NOT EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[Qz_VProduct_Shop]'))
EXEC dbo.sp_executesql @statement = N'CREATE VIEW [dbo].[Qz_VProduct_Shop]
AS
SELECT     b.MonPrice, b.ThPrice, b.HfPrice, b.YearPrice, b.PlaceId, b.UserGrade, a.id, a.ProductName, a.ProductInfo, a.ProductSN, a.FacePic, a.ClassType, a.ClassId, a.TempId, 
                      a.vCurrency, a.DisAgent, a.BuyAgreement, a.CanUpdate, a.BeSlp, a.Orders, a.PlaceIds, a.SellNum, a.FreeDays, dbo.Qz_ShopTemp.IsDatePro, b.AgentUserId, 
                      a.TitleColor
FROM         (SELECT     id, ProductName, ProductInfo, ProductSN, FacePic, ClassType, ClassId, TempId, vCurrency, DisAgent, BuyAgreement, CanUpdate, BeSlp, Orders, PlaceIds, 
                                              SellNum, FreeDays, TitleColor
                       FROM          dbo.Qz_Product
                       WHERE      (ClassType = 10)) AS a LEFT OUTER JOIN
                      dbo.Qz_ShopTemp ON a.TempId = dbo.Qz_ShopTemp.id LEFT OUTER JOIN
                      dbo.Qz_VProductPrice AS b ON a.id = b.PriceId
' 
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane1' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProduct_Shop', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane1', @value=N'[0E232FF0-B466-11cf-A24F-00AA00A3EFFF, 1.00]
Begin DesignProperties = 
   Begin PaneConfigurations = 
      Begin PaneConfiguration = 0
         NumPanes = 4
         Configuration = "(H (1[35] 4[16] 2[29] 3) )"
      End
      Begin PaneConfiguration = 1
         NumPanes = 3
         Configuration = "(H (1 [50] 4 [25] 3))"
      End
      Begin PaneConfiguration = 2
         NumPanes = 3
         Configuration = "(H (1 [50] 2 [25] 3))"
      End
      Begin PaneConfiguration = 3
         NumPanes = 3
         Configuration = "(H (4 [30] 2 [40] 3))"
      End
      Begin PaneConfiguration = 4
         NumPanes = 2
         Configuration = "(H (1 [56] 3))"
      End
      Begin PaneConfiguration = 5
         NumPanes = 2
         Configuration = "(H (2 [66] 3))"
      End
      Begin PaneConfiguration = 6
         NumPanes = 2
         Configuration = "(H (4 [50] 3))"
      End
      Begin PaneConfiguration = 7
         NumPanes = 1
         Configuration = "(V (3))"
      End
      Begin PaneConfiguration = 8
         NumPanes = 3
         Configuration = "(H (1[56] 4[18] 2) )"
      End
      Begin PaneConfiguration = 9
         NumPanes = 2
         Configuration = "(H (1 [75] 4))"
      End
      Begin PaneConfiguration = 10
         NumPanes = 2
         Configuration = "(H (1[66] 2) )"
      End
      Begin PaneConfiguration = 11
         NumPanes = 2
         Configuration = "(H (4 [60] 2))"
      End
      Begin PaneConfiguration = 12
         NumPanes = 1
         Configuration = "(H (1) )"
      End
      Begin PaneConfiguration = 13
         NumPanes = 1
         Configuration = "(V (4))"
      End
      Begin PaneConfiguration = 14
         NumPanes = 1
         Configuration = "(V (2))"
      End
      ActivePaneConfig = 0
   End
   Begin DiagramPane = 
      Begin Origin = 
         Top = 0
         Left = 0
      End
      Begin Tables = 
         Begin Table = "Qz_ShopTemp"
            Begin Extent = 
               Top = 3
               Left = 544
               Bottom = 111
               Right = 677
            End
            DisplayFlags = 280
            TopColumn = 1
         End
         Begin Table = "b"
            Begin Extent = 
               Top = 7
               Left = 337
               Bottom = 181
               Right = 498
            End
            DisplayFlags = 280
            TopColumn = 3
         End
         Begin Table = "a"
            Begin Extent = 
               Top = 6
               Left = 38
               Bottom = 114
               Right = 189
            End
            DisplayFlags = 280
            TopColumn = 14
         End
      End
   End
   Begin SQLPane = 
   End
   Begin DataPane = 
      Begin ParameterDefaults = ""
      End
      Begin ColumnWidths = 26
         Width = 284
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
         Width = 1500
      End
   End
   Begin CriteriaPane = 
      Begin ColumnWidths = 11
         Column = 1440
         Alias = 900
         Table = 1170
         Output = 720
         Append = 1400
         NewValue = 1170
         SortType = 1350
         SortOrder = 1410
 ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProduct_Shop'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPane2' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProduct_Shop', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPane2', @value=N'        GroupBy = 1350
         Filter = 1350
         Or = 1350
         Or = 1350
         Or = 1350
      End
   End
End
' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProduct_Shop'
;
IF NOT EXISTS (SELECT * FROM ::fn_listextendedproperty(N'MS_DiagramPaneCount' , N'SCHEMA',N'dbo', N'VIEW',N'Qz_VProduct_Shop', NULL,NULL))
EXEC sys.sp_addextendedproperty @name=N'MS_DiagramPaneCount', @value=2 , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'VIEW',@level1name=N'Qz_VProduct_Shop'
