if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[SP_Pagination]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[SP_Pagination]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[News]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[News]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Bank]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Bank]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[C]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[C]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Cp]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Cp]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CpC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CpC]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CpO]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CpO]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[CpOs]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[CpOs]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Fb]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Fb]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Gl]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Gl]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[GlI]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[GlI]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Link]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Link]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[NewsC]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[NewsC]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[NewsP]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[NewsP]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[Pay]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Pay]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ad]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ad]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[indexad]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[indexad]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[indexlb]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[indexlb]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[joins]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[joins]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[kefu]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[kefu]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[pinglun]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[pinglun]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[soso]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[soso]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tc]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[tc]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[u]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[u]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[udz]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[udz]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[ul]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[ul]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[us]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[us]

if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[wishlist]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[wishlist]

CREATE TABLE [dbo].[News] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_lb] [int] NULL ,
	[s_mc] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_ly] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_logo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[hits] [smallint] NULL ,
	[home] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[recommend] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_ys] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[Bank] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankPartner] [nvarchar] (64) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankKey] [nvarchar] (64) COLLATE Chinese_PRC_CI_AS NULL ,
	[BankId] [nvarchar] (64) COLLATE Chinese_PRC_CI_AS NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[C] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_lb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_mc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[Cp] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_lb] [int] NULL ,
	[s_mc] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[taobao] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_dw] [int] NULL ,
	[s_zl] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_jg1] [money] NULL ,
	[s_jg] [money] NULL ,
	[s_logo] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[s_sl] [int] NULL ,
	[s_buy] [smallint] NULL ,
	[addtime] [smalldatetime] NULL ,
	[hits] [smallint] NULL ,
	[ms] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[msTime] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[msPrice] [money] NULL ,
	[score] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[scores] [int] NULL ,
	[p1] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_Fre] [int] NULL ,
	[s_ck] [int] NULL ,
	[kzname] [varchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[kzvalue] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[CpC] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[upid] [int] NULL ,
	[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sort] [smallint] NULL ,
	[depth] [nvarchar] (2) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[CpO] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[ono] [nvarchar] (18) COLLATE Chinese_PRC_CI_AS NULL ,
	[uid] [int] NULL ,
	[Payment] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Ship] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Invoice] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[State] [nvarchar] (3) COLLATE Chinese_PRC_CI_AS NULL ,
	[Time1] [smalldatetime] NULL ,
	[Time2] [smalldatetime] NULL ,
	[Time3] [smalldatetime] NULL ,
	[Time4] [smalldatetime] NULL ,
	[Moneys] [money] NULL ,
	[OName] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
	[OPhone] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[OTel] [nvarchar] (13) COLLATE Chinese_PRC_CI_AS NULL ,
	[OCode] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,
	[OAddress] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL ,
	[OYf] [money] NULL ,
	[OScore] [smallint] NULL ,
	[Bz] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[fh_sj] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fh_name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fh_no] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[fh_kf] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[otype] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[CpOs] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[oid] [int] NULL ,
	[pid] [int] NULL ,
	[pname] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[psl] [smallint] NULL ,
	[pjg] [money] NULL ,
	[pbz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[uid] [int] NULL ,
	[ptime] [datetime] NULL ,
	[pa] [tinyint] NULL ,
	[pb] [tinyint] NULL ,
	[pc] [tinyint] NULL ,
	[pvalue] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[Fb] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[s_lb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_mc] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[name] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[time1] [smalldatetime] NULL ,
	[s_answer] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[time2] [smalldatetime] NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[Gl] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_mc] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[s_mm] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[s_lb] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[s_ip] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[s_check] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NOT NULL ,
	[logintime] [smalldatetime] NULL ,
	[ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[hits] [smallint] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[GlI] (
	[id] [int] NOT NULL ,
	[s_mc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[s_details] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[Link] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_lb] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_mc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_url] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_logo] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[sort] [smallint] NULL ,
	[s_p1] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[NewsC] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[upid] [int] NULL ,
	[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[sort] [smallint] NULL ,
	[depth] [smallint] NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[NewsP] (
	[id] [int] NOT NULL ,
	[uid] [int] NULL ,
	[s_id] [int] NULL ,
	[s_mc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[Pay] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[sign] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
	[v_no] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
	[v_amount] [money] NULL ,
	[v_type] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
	[state] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[ad] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_mc] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_lb] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_logo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_url] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[indexad] (
	[id] [int] NOT NULL ,
	[alogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[aurl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[blogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[burl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[clogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[cpid] [int] NULL ,
	[dlogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[dpid] [int] NULL ,
	[elogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[eurl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[flogo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[furl] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[indexlb] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_mc] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_logo] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_lb] [int] NULL ,
	[s_ys] [char] (7) COLLATE Chinese_PRC_CI_AS NULL ,
	[sort] [int] NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[joins] (
	[id] [int] NOT NULL ,
	[title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[name] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tel] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[phone] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[code] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,
	[ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[kefu] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_lb] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_mc] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_details] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[pinglun] (
	[id] [int] NOT NULL ,
	[uid] [int] NULL ,
	[pid] [int] NULL ,
	[email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[level] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[cont] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [smalldatetime] NULL ,
	[s_ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[soso] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[title] [nvarchar] (150) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[tc] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[s_mc] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[pid] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[pjg] [varchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[s_fre] [int] NULL ,
	[s_details] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[addtime] [datetime] NULL ,
	[state] [char] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]

CREATE TABLE [dbo].[u] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[username] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
	[password] [nvarchar] (32) COLLATE Chinese_PRC_CI_AS NULL ,
	[email] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[ul] [tinyint] NULL ,
	[addtime] [smalldatetime] NULL ,
	[logintime] [smalldatetime] NULL ,
	[hits] [int] NULL ,
	[ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	[score] [smallint] NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[receive] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[money1] [money] NULL ,
	[money2] [money] NULL ,
	[name] [nvarchar] (8) COLLATE Chinese_PRC_CI_AS NULL ,
	[sex] [nvarchar] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[tel] [nvarchar] (13) COLLATE Chinese_PRC_CI_AS NULL ,
	[phone] [nvarchar] (12) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq1] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq2] [nvarchar] (30) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq3] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[code] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[udz] (
	[Id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[tel] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[phone] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq1] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq2] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[dq3] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[address] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[code] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,
	[state] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[ul] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[name] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[exp] [int] NULL ,
	[zk] [money] NULL ,
	[score] [money] NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[us] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[addtime] [datetime] NULL ,
	[vt] [varchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[v] [varchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,
	[bz] [varchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]

CREATE TABLE [dbo].[wishlist] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[uid] [int] NULL ,
	[pid] [int] NULL ,
	[addtime] [datetime] NULL 
) ON [PRIMARY]

ALTER TABLE [dbo].[News] ADD 
	CONSTRAINT [DF_News_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_News_hits] DEFAULT (0) FOR [hits],
	CONSTRAINT [DF_News_home] DEFAULT (0) FOR [home],
	CONSTRAINT [DF_News_recommend] DEFAULT (0) FOR [recommend],
	CONSTRAINT [DF_News_state] DEFAULT (1) FOR [state],
	CONSTRAINT [PK_News] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Bank] ADD 
	CONSTRAINT [DF_Bank_state] DEFAULT (0) FOR [state],
	CONSTRAINT [PK_Bank] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[C] ADD 
	CONSTRAINT [PK_C] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Cp] ADD 
	CONSTRAINT [DF_Cp_pnum] DEFAULT (0) FOR [s_sl],
	CONSTRAINT [DF_Cp_s_buy] DEFAULT (0) FOR [s_buy],
	CONSTRAINT [DF_Cp_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_Cp_hits] DEFAULT (0) FOR [hits],
	CONSTRAINT [DF_Cp_msPrice] DEFAULT (0) FOR [msPrice],
	CONSTRAINT [DF_Cp_s_state] DEFAULT (1) FOR [score],
	CONSTRAINT [DF_Cp_s_scores] DEFAULT (0) FOR [scores],
	CONSTRAINT [DF_Cp_p1] DEFAULT (0) FOR [p1],
	CONSTRAINT [DF_Cp_s_Fre] DEFAULT (0) FOR [s_Fre],
	CONSTRAINT [DF_Cp_s_ck] DEFAULT (1) FOR [s_ck],
	CONSTRAINT [PK_Cp] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[CpC] ADD 
	CONSTRAINT [PK_CpC] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[CpO] ADD 
	CONSTRAINT [DF_CpO_Time1] DEFAULT (getdate()) FOR [Time1],
	CONSTRAINT [PK_CpO] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[CpOs] ADD 
	CONSTRAINT [DF_CpOs_pa] DEFAULT (0) FOR [pa],
	CONSTRAINT [DF_CpOs_pb] DEFAULT (0) FOR [pb],
	CONSTRAINT [DF_CpOs_pc] DEFAULT (0) FOR [pc],
	CONSTRAINT [PK_CpOs] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Fb] ADD 
	CONSTRAINT [DF_Fb_time1] DEFAULT (getdate()) FOR [time1],
	CONSTRAINT [DF_Fb_state] DEFAULT (0) FOR [state],
	CONSTRAINT [PK_Fb] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Gl] ADD 
	CONSTRAINT [DF_Gl_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_Gl_hits] DEFAULT (0) FOR [hits],
	CONSTRAINT [PK_Gl] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Link] ADD 
	CONSTRAINT [DF_Link_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [PK_Link] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[NewsC] ADD 
	CONSTRAINT [PK_NewsC] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[Pay] ADD 
	CONSTRAINT [DF_Pay_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [PK_Pay] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[ad] ADD 
	CONSTRAINT [DF_ad_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_ad_state] DEFAULT (1) FOR [state],
	CONSTRAINT [PK_ad] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[indexad] ADD 
	CONSTRAINT [PK_indexad] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[indexlb] ADD 
	CONSTRAINT [DF_indexlb_sort] DEFAULT (0) FOR [sort],
	CONSTRAINT [PK_indexlb] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[kefu] ADD 
	CONSTRAINT [DF_kefu_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [PK_kefu] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[tc] ADD 
	CONSTRAINT [DF_tc_s_fre] DEFAULT (0) FOR [s_fre],
	CONSTRAINT [DF_taocan_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_tc_state] DEFAULT (1) FOR [state],
	CONSTRAINT [PK_taocan] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[u] ADD 
	CONSTRAINT [DF_u_levels] DEFAULT (0) FOR [ul],
	CONSTRAINT [DF_u_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [DF_u_logintime] DEFAULT (getdate()) FOR [logintime],
	CONSTRAINT [DF_u_hits] DEFAULT (1) FOR [hits],
	CONSTRAINT [DF_u_score] DEFAULT (0) FOR [score],
	CONSTRAINT [DF_u_state] DEFAULT (0) FOR [state],
	CONSTRAINT [DF_u_receive] DEFAULT (0) FOR [receive],
	CONSTRAINT [DF_u_money1] DEFAULT (0) FOR [money1],
	CONSTRAINT [DF_u_money2] DEFAULT (0) FOR [money2],
	CONSTRAINT [PK_u] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[udz] ADD 
	CONSTRAINT [PK_udz] PRIMARY KEY  CLUSTERED 
	(
		[Id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[ul] ADD 
	CONSTRAINT [PK_ul] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[us] ADD 
	CONSTRAINT [DF_us_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [PK_us] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

ALTER TABLE [dbo].[wishlist] ADD 
	CONSTRAINT [DF_wishlist_addtime] DEFAULT (getdate()) FOR [addtime],
	CONSTRAINT [PK_wishlist] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 

SET QUOTED_IDENTIFIER ON 
SET ANSI_NULLS OFF 

