CREATE TABLE [dbo].[sites](
	[siteid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[sitetitle] [nvarchar](200) NULL,
	[sitename] [nvarchar](200) NULL,
	[sitekeywords] [nvarchar](500) NULL,
	[sitedescription] [nvarchar](2000) NULL,
	[siteurl] [nvarchar](200) NULL,
	[siteip] [nvarchar](50) NULL,
	[skin] [nvarchar](50) NULL,
	[pid] [nvarchar](200) NULL,
	[appkey] [nvarchar](200) NULL,
	[appsecret] [nvarchar](200) NULL,
	[beian] [nvarchar](200) NULL,
	[sitetongji] [nvarchar](max) NULL,
	[sitetime] [datetime] NULL CONSTRAINT [DF_sites_sitetime]  DEFAULT (getdate()),
	[siteor] [int] NULL CONSTRAINT [DF_sites_siteor]  DEFAULT ((0)),
	[sitelogo] [nvarchar](50) NULL
  
	)

CREATE TABLE [dbo].[tags](
	[tagid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[tagname] [nvarchar](200) NULL,
	[tagkeywords] [nvarchar](200) NULL,
	[classfathername] [nvarchar](50) NULL,
	[classfatherid] [int] NULL,
	[classname] [nvarchar](50) NULL,
	[classid] [int] NULL,
	[siteurl] [nvarchar](50) NULL,
	[taghot] [int] NULL CONSTRAINT [DF_tags_taghot]  DEFAULT ((0)),
	[tagtime] [datetime] NULL CONSTRAINT [DF_tags_tagtime]  DEFAULT (getdate())

	
	)


CREATE TABLE [dbo].[products](
	[productid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[numiid] [bigint] NULL,
	[productname] [nvarchar](200) NULL,
	[classfathername] [nvarchar](200) NULL,
	[classfatherid] [int] NULL,
	[classid] [int] NULL,
	[classname] [nvarchar](200) NULL,
	[shopurl] [nvarchar](2000) NULL,
	[producturl] [nvarchar](2000) NULL,
	[productprice] [money] NULL,
	[productsum] [int] NULL,
	[producttext] [ntext] NULL,
	[productreply] [ntext] NULL,
	[productpic] [nvarchar](2000) NULL,
	[producttime] [datetime] NULL CONSTRAINT [DF_products_producttime]  DEFAULT (getdate()),
	[producthot] [int] NULL CONSTRAINT [DF_products_producthot]  DEFAULT ((0)),
	[usertype] [int] NULL,
	[siteurl] [nvarchar](50) NULL,
	[tagname] [nvarchar](200) NULL,
	[productor] [int] NULL
	)

CREATE TABLE [dbo].[searchs](
	[searchid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[searchname] [nvarchar](200) NULL,
	[searchhot] [int] NULL CONSTRAINT [DF_searchs_searchhot]  DEFAULT ((1)),
	[searchtime] [datetime] NULL CONSTRAINT [DF_searchs_searchtime]  DEFAULT (getdate()),
	[searchnewtime] [datetime] NULL CONSTRAINT [DF_searchs_searchnewtime]  DEFAULT (getdate()),
	[siteurl] [nvarchar](50) NULL,
	[searchtype] [nvarchar](50) NULL
	)


CREATE TABLE [dbo].[links](
	[linkid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[linktitle] [nvarchar](50) NULL,
	[linkurl] [nvarchar](100) NULL,
	[siteurl] [nvarchar](50) NULL,
	[linktime] [datetime] NULL CONSTRAINT [DF_links_linktime]  DEFAULT (getdate())
	)


CREATE TABLE [dbo].[class](
	[classid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[classname] [nvarchar](50) NOT NULL,
	[classurl] [nvarchar](50) NULL,
	[classkeywords] [nvarchar](500) NULL,
	[classdescription] [nvarchar](1000) NULL,
	[classpic] [nvarchar](50) NULL,
	[classtype] [nvarchar](50) NULL,
	[classfather] [int] NULL,
	[classorder] [int] NOT NULL CONSTRAINT [DF_types_typeorder]  DEFAULT ((0)),
	[classor] [int] NULL CONSTRAINT [DF_class_classor]  DEFAULT ((0)),
	[siteurl] [nvarchar](50) NULL
	)
	

CREATE TABLE [dbo].[admins](
	[adminid] [int] IDENTITY(1,1) NOT NULL PRIMARY KEY,
	[adminuser] [nvarchar](50) NULL,
	[adminpass] [nvarchar](50) NULL

	)