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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

CREATE TABLE [TE_About] (
	[A_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[A_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_PId] [int] NOT NULL ,
	[A_Path] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_Url] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_Text] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_OrderID] [int] NOT NULL ,
	[A_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Ad] (
	[A_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[A_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[A_Url] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[A_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[A_OrderId] [int] NULL ,
	[A_Type] [int] NULL ,
	[A_Description] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Admin] (
	[A_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[A_UserName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_UserPass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_Permissions] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_LoginIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[A_LoginDate] [datetime] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_BonusDetails] (
	[B_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[B_UserId] [int] NULL ,
	[B_Type] [int] NULL ,
	[B_Date] [datetime] NULL ,
	[B_BonusCount] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_City] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_OrderID] [int] NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_Py] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Favorites] (
	[F_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[F_UserId] [int] NOT NULL ,
	[F_AdId] [int] NOT NULL ,
	[F_Type] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_FeedBack] (
	[F_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[F_Date] [datetime] NOT NULL ,
	[F_Text] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[F_IP] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[F_Type] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[F_Contact] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Help] (
	[H_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[H_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[H_CategoryID] [int] NOT NULL ,
	[H_Url] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[H_Text] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[H_OrderID] [int] NOT NULL ,
	[H_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Hotel] (
	[H_ID] [int] IDENTITY ({hotelid}, 1) NOT NULL ,
	[H_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_MinRackRate] [int] NULL ,
	[H_MaxRackRate] [int] NULL ,
	[H_MinPrice] [int] NULL ,
	[H_MaxPrice] [int] NULL ,
	[H_MinBonus] [int] NULL ,
	[H_MaxBonus] [int] NULL ,
	[H_CityID] [int] NULL ,
	[H_CategoryID] [int] NULL ,
	[H_BrandId] [int] NULL ,
	[H_BrandName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_OpeningDate] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Add] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Nid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Traffic] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Environment] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Distance] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_PreviewPic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_ContactWay] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Prompt] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_SupportCards] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_AdditionalServices] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Restaurants] [int] NULL ,
	[H_Swimming] [int] NULL ,
	[H_Fitness] [int] NULL ,
	[H_Airbus] [int] NULL ,
	[H_Internet] [int] NULL ,
	[H_Parking] [int] NULL ,
	[H_ServicesProject] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_CateringServices] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Entertainment] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Facility] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[H_Tj] [int] NULL ,
	[H_Top] [int] NULL ,
	[H_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_HaoPing] [int] NULL ,
	[H_ZhongPing] [int] NULL ,
	[H_ChaPing] [int] NULL ,
	[H_Favorites] [int] NULL ,
	[H_Reviewss] [int] NOT NULL ,
	[H_SalesStatistics] [int] NOT NULL ,
	[H_Video] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[H_OrderId] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_HotelBrand] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_OrderID] [int] NULL ,
	[T_Logo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_HotelCategory] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_OrderID] [int] NULL ,
	[T_Pic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_HotelOrder] (
	[O_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[O_Number] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_HotelID] [int] NULL ,
	[O_RoomID] [int] NOT NULL ,
	[O_UserID] [int] NOT NULL ,
	[O_StartDate] [datetime] NOT NULL ,
	[O_StopDate] [datetime] NOT NULL ,
	[O_Rooms] [int] NOT NULL ,
	[O_ComeNames] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Contact] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Arrivelatetime] [datetime] NULL ,
	[O_Text] [nvarchar] (500) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_FeesCount] [int] NULL ,
	[O_BonusCount] [int] NULL ,
	[O_Date] [datetime] NULL ,
	[O_Mark] [int] NULL ,
	[O_CancelReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_R_Rating_0] [int] NULL ,
	[O_R_Rating_1] [int] NULL ,
	[O_R_Rating_2] [int] NULL ,
	[O_R_Rating_3] [int] NULL ,
	[O_R_Count] [int] NULL ,
	[O_R_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Impression] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Date] [datetime] NULL,
	[O_R_Pics] [int] NULL,
	[O_R_PicBonusCount] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_HotelPic] (
	[P_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[P_H_Id] [int] NOT NULL ,
	[P_UserId] [int] NOT NULL ,
	[P_O_Id] [int] NOT NULL ,
	[P_OrderId] [int] NOT NULL ,
	[P_Pic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_Preview] [int] NOT NULL ,
	[P_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_date] [datetime] NOT NULL ,
	[P_Mark] [int] NOT NULL ,
	[P_Default] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Label] (
	[L_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[L_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[L_Title] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Line] (
	[L_ID] [int] IDENTITY ({lineid}, 1) NOT NULL ,
	[L_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_CategoryID] [int] NULL ,
	[L_CategoryPath] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_TopicsID] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Price] [int] NULL ,
	[L_RackRate] [int] NULL ,
	[L_ChildrenPrice] [int] NULL ,
	[L_StartDate] [nvarchar] (200) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_EarlyBird] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_TravelDays] [int] NULL ,
	[L_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_BookNotes] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Reminder] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_FeeIncludes] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_FeeNoIncludes] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_OptionalActivities] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Shop] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Tj] [int] NULL ,
	[L_Popularity] [int] NULL ,
	[L_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Traffic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_SpecialServices] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_PreviewPic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_SpecialPrice] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Bonus] [int] NOT NULL ,
	[L_ChildrenBonus] [int] NOT NULL ,
	[L_HaoPing] [int] NULL ,
	[L_ZhongPing] [int] NULL ,
	[L_Favorites] [int] NULL ,
	[L_ChaPing] [int] NULL ,
	[L_Reviewss] [int] NULL ,
	[L_SalesStatistics] [int] NULL,
	[L_Video] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_OrderId] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_LineCategory] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_PID] [int] NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_Path] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_OrderID] [int] NULL ,
	[T_Top] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_LineOrder] (
	[O_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[O_Number] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_LineID] [int] NULL ,
	[O_UserID] [int] NULL ,
	[O_StartDate] [datetime] NULL ,
	[O_Adult] [int] NULL ,
	[O_Children] [int] NULL ,
	[O_Contact] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[O_Visitor] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[O_FeesCount] [int] NULL ,
	[O_BonusCount] [int] NULL ,
	[O_Mark] [int] NULL ,
	[O_Date] [datetime] NULL ,
	[O_CancelReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Rating_0] [int] NULL ,
	[O_R_Rating_1] [int] NULL ,
	[O_R_Rating_2] [int] NULL ,
	[O_R_Rating_3] [int] NULL ,
	[O_R_Count] [int] NULL ,
	[O_R_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Impression] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Date] [datetime] NULL,
	[O_R_Pics] [int] NULL,
	[O_R_PicBonusCount] [int] NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_LinePic] (
	[P_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[P_L_Id] [int] NOT NULL ,
	[P_UserId] [int] NOT NULL ,
	[P_O_Id] [int] NOT NULL ,
	[P_OrderId] [int] NOT NULL ,
	[P_Pic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_Preview] [int] NOT NULL ,
	[P_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_Date] [datetime] NOT NULL ,
	[P_Mark] [int] NOT NULL ,
	[P_Default] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Link] (
	[L_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[L_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[L_Type] [int] NULL ,
	[L_Url] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_Logo] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[L_OrderID] [int] NULL ,
	[L_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Message] (
	[M_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[M_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[M_Text] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[M_UserID] [int] NOT NULL ,
	[M_OrderId] [int] NOT NULL ,
	[M_Date] [datetime] NOT NULL ,
	[M_View] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_News] (
	[N_ID] [int] IDENTITY ({newsid}, 1) NOT NULL ,
	[N_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_CategoryID] [int] NULL ,
	[N_CategoryPath] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_PreviewPic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_Url] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[N_Source] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_Author] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_OrderID] [int] NULL ,
	[N_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[N_Tj] [int] NULL ,
	[N_Top] [int] NULL ,
	[N_Popularity] [int] NULL ,
	[N_AddDate] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_NewsCategory] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_PID] [int] NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_Path] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_OrderID] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_NewsReviews] (
	[R_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[R_NewsID] [int] NOT NULL ,
	[R_UserID] [int] NOT NULL ,
	[R_Text] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[R_IP] [nvarchar] (16) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[R_AddDate] [datetime] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_OtherCategory] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[T_OrderID] [int] NULL ,
	[T_Type] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Questions] (
	[Q_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[Q_AdId] [int] NULL ,
	[Q_UserId] [int] NULL ,
	[Q_Type] [int] NULL ,
	[Q_Questions] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Q_QDate] [datetime] NULL ,
	[Q_Answers] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[Q_ADate] [datetime] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Room] (
	[R_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[R_HotelID] [int] NOT NULL ,
	[R_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[R_BedCategory] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[R_RackRate] [int] NOT NULL ,
	[R_Price] [int] NOT NULL ,
	[R_Friday] [int] NULL ,
	[R_Saturday] [int] NULL ,
	[R_Weekend] [int] NULL ,
	[R_SpecialPrice] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[R_Area] [int] NULL ,
	[R_Breakfast] [int] NULL ,
	[R_Internet] [int] NULL ,
	[R_Floor] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[R_Windows] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[R_Bathroom] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[R_AddBed] [int] NULL ,
	[R_Bonus] [int] NULL ,
	[R_OrderID] [int] NULL ,
	[R_SalesStatistics] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Scenery] (
	[S_ID] [int] IDENTITY ({sceneryid}, 1) NOT NULL ,
	[S_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_MinRackRate] [int] NULL ,
	[S_MaxRackRate] [int] NULL ,
	[S_MinPrice] [int] NULL ,
	[S_MaxPrice] [int] NULL ,
	[S_MinDiscountPrice] [int] NULL ,
	[S_MaxDiscountPrice] [int] NULL ,
	[S_MinBonus] [int] NULL ,
	[S_MaxBonus] [int] NULL ,
	[S_Level] [int] NULL ,
	[S_Category] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_CityID] [int] NULL ,
	[S_Add] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_NID] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_FitCrowd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_PreviewPic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_TakeWay] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Traffic] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_BuyNotes] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Shop] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Gourmet] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_Tj] [int] NULL ,
	[S_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HaoPing] [int] NULL ,
	[S_ZhongPing] [int] NULL ,
	[S_ChaPing] [int] NULL ,
	[S_Favorites] [int] NULL ,
	[S_Reviewss] [int] NOT NULL ,
	[S_SalesStatistics] [int] NOT NULL ,
	[S_Video] [nvarchar] (300) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_OrderId] [int] NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_SceneryOrder] (
	[O_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[O_Number] [nvarchar] (20) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_SceneryID] [int] NOT NULL ,
	[O_TicketsID] [int] NOT NULL ,
	[O_UserId] [int] NOT NULL ,
	[O_PlayDate] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Quantity] [int] NOT NULL ,
	[O_Contact] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_Email] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_FeesCount] [int] NOT NULL ,
	[O_BonusCount] [int] NOT NULL ,
	[O_Date] [datetime] NOT NULL ,
	[O_Mark] [int] NOT NULL ,
	[O_CancelReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[O_R_Rating_0] [int] NULL ,
	[O_R_Rating_1] [int] NULL ,
	[O_R_Rating_2] [int] NULL ,
	[O_R_Rating_3] [int] NULL ,
	[O_R_Count] [int] NULL ,
	[O_R_Text] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Impression] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[O_R_Date] [datetime] NULL,
	[O_R_Pics] [int] NULL,
	[O_R_PicBonusCount] [int] NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_SceneryPic] (
	[P_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[P_S_ID] [int] NOT NULL ,
	[P_UserId] [int] NOT NULL ,
	[P_O_ID] [int] NOT NULL ,
	[P_OrderID] [int] NOT NULL ,
	[P_Pic] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_Preview] [int] NOT NULL ,
	[P_Title] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[P_Date] [datetime] NOT NULL ,
	[P_Mark] [int] NOT NULL ,
	[P_Default] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Sysset] (
	[S_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[S_HotelSupportCards] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HotelServicesProject] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HotelCateringServices] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HotelEntertainment] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HotelFacility] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_RoomCategory] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_BedCategory] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_WebSet] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_RegClose] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_RegSet] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_HotelAdvance] [int] NULL ,
	[S_HotelMaxBooking] [int] NULL ,
	[S_HotelReviews] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_WebContact] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[S_UpSet] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_SceneryReviews] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL ,
	[S_LineReviews] [nvarchar] (100) COLLATE Chinese_PRC_CI_AS NULL
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

CREATE TABLE [TE_Template] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_Folder] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_Default] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Tickets] (
	[T_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[T_SceneryID] [int] NOT NULL ,
	[T_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[T_RackRate] [int] NOT NULL ,
	[T_Price] [int] NOT NULL ,
	[T_DiscountPrice] [int] NOT NULL ,
	[T_Bonus] [int] NOT NULL ,
	[T_OrderID] [int] NOT NULL ,
	[T_SalesStatistics] [int] NOT NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_UpFile] (
	[F_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[F_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_IP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_RanNum] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[F_Dy] [int] NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_User] (
	[U_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[U_DzUserId] [int] NOT NULL ,
	[U_Name] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[U_Pass] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[U_CardId] [nvarchar] (18) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_EMail] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Mark] [int] NULL ,
	[U_RandCode] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_LastLoginDate] [datetime] NULL ,
	[U_LastLoginIP] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_RealName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Sex] [nvarchar] (1) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Phone] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Address] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Zip] [nvarchar] (6) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Working] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_EDU] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_ShouRu] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Marry] [nvarchar] (2) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_YuanYin] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_TuJing] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[U_Bonus] [int] NULL ,
	[U_Perfect] [int] NULL ,
	[U_Face] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL 
) ON [PRIMARY]
GO

CREATE TABLE [TE_Withdraw] (
	[W_ID] [int] IDENTITY (1, 1) NOT NULL ,
	[W_UserId] [int] NOT NULL ,
	[W_Money] [int] NOT NULL ,
	[W_BankName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_KardName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_KardID] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_CardId] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_Mobile] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_Bak] [ntext] COLLATE Chinese_PRC_CI_AS NOT NULL ,
	[W_Mark] [int] NOT NULL ,
	[W_Date] [datetime] NOT NULL ,
	[W_RejectReason] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NOT NULL 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

ALTER TABLE [TE_About] ADD 
	CONSTRAINT [DF_TE_About_A_Title] DEFAULT ('') FOR [A_Title],
	CONSTRAINT [DF_TE_About_A_CategoryId] DEFAULT (0) FOR [A_PId],
	CONSTRAINT [DF_TE_About_A_Path] DEFAULT (',') FOR [A_Path],
	CONSTRAINT [DF_TE_About_A_Url] DEFAULT ('') FOR [A_Url],
	CONSTRAINT [DF_TE_About_A_Text] DEFAULT ('') FOR [A_Text],
	CONSTRAINT [DF_TE_About_A_OrderID] DEFAULT (0) FOR [A_OrderID],
	CONSTRAINT [DF_TE_About_A_RanNum] DEFAULT ('') FOR [A_RanNum],
	CONSTRAINT [PK_TE_About] PRIMARY KEY  CLUSTERED 
	(
		[A_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Ad] ADD 
	CONSTRAINT [DF_TE_Ad_A_Text] DEFAULT ('') FOR [A_Text],
	CONSTRAINT [DF_TE_Ad_A_Url] DEFAULT ('') FOR [A_Url],
	CONSTRAINT [DF_TE_Ad_A_RanNum] DEFAULT ('') FOR [A_RanNum],
	CONSTRAINT [DF_TE_Ad_A_OrderId] DEFAULT (1) FOR [A_OrderId],
	CONSTRAINT [DF_TE_Ad_A_Type] DEFAULT (0) FOR [A_Type],
	CONSTRAINT [PK_TE_Ad] PRIMARY KEY  CLUSTERED 
	(
		[A_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Admin] ADD 
	CONSTRAINT [DF_TE_Admin_A_LoginIP] DEFAULT ('') FOR [A_LoginIP],
	CONSTRAINT [DF_TE_Admin_A_LoginDate] DEFAULT ('') FOR [A_LoginDate],
	CONSTRAINT [PK_TE_Admin] PRIMARY KEY  CLUSTERED 
	(
		[A_ID] DESC 
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_BonusDetails] ADD 
	CONSTRAINT [DF_TE_BonusDetails_B_Type] DEFAULT (0) FOR [B_Type],
	CONSTRAINT [DF_TE_BonusDetails_B_Date] DEFAULT (getdate()) FOR [B_Date],
	CONSTRAINT [PK_TE_BonusDetails] PRIMARY KEY  CLUSTERED 
	(
		[B_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_City] ADD 
	CONSTRAINT [DF_TE_City_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [DF_TE_City_T_Py] DEFAULT ('') FOR [T_Py],
	CONSTRAINT [PK_TE_City] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Favorites] ADD 
	CONSTRAINT [DF_TE_Favorites_F_UserId] DEFAULT (0) FOR [F_UserId],
	CONSTRAINT [DF_TE_Favorites_F_AdId] DEFAULT (0) FOR [F_AdId],
	CONSTRAINT [DF_TE_Favorites_F_Type] DEFAULT (0) FOR [F_Type]
GO

ALTER TABLE [TE_FeedBack] ADD 
	CONSTRAINT [DF_TE_FeedBack_F_Date] DEFAULT (getdate()) FOR [F_Date]
GO

ALTER TABLE [TE_Help] ADD 
	CONSTRAINT [DF_TE_Help_H_Title] DEFAULT ('') FOR [H_Title],
	CONSTRAINT [DF_TE_Help_H_Url] DEFAULT ('') FOR [H_Url],
	CONSTRAINT [DF_TE_Help_H_Text] DEFAULT ('') FOR [H_Text],
	CONSTRAINT [DF_TE_Help_H_OrderID] DEFAULT (0) FOR [H_OrderID],
	CONSTRAINT [DF_TE_Help_H_RanNum] DEFAULT ('') FOR [H_RanNum],
	CONSTRAINT [PK_TE_Help] PRIMARY KEY  CLUSTERED 
	(
		[H_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Hotel] ADD 
	CONSTRAINT [DF_TE_Hotel_H_MinRackRate] DEFAULT (0) FOR [H_MinRackRate],
	CONSTRAINT [DF_TE_Hotel_H_MaxRackRate] DEFAULT (0) FOR [H_MaxRackRate],
	CONSTRAINT [DF_TE_Hotel_H_MinPrice] DEFAULT (0) FOR [H_MinPrice],
	CONSTRAINT [DF_TE_Hotel_H_MaxPrice] DEFAULT (0) FOR [H_MaxPrice],
	CONSTRAINT [DF_TE_Hotel_H_MinBonus] DEFAULT (0) FOR [H_MinBonus],
	CONSTRAINT [DF_TE_Hotel_H_MaxBonus] DEFAULT (0) FOR [H_MaxBonus],
	CONSTRAINT [DF_TE_Hotel_H_CityID] DEFAULT (0) FOR [H_CityID],
	CONSTRAINT [DF_TE_Hotel_H_CategoryID] DEFAULT (0) FOR [H_CategoryID],
	CONSTRAINT [DF_TE_Hotel_H_BrandId] DEFAULT (0) FOR [H_BrandId],
	CONSTRAINT [DF_TE_Hotel_H_BrandName] DEFAULT ('') FOR [H_BrandName],
	CONSTRAINT [DF_TE_Hotel_H_PreviewPic] DEFAULT ('') FOR [H_PreviewPic],
	CONSTRAINT [DF_TE_Hotel_H_Computer] DEFAULT (0) FOR [H_Restaurants],
	CONSTRAINT [DF_TE_Hotel_H_SwimmingPool] DEFAULT (0) FOR [H_Swimming],
	CONSTRAINT [DF_TE_Hotel_H_Fitness] DEFAULT (0) FOR [H_Fitness],
	CONSTRAINT [DF_TE_Hotel_H_Airbus] DEFAULT (0) FOR [H_Airbus],
	CONSTRAINT [DF_TE_Hotel_H_Internet] DEFAULT (0) FOR [H_Internet],
	CONSTRAINT [DF_TE_Hotel_H_Parking] DEFAULT (0) FOR [H_Parking],
	CONSTRAINT [DF_TE_Hotel_H_Tj] DEFAULT (0) FOR [H_Tj],
	CONSTRAINT [DF_TE_Hotel_H_Top] DEFAULT (0) FOR [H_Top],
	CONSTRAINT [DF_TE_Hotel_H_HaoPing] DEFAULT (0) FOR [H_HaoPing],
	CONSTRAINT [DF_TE_Hotel_H_ZhongPing] DEFAULT (0) FOR [H_ZhongPing],
	CONSTRAINT [DF_TE_Hotel_H_ChaPing] DEFAULT (0) FOR [H_ChaPing],
	CONSTRAINT [DF_TE_Hotel_H_Favorites] DEFAULT (0) FOR [H_Favorites],
	CONSTRAINT [DF_TE_Hotel_H_Reviewss] DEFAULT (0) FOR [H_Reviewss],
	CONSTRAINT [DF_TE_Hotel_H_SalesStatistics] DEFAULT (0) FOR [H_SalesStatistics],
	CONSTRAINT [DF_TE_Hotel_H_OrderId] DEFAULT (0) FOR [H_OrderId],
	CONSTRAINT [PK_TE_Hotel] PRIMARY KEY  CLUSTERED 
	(
		[H_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_HotelBrand] ADD 
	CONSTRAINT [PK_TE_HotelBrand] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_HotelCategory] ADD 
	CONSTRAINT [DF_TE_HotelCategory_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [PK_TE_HotelCategory] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_HotelOrder] ADD 
	CONSTRAINT [DF_TE_HotelOrder_O_FessCount] DEFAULT (0) FOR [O_FeesCount],
	CONSTRAINT [DF_TE_HotelOrder_O_BonusCount] DEFAULT (0) FOR [O_BonusCount],
	CONSTRAINT [DF_TE_HotelOrder_O_Date] DEFAULT (getdate()) FOR [O_Date],
	CONSTRAINT [DF_TE_HotelOrder_O_Mark] DEFAULT (0) FOR [O_Mark],
	CONSTRAINT [DF_TE_HotelOrder_O_CancelReason] DEFAULT ('') FOR [O_CancelReason],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Rating_0] DEFAULT (0) FOR [O_R_Rating_0],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Rating_1] DEFAULT (0) FOR [O_R_Rating_1],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Rating_2] DEFAULT (0) FOR [O_R_Rating_2],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Rating_3] DEFAULT (0) FOR [O_R_Rating_3],
	CONSTRAINT [DF_TE_HotelOrder_O_R_HaoRating] DEFAULT (0) FOR [O_R_Count],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Text] DEFAULT ('') FOR [O_R_Text],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Impression] DEFAULT ('') FOR [O_R_Impression],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Date] DEFAULT ('2000-1-1') FOR [O_R_Date],
	CONSTRAINT [DF_TE_HotelOrder_O_R_Pics] DEFAULT (0) FOR [O_R_Pics],
	CONSTRAINT [DF_TE_HotelOrder_O_R_PicBonusCount] DEFAULT (0) FOR [O_R_PicBonusCount],
	CONSTRAINT [PK_TE_HotelOrder] PRIMARY KEY  CLUSTERED 
	(
		[O_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_HotelPic] ADD 
	CONSTRAINT [DF_TE_HotelPic_P_H_Id] DEFAULT (0) FOR [P_H_Id],
	CONSTRAINT [DF_TE_HotelPic_P_UserId] DEFAULT (0) FOR [P_UserId],
	CONSTRAINT [DF_TE_HotelPic_P_O_Id] DEFAULT (0) FOR [P_O_Id],
	CONSTRAINT [DF_TE_HotelPic_P_OrderId] DEFAULT (0) FOR [P_OrderId],
	CONSTRAINT [DF_TE_HotelPic_P_PreviewPic] DEFAULT (0) FOR [P_Preview],
	CONSTRAINT [DF_TE_HotelPic_P_date] DEFAULT (getdate()) FOR [P_date],
	CONSTRAINT [DF_TE_HotelPic_P_Mark] DEFAULT (0) FOR [P_Mark],
	CONSTRAINT [DF_TE_HotelPic_P_Default] DEFAULT (0) FOR [P_Default],
	CONSTRAINT [PK_TE_HotelPic] PRIMARY KEY  CLUSTERED 
	(
		[P_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Line] ADD 
	CONSTRAINT [DF_TE_Line_L_CategoryID] DEFAULT (0) FOR [L_CategoryID],
	CONSTRAINT [DF_TE_Line_L_StopCityID] DEFAULT (0) FOR [L_TopicsID],
	CONSTRAINT [DF_TE_Line_L_Price] DEFAULT (0) FOR [L_Price],
	CONSTRAINT [DF_TE_Line_L_RackRate] DEFAULT (0) FOR [L_RackRate],
	CONSTRAINT [DF_TE_Line_L_ChildrenPrice] DEFAULT (0) FOR [L_ChildrenPrice],
	CONSTRAINT [DF_TE_Line_L_EarlyBird] DEFAULT (0) FOR [L_EarlyBird],
	CONSTRAINT [DF_TE_Line_L_TravelDays] DEFAULT (0) FOR [L_TravelDays],
	CONSTRAINT [DF_TE_Line_L_Tj] DEFAULT (0) FOR [L_Tj],
	CONSTRAINT [DF_TE_Line_L_Popularity] DEFAULT (0) FOR [L_Popularity],
	CONSTRAINT [DF_TE_Line_L_Bonus] DEFAULT (0) FOR [L_Bonus],
	CONSTRAINT [DF_TE_Line_L_ChildrenBonus] DEFAULT (0) FOR [L_ChildrenBonus],
	CONSTRAINT [DF_TE_Line_L_HaoPing] DEFAULT (0) FOR [L_HaoPing],
	CONSTRAINT [DF_TE_Line_L_ZhongPing] DEFAULT (0) FOR [L_ZhongPing],
	CONSTRAINT [DF_TE_Line_L_Favorites] DEFAULT (0) FOR [L_Favorites],
	CONSTRAINT [DF_TE_Line_L_ChaPing] DEFAULT (0) FOR [L_ChaPing],
	CONSTRAINT [DF_TE_Line_L_Reviewss] DEFAULT (0) FOR [L_Reviewss],
	CONSTRAINT [DF_TE_Line_L_SalesStatistics] DEFAULT (0) FOR [L_SalesStatistics],
	CONSTRAINT [DF_TE_Line_L_OrderId] DEFAULT (0) FOR [L_OrderId],
	CONSTRAINT [PK_TE_Line] PRIMARY KEY  CLUSTERED 
	(
		[L_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_LineCategory] ADD 
	CONSTRAINT [DF_TE_LineCategory_T_PID] DEFAULT (0) FOR [T_PID],
	CONSTRAINT [DF_TE_LineCategory_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [DF_TE_LineCategory_T_Top] DEFAULT (0) FOR [T_Top],
	CONSTRAINT [PK_TE_LineCategory] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_LineOrder] ADD 
	CONSTRAINT [DF_TE_LineOrder_O_FessCount] DEFAULT (0) FOR [O_FeesCount],
	CONSTRAINT [DF_TE_LineOrder_O_BonusCount] DEFAULT (0) FOR [O_BonusCount],
	CONSTRAINT [DF_TE_LineOrder_O_Mark] DEFAULT (0) FOR [O_Mark],
	CONSTRAINT [DF_TE_LineOrder_O_Date] DEFAULT (getdate()) FOR [O_Date],
	CONSTRAINT [DF_TE_LineOrder_O_CancelReason] DEFAULT ('') FOR [O_CancelReason],
	CONSTRAINT [DF_TE_LineOrder_O_R_Rating_0] DEFAULT (0) FOR [O_R_Rating_0],
	CONSTRAINT [DF_TE_LineOrder_O_R_Rating_1] DEFAULT (0) FOR [O_R_Rating_1],
	CONSTRAINT [DF_TE_LineOrder_O_R_Rating_2] DEFAULT (0) FOR [O_R_Rating_2],
	CONSTRAINT [DF_TE_LineOrder_O_R_Rating_3] DEFAULT (0) FOR [O_R_Rating_3],
	CONSTRAINT [DF_TE_LineOrder_O_R_Count] DEFAULT (0) FOR [O_R_Count],
	CONSTRAINT [DF_TE_LineOrder_O_R_Text] DEFAULT ('') FOR [O_R_Text],
	CONSTRAINT [DF_TE_LineOrder_O_R_Impression] DEFAULT ('') FOR [O_R_Impression],
	CONSTRAINT [DF_TE_LineOrder_O_R_Date] DEFAULT ('2000-1-1') FOR [O_R_Date],
	CONSTRAINT [DF_TE_LineOrder_O_R_Pics] DEFAULT (0) FOR [O_R_Pics],
	CONSTRAINT [DF_TE_LineOrder_O_R_PicBonusCount] DEFAULT (0) FOR [O_R_PicBonusCount],
	CONSTRAINT [PK_TE_LineOrder] PRIMARY KEY  CLUSTERED 
	(
		[O_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_LinePic] ADD 
	CONSTRAINT [DF_TE_LinePic_P_L_Id] DEFAULT (0) FOR [P_L_Id],
	CONSTRAINT [DF_TE_LinePic_P_UserId] DEFAULT (0) FOR [P_UserId],
	CONSTRAINT [DF_TE_LinePic_P_O_Id] DEFAULT (0) FOR [P_O_Id],
	CONSTRAINT [DF_TE_LinePic_P_OrderId] DEFAULT (0) FOR [P_OrderId],
	CONSTRAINT [DF_TE_LinePic_P_Preview] DEFAULT (0) FOR [P_Preview],
	CONSTRAINT [DF_TE_LinePic_P_Date] DEFAULT (getdate()) FOR [P_Date],
	CONSTRAINT [DF_TE_LinePic_P_Mark] DEFAULT (0) FOR [P_Mark],
	CONSTRAINT [DF_TE_LinePic_P_Dafault] DEFAULT (0) FOR [P_Default],
	CONSTRAINT [PK_TE_LinePic] PRIMARY KEY  CLUSTERED 
	(
		[P_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Link] ADD 
	CONSTRAINT [DF_TE_Link_L_CategoryID] DEFAULT (0) FOR [L_Type],
	CONSTRAINT [DF_TE_Link_L_Logo] DEFAULT ('') FOR [L_Logo],
	CONSTRAINT [DF_TE_Link_L_OrderID] DEFAULT (0) FOR [L_OrderID],
	CONSTRAINT [PK_TE_Link] PRIMARY KEY  CLUSTERED 
	(
		[L_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Message] ADD 
	CONSTRAINT [DF_TE_Message_M_UserID] DEFAULT (1) FOR [M_UserID],
	CONSTRAINT [DF_TE_Message_M_OrderId] DEFAULT (0) FOR [M_OrderId],
	CONSTRAINT [DF_TE_Message_M_Date] DEFAULT (getdate()) FOR [M_Date],
	CONSTRAINT [DF_TE_Message_M_View] DEFAULT (',') FOR [M_View],
	CONSTRAINT [PK_TE_Message] PRIMARY KEY  CLUSTERED 
	(
		[M_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_News] ADD 
	CONSTRAINT [DF_TE_News_N_CategoryID] DEFAULT (0) FOR [N_CategoryID],
	CONSTRAINT [DF_TE_News_N_OrderID] DEFAULT (0) FOR [N_OrderID],
	CONSTRAINT [DF_TE_News_N_Tj] DEFAULT (0) FOR [N_Tj],
	CONSTRAINT [DF_TE_News_N_Top] DEFAULT (0) FOR [N_Top],
	CONSTRAINT [DF_TE_News_N_Popularity] DEFAULT (0) FOR [N_Popularity],
	CONSTRAINT [DF_TE_News_N_StartDate] DEFAULT (getdate()) FOR [N_AddDate],
	CONSTRAINT [PK_TE_News] PRIMARY KEY  CLUSTERED 
	(
		[N_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_NewsCategory] ADD 
	CONSTRAINT [DF_TE_NewsCategory_T_PID] DEFAULT (0) FOR [T_PID],
	CONSTRAINT [DF_TE_NewsCategory_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [PK_TE_NewsCategory] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_NewsReviews] ADD 
	CONSTRAINT [DF_TE_NewsReviews_R_NewsID] DEFAULT (0) FOR [R_NewsID],
	CONSTRAINT [DF_TE_NewsReviews_R_UserID] DEFAULT (1) FOR [R_UserID],
	CONSTRAINT [DF_TE_NewsReviews_R_AddDate] DEFAULT (getdate()) FOR [R_AddDate],
	CONSTRAINT [PK_TE_NewsReviews] PRIMARY KEY  CLUSTERED 
	(
		[R_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_OtherCategory] ADD 
	CONSTRAINT [DF_TE_LinkCategory_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [DF_TE_OtherCategory_T_Type] DEFAULT (0) FOR [T_Type],
	CONSTRAINT [PK_TE_LinkCategory] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Questions] ADD 
	CONSTRAINT [DF_TE_Questions_Q_AdId] DEFAULT (0) FOR [Q_AdId],
	CONSTRAINT [DF_TE_Questions_Q_UserId] DEFAULT (0) FOR [Q_UserId],
	CONSTRAINT [DF_TE_Questions_Q_Type] DEFAULT (0) FOR [Q_Type],
	CONSTRAINT [DF_TE_Questions_Q_QDate] DEFAULT (getdate()) FOR [Q_QDate],
	CONSTRAINT [DF_TE_Questions_Q_Answers] DEFAULT ('') FOR [Q_Answers],
	CONSTRAINT [DF_TE_Questions_Q_ADate] DEFAULT ('2000-1-1') FOR [Q_ADate],
	CONSTRAINT [PK_TE_Questions] PRIMARY KEY  CLUSTERED 
	(
		[Q_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Room] ADD 
	CONSTRAINT [DF_TE_Room_R_HotelID] DEFAULT (0) FOR [R_HotelID],
	CONSTRAINT [DF_TE_Room_R_RackRate] DEFAULT (0) FOR [R_RackRate],
	CONSTRAINT [DF_TE_Room_R_Price] DEFAULT (0) FOR [R_Price],
	CONSTRAINT [DF_TE_Room_R_Friday] DEFAULT (0) FOR [R_Friday],
	CONSTRAINT [DF_TE_Room_R_Saturday] DEFAULT (0) FOR [R_Saturday],
	CONSTRAINT [DF_TE_Room_R_Weekend] DEFAULT (0) FOR [R_Weekend],
	CONSTRAINT [DF_TE_Room_R_Area] DEFAULT (0) FOR [R_Area],
	CONSTRAINT [DF_TE_Room_R_Breakfast] DEFAULT (0) FOR [R_Breakfast],
	CONSTRAINT [DF_TE_Room_R_Internet] DEFAULT (0) FOR [R_Internet],
	CONSTRAINT [DF_TE_Room_R_AddBed] DEFAULT (0) FOR [R_AddBed],
	CONSTRAINT [DF_TE_Room_R_Bonus] DEFAULT (0) FOR [R_Bonus],
	CONSTRAINT [DF_TE_Room_R_OrderID] DEFAULT (0) FOR [R_OrderID],
	CONSTRAINT [DF_TE_Room_R_SalesStatistics] DEFAULT (0) FOR [R_SalesStatistics],
	CONSTRAINT [PK_TE_Room] PRIMARY KEY  CLUSTERED 
	(
		[R_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Scenery] ADD 
	CONSTRAINT [DF_TE_Scenery_S_MinRackRate] DEFAULT (0) FOR [S_MinRackRate],
	CONSTRAINT [DF_TE_Scenery_S_MaxRackRate] DEFAULT (0) FOR [S_MaxRackRate],
	CONSTRAINT [DF_TE_Scenery_S_MinPrice] DEFAULT (0) FOR [S_MinPrice],
	CONSTRAINT [DF_TE_Scenery_S_MaxPrice] DEFAULT (0) FOR [S_MaxPrice],
	CONSTRAINT [DF_TE_Scenery_S_MinDiscountPrice] DEFAULT (0) FOR [S_MinDiscountPrice],
	CONSTRAINT [DF_TE_Scenery_S_MaxDiscountPrice] DEFAULT (0) FOR [S_MaxDiscountPrice],
	CONSTRAINT [DF_TE_Scenery_S_MinBonus] DEFAULT (0) FOR [S_MinBonus],
	CONSTRAINT [DF_TE_Scenery_S_MaxBonus] DEFAULT (0) FOR [S_MaxBonus],
	CONSTRAINT [DF_TE_Scenery_S_Level] DEFAULT (0) FOR [S_Level],
	CONSTRAINT [DF_TE_Scenery_S_CityID] DEFAULT (0) FOR [S_CityID],
	CONSTRAINT [DF_TE_Scenery_S_PaymentWay] DEFAULT (0) FOR [S_FitCrowd],
	CONSTRAINT [DF_TE_Scenery_S_PreviewPic] DEFAULT ('') FOR [S_PreviewPic],
	CONSTRAINT [DF_TE_Scenery_S_Tj] DEFAULT (0) FOR [S_Tj],
	CONSTRAINT [DF_TE_Scenery_S_RanNum] DEFAULT ('') FOR [S_RanNum],
	CONSTRAINT [DF_TE_Scenery_S_HaoPing] DEFAULT (0) FOR [S_HaoPing],
	CONSTRAINT [DF_TE_Scenery_S_ZhongPing] DEFAULT (0) FOR [S_ZhongPing],
	CONSTRAINT [DF_TE_Scenery_S__ChaPing] DEFAULT (0) FOR [S_ChaPing],
	CONSTRAINT [DF_TE_Scenery_S_Favorites] DEFAULT (0) FOR [S_Favorites],
	CONSTRAINT [DF_TE_Scenery_S_Reviewss] DEFAULT (0) FOR [S_Reviewss],
	CONSTRAINT [DF_TE_Scenery_S_SalesStatistics] DEFAULT (0) FOR [S_SalesStatistics],
	CONSTRAINT [DF_TE_Scenery_S_OrderId] DEFAULT (0) FOR [S_OrderId],
	CONSTRAINT [PK_TE_Scenery] PRIMARY KEY  CLUSTERED 
	(
		[S_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_SceneryOrder] ADD 
	CONSTRAINT [DF_TE_SceneryOrder_O_SceneryID] DEFAULT (0) FOR [O_SceneryID],
	CONSTRAINT [DF_TE_SceneryOrder_O_TicketsID] DEFAULT (0) FOR [O_TicketsID],
	CONSTRAINT [DF_TE_SceneryOrder_O_UserId] DEFAULT (0) FOR [O_UserId],
	CONSTRAINT [DF_TE_SceneryOrder_O_Quantity] DEFAULT (0) FOR [O_Quantity],
	CONSTRAINT [DF_TE_SceneryOrder_O_Email] DEFAULT ('') FOR [O_Email],
	CONSTRAINT [DF_TE_SceneryOrder_O_FeesCount] DEFAULT (0) FOR [O_FeesCount],
	CONSTRAINT [DF_TE_SceneryOrder_O_BonusCount] DEFAULT (0) FOR [O_BonusCount],
	CONSTRAINT [DF_TE_SceneryOrder_O_Date] DEFAULT (getdate()) FOR [O_Date],
	CONSTRAINT [DF_TE_SceneryOrder_O_Mark] DEFAULT (0) FOR [O_Mark],
	CONSTRAINT [DF_TE_SceneryOrder_O_CancelReason] DEFAULT ('') FOR [O_CancelReason],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Rating_0] DEFAULT (0) FOR [O_R_Rating_0],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Rating_1] DEFAULT (0) FOR [O_R_Rating_1],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Rating_2] DEFAULT (0) FOR [O_R_Rating_2],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Rating_3] DEFAULT (0) FOR [O_R_Rating_3],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_HaoRating] DEFAULT (0) FOR [O_R_Count],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Date] DEFAULT ('2000-1-1') FOR [O_R_Date],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_Pics] DEFAULT (0) FOR [O_R_Pics],
	CONSTRAINT [DF_TE_SceneryOrder_O_R_PicBonusCount] DEFAULT (0) FOR [O_R_PicBonusCount],
	CONSTRAINT [PK_TE_SceneryOrder] PRIMARY KEY  CLUSTERED 
	(
		[O_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_SceneryPic] ADD 
	CONSTRAINT [DF_TE_SceneryPic_P_S_ID] DEFAULT (0) FOR [P_S_ID],
	CONSTRAINT [DF_TE_SceneryPic_P_UserId] DEFAULT (0) FOR [P_UserId],
	CONSTRAINT [DF_TE_SceneryPic_P_O_ID] DEFAULT (0) FOR [P_O_ID],
	CONSTRAINT [DF_TE_SceneryPic_P_OrderID] DEFAULT (0) FOR [P_OrderID],
	CONSTRAINT [DF_TE_SceneryPic_P_Preview] DEFAULT (0) FOR [P_Preview],
	CONSTRAINT [DF_TE_SceneryPic_P_Date] DEFAULT (getdate()) FOR [P_Date],
	CONSTRAINT [DF_TE_SceneryPic_P_Mark] DEFAULT (0) FOR [P_Mark],
	CONSTRAINT [DF_TE_SceneryPic_P_Default] DEFAULT (0) FOR [P_Default]
GO

ALTER TABLE [TE_Template] ADD 
	CONSTRAINT [DF_TE_Template_T_Default] DEFAULT (0) FOR [T_Default],
	CONSTRAINT [PK_TE_Template] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Tickets] ADD 
	CONSTRAINT [DF_TE_Tickets_T_SceneryID] DEFAULT (0) FOR [T_SceneryID],
	CONSTRAINT [DF_TE_Tickets_T_RackRate] DEFAULT (0) FOR [T_RackRate],
	CONSTRAINT [DF_TE_Tickets_T_Price] DEFAULT (0) FOR [T_Price],
	CONSTRAINT [DF_TE_Tickets_T_DiscountPrice] DEFAULT (0) FOR [T_DiscountPrice],
	CONSTRAINT [DF_TE_Tickets_T_Bonus] DEFAULT (0) FOR [T_Bonus],
	CONSTRAINT [DF_TE_Tickets_T_OrderID] DEFAULT (0) FOR [T_OrderID],
	CONSTRAINT [DF_TE_Tickets_T_SalesStatistics] DEFAULT (0) FOR [T_SalesStatistics],
	CONSTRAINT [PK_TE_Tickets] PRIMARY KEY  CLUSTERED 
	(
		[T_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_UpFile] ADD 
	CONSTRAINT [DF_TE_UpFile_F_Dy] DEFAULT (0) FOR [F_Dy],
	CONSTRAINT [PK_TE_UpFile] PRIMARY KEY  CLUSTERED 
	(
		[F_ID]
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_User] ADD 
	CONSTRAINT [DF_TE_User_U_DzUserId] DEFAULT (0) FOR [U_DzUserId],
	CONSTRAINT [DF_TE_User_U_CardId] DEFAULT ('') FOR [U_CardId],
	CONSTRAINT [DF_TE_User_U_Mobile] DEFAULT ('') FOR [U_Mobile],
	CONSTRAINT [DF_TE_User_U_Mark] DEFAULT (0) FOR [U_Mark],
	CONSTRAINT [DF_TE_User_U_RandCode] DEFAULT ('') FOR [U_RandCode],
	CONSTRAINT [DF_TE_User_U_LoginDate] DEFAULT (getdate()) FOR [U_LastLoginDate],
	CONSTRAINT [DF_TE_User_U_RealName] DEFAULT ('') FOR [U_RealName],
	CONSTRAINT [DF_TE_User_U_Sex] DEFAULT ('') FOR [U_Sex],
	CONSTRAINT [DF_TE_User_U_Phone] DEFAULT ('') FOR [U_Phone],
	CONSTRAINT [DF_TE_User_U_Address] DEFAULT ('') FOR [U_Address],
	CONSTRAINT [DF_TE_User_U_Zip] DEFAULT ('') FOR [U_Zip],
	CONSTRAINT [DF_TE_User_U_Working] DEFAULT ('') FOR [U_Working],
	CONSTRAINT [DF_TE_User_U_EDU] DEFAULT ('') FOR [U_EDU],
	CONSTRAINT [DF_TE_User_U_ShouRu] DEFAULT ('') FOR [U_ShouRu],
	CONSTRAINT [DF_TE_User_U_Marry] DEFAULT ('') FOR [U_Marry],
	CONSTRAINT [DF_TE_User_U_YuanYin] DEFAULT ('') FOR [U_YuanYin],
	CONSTRAINT [DF_TE_User_U_TuJing] DEFAULT ('') FOR [U_TuJing],
	CONSTRAINT [DF_TE_User_U_Bonus] DEFAULT (0) FOR [U_Bonus],
	CONSTRAINT [DF_TE_User_U_Perfect] DEFAULT (0) FOR [U_Perfect],
	CONSTRAINT [DF_TE_User_U_Face] DEFAULT ('') FOR [U_Face],
	CONSTRAINT [PK_TE_User] PRIMARY KEY  CLUSTERED 
	(
		[U_ID] DESC 
	)  ON [PRIMARY] 
GO

ALTER TABLE [TE_Withdraw] ADD 
	CONSTRAINT [DF_TE_Withdraw_W_UserId] DEFAULT (0) FOR [W_UserId],
	CONSTRAINT [DF_TE_Withdraw_W_Money] DEFAULT (0) FOR [W_Money],
	CONSTRAINT [DF_TE_Withdraw_W_Mobile] DEFAULT ('') FOR [W_Mobile],
	CONSTRAINT [DF_TE_Withdraw_W_Bak] DEFAULT ('') FOR [W_Bak],
	CONSTRAINT [DF_TE_Withdraw_W_Mark] DEFAULT (0) FOR [W_Mark],
	CONSTRAINT [DF_TE_Withdraw_W_Date] DEFAULT (getdate()) FOR [W_Date],
	CONSTRAINT [DF_TE_Withdraw_W_RejectReason] DEFAULT ('') FOR [W_RejectReason],
	CONSTRAINT [PK_TE_Withdraw] PRIMARY KEY  CLUSTERED 
	(
		[W_ID] DESC 
	)  ON [PRIMARY]