SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT;
SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS;
SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION;
SET NAMES utf8;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;


CREATE DATABASE /*!32312 IF NOT EXISTS*/ `cwbbs`;
USE `cwbbs`;
CREATE TABLE `bc` (
  `ID` int(11) NOT NULL auto_increment,
  `bc` varchar(50) default NULL,
  `count` int(11) default NULL,
  `todays` int(11) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `blog` (
  `id` int(11) NOT NULL default '0',
  `blogCount` int(11) NOT NULL default '0',
  `newBlogUserName` varchar(20) default NULL,
  `topicCount` int(11) NOT NULL default '0',
  `postCount` int(11) NOT NULL default '0',
  `todayCount` int(11) NOT NULL default '0',
  `todayDate` varchar(15) NOT NULL default '',
  `yestodayCount` int(11) NOT NULL default '0',
  `maxCount` int(11) NOT NULL default '0',
  `maxDate` varchar(15) NOT NULL default '',
  `star` varchar(20) default NULL,
  `homeClasses` varchar(255) default NULL,
  `recommandBlogs` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `blog` (`id`,`blogCount`,`newBlogUserName`,`topicCount`,`postCount`,`todayCount`,`todayDate`,`yestodayCount`,`maxCount`,`maxDate`,`star`,`homeClasses`,`recommandBlogs`) VALUES (1,0,'',0,0,0,'2006-01-12',0,0,'2005-10-02','','wx,keji,yishu,trap,teach,movie,sport','');
CREATE TABLE `blog_directory` (
  `code` varchar(50) NOT NULL default '',
  `name` varchar(50) NOT NULL default '',
  `isHome` tinyint(1) NOT NULL default '0',
  `description` varchar(100) default NULL,
  `parent_code` varchar(20) NOT NULL default '',
  `root_code` varchar(20) NOT NULL default '',
  `orders` int(11) NOT NULL default '1',
  `child_count` int(11) default '0',
  `add_date` varchar(15) NOT NULL default '',
  `islocked` tinyint(1) default NULL,
  `type` tinyint(3) unsigned default NULL,
  `layer` int(11) NOT NULL default '0',
  `doc_id` int(11) default NULL,
  `template_id` int(11) NOT NULL default '-1',
  `pluginCode` varchar(50) NOT NULL default 'N''default''',
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `blog_directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`) VALUES ('cuzhong','初中',0,'','teach','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('dance','舞蹈',0,'','yishu','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('daxue','大学',0,'','teach','root',4,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('dianzi','电子',0,'','keji','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('donghua','动画',0,'','movie','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('football','足球',0,'','sport','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('gaozhong','高中',0,'','teach','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('gc','歌唱',0,'','yishu','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('keji','科技博客',1,'','root','root',2,3,'0',NULL,0,2,NULL,-1,'N\'default\''),('lanqiu','篮球',0,'','sport','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('movie','电影博客',0,'','root','root',6,5,'0',NULL,0,2,NULL,-1,'N\'default\''),('msdc','名山大川',0,'','trap','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\'');
INSERT INTO `blog_directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`) VALUES ('paint','绘画',0,'','yishu','root',5,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('paiqiu','排球',0,'','sport','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('pinpangqiu','乒乓球',0,'','sport','root',4,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('program','程序',0,'','keji','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('qiangzhan','枪战',0,'','movie','root',5,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('root','全部分类',0,NULL,'-1','root',1,7,'0',NULL,0,1,NULL,-1,'N\'default\''),('sanwen','散文',1,'','wx','root',1,0,'0',NULL,2,3,0,-1,'N\'default\''),('sheji','射击',0,'','sport','root',6,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('sheyin','摄影',0,'','yishu','root',4,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('shige','诗歌',1,'','wx','root',2,0,'0',NULL,2,3,0,-1,'N\'default\''),('shougong','手工',0,'','yishu','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('shuma','数码',0,'','keji','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\'');
INSERT INTO `blog_directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`) VALUES ('sport','体育博客',0,'','root','root',7,7,'0',NULL,0,2,NULL,-1,'N\'default\''),('sport_other','其它',0,'','sport','root',7,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('teach','教育博客',0,'','root','root',5,4,'0',NULL,0,2,NULL,-1,'N\'default\''),('trap','旅游博客',0,'','root','root',4,3,'0',NULL,0,2,NULL,-1,'N\'default\''),('tyfg','田园风光',0,'','trap','root',3,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('war','战争',0,'','movie','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('wuda','武打',0,'','movie','root',4,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('wx','文学博客',0,'','root','root',1,3,'0',NULL,0,2,0,-1,'N\'default\''),('xiaoshuo','小说',0,'','wx','root',3,0,'0',NULL,2,3,0,-1,'N\'default\''),('xiaoxue','小学',0,'','teach','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('xtrq','乡土人情',0,'','trap','root',2,0,'0',NULL,2,3,NULL,-1,'N\'default\'');
INSERT INTO `blog_directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`) VALUES ('yanqin','言情',0,'','movie','root',1,0,'0',NULL,2,3,NULL,-1,'N\'default\''),('yishu','艺术博客',0,'','root','root',3,5,'0',NULL,0,2,NULL,-1,'N\'default\''),('youyong','游泳',0,'','sport','root',5,0,'0',NULL,2,3,NULL,-1,'N\'default\'');
CREATE TABLE `blog_user_config` (
  `userName` varchar(50) NOT NULL default '',
  `title` varchar(50) NOT NULL default '',
  `subtitle` varchar(50) default NULL,
  `penName` varchar(50) NOT NULL default '',
  `skin` varchar(50) NOT NULL default 'default',
  `notice` text NOT NULL,
  `addDate` varchar(15) NOT NULL default '',
  `isValid` tinyint(1) NOT NULL default '1',
  `viewCount` int(11) NOT NULL default '0',
  `msgCount` int(11) NOT NULL default '0',
  `replyCount` int(11) NOT NULL default '0',
  `kind` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `blog_user_dir` (
  `code` varchar(50) NOT NULL default '',
  `userName` varchar(50) NOT NULL default '',
  `dirName` varchar(250) NOT NULL default '',
  `catalogCode` varchar(50) NOT NULL default 'N''default''',
  `sort` int(11) NOT NULL default '0',
  `color` varchar(20) default NULL,
  `addDate` datetime NOT NULL default '0000-00-00 00:00:00',
  PRIMARY KEY  (`code`),
  KEY `userName` (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `cms_images` (
  `id` int(11) NOT NULL default '0',
  `path` varchar(255) NOT NULL default '',
  `mainkey` varchar(20) NOT NULL default '',
  `kind` varchar(20) NOT NULL default '',
  `subkey` int(11) NOT NULL default '1',
  `visualPath` varchar(200) default NULL,
  PRIMARY KEY  (`id`),
  KEY `IX_images` (`mainkey`),
  KEY `IX_images_1` (`kind`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `cms_images` (`id`,`path`,`mainkey`,`kind`,`subkey`,`visualPath`) VALUES (10,'upfile/webeditimg/2006/8/2357ddd8a4354a8b82292978ec6821f6.jpg','1','document',1,NULL),(11,'upfile/webeditimg/2006/8/528e140122ca4930a85d31ca942a0ab3.jpg','2','document',1,NULL),(12,'upfile/webeditimg/2006/8/96ede6606c104816bc9f7a6722929a9c.jpg','3','document',1,NULL);
CREATE TABLE `comment` (
  `id` bigint(11) NOT NULL default '0',
  `content` text NOT NULL,
  `add_date` varchar(15) NOT NULL default '',
  `doc_id` int(11) NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  `nick` varchar(50) default NULL,
  `link` varchar(100) default NULL,
  PRIMARY KEY  (`id`),
  KEY `IX_comment` (`doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `count` (
  `ID` int(11) NOT NULL default '0',
  `PageCount` int(11) default NULL,
  `DayMax` int(11) default NULL,
  `AllCount` int(11) default NULL,
  `ToDayCount` int(11) default NULL,
  `LogDate` datetime default NULL,
  `StartDate` date default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `count` (`ID`,`PageCount`,`DayMax`,`AllCount`,`ToDayCount`,`LogDate`,`StartDate`) VALUES (0,0,0,0,0,'2006-10-27 10:44:54','0000-00-00');
CREATE TABLE `daycount` (
  `ID` int(11) NOT NULL default '0',
  `0` int(11) default NULL,
  `1` int(11) default NULL,
  `2` int(11) default NULL,
  `3` int(11) default NULL,
  `4` int(11) default NULL,
  `5` int(11) default NULL,
  `6` int(11) default NULL,
  `7` int(11) default NULL,
  `8` int(11) default NULL,
  `9` int(11) default NULL,
  `10` int(11) default NULL,
  `11` int(11) default NULL,
  `12` int(11) default NULL,
  `13` int(11) default NULL,
  `14` int(11) default NULL,
  `15` int(11) default NULL,
  `16` int(11) default NULL,
  `17` int(11) default NULL,
  `18` int(11) default NULL,
  `19` int(11) default NULL,
  `20` int(11) default NULL,
  `21` int(11) default NULL,
  `22` int(11) default NULL,
  `23` int(11) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `dir_priv` (
  `id` int(11) NOT NULL auto_increment,
  `dir_code` varchar(50) NOT NULL default '',
  `see` tinyint(1) NOT NULL default '1',
  `append` tinyint(1) NOT NULL default '0',
  `del` tinyint(1) NOT NULL default '0',
  `modify` tinyint(1) NOT NULL default '0',
  `examine` tinyint(1) NOT NULL default '0',
  `name` varchar(50) NOT NULL default '',
  `type` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `IX_dir_priv` (`dir_code`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `dir_priv` (`id`,`dir_code`,`see`,`append`,`del`,`modify`,`examine`,`name`,`type`) VALUES (1,'blog_ad',1,0,0,0,0,'Everyone',0),(2,'blog_ad1',1,0,0,0,0,'Everyone',0),(3,'blog_ad2',1,0,0,0,0,'Everyone',0),(4,'blog_ad3',1,0,0,0,0,'Everyone',0),(5,'blog_ad4',1,0,0,0,0,'Everyone',0),(13,'z',1,0,0,0,0,'Everyone',0);
CREATE TABLE `directory` (
  `code` varchar(20) NOT NULL default '',
  `name` varchar(50) NOT NULL default '',
  `isHome` tinyint(1) NOT NULL default '0',
  `description` varchar(100) default NULL,
  `parent_code` varchar(20) NOT NULL default '',
  `root_code` varchar(20) NOT NULL default '',
  `orders` int(11) NOT NULL default '0',
  `child_count` int(11) default NULL,
  `add_date` varchar(15) NOT NULL default '',
  `islocked` tinyint(1) default NULL,
  `type` tinyint(3) unsigned default NULL,
  `layer` int(11) NOT NULL default '0',
  `doc_id` int(11) default NULL,
  `template_id` int(11) NOT NULL default '-1',
  `pluginCode` varchar(50) NOT NULL default 'default',
  `price` decimal(19,2) default NULL,
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`,`price`) VALUES ('article','文章系统',0,'','root','root',3,0,'1154857963109',NULL,0,2,0,-1,'default','0.00'),('blog','博客',0,'','root','root',4,2,'1154857963109',NULL,0,2,NULL,-1,'default',NULL),('blog_ad','广告',0,'','blog','root',2,4,'1154857963109',NULL,0,3,NULL,-1,'default','0.00'),('blog_ad1','公告旁的广告',0,'公告旁的广告','blog_ad','root',1,0,'1154857963109',NULL,1,4,1,-1,'default','0.00'),('blog_ad2','首页中部横幅',0,'','blog_ad','root',2,0,'1154857963109',NULL,1,4,2,-1,'default','0.00'),('blog_ad3','首页底部横幅',0,'','blog_ad','root',3,0,'1154857963109',NULL,1,4,3,-1,'default','0.00'),('blog_ad4','首页右下角部',0,'','blog_ad','root',4,0,'1154857963109',NULL,1,4,NULL,-1,'default','0.00'),('blog_notice','博客公告',0,'','blog','root',1,0,'1154857963109',NULL,2,3,NULL,-1,'default',NULL),('bmfu','便民服务',0,'','shop','root',8,0,'1154857963109',NULL,1,4,NULL,-1,'default','0.00');
INSERT INTO `directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`,`price`) VALUES ('email','邮件',0,'','template','root',1,0,'1154857963109',NULL,2,3,0,-1,'default','0.00'),('home','首页',0,'首页','root','root',1,1,'1154857963109',NULL,0,2,NULL,-1,'default',NULL),('photo','社区推荐图片',0,'','shop','root',7,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('recommandAuction1','推荐商品1',0,'','shop','root',3,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('recommandAuction2','推荐商品2',0,'','shop','root',4,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('recommandAuction3','推荐商品3',0,'','shop','root',5,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('recommandShop','推荐商店',0,'','shop','root',1,0,'1154857963109',NULL,1,4,5,-1,'default','0.00'),('root','全部栏目',0,NULL,'-1','root',1,4,'1154857963109',0,0,1,NULL,-1,'default',NULL),('shop','商店',0,'','home','root',1,8,'1154857963109',NULL,0,3,NULL,-1,'default',NULL);
INSERT INTO `directory` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`,`pluginCode`,`price`) VALUES ('star','社区之星',0,'','shop','root',6,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('starShop','明星店铺',0,'','shop','root',2,0,'1154857963109',NULL,1,4,NULL,-1,'default',NULL),('template','模板',0,'','root','root',2,1,'1154857963109',NULL,0,2,0,-1,'default','0.00'),('z','z',0,'z','dd','root',1,0,'1159243676546',NULL,2,5,0,-1,'default','0.00');
CREATE TABLE `doc_content` (
  `doc_id` int(11) NOT NULL default '0',
  `content` longtext NOT NULL,
  `page_num` int(11) NOT NULL default '1',
  UNIQUE KEY `IX_doc_content_1` (`doc_id`,`page_num`),
  KEY `IX_doc_content` (`doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `doc_content` (`doc_id`,`content`,`page_num`) VALUES (1,'<IMG height=150 src=\"upfile/webeditimg/2006/8/2357ddd8a4354a8b82292978ec6821f6.jpg\" width=554>',1),(2,'<IMG height=104 src=\"upfile/webeditimg/2006/8/528e140122ca4930a85d31ca942a0ab3.jpg\" width=879>',1),(3,'<IMG height=104 src=\"upfile/webeditimg/2006/8/96ede6606c104816bc9f7a6722929a9c.jpg\" width=879>',1),(4,' ',1);
CREATE TABLE `document` (
  `id` int(11) NOT NULL default '0',
  `keywords` varchar(50) default NULL,
  `isrelateshow` tinyint(1) default '1',
  `title` varchar(100) NOT NULL default '',
  `class1` varchar(50) NOT NULL default '',
  `author` varchar(100) default NULL,
  `modifiedDate` varchar(15) NOT NULL default '',
  `can_comment` tinyint(1) NOT NULL default '0',
  `summary` text,
  `isHome` tinyint(1) NOT NULL default '0',
  `voteoption` varchar(250) default NULL,
  `voteresult` varchar(50) default NULL,
  `type` tinyint(3) unsigned NOT NULL default '0',
  `examine` tinyint(3) unsigned NOT NULL default '0',
  `nick` varchar(50) default NULL,
  `hit` int(11) NOT NULL default '0',
  `template_id` int(11) NOT NULL default '-1',
  `page_count` int(11) NOT NULL default '1',
  `parent_code` varchar(20) default NULL,
  `isNew` tinyint(1) NOT NULL default '0',
  `flowTypeCode` varchar(20) default NULL,
  PRIMARY KEY  (`id`),
  KEY `IX_document` (`class1`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `document` (`id`,`keywords`,`isrelateshow`,`title`,`class1`,`author`,`modifiedDate`,`can_comment`,`summary`,`isHome`,`voteoption`,`voteresult`,`type`,`examine`,`nick`,`hit`,`template_id`,`page_count`,`parent_code`,`isNew`,`flowTypeCode`) VALUES (1,'ad',1,'公告旁的广告','blog_ad1','admin','1156735806937',1,NULL,0,'','',0,0,'admin',23,-1,1,'blog_ad',0,''),(2,'ad',1,'首页中部横幅','blog_ad2','admin','1156735913968',1,NULL,0,'','',0,0,'admin',0,-1,1,'blog_ad',0,''),(3,'',1,'首页底部横幅','blog_ad3','admin','1156735951062',1,NULL,0,'','',0,0,'admin',0,-1,1,'blog_ad',0,''),(4,'',1,'便民服务','bmfu','admin','1156736629718',1,NULL,0,'','',0,0,'admin',0,-1,1,'shop',0,'');
CREATE TABLE `document_attach` (
  `id` int(11) NOT NULL default '0',
  `doc_id` int(11) NOT NULL default '0',
  `name` varchar(200) NOT NULL default '',
  `fullpath` text NOT NULL,
  `diskname` varchar(100) NOT NULL default '',
  `visualpath` varchar(200) NOT NULL default '',
  `page_num` int(11) NOT NULL default '1',
  `orders` int(11) NOT NULL default '0',
  `downloadCount` int(11) NOT NULL default '0',
  `upload_date` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `doc_id` (`doc_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `guestbook` (
  `id` int(11) NOT NULL auto_increment,
  `shopCode` varchar(50) NOT NULL default '',
  `userName` varchar(50) NOT NULL default '',
  `content` text NOT NULL,
  `ip` varchar(15) NOT NULL default '',
  `lydate` varchar(15) NOT NULL default '',
  `reply` text,
  `redate` varchar(15) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `lastly` (
  `BC` varchar(50) default NULL,
  `OS` varchar(50) default NULL,
  `IP` varchar(50) default NULL,
  `Date` datetime NOT NULL default '0000-00-00 00:00:00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `link` (
  `id` int(11) NOT NULL auto_increment,
  `url` varchar(200) NOT NULL default '',
  `title` varchar(100) default NULL,
  `image` text,
  `userName` varchar(50) default NULL,
  `sort` int(11) NOT NULL default '0',
  `kind` varchar(50) NOT NULL default 'N''default''',
  PRIMARY KEY  (`id`),
  KEY `userName` (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `message` (
  `id` int(11) NOT NULL default '0',
  `title` varchar(255) NOT NULL default '',
  `content` text NOT NULL,
  `sender` varchar(20) NOT NULL default '',
  `receiver` varchar(20) NOT NULL default '',
  `rq` varchar(15) NOT NULL default '',
  `type` tinyint(3) unsigned NOT NULL default '0',
  `ip` varchar(15) NOT NULL default '',
  `isreaded` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `receiver` (`receiver`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `miniplugin_home` (
  `id` int(11) NOT NULL default '0',
  `hot` varchar(100) default NULL,
  `recommandBoard` varchar(255) default NULL,
  `recommandMsg` varchar(200) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `miniplugin_home` (`id`,`hot`,`recommandBoard`,`recommandMsg`) VALUES (0,'','','');
CREATE TABLE `monthcount` (
  `ID` int(11) NOT NULL default '0',
  `1` int(11) default NULL,
  `2` int(11) default NULL,
  `3` int(11) default NULL,
  `4` int(11) default NULL,
  `5` int(11) default NULL,
  `6` int(11) default NULL,
  `7` int(11) default NULL,
  `8` int(11) default NULL,
  `9` int(11) default NULL,
  `10` int(11) default NULL,
  `11` int(11) default NULL,
  `12` int(11) default NULL,
  `13` int(11) default NULL,
  `14` int(11) default NULL,
  `15` int(11) default NULL,
  `16` int(11) default NULL,
  `17` int(11) default NULL,
  `18` int(11) default NULL,
  `19` int(11) default NULL,
  `20` int(11) default NULL,
  `21` int(11) default NULL,
  `22` int(11) default NULL,
  `23` int(11) default NULL,
  `24` int(11) default NULL,
  `25` int(11) default NULL,
  `26` int(11) default NULL,
  `27` int(11) default NULL,
  `28` int(11) default NULL,
  `29` int(11) default NULL,
  `30` int(11) default NULL,
  `31` int(11) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `nav` (
  `name` varchar(50) NOT NULL default '',
  `orders` tinyint(3) unsigned NOT NULL default '0',
  `link` varchar(255) NOT NULL default '',
  `color` varchar(20) default NULL,
  `target` varchar(20) default NULL,
  PRIMARY KEY  (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `nav` (`name`,`orders`,`link`,`color`,`target`) VALUES ('佳人有约',4,'forum/listtopic.jsp?boardcode=qrl','','_self'),('博客',5,'blog/index.jsp','#ff0000',''),('同城交易',2,'forum/listtopic.jsp?boardcode=trade','#ff0005',NULL),('百姓信息',3,'forum/listtopic.jsp?boardcode=info','',NULL),('论坛',1,'forum/index.jsp','',NULL);
CREATE TABLE `os` (
  `ID` int(11) NOT NULL auto_increment,
  `os` varchar(50) default NULL,
  `count` int(11) default NULL,
  `todays` int(11) default NULL,
  KEY `ID` (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `photo` (
  `id` int(11) NOT NULL default '0',
  `title` varchar(100) default NULL,
  `image` varchar(255) default NULL,
  `userName` varchar(50) default NULL,
  `sort` int(11) NOT NULL default '0',
  `kind` varchar(50) NOT NULL default '',
  `addDate` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `IX_photo` (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin2_alipay` (
  `msgRootId` bigint(20) NOT NULL default '0',
  `alipay_seller` varchar(50) NOT NULL default '',
  `alipay_subject` varchar(100) NOT NULL default '',
  `alipay_price` varchar(20) default NULL,
  `alipay_transport` tinyint(3) NOT NULL default '2',
  `alipay_demo` varchar(100) default NULL,
  `alipay_ww` varchar(30) default NULL,
  `alipay_qq` varchar(20) default NULL,
  `alipay_ordinary` varchar(20) default NULL,
  `alipay_express` varchar(20) default NULL,
  PRIMARY KEY  (`msgRootId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction` (
  `msgRootId` bigint(20) NOT NULL default '0',
  `name` text NOT NULL,
  `userType` varchar(50) NOT NULL default 'N''0''',
  `counts` int(11) NOT NULL default '-1',
  `beginDate` varchar(15) NOT NULL default '',
  `endDate` varchar(15) default NULL,
  `state` tinyint(3) unsigned NOT NULL default '0',
  `userName` varchar(50) NOT NULL default '',
  `sellType` varchar(10) default NULL,
  `curBidPrice` decimal(19,4) NOT NULL default '0.0000',
  `orderId` int(11) NOT NULL default '-1',
  `shopDir` varchar(50) NOT NULL default 'N''default''',
  `recommand` tinyint(1) NOT NULL default '0',
  `catalogCode` varchar(50) NOT NULL default '',
  `isShow` tinyint(1) NOT NULL default '0',
  `image` text,
  PRIMARY KEY  (`msgRootId`),
  KEY `endDate` (`endDate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction_bid` (
  `id` int(11) NOT NULL auto_increment,
  `msgRootId` int(11) NOT NULL default '0',
  `name` varchar(50) NOT NULL default '',
  `price` decimal(19,4) NOT NULL default '0.0000',
  `bidDate` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `msgRootId` (`msgRootId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction_board` (
  `boardCode` varchar(20) NOT NULL default '',
  `auctionRule` text NOT NULL,
  PRIMARY KEY  (`boardCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_auction_board` (`boardCode`,`auctionRule`) VALUES ('trade','<P>同城交易，更安全，更快捷，更放心！</P>');
CREATE TABLE `plugin_auction_catalog` (
  `code` varchar(50) NOT NULL default '',
  `name` varchar(50) NOT NULL default '',
  `isHome` tinyint(1) NOT NULL default '0',
  `description` varchar(100) default NULL,
  `parent_code` varchar(20) NOT NULL default '',
  `root_code` varchar(20) NOT NULL default '',
  `orders` int(11) NOT NULL default '1',
  `child_count` int(11) default NULL,
  `add_date` varchar(15) NOT NULL default '',
  `islocked` tinyint(1) default NULL,
  `type` tinyint(3) unsigned default NULL,
  `layer` int(11) NOT NULL default '1',
  `doc_id` int(11) default NULL,
  `template_id` int(11) NOT NULL default '-1',
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('bicycle','自行车',0,'','cheliang','root',4,0,'',NULL,1,3,NULL,-1),('caizhuang','彩妆',0,'','meirong','root',2,0,'',NULL,1,3,NULL,-1),('camera','数码相机',0,'','shuma','root',1,0,'',NULL,1,3,NULL,-1),('chaju','茶具',0,'','rcyp','root',2,0,'',NULL,1,3,NULL,-1),('cheliang','车辆',0,'','root','root',4,5,'',NULL,0,2,NULL,-1),('chongyin','冲印',0,'','shuma','root',5,0,'',NULL,1,3,NULL,-1),('chongzhi','充值卡',0,'','mobile','root',5,0,'',NULL,1,3,NULL,-1),('coffiee','咖啡',0,'','shipinbaojian','root',1,0,'',NULL,1,3,NULL,-1),('computer','计算机',0,'计算机','root','root',1,2,'',NULL,0,2,0,-1),('couple','情侣装',0,'','nuzhuang','root',6,0,'',NULL,1,3,NULL,-1),('cunshan','衬衫',0,'','nuzhuang','root',1,0,'',NULL,1,3,NULL,-1),('diandong','电动车',0,'','cheliang','root',2,0,'',NULL,1,3,NULL,-1),('dianhua','电话机',0,'','mobile','root',2,0,'',NULL,1,3,NULL,-1);
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('dianqi','电器',0,'','root','root',6,2,'',NULL,0,2,NULL,-1),('duanwai','短外套',0,'','nuzhuang','root',12,0,'',NULL,1,3,NULL,-1),('flower','鲜花',0,'','liping','root',2,0,'',NULL,1,3,NULL,-1),('game','游戏',0,'游戏','software','root',1,0,'',NULL,1,4,NULL,-1),('hardware','硬件',0,'硬件','computer','root',1,3,'',NULL,0,3,0,-1),('hufu','护肤',0,'','meirong','root',4,0,'',NULL,1,3,NULL,-1),('jiaju','家具',0,'','rcyp','root',1,0,'',NULL,1,3,NULL,-1),('jianfei','减肥',0,'','shipinbaojian','root',4,0,'',NULL,1,3,NULL,-1),('kz','裤子',0,'','nuzhuang','root',14,0,'',NULL,1,3,NULL,-1),('lei','蕾丝衫/雪纺衫',0,'','nuzhuang','root',5,0,'',NULL,1,3,NULL,-1),('liping','宠物、工艺品',0,'','root','root',10,3,'',NULL,0,2,0,-1),('lipingshiping','礼品饰品',0,'','rcyp','root',4,0,'',NULL,1,3,NULL,-1),('maoyi','毛衣',0,'','nuzhuang','root',2,0,'',NULL,1,3,NULL,-1);
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('marry','婚纱/礼服',0,'','nuzhuang','root',8,0,'',NULL,1,3,NULL,-1),('meirong','美容美体',0,'','root','root',3,4,'',NULL,0,2,NULL,-1),('mianbu','面部保养',0,'','meirong','root',1,0,'',NULL,1,3,NULL,-1),('mobile','手机、通讯设备、卡',0,'','root','root',8,6,'',NULL,0,2,NULL,-1),('moto','摩托车',0,'','cheliang','root',3,0,'',NULL,1,3,NULL,-1),('neiyi','内衣',0,'','nuzhuang','root',10,0,'',NULL,1,3,NULL,-1),('niuzai','牛仔',0,'','nuzhuang','root',3,0,'',NULL,1,3,NULL,-1),('notebook','笔记本',0,'','hardware','root',2,0,'',NULL,1,4,0,-1),('nuzhuang','女装',0,'','root','root',5,17,'',NULL,0,2,NULL,-1),('old','中老年服装',0,'','nuzhuang','root',9,0,'',NULL,1,3,NULL,-1),('pc','台式机',0,'','hardware','root',3,0,'',NULL,1,4,0,-1),('peijian','配件',0,'','mobile','root',4,0,'',NULL,1,3,NULL,-1),('pet','宠物',0,'','liping','root',1,0,'',NULL,1,3,NULL,-1);
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('pinpai','品牌内衣',0,'','nuzhuang','root',11,0,'',NULL,1,3,NULL,-1),('qiche','汽车',0,'','cheliang','root',1,0,'',NULL,1,3,NULL,-1),('qunzi','裙子',0,'','nuzhuang','root',15,0,'',NULL,1,3,NULL,-1),('rcyp','日常用品',0,'','root','root',2,4,'',NULL,0,2,NULL,-1),('riyong','日用',0,'','dianqi','root',1,0,'',NULL,1,3,NULL,-1),('root','全部分类',0,'','-1','root',1,10,'',NULL,0,1,0,-1),('shancun','闪存',0,'','shuma','root',3,0,'',NULL,1,3,NULL,-1),('shexiang','摄像机',0,'','shuma','root',2,0,'',NULL,1,3,NULL,-1),('shipinbaojian','食品、保健品',0,'','root','root',7,4,'',NULL,0,2,NULL,-1),('shiping','手机饰品',0,'','mobile','root',6,0,'',NULL,1,3,NULL,-1),('shoubu','手部保养',0,'','meirong','root',3,0,'',NULL,1,3,NULL,-1),('shougong','手工',0,'','liping','root',3,0,'',NULL,1,3,NULL,-1),('shouji','手机',0,'','mobile','root',1,0,'',NULL,1,3,NULL,-1);
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('shuma','数码',0,'','root','root',9,5,'',NULL,0,2,0,-1),('smpeijian','配件',0,'','shuma','root',4,0,'',NULL,1,3,NULL,-1),('software','软件',0,'','computer','root',2,1,'',NULL,0,3,0,-1),('tang','唐装/中式服装',0,'','nuzhuang','root',7,0,'',NULL,1,3,NULL,-1),('taozhuang','套装',0,'','nuzhuang','root',16,0,'',NULL,1,3,NULL,-1),('tea','茶叶',0,'','shipinbaojian','root',2,0,'',NULL,1,3,NULL,-1),('techan','特产',0,'','shipinbaojian','root',3,0,'',NULL,1,3,NULL,-1),('tongche','童车',0,'','cheliang','root',5,0,'',NULL,1,3,NULL,-1),('wenju','文具',0,'','rcyp','root',3,0,'',NULL,1,3,NULL,-1),('xiaobeixin','小背心/吊带衫',0,'','nuzhuang','root',4,0,'',NULL,1,3,0,-1),('xiaolintong','小灵通',0,'','mobile','root',3,0,'',NULL,1,3,NULL,-1),('yingyin','影音',0,'','dianqi','root',2,0,'',NULL,1,3,NULL,-1),('yunfu','孕妇装',0,'','nuzhuang','root',17,0,'',NULL,1,3,NULL,-1);
INSERT INTO `plugin_auction_catalog` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`doc_id`,`template_id`) VALUES ('zhongchang','中长外套',0,'','nuzhuang','root',13,0,'',NULL,1,3,NULL,-1);
CREATE TABLE `plugin_auction_catalog_priv` (
  `id` int(11) NOT NULL auto_increment,
  `dir_code` varchar(50) NOT NULL default '',
  `see` tinyint(1) NOT NULL default '0',
  `append` tinyint(1) NOT NULL default '0',
  `del` tinyint(1) NOT NULL default '0',
  `modify` tinyint(1) NOT NULL default '0',
  `examine` tinyint(1) NOT NULL default '0',
  `name` varchar(50) NOT NULL default '',
  `type` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `dir_code` (`dir_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_auction_catalog_priv` (`id`,`dir_code`,`see`,`append`,`del`,`modify`,`examine`,`name`,`type`) VALUES (1,'computer',1,0,0,0,0,'Everyone',0),(2,'hardware',1,0,0,0,0,'Everyone',0),(5,'notebook',1,0,0,0,0,'Everyone',0),(6,'pc',1,0,0,0,0,'Everyone',0),(7,'software',1,0,0,0,0,'Everyone',0),(8,'game',1,0,0,0,0,'Everyone',0),(9,'rcyp',1,0,0,0,0,'Everyone',0),(10,'jiaju',1,0,0,0,0,'Everyone',0),(11,'chaju',1,0,0,0,0,'Everyone',0),(12,'wenju',1,0,0,0,0,'Everyone',0),(14,'meirong',1,0,0,0,0,'Everyone',0),(15,'mianbu',1,0,0,0,0,'Everyone',0),(16,'caizhuang',1,0,0,0,0,'Everyone',0),(17,'shoubu',1,0,0,0,0,'Everyone',0),(18,'lipingshiping',1,0,0,0,0,'Everyone',0),(19,'cheliang',1,0,0,0,0,'Everyone',0),(20,'qiche',1,0,0,0,0,'Everyone',0),(21,'diandong',1,0,0,0,0,'Everyone',0),(22,'moto',1,0,0,0,0,'Everyone',0),(23,'bicycle',1,0,0,0,0,'Everyone',0),(24,'tongche',1,0,0,0,0,'Everyone',0),(25,'nuzhuang',1,0,0,0,0,'Everyone',0),(26,'cunshan',1,0,0,0,0,'Everyone',0),(27,'maoyi',1,0,0,0,0,'Everyone',0),(28,'niuzai',1,0,0,0,0,'Everyone',0);
INSERT INTO `plugin_auction_catalog_priv` (`id`,`dir_code`,`see`,`append`,`del`,`modify`,`examine`,`name`,`type`) VALUES (29,'xiaobeixin',1,0,0,0,0,'Everyone',0),(30,'lei',1,0,0,0,0,'Everyone',0),(31,'couple',1,0,0,0,0,'Everyone',0),(32,'tang',1,0,0,0,0,'Everyone',0),(33,'marry',1,0,0,0,0,'Everyone',0),(34,'old',1,0,0,0,0,'Everyone',0),(35,'neiyi',1,0,0,0,0,'Everyone',0),(36,'pinpai',1,0,0,0,0,'Everyone',0),(37,'duanwai',1,0,0,0,0,'Everyone',0),(38,'zhongchang',1,0,0,0,0,'Everyone',0),(39,'kz',1,0,0,0,0,'Everyone',0),(40,'qunzi',1,0,0,0,0,'Everyone',0),(41,'taozhuang',1,0,0,0,0,'Everyone',0),(42,'yunfu',1,0,0,0,0,'Everyone',0),(43,'dianqi',1,0,0,0,0,'Everyone',0),(44,'riyong',1,0,0,0,0,'Everyone',0),(45,'yingyin',1,0,0,0,0,'Everyone',0),(46,'shipinbaojian',1,0,0,0,0,'Everyone',0),(47,'coffiee',1,0,0,0,0,'Everyone',0),(48,'tea',1,0,0,0,0,'Everyone',0),(49,'techan',1,0,0,0,0,'Everyone',0),(50,'jianfei',1,0,0,0,0,'Everyone',0),(51,'mobile',1,0,0,0,0,'Everyone',0),(52,'shouji',1,0,0,0,0,'Everyone',0),(53,'dianhua',1,0,0,0,0,'Everyone',0);
INSERT INTO `plugin_auction_catalog_priv` (`id`,`dir_code`,`see`,`append`,`del`,`modify`,`examine`,`name`,`type`) VALUES (54,'xiaolintong',1,0,0,0,0,'Everyone',0),(55,'peijian',1,0,0,0,0,'Everyone',0),(56,'chongzhi',1,0,0,0,0,'Everyone',0),(57,'shiping',1,0,0,0,0,'Everyone',0),(58,'hufu',1,0,0,0,0,'Everyone',0),(59,'shuma',1,0,0,0,0,'Everyone',0),(60,'camera',1,0,0,0,0,'Everyone',0),(61,'shexiang',1,0,0,0,0,'Everyone',0),(62,'shancun',1,0,0,0,0,'Everyone',0),(63,'smpeijian',1,0,0,0,0,'Everyone',0),(64,'chongyin',1,0,0,0,0,'Everyone',0),(65,'liping',1,0,0,0,0,'Everyone',0),(66,'pet',1,0,0,0,0,'Everyone',0),(67,'flower',1,0,0,0,0,'Everyone',0),(68,'shougong',1,0,0,0,0,'Everyone',0);
CREATE TABLE `plugin_auction_order` (
  `id` int(11) NOT NULL default '0',
  `auctionId` int(11) NOT NULL default '0',
  `auctionSellType` tinyint(3) unsigned NOT NULL default '0',
  `seller` varchar(50) NOT NULL default '',
  `buyer` varchar(50) NOT NULL default '',
  `price` decimal(19,4) NOT NULL default '0.0000',
  `moneyCode` varchar(50) NOT NULL default '',
  `totalPrice` decimal(19,4) NOT NULL default '0.0000',
  `amount` int(11) NOT NULL default '0',
  `state` tinyint(3) unsigned NOT NULL default '0',
  `orderDate` varchar(15) NOT NULL default '',
  `payTime` varchar(15) default NULL,
  `deliverTime` varchar(15) default NULL,
  `commodityName` varchar(50) NOT NULL default '',
  `sellerScore` int(11) NOT NULL default '-100',
  `buyerScore` int(11) NOT NULL default '-100',
  PRIMARY KEY  (`id`),
  KEY `auctionId` (`auctionId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction_shop` (
  `id` int(11) NOT NULL default '0',
  `userName` varchar(50) NOT NULL default '',
  `shopName` varchar(200) NOT NULL default '',
  `address` text NOT NULL,
  `tel` varchar(50) NOT NULL default '',
  `description` text NOT NULL,
  `isValid` tinyint(1) NOT NULL default '1',
  `reason` varchar(10) default NULL,
  `openDate` varchar(15) NOT NULL default '',
  `logo` text,
  `logoWidth` int(11) NOT NULL default '0',
  `skinCode` varchar(50) NOT NULL default 'default',
  `IS_RECOMMANDED` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`userName`),
  KEY `IX_plugin_auction_shop` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction_shop_dir` (
  `code` varchar(50) NOT NULL default '',
  `userName` varchar(50) NOT NULL default '',
  `dirName` varchar(250) NOT NULL default '',
  `catalogCode` varchar(50) NOT NULL default '',
  `sort` int(11) NOT NULL default '0',
  `color` varchar(20) default NULL,
  UNIQUE KEY `IX_plugin_auction_shop_dir` (`userName`,`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_auction_worth` (
  `id` int(11) NOT NULL auto_increment,
  `msgRootId` bigint(20) NOT NULL default '0',
  `moneyCode` varchar(50) NOT NULL default '',
  `price` decimal(19,4) NOT NULL default '0.0000',
  `dlt` decimal(19,4) NOT NULL default '0.0000',
  `referPrice` decimal(19,4) NOT NULL default '0.0000',
  `isValid` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`),
  KEY `msgRootId` (`msgRootId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_entrance_vip_card` (
  `id` varchar(15) NOT NULL default '',
  `userName` varchar(20) default NULL,
  `beginDate` varchar(15) default NULL,
  `endDate` varchar(15) default NULL,
  `fee` int(11) default NULL,
  `kind` varchar(20) NOT NULL default '',
  `fingerPrint` varchar(32) default NULL,
  `pwd` varchar(32) NOT NULL default '',
  `pwdRaw` varchar(32) NOT NULL default '0',
  `isUseFingerPrint` tinyint(1) NOT NULL default '0',
  `isValid` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  UNIQUE KEY `userName_kind` (`userName`,`kind`,`endDate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_entrance_vip_user` (
  `userName` varchar(20) NOT NULL default '',
  `beginDate` varchar(15) default NULL,
  `endDate` varchar(15) default NULL,
  `isValid` tinyint(1) NOT NULL default '0',
  `boards` varchar(255) default NULL,
  PRIMARY KEY  (`userName`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_entrance_vip_user_group` (
  `groupCode` varchar(20) NOT NULL default '',
  `beginDate` varchar(15) default NULL,
  `endDate` varchar(15) default NULL,
  `isValid` tinyint(1) NOT NULL default '0',
  `boards` varchar(255) default NULL,
  PRIMARY KEY  (`groupCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_entrance_vip_user_group` (`groupCode`,`beginDate`,`endDate`,`isValid`,`boards`) VALUES ('ccc','1160150400000','1161964800000',1,'trade,info,alipay,master');
CREATE TABLE `plugin_info` (
  `id` bigint(20) NOT NULL default '0',
  `typeCode` varchar(50) NOT NULL default '',
  `userName` varchar(50) NOT NULL default '',
  `addDate` varchar(15) NOT NULL default '',
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_info_board` (
  `boardCode` varchar(20) NOT NULL default '',
  `boardRule` text NOT NULL,
  PRIMARY KEY  (`boardCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_info_board` (`boardCode`,`boardRule`) VALUES ('info','发布各类信息，用户的信用值越高，信息越可信，但是“镇江人家”并不保证信息的真实性，请各用户在查看信息时判别其真实性。'),('reward','');
CREATE TABLE `plugin_reward` (
  `msg_id` bigint(20) NOT NULL default '0',
  `score` int(11) NOT NULL default '0',
  `is_end` tinyint(1) default '0',
  `money_code` varchar(20) default NULL,
  `score_given` int(11) NOT NULL default '0',
  `best_msg_id` bigint(20) default '0',
  PRIMARY KEY  (`msg_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_reward_board` (
  `boardCode` varchar(20) NOT NULL default '',
  `boardRule` text NOT NULL,
  PRIMARY KEY  (`boardCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_reward_board` (`boardCode`,`boardRule`) VALUES ('reward','asdfasdfasdf');
CREATE TABLE `plugin_sweet` (
  `msgRootId` bigint(20) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `state` tinyint(3) unsigned NOT NULL default '0',
  `spouse` varchar(20) default NULL,
  PRIMARY KEY  (`msgRootId`),
  UNIQUE KEY `IX_plugin_sweet` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_sweet_board` (
  `boardCode` varchar(20) NOT NULL default '',
  `sweetRule` text NOT NULL,
  PRIMARY KEY  (`boardCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `plugin_sweet_board` (`boardCode`,`sweetRule`) VALUES ('qrl','');
CREATE TABLE `plugin_sweet_life` (
  `msgRootId` bigint(20) NOT NULL default '0',
  `marryDate` varchar(15) NOT NULL default '',
  `divorceDate` varchar(15) default NULL,
  `ownerName` varchar(20) NOT NULL default '',
  `spouseName` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`msgRootId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_sweet_sq_message` (
  `msgId` bigint(20) NOT NULL default '0',
  `scretLevel` int(11) NOT NULL default '0',
  `userAction` int(11) NOT NULL default '0',
  PRIMARY KEY  (`msgId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_sweet_user` (
  `msgRootId` bigint(20) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `type` int(11) NOT NULL default '0',
  `state` int(11) NOT NULL default '0',
  UNIQUE KEY `IX_plugin_sweet_user` (`msgRootId`,`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `plugin_sweet_userinfo` (
  `name` varchar(50) NOT NULL default '',
  `gender` varchar(50) NOT NULL default 'N''男''',
  `age` int(11) NOT NULL default '0',
  `birthday` varchar(15) default NULL,
  `marriage` varchar(10) NOT NULL default '0',
  `province` varchar(50) default NULL,
  `workAddress` varchar(200) default NULL,
  `tall` varchar(10) default NULL,
  `xueli` varchar(50) default NULL,
  `job` varchar(50) default NULL,
  `salary` varchar(20) default NULL,
  `address` varchar(50) default NULL,
  `postCode` int(11) default '0',
  `tel` varchar(50) default NULL,
  `email` varchar(50) default NULL,
  `OICQ` int(11) default NULL,
  `ICQ` varchar(50) default NULL,
  `MSN` varchar(50) default NULL,
  `description` text,
  `sport` varchar(50) default NULL,
  `book` varchar(50) default NULL,
  `music` varchar(50) default NULL,
  `celebrity` varchar(50) default NULL,
  `photo` varchar(100) default NULL,
  `hobby` varchar(50) default NULL,
  `frendType` varchar(50) default NULL,
  `frendAge` varchar(20) default NULL,
  `frendTall` varchar(10) default NULL,
  `frendMarriage` varchar(30) default NULL,
  `frendProvince` varchar(50) default NULL,
  `frendXueli` varchar(50) default NULL,
  `frendSalary` varchar(20) default NULL,
  `frendRequire` text,
  `manager` varchar(50) default NULL,
  `isChecked` tinyint(1) NOT NULL default '0',
  `member` tinyint(3) unsigned NOT NULL default '0',
  PRIMARY KEY  (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `privilege` (
  `priv` varchar(20) NOT NULL default '',
  `description` varchar(50) NOT NULL default '',
  `isSystem` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`priv`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `privilege` (`priv`,`description`,`isSystem`) VALUES ('admin','管理员权限',1),('auction','拍卖管理',0),('backup','备份操作',1),('chat','聊天管理',1),('email','Email 群发',1),('forum','论坛总管理',1),('forum.bak','论坛数据备份',1),('forum.boardmanager','分配版主',1),('forum.message','论坛贴子操作',1),('forum.plugin','论坛插件管理',1),('forum.user','论坛用户管理',1),('user','管理用户',1);
CREATE TABLE `sq_board` (
  `code` varchar(50) NOT NULL default '',
  `name` varchar(50) NOT NULL default '',
  `isHome` tinyint(1) NOT NULL default '0',
  `description` varchar(100) default NULL,
  `parent_code` varchar(20) NOT NULL default '',
  `root_code` varchar(20) NOT NULL default '',
  `orders` int(11) NOT NULL default '0',
  `child_count` int(11) default NULL,
  `add_date` varchar(15) NOT NULL default '',
  `islocked` tinyint(1) default NULL,
  `type` tinyint(3) unsigned default NULL,
  `layer` int(11) NOT NULL default '0',
  `add_id` int(11) default NULL,
  `logo` varchar(50) default NULL,
  `today_count` int(11) NOT NULL default '0',
  `today_date` varchar(15) NOT NULL default '',
  `topic_count` int(11) NOT NULL default '0',
  `post_count` int(11) NOT NULL default '0',
  `theme` varchar(20) default 'N''default''',
  `skin` varchar(20) default NULL,
  `boardRule` text,
  `color` varchar(15) default NULL,
  `webeditAllowType` int(11) NOT NULL default '2',
  `plugin2Code` varchar(20) default NULL,
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_board` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`add_id`,`logo`,`today_count`,`today_date`,`topic_count`,`post_count`,`theme`,`skin`,`boardRule`,`color`,`webeditAllowType`,`plugin2Code`) VALUES ('alipay','支付宝交易',1,'支付宝交易','dssh','root',6,0,'1154847835015',0,1,3,0,'11548480623432099878744.gif',0,'1160955855062',0,0,'','','','',2,'alipay'),('blog','博客',0,'','hidden','root',1,0,'0',0,1,3,0,'',0,'1161823780234',0,0,'default','default','','',2,''),('bzjl','版主交流',1,'斑竹聚会，讨论交流。','社区管理','root',2,1,'0',0,1,3,0,'1154826091734217518162.gif',0,'1160955855718',0,0,'default','default','asdfsafd','',2,''),('bzjlsecret','版主议事厅',1,'只有版主才能进入','bzjl','root',1,0,'0',0,1,4,0,'',0,'1154445401359',2,9,'default','default','','',2,NULL),('dssh','都市生活',1,'缤纷都市，多彩生活。','root','root',1,8,'0',0,0,2,0,'',0,'1154445401359',0,0,'default','default','','',2,'alipay'),('hidden','隐藏版块区',0,'','root','root',3,1,'0',0,0,2,0,'',0,'1154445401359',0,0,'default','default',NULL,'',2,NULL);
INSERT INTO `sq_board` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`add_id`,`logo`,`today_count`,`today_date`,`topic_count`,`post_count`,`theme`,`skin`,`boardRule`,`color`,`webeditAllowType`,`plugin2Code`) VALUES ('info','百姓信息',1,'分类信息列表，方便百姓生活','dssh','root',5,0,'0',0,1,3,0,'11548267085931412002470.gif',0,'1160955854953',0,0,'default','default','','',2,''),('master','总版主议事厅',1,'暂时公开，过段时间加密本版','sqzw','root',1,0,'0',0,1,4,0,'',0,'1154445401359',4,9,'default','default','','',2,NULL),('qrl','佳人有约',1,'特色版块，虚拟家园','dssh','root',3,0,'0',0,1,3,0,'11548260147962138883725.gif',0,'1160955854328',0,0,'sweet','sweet','','',2,''),('reward','悬赏解决问题',1,'悬赏解决问题','dssh','root',7,0,'1160798528484',0,1,3,0,'',0,'1161916542593',0,0,'','','','',2,''),('root','全部版块',1,'','-1','root',1,3,'0',0,0,1,0,NULL,0,'1154445401359',0,0,'default','default',NULL,NULL,2,NULL),('sqzw','社区站务',1,'社区站务，欢迎大家来讨论社区建设','社区管理','root',1,1,'0',0,1,3,0,'1154825978859468072104.gif',0,'1161823780312',0,0,'','','<STRONG><FONT color=#e9397f>请大家在此提出对“云网论坛”的意见和建议！本论坛目前尚处于测试期，欢迎大家多多批评和指导！</FONT></STRONG>','',4,'');
INSERT INTO `sq_board` (`code`,`name`,`isHome`,`description`,`parent_code`,`root_code`,`orders`,`child_count`,`add_date`,`islocked`,`type`,`layer`,`add_id`,`logo`,`today_count`,`today_date`,`topic_count`,`post_count`,`theme`,`skin`,`boardRule`,`color`,`webeditAllowType`,`plugin2Code`) VALUES ('test','test',1,'test','dssh','root',8,0,'1160891958500',0,1,3,0,'',0,'1160955855281',0,0,'','','','',2,''),('trade','同城交易',1,'同城交易，安全放心','dssh','root',4,0,'0',0,1,3,0,'1154826755984210275085.gif',0,'1160955854843',0,0,'','','<P><STRONG><FONT style=\"BACKGROUND-COLOR: #ffffff\" color=#875dc4>1、开店方法：点击<U><FONT color=#ff0000>我要开店</FONT></U>，填写简单的信息提交，建好店后，在版块中发贴，就可以发布商品，并且同步在店铺的首页中显示出来。<FONT style=\"BACKGROUND-COLOR: #ff0000\" color=#eeeeee>注意：一个贴子对应一件商品</FONT>。管理店铺的入口，在您的小店的首页面上。<BR>2、如果您的店铺要发布公告，请在百姓信息版块中发贴，发贴以后会自动显示在您的店面上。<BR>3、另外，店铺支持二级域名，您可以在其它地方通过二级域名做友情链接</FONT></STRONG></P>','#ee0005',2,''),('社区管理','社区管理',1,'','root','root',2,2,'0',NULL,0,2,0,NULL,0,'1154445401359',0,0,'default','default',NULL,NULL,2,NULL);
CREATE TABLE `sq_board_entrance` (
  `boardCode` varchar(50) NOT NULL default '',
  `entranceCode` varchar(50) NOT NULL default '',
  UNIQUE KEY `IX_sq_board_entrance` (`boardCode`,`entranceCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_board_score` (
  `boardCode` varchar(50) NOT NULL default '',
  `scoreCode` varchar(50) NOT NULL default '',
  UNIQUE KEY `IX_sq_board_score` (`boardCode`,`scoreCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_boardmanager` (
  `name` varchar(20) NOT NULL default '',
  `boardcode` varchar(20) NOT NULL default '',
  `sort` tinyint(3) unsigned NOT NULL default '1',
  PRIMARY KEY  (`name`,`boardcode`),
  KEY `name` (`name`),
  CONSTRAINT `sq_user_name` FOREIGN KEY (`name`) REFERENCES `sq_user` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_boardrender` (
  `boardCode` varchar(20) NOT NULL default '',
  `renderCode` varchar(20) NOT NULL default '',
  KEY `IX_render` (`boardCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_boardrender` (`boardCode`,`renderCode`) VALUES ('qrl','sweet');
CREATE TABLE `sq_chatroom` (
  `id` int(11) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `description` varchar(255) default NULL,
  `expire` varchar(15) default NULL,
  `sort` int(11) NOT NULL default '0',
  `topic` varchar(250) default NULL,
  `peopleNum` int(11) NOT NULL default '100',
  `playMusic` tinyint(1) NOT NULL default '0',
  `isopen` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`name`),
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_chatroom` (`id`,`name`,`description`,`expire`,`sort`,`topic`,`peopleNum`,`playMusic`,`isopen`) VALUES (25,'一网情深',NULL,NULL,0,'一网情深',100,0,1),(11,'不见不散',NULL,NULL,0,'不见不散',100,0,1),(28,'佳人有约',NULL,NULL,0,'佳人有约',100,1,1),(22,'南国红豆屋',NULL,NULL,0,'南国红豆屋',100,1,1),(21,'天若有情',NULL,NULL,0,'天若有情',100,1,1),(18,'开心小屋',NULL,NULL,0,'开心小屋',100,1,1),(20,'情人酒吧',NULL,NULL,0,'情人酒吧',100,1,1),(19,'生于七十年代',NULL,NULL,0,'生于七十年代',100,1,1),(29,'相思网络中',NULL,NULL,0,'相思网络中',100,1,1),(26,'红粉知己',NULL,NULL,0,'红粉知己',100,1,1),(16,'缘份的天空',NULL,NULL,0,'缘份的天空',100,1,1),(14,'英语聊天室',NULL,NULL,0,'英语聊天室',100,1,1),(17,'菁菁校园',NULL,NULL,0,'菁菁校园',100,1,1),(27,'菩提树下',NULL,NULL,0,'菩提树下',100,1,1);
CREATE TABLE `sq_classmaster` (
  `id` int(11) NOT NULL auto_increment,
  `name` varchar(20) NOT NULL default '',
  `classcode` varchar(20) NOT NULL default '',
  `sort` int(11) NOT NULL default '0',
  PRIMARY KEY  (`name`),
  KEY `id` (`id`),
  CONSTRAINT `sq_classmaster_ibfk_2` FOREIGN KEY (`name`) REFERENCES `sq_user` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_forbid_ip` (
  `ip` varchar(15) NOT NULL default '',
  `user_name` varchar(20) default NULL,
  `add_date` varchar(15) default NULL,
  `reason` varchar(255) default NULL,
  PRIMARY KEY  (`ip`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_forbid_ip_range` (
  `id` int(11) NOT NULL default '0',
  `begin` varchar(15) NOT NULL default '',
  `end` varchar(15) NOT NULL default '',
  `user_name` varchar(20) default NULL,
  `add_date` varchar(15) default NULL,
  `reason` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_forum` (
  `id` int(11) NOT NULL default '1',
  `userCount` int(11) NOT NULL default '0',
  `userNew` varchar(20) default '0',
  `createDate` varchar(15) default NULL,
  `topicCount` int(11) NOT NULL default '0',
  `postCount` int(11) NOT NULL default '0',
  `todayCount` int(11) NOT NULL default '0',
  `todayDate` varchar(15) NOT NULL default '',
  `yestodayCount` int(11) NOT NULL default '0',
  `maxCount` int(11) NOT NULL default '0',
  `maxDate` varchar(15) NOT NULL default '',
  `maxOnlineCount` int(11) NOT NULL default '0',
  `maxOnlineDate` varchar(15) NOT NULL default '',
  `notices` varchar(60) default NULL,
  `filterUserName` text,
  `filterMsg` text,
  `isShowLink` tinyint(1) NOT NULL default '1',
  `status` tinyint(3) NOT NULL default '1',
  `reason` text,
  `GUEST_ACTION` varchar(20) NOT NULL default '11' COMMENT '1->Guest can see topic 2->Guest can download  attachment',
  `ad_topic_bottom` varchar(255) default NULL,
  PRIMARY KEY  (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_forum` (`id`,`userCount`,`userNew`,`createDate`,`topicCount`,`postCount`,`todayCount`,`todayDate`,`yestodayCount`,`maxCount`,`maxDate`,`maxOnlineCount`,`maxOnlineDate`,`notices`,`filterUserName`,`filterMsg`,`isShowLink`,`status`,`reason`,`GUEST_ACTION`,`ad_topic_bottom`) VALUES (1,0,'','1161917132890',0,0,0,'1161871326531',0,0,'0',1,'1161917272734','461,462,403,402,381,391','共产党|他妈的|放屁|狗屎','共*产*党',1,1,'<P><IMG src=\"http://localhost:8080/zjrj/editor/images/emot/face18.gif\">论坛维护中，请稍后访问！</P>','11','462,463,461');
CREATE TABLE `sq_friend` (
  `id` int(11) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `friend` varchar(20) NOT NULL default '',
  `rq` varchar(15) NOT NULL default '',
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_id` (
  `idType` int(11) NOT NULL default '0',
  `id` int(11) NOT NULL default '0',
  PRIMARY KEY  (`idType`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_id` (`idType`,`id`) VALUES (0,1),(1,5),(2,1),(3,1),(4,1),(5,1),(6,1),(7,1),(8,1),(9,1),(10,1),(11,1),(12,1),(13,1),(14,1),(15,1);
CREATE TABLE `sq_images` (
  `id` bigint(11) NOT NULL default '0',
  `path` varchar(200) NOT NULL default '',
  `otherid` bigint(20) NOT NULL default '0',
  `kind` varchar(20) NOT NULL default '',
  PRIMARY KEY  (`id`),
  KEY `IX_images` (`otherid`),
  KEY `IX_images_1` (`kind`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_master` (
  `id` int(11) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `sort` tinyint(3) unsigned NOT NULL default '0',
  `description` varchar(100) default NULL,
  PRIMARY KEY  (`name`),
  KEY `id` (`id`),
  CONSTRAINT `sq_master_ibfk_1` FOREIGN KEY (`name`) REFERENCES `sq_user` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_message` (
  `id` bigint(20) NOT NULL default '0',
  `name` varchar(20) NOT NULL default 'N''无名氏''',
  `expression` tinyint(3) unsigned default '25',
  `boardcode` varchar(20) NOT NULL default 'N''xlmx''',
  `replyid` bigint(20) NOT NULL default '-1',
  `rootid` bigint(20) NOT NULL default '-1',
  `msg_layer` int(11) NOT NULL default '1',
  `length` int(11) NOT NULL default '0',
  `orders` int(11) NOT NULL default '1',
  `title` varchar(200) NOT NULL default '',
  `content` longtext NOT NULL,
  `recount` int(11) NOT NULL default '0',
  `hit` int(11) NOT NULL default '0',
  `lydate` varchar(15) NOT NULL default '',
  `ip` varchar(15) default NULL,
  `msg_level` int(11) NOT NULL default '0',
  `isprivate` tinyint(1) NOT NULL default '1',
  `MSG_TYPE` tinyint(3) unsigned default '0',
  `filename` varchar(250) default NULL,
  `extname` varchar(3) default NULL,
  `voteoption` varchar(255) default NULL,
  `voteresult` varchar(25) default NULL,
  `voteduser` longtext,
  `iselite` tinyint(1) NOT NULL default '0',
  `islocked` tinyint(1) NOT NULL default '0',
  `isguide` tinyint(3) unsigned NOT NULL default '0',
  `show_ubbcode` tinyint(1) NOT NULL default '1',
  `show_smile` tinyint(1) NOT NULL default '1',
  `email_notify` tinyint(1) NOT NULL default '0',
  `replier` varchar(20) default NULL,
  `redate` varchar(15) default NULL,
  `iswebedit` tinyint(3) unsigned NOT NULL default '0',
  `color` varchar(20) default NULL,
  `colorExpire` varchar(15) NOT NULL default '',
  `isBold` tinyint(1) NOT NULL default '0',
  `boldExpire` varchar(15) NOT NULL default '',
  `isBlog` tinyint(1) default '0',
  `blogUserDir` varchar(50) NOT NULL default 'default',
  `replyRootName` varchar(50) default NULL,
  `pluginCode` varchar(20) default NULL,
  `plugin2Code` varchar(20) default NULL,
  `msg_kind` varchar(20) default NULL,
  `isChecked` tinyint(1) NOT NULL default '1',
  PRIMARY KEY  (`id`,`replyid`),
  KEY `rootid` (`rootid`),
  KEY `replyid` (`replyid`),
  KEY `boardcode` (`boardcode`),
  KEY `replyRootName` (`replyRootName`),
  KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_message_attach` (
  `id` bigint(20) NOT NULL default '0',
  `msgId` bigint(20) NOT NULL default '0',
  `name` varchar(200) NOT NULL default '',
  `fullpath` varchar(255) default NULL,
  `diskname` varchar(100) NOT NULL default '',
  `visualpath` varchar(255) NOT NULL default '',
  `orders` int(11) NOT NULL default '0',
  `DOWNLOAD_COUNT` int(11) NOT NULL default '0',
  `UPLOAD_DATE` varchar(15) default NULL,
  `FILE_SIZE` bigint(20) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `msgId` (`msgId`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_online` (
  `name` varchar(26) NOT NULL default '',
  `boardcode` varchar(20) default NULL,
  `ip` varchar(15) NOT NULL default '',
  `doing` varchar(50) default NULL,
  `logtime` varchar(15) NOT NULL default '',
  `staytime` varchar(15) NOT NULL default '',
  `isguest` tinyint(1) NOT NULL default '0',
  `covered` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`name`),
  KEY `IX_sq_online` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_online` (`name`,`boardcode`,`ip`,`doing`,`logtime`,`staytime`,`isguest`,`covered`) VALUES ('11619172726091330867595','reward','127.0.0.1',NULL,'1161917272640','1161917272640',1,0);
CREATE TABLE `sq_roomemcee` (
  `id` int(11) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `room` varchar(20) NOT NULL default '',
  `sort` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `room` (`room`),
  KEY `name` (`name`),
  CONSTRAINT `FK_sq_roomemcee_sq_chatroom` FOREIGN KEY (`room`) REFERENCES `sq_chatroom` (`name`),
  CONSTRAINT `FK_sq_roomemcee_users` FOREIGN KEY (`name`) REFERENCES `sq_user` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_setup_user_level` (
  `levelAmount` int(11) NOT NULL default '0',
  `description` varchar(50) NOT NULL default '',
  PRIMARY KEY  (`levelAmount`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `sq_setup_user_level` (`levelAmount`,`description`) VALUES (0,'初入江湖'),(1000,'小有名气'),(2000,'名动一方'),(3000,'天下闻名'),(4000,'一代宗师'),(5000,'超凡入圣'),(6000,'天外飞仙'),(7000,'无所不能');
CREATE TABLE `sq_thread` (
  `id` bigint(20) NOT NULL default '0' COMMENT 'The id of message''s root id',
  `boardcode` varchar(20) default NULL,
  `msg_level` int(11) NOT NULL default '0',
  `iselite` tinyint(1) NOT NULL default '0',
  `lydate` varchar(15) NOT NULL default '',
  `redate` varchar(15) default NULL COMMENT 'reply date',
  `name` varchar(20) NOT NULL default '',
  `blogUserDir` varchar(50) default NULL,
  `isBlog` tinyint(1) NOT NULL default '0',
  `hit` int(11) NOT NULL default '0',
  PRIMARY KEY  (`id`),
  KEY `boardcode` (`boardcode`),
  KEY `name` (`name`),
  KEY `lydate` (`lydate`),
  KEY `redate` (`redate`),
  KEY `name_blogUserDir` (`name`,`blogUserDir`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_user` (
  `id` int(11) NOT NULL default '0',
  `name` varchar(20) NOT NULL default '',
  `pwd` varchar(32) default NULL,
  `rawPwd` varchar(20) default NULL,
  `RegDate` varchar(15) NOT NULL default '',
  `realname` varchar(20) default NULL,
  `RealPic` varchar(50) default NULL,
  `Question` varchar(50) default NULL,
  `Answer` varchar(50) default NULL,
  `Email` varchar(50) default NULL,
  `Gender` char(1) default NULL,
  `OICQ` varchar(15) default NULL,
  `Birthday` varchar(15) default NULL,
  `IDCard` varchar(50) default NULL,
  `Career` varchar(255) default NULL,
  `Job` varchar(50) default NULL,
  `State` varchar(50) default NULL,
  `City` varchar(50) default NULL,
  `Address` varchar(255) default NULL,
  `PostCode` varchar(20) default NULL,
  `Phone` varchar(50) default NULL,
  `Mobile` varchar(30) default NULL,
  `Hobbies` varchar(50) default NULL,
  `lastTime` varchar(15) NOT NULL default '',
  `curTime` varchar(15) NOT NULL default '',
  `sign` varchar(255) default NULL,
  `myface` varchar(50) default NULL,
  `myfacewidth` int(11) default '120',
  `myfaceheight` int(11) default '150',
  `favoriate` varchar(250) default NULL,
  `ispolice` tinyint(1) NOT NULL default '0',
  `arrestday` int(11) NOT NULL default '0',
  `releasetime` varchar(15) NOT NULL default '0',
  `arrestreason` varchar(255) default NULL,
  `arresttime` varchar(15) NOT NULL default '0',
  `arrestpolice` varchar(20) default NULL,
  `experience` int(11) NOT NULL default '0',
  `credit` int(11) NOT NULL default '500',
  `addcount` int(11) NOT NULL default '0',
  `delcount` int(11) NOT NULL default '0',
  `eliteCount` int(11) NOT NULL default '0',
  `Marriage` tinyint(3) unsigned NOT NULL default '0',
  `gold` int(11) NOT NULL default '0',
  `isValid` tinyint(1) NOT NULL default '1',
  `diskSpaceAllowed` int(11) NOT NULL default '10240000',
  `diskSpaceUsed` int(11) NOT NULL default '0',
  `isSecret` tinyint(1) NOT NULL default '1',
  `IP` varchar(15) default NULL,
  `timeZone` varchar(9) NOT NULL default '',
  `home` varchar(255) default NULL,
  `msn` varchar(200) default NULL,
  `group_code` varchar(20) default NULL,
  `icq` varchar(50) default NULL,
  `uc` varchar(50) default NULL,
  `yahoo` varchar(50) default NULL,
  `isChecked` tinyint(1) NOT NULL default '1',
  `locale` varchar(20) default NULL,
  PRIMARY KEY  (`name`),
  KEY `id` (`id`),
  KEY `RegDate` (`RegDate`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_user_group` (
  `code` varchar(50) NOT NULL default '',
  `description` varchar(50) NOT NULL default '',
  `isSystem` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `sq_user_treasure` (
  `userName` varchar(50) NOT NULL default '',
  `treasureCode` varchar(50) NOT NULL default '',
  `buyDate` varchar(15) NOT NULL default '',
  `amount` int(11) NOT NULL default '0',
  UNIQUE KEY `IX_sq_user_treasure` (`userName`,`treasureCode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `user_group` (
  `code` varchar(50) NOT NULL default '',
  `description` varchar(50) NOT NULL default '',
  `isSystem` tinyint(1) NOT NULL default '0',
  PRIMARY KEY  (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `user_group` (`code`,`description`,`isSystem`) VALUES ('Administrators','管理员组',1),('Everyone','每个人',1);
CREATE TABLE `user_group_priv` (
  `group_code` varchar(20) NOT NULL default '',
  `priv` varchar(20) NOT NULL default '',
  KEY `IX_group_priv` (`group_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `user_of_group` (
  `user_name` varchar(50) NOT NULL default '',
  `group_code` varchar(50) NOT NULL default '',
  KEY `IX_user_of_group` (`user_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `user_priv` (
  `username` varchar(20) NOT NULL default '',
  `priv` varchar(50) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `users` (
  `name` varchar(20) NOT NULL default '',
  `pwd` varchar(32) NOT NULL default '',
  `realname` varchar(20) NOT NULL default '',
  `description` varchar(200) default NULL,
  `enter_count` int(11) NOT NULL default '0',
  `enter_last` varchar(15) NOT NULL default '0',
  PRIMARY KEY  (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `users` (`name`,`pwd`,`realname`,`description`,`enter_count`,`enter_last`) VALUES ('admin','96e79218965eb72c92a549dd5a330112','admin',NULL,0,'0');
CREATE TABLE `yearcount` (
  `ID` int(11) NOT NULL default '0',
  `1` int(11) default NULL,
  `2` int(11) default NULL,
  `3` int(11) default NULL,
  `4` int(11) default NULL,
  `5` int(11) default NULL,
  `6` int(11) default NULL,
  `7` int(11) default NULL,
  `8` int(11) default NULL,
  `9` int(11) default NULL,
  `10` int(11) default NULL,
  `11` int(11) default NULL,
  `12` int(11) default NULL,
  PRIMARY KEY  (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT;
SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS;
SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
