SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[vote]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[vote](
	[ID] [int] NOT NULL,
	[ItemName] [nvarchar](255) NULL,
	[ItemNumber] [nvarchar](255) NULL,
	[ItemCount] [int] NULL,
	[ItemClick] [int] NULL,
	[Content] [nvarchar](max) NULL,
	[thumbnail] [nvarchar](255) NULL,
	[ClassID] [int] NULL,
	[Sorting] [int] 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].[vote_class]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[vote_class](
	[ID] [int] NOT NULL,
	[VoteTheme] [nvarchar](255) NULL,
	[VoteIntroduction] [nvarchar](max) NULL,
	[PageTitle] [nvarchar](255) NULL,
	[Keywords] [nvarchar](255) NULL,
	[Description] [nvarchar](max) NULL,
	[PageHeadCode] [nvarchar](max) NULL,
	[PageFootCode] [nvarchar](max) NULL,
	[StartDateTime] [datetime] NULL,
	[EndDateTime] [datetime] NULL,
	[UserVote] [bit] NOT 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].[vote_mark]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[vote_mark](
	[ID] [int] NOT NULL,
	[IP] [nvarchar](255) NULL,
	[VoteDateTime] [datetime] NULL,
	[fid] [int] NULL,
	[uid] [int] NULL
) ON [PRIMARY]
END
GO