SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall_pl_re]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall_pl_re](
	[id] [int] NOT NULL,
	[time] [datetime] NULL,
	[uid] [int] NULL,
	[fid] [int] NULL,
	[enable] [bit] NOT NULL,
	[ip] [nvarchar](255) NULL,
	[content] [nvarchar](max) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall](
	[id] [int] NOT NULL,
	[time] [datetime] NULL,
	[pltime] [datetime] NULL,
	[enable] [bit] NOT NULL,
	[istop] [bit] NOT NULL,
	[isred] [bit] NOT NULL,
	[click] [int] NULL,
	[uid] [int] NULL,
	[classid] [int] NULL,
	[areaid] [int] NULL,
	[ip] [nvarchar](255) NULL,
	[title] [nvarchar](255) NULL,
	[thumbnail] [nvarchar](255) NULL,
	[contact] [nvarchar](255) NULL,
	[address] [nvarchar](255) NULL,
	[phone] [nvarchar](255) NULL,
	[tel] [nvarchar](255) NULL,
	[qq] [nvarchar](255) NULL,
	[content] [nvarchar](max) NULL,
	[customcode] [nvarchar](max) NULL,
	[oldprice] [money] NULL,
	[buyprice] [money] NULL,
	[buytotal] [int] NULL,
	[sonclass] [nvarchar](255) NULL,
	[buyexplain] [nvarchar](max) NULL,
	[instructions] [nvarchar](max) NULL,
	[buyservice] [nvarchar](max) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall_class]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall_class](
	[id] [int] NOT NULL,
	[parentid] [int] NULL,
	[sorting] [int] NULL,
	[n] [nvarchar](255) NULL,
	[customrule] [nvarchar](255) NULL,
	[sonclass] [nvarchar](max) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall_column]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall_column](
	[id] [int] NOT NULL,
	[n] [nvarchar](255) NULL,
	[sorting] [int] NULL,
	[indexsize] [int] NULL,
	[strsql] [nvarchar](255) NULL,
	[adcode] [nvarchar](max) NULL,
	[pagesize] [int] NULL,
	[pagetitle] [nvarchar](255) NULL,
	[pagekeywords] [nvarchar](255) NULL,
	[pagedescription] [nvarchar](max) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall_order]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall_order](
	[id] [int] NOT NULL,
	[time] [datetime] NULL,
	[uid] [int] NULL,
	[fid] [int] NULL,
	[buycount] [int] NULL,
	[malltitle] [nvarchar](255) NULL,
	[oneprice] [money] NULL,
	[allprice] [money] NULL,
	[buytype] [nvarchar](255) NULL,
	[contact] [nvarchar](255) NULL,
	[address] [nvarchar](255) NULL,
	[postcode] [nvarchar](255) NULL,
	[phone] [nvarchar](255) NULL,
	[note] [nvarchar](255) NULL,
	[state] [nvarchar](255) NULL
) ON [PRIMARY]
END
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[mall_pl]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[mall_pl](
	[id] [int] NOT NULL,
	[time] [datetime] NULL,
	[uid] [int] NULL,
	[fid] [int] NULL,
	[enable] [bit] NOT NULL,
	[ip] [nvarchar](255) NULL,
	[content] [nvarchar](max) NULL
) ON [PRIMARY]
END
GO
