USE [InfoManager]
GO
/****** Object:  Table [dbo].[wx_customer]    Script Date: 11/11/2019 16:26:26 ******/
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_service_notify]    Script Date: 11/11/2019 16:26:26 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_serviceNotify_WN_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_service_notify] DROP CONSTRAINT [DF_HW_serviceNotify_WN_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_service_notify]') AND type in (N'U'))
DROP TABLE [dbo].[wx_service_notify]
GO
/****** Object:  Table [dbo].[wx_service_push]    Script Date: 11/11/2019 16:26:26 ******/
IF  EXISTS (SELECT * FROM dbo.sysobjects WHERE id = OBJECT_ID(N'[DF_HW_servicePush_WP_createTime]') AND type = 'D')
BEGIN
ALTER TABLE [dbo].[wx_service_push] DROP CONSTRAINT [DF_HW_servicePush_WP_createTime]
END
GO
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[wx_service_push]') AND type in (N'U'))
DROP TABLE [dbo].[wx_service_push]
GO
/****** Object:  Table [dbo].[wx_user]    Script Date: 11/11/2019 16:26:26 ******/
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: 11/11/2019 16:26:26 ******/
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_unionid] [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_headimg] [nvarchar](512) 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_service_push]    Script Date: 11/11/2019 16:26:26 ******/
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_service_push]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[wx_service_push](
	[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_service_notify]    Script Date: 11/11/2019 16:26:26 ******/
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_service_notify]') AND type in (N'U'))
BEGIN
CREATE TABLE [dbo].[wx_service_notify](
	[wn_id] [int] IDENTITY(1000,1) NOT NULL,
	[wn_hostappid] [nvarchar](100) NULL,
	[wn_useropenid] [nvarchar](100) NULL,
	[wn_wu_id] [int] 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: 11/11/2019 16:26:26 ******/
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
