USE [InfoManager]
GO
/****** Object:  Table [dbo].[Wx_CaptCha]    Script Date: 08/26/2019 11:46:04 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_CaptCha_WCC_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Wx_CaptCha] DROP CONSTRAINT [DF_HW_CaptCha_WCC_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_CaptCha]') AND type in (N'U'))
DROP TABLE [dbo].[Wx_CaptCha]
GO
/****** Object:  Table [dbo].[Wx_Customer]    Script Date: 08/26/2019 11:46:04 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_Customer_WC_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Wx_Customer] DROP CONSTRAINT [DF_HW_Customer_WC_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_Customer]') AND type in (N'U'))
DROP TABLE [dbo].[Wx_Customer]
GO
/****** Object:  Table [dbo].[Wx_serviceNotify]    Script Date: 08/26/2019 11:46:04 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_serviceNotify_WN_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Wx_serviceNotify] DROP CONSTRAINT [DF_HW_serviceNotify_WN_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_serviceNotify]') AND type in (N'U'))
DROP TABLE [dbo].[Wx_serviceNotify]
GO
/****** Object:  Table [dbo].[Wx_servicePush]    Script Date: 08/26/2019 11:46:04 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_servicePush_WP_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Wx_servicePush] DROP CONSTRAINT [DF_HW_servicePush_WP_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_servicePush]') AND type in (N'U'))
DROP TABLE [dbo].[Wx_servicePush]
GO
/****** Object:  Table [dbo].[Wx_User]    Script Date: 08/26/2019 11:46:04 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_User_WU_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[Wx_User] DROP CONSTRAINT [DF_HW_User_WU_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_User]') AND type in (N'U'))
DROP TABLE [dbo].[Wx_User]
GO
/****** Object:  Table [dbo].[Wx_User]    Script Date: 08/26/2019 11:46:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_User]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Wx_User](
	[WU_id] [int] IDENTITY(1000,1) NOT NULL,
	[WU_mobileNo] [nvarchar](50) NULL,
	[WU_nation] [varchar](50) NULL,
	[WU_email] [nvarchar](512) NULL,
	[WU_COLI_SN] [nvarchar](128) NULL,
	[WU_HTorderType] [nvarchar](50) NULL,
	[WU_hostAppId] [nvarchar](100) NULL,
	[WU_userOpenId] [nvarchar](100) NULL,
	[WU_subcribeTime] [datetime] NULL,
	[WU_subscribeScene] [varchar](50) NULL,
	[WU_nickName] [nvarchar](128) NULL,
	[WU_sex] [varchar](50) NULL,
	[WU_language] [varchar](50) NULL,
	[WU_country] [nvarchar](128) NULL,
	[WU_province] [nvarchar](128) NULL,
	[WU_city] [nvarchar](128) NULL,
	[WU_createTime] [datetime] NULL CONSTRAINT [DF_HW_User_WU_createTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_HW_User] PRIMARY KEY CLUSTERED 
(
	[WU_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
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Wx_servicePush]    Script Date: 08/26/2019 11:46:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_servicePush]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Wx_servicePush](
	[WP_id] [int] IDENTITY(1000,1) NOT NULL,
	[WP_WU_id] [int] NULL,
	[WP_msgType] [nvarchar](50) NULL,
	[WP_content] [nvarchar](4000) NULL,
	[WP_templateId] [varchar](50) NULL,
	[WP_templateName] [nvarchar](50) NULL,
	[WP_createTime] [datetime] NULL CONSTRAINT [DF_HW_servicePush_WP_createTime]  DEFAULT (getdate()),
	[WP_WC_Id] [int] NULL,
 CONSTRAINT [PK_HW_servicePush] PRIMARY KEY CLUSTERED 
(
	[WP_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
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Wx_serviceNotify]    Script Date: 08/26/2019 11:46:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_serviceNotify]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Wx_serviceNotify](
	[WN_id] [int] IDENTITY(1000,1) NOT NULL,
	[WN_hostAppId] [nvarchar](100) NULL,
	[WN_userOpenId] [nvarchar](100) NULL,
	[WN_msgType] [nvarchar](50) NULL,
	[WN_eventType] [nvarchar](50) NULL,
	[WN_createTime] [datetime] NULL CONSTRAINT [DF_HW_serviceNotify_WN_createTime]  DEFAULT (getdate()),
	[WN_rawContent] [nvarchar](4000) NULL,
	[WN_msgId] [nvarchar](100) NULL,
	[WN_eventKey] [nvarchar](512) NULL,
 CONSTRAINT [PK_HW__serviceNotify_1] PRIMARY KEY CLUSTERED 
(
	[WN_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
GO
/****** Object:  Table [dbo].[Wx_Customer]    Script Date: 08/26/2019 11:46:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_Customer]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Wx_Customer](
	[WC_id] [int] IDENTITY(1000,1) NOT NULL,
	[WC_WU_id] [int] NULL,
	[WC_COLI_SN] [varchar](128) NULL,
	[WC_HTorderType] [varchar](50) NULL,
	[WC_createTime] [datetime] NULL CONSTRAINT [DF_HW_Customer_WC_createTime]  DEFAULT (getdate()),
 CONSTRAINT [PK_HW_Customer] PRIMARY KEY CLUSTERED 
(
	[WC_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
GO
SET ANSI_PADDING OFF
GO
/****** Object:  Table [dbo].[Wx_CaptCha]    Script Date: 08/26/2019 11:46:04 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[Wx_CaptCha]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[Wx_CaptCha](
	[WCC_id] [int] IDENTITY(1000,1) NOT NULL,
	[WCC_value] [varchar](50) NULL,
	[WCC_WU_id] [int] NULL,
	[WCC_verifyType] [varchar](50) NULL,
	[WCC_mobileNo] [varchar](50) NULL,
	[WCC_nation] [varchar](50) NULL,
	[WCC_email] [nvarchar](512) NULL,
	[WCC_status] [tinyint] NULL,
	[WCC_createTime] [datetime] NULL CONSTRAINT [DF_HW_CaptCha_WCC_createTime]  DEFAULT (getdate()),
	[WCC_successTime] [datetime] NULL,
	[WCC_expireSeconds] [int] NULL,
 CONSTRAINT [PK_HW_CaptCha] PRIMARY KEY CLUSTERED 
(
	[WCC_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
GO
SET ANSI_PADDING OFF
GO
