/*
仅限空数据库创建数据库结构
			Order By Adyson
*/

/*创建zt_admin*/
CREATE TABLE [zt_admin] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[adminName] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[Password] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[isActive] [int] NULL ,
	[Flag] [int] NULL ,
	[LoginTime] [smalldatetime] NULL ,
	[Loginip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_admin] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO
/*创建zt_book*/
CREATE TABLE [zt_book] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[username] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[date] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[comment] [int] NULL ,
	[type] [int] NULL ,
	CONSTRAINT [PK_zt_book] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_comment*/
CREATE TABLE [zt_comment] (
	[zt_id] [int] IDENTITY (1, 1) NOT NULL ,
	[zt_vid] [int] NULL ,
	[zt_username] [nvarchar] (10) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_date] [smalldatetime] NULL ,
	[zt_ip] [nvarchar] (15) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_comment] PRIMARY KEY  CLUSTERED 
	(
		[zt_id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_data*/
CREATE TABLE [zt_data] (
	[zt_id] [int] IDENTITY (1, 1) NOT NULL ,
	[zt_name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_enname] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_color] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_lz] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_type] [int] NULL ,
	[zt_type2] [int] NULL ,
	[zt_type3] [int] NULL ,
	[zt_types] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_dy] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_dy1] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_zy] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_yy] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_dq] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_pic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_tj] [int] NULL ,
	[zt_hits] [int] NULL ,
	[zt_date] [smalldatetime] NULL ,
	[zt_url] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_url1] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_down] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_vhide] [smallint] NULL ,
	[zt_uvid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_digg] [int] NULL ,
	[zt_dcai] [int] NULL ,
	CONSTRAINT [PK_zt_data] PRIMARY KEY  CLUSTERED 
	(
		[zt_id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_import*/
CREATE TABLE [zt_import] (
	[zt_id] [int] IDENTITY (1, 1) NOT NULL ,
	[zt_uvid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_name] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_type] [int] NULL ,
	[zt_type2] [int] NULL ,
	[zt_type3] [int] NULL ,
	[zt_zy] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_yy] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_pic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_url] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_url1] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_date] [smalldatetime] NULL ,
	[zt_dy] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_dy1] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_down] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_import] PRIMARY KEY  CLUSTERED 
	(
		[zt_id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_link*/
CREATE TABLE [zt_link] (
	[zt_lid] [int] IDENTITY (1, 1) NOT NULL ,
	[zt_lname] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_lpic] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_lurl] [nvarchar] (255) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_ldes] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_switch] [int] NULL ,
	[zt_order] [int] NULL ,
	[zt_hide] [int] NULL ,
	CONSTRAINT [PK_zt_link] PRIMARY KEY  CLUSTERED 
	(
		[zt_lid]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_rebook*/
CREATE TABLE [zt_rebook] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[cid] [int] NULL ,
	[admin] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[content] [ntext] COLLATE Chinese_PRC_CI_AS NULL ,
	[ip] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[date] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_rebook] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO
/*创建zt_setting*/
CREATE TABLE [zt_setting] (
	[id] [int] IDENTITY (1, 1) NOT NULL ,
	[sitename] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[siteurl] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sitelogo] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[sitetype] [int] NULL ,
	[siteemail] [nvarchar] (250) COLLATE Chinese_PRC_CI_AS NULL ,
	[ccid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[cc_key] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[cc_pwd] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_setting] PRIMARY KEY  CLUSTERED 
	(
		[id]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO
/*创建zt_type*/
CREATE TABLE [zt_type] (
	[zt_typeid] [int] IDENTITY (1, 1) NOT NULL ,
	[zt_typename] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_en] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	[zt_n] [int] NULL ,
	[zt_upid] [int] NULL ,
	[zt_hide] [smallint] NULL ,
	[zt_unionid] [nvarchar] (50) COLLATE Chinese_PRC_CI_AS NULL ,
	CONSTRAINT [PK_zt_type] PRIMARY KEY  CLUSTERED 
	(
		[zt_typeid]
	)  ON [PRIMARY] 
) ON [PRIMARY]
GO

/*初始化管理员用户名密码sql:用户名为admin,密码为admin*/
insert into [zt_admin](adminname,[password],isactive,flag) values('admin','21232f297a57a5a743894a0e4a801fc3',1,0)
/*'注明,免费版本不能去掉这里,不然运行不了的时候,别找我*/
insert into [zt_link](zt_lname,zt_lurl,zt_switch,zt_order,[zt_hide]) values('幻影动漫网','http://www.ppdong.com',0,0,1)