/*
	VeryIDE
	Version: 3.0
	Database: module
	Date: 16:40 2010/4/12
*/

-- ----------------------------
-- 嫘豢弇
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}adsarea`;
CREATE TABLE `{TablePre}adsarea` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(11) NOT NULL,
  `account` varchar(30) NOT NULL,
  `parent` int(11) NOT NULL,
  `name` varchar(20) NOT NULL,
  `key` varchar(20) default NULL,
  `quote` varchar(100) default NULL,
  `number` tinyint(4) NOT NULL,
  `preview` varchar(100) default NULL,
  `variable` varchar(250) default NULL,
  `show` tinyint(4) NOT NULL,
  `templet` text NOT NULL,
  `modify` datetime default NULL,
  `price` mediumint(11) NOT NULL,
  `width` int(11) NOT NULL,
  `height` int(11) NOT NULL,
  `unit` varchar(10) default NULL,
  `tag` varchar(10) default NULL,
  `description` varchar(300) default NULL,
  `config` text NOT NULL,
  `dateline` int(11) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `parent` (`parent`),
  KEY `show` (`show`),
  KEY `name` (`name`),
  UNIQUE KEY `key` (`key`)
) ENGINE=MyISAM;

-- ----------------------------
-- 嫘豢桶
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}adsview`;
CREATE TABLE `{TablePre}adsview` (
  `id` int(11) NOT NULL auto_increment,
  `type` int(11) NOT NULL,
  `parent` int(11) NOT NULL,
  `aid` int(11) NOT NULL,
  `account` varchar(30) NOT NULL,
  `category` varchar(30) default NULL,
  `name` varchar(20) NOT NULL,
  `owner` int(11) NOT NULL,
  `contract` varchar(20) default NULL,
  `custom` varchar(30) default NULL,
  `contact` varchar(30) default NULL,
  `file` varchar(100) default NULL,
  `script` text,
  `link` varchar(255) default NULL,
  `width` smallint(11) NOT NULL,
  `height` smallint(11) NOT NULL,
  `form` tinyint(4) NOT NULL default '0',
  `sort` int(11) NOT NULL default '1',
  `spare` tinyint(4) NOT NULL default '0',
  `dateline` int(11) NOT NULL,
  `modify` int(11) default NULL,
  `mender` varchar(30) default NULL,
  `end` int(11) default NULL,
  `start` int(11) NOT NULL,
  `expire` int(11) NOT NULL,
  `engage` tinyint(4) NOT NULL default '0',
  `config` text NOT NULL,
  `description` text,
  `tags` varchar(50) default NULL,
  `share` varchar(100) NOT NULL,
  `zone` varchar(100) NOT NULL,
  `status` tinyint(4) NOT NULL default '0',
  `ar` int(11) NOT NULL COMMENT 'accounts receivable',
  `pr` int(11) NOT NULL COMMENT 'paid receivable',
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `type` (`type`),
  KEY `parent` (`parent`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `category` (`category`),
  KEY `name` (`name`),
  KEY `owner` (`owner`),
  KEY `form` (`form`),
  KEY `start` (`start`),
  KEY `expire` (`expire`),
  KEY `tags` (`tags`),
  KEY `share` (`share`),
  KEY `zone` (`zone`),
  KEY `status` (`status`),
  KEY `spare` (`spare`)
) ENGINE=MyISAM;

-- ----------------------------
-- 苀數煦昴
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}analytic`;
CREATE TABLE `{TablePre}analytic` (
  `id` int(11) NOT NULL auto_increment,
  `appkey` varchar(30) NOT NULL,
  `category` varchar(10) default NULL,
  `date` varchar(10) default NULL,
  `views` int(11) NOT NULL,
  `clicks` int(11) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `appkey` (`appkey`),
  KEY `category` (`category`),
  KEY `date` (`date`)
) ENGINE=MyISAM;

-- ----------------------------
-- 桶等
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}forms`;
CREATE TABLE `{TablePre}forms` (
  `id` int(11) NOT NULL auto_increment,
  `appid` varchar(15) NOT NULL,
  `aid` int(11) NOT NULL,
  `account` varchar(30) NOT NULL,
  `category` varchar(30) default NULL,
  `thumb` varchar(100) default NULL,
  `name` varchar(100) NOT NULL,
  `config` text,
  `description` varchar(1000) default NULL,
  `color` varchar(10) default NULL,
  `tags` varchar(100) default NULL,
  `status` tinyint(4) NOT NULL,
  `skin` varchar(20) default NULL,
  `stat` mediumint(9) NOT NULL default '0',
  `quote` varchar(100) default NULL,
  `start` int(11) NOT NULL,
  `expire` int(11) NOT NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) default NULL,
  `mender` varchar(30) default NULL,
  `ip` varchar(255) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `appid` (`appid`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `category` (`category`),
  KEY `name` (`name`),
  KEY `tags` (`tags`)
) ENGINE=MyISAM;

-- ----------------------------
-- 桶等〞〞恁砐郪
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}groups`;
CREATE TABLE `{TablePre}groups` (
  `id` int(11) NOT NULL auto_increment,
  `fid` int(11) NOT NULL,
  `aid` int(11) NOT NULL,
  `account` varchar(30) NOT NULL,
  `name` varchar(100) default NULL,
  `type` varchar(20) default NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) NOT NULL,
  `status` tinyint(4) NOT NULL,
  `sort` mediumint(9) NOT NULL,
  `config` varchar(255) default NULL,
  `selected` varchar(255) default NULL,
  `description` text,
  `stat` mediumint(9) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `fid` (`fid`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `name` (`name`),
  KEY `sort` (`sort`)
) ENGINE=MyISAM;

-- ----------------------------
-- 桶等〞〞赽恁砐
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}options`;
CREATE TABLE `{TablePre}options` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(11) NOT NULL,
  `account` varchar(30) NOT NULL,
  `fid` int(11) NOT NULL,
  `gid` int(11) default NULL,
  `name` varchar(200) NOT NULL,
  `dateline` int(11) default NULL,
  `sort` mediumint(9) default NULL,
  `config` varchar(255) default NULL,
  `description` varchar(1000) default NULL,
  `quote` varchar(100) default NULL,
  `image` varchar(100) default NULL,
  `status` tinyint(4) default '1',
  `stat` mediumint(9) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `fid` (`fid`),
  KEY `gid` (`gid`),
  KEY `sort` (`sort`),
  KEY `name` (`name`)
) ENGINE=MyISAM;

-- ----------------------------
-- 桶等〞〞蚚誧杅擂
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}values`;
CREATE TABLE `{TablePre}values` (
  `id` int(11) NOT NULL auto_increment,
  `fid` int(11) NOT NULL,
  `appid` varchar(15) NOT NULL,
  `uid` int(11) NOT NULL,
  `account` varchar(30) default NULL,
  `config` text,
  `status` tinyint(4) NOT NULL,
  `dateline` int(11) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `account` (`account`),
  KEY `fid` (`fid`),
  KEY `appid` (`appid`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM;

-- ----------------------------
-- 蚳枙
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}special`;
CREATE TABLE `{TablePre}special` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(11) default NULL,
  `account` varchar(30) NOT NULL,
  `category` varchar(30) default NULL,
  `thumb` varchar(100) default NULL,
  `name` varchar(100) NOT NULL,
  `form` tinyint(4) NOT NULL,
  `content` mediumtext,
  `tags` varchar(100) default NULL,
  `color` varchar(10) default NULL,
  `quote` varchar(255) default NULL,
  `source` varchar(100) default NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) NOT NULL,
  `mender` varchar(30) default NULL,
  `status` tinyint(4) NOT NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `category` (`category`),
  KEY `name` (`name`),
  KEY `form` (`form`),
  KEY `tags` (`tags`)
) ENGINE=MyISAM;

-- ----------------------------
-- 苀數桶
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}go`;
CREATE TABLE `{TablePre}go` (
  `id` int(11) NOT NULL auto_increment,
  `aid` int(11) default NULL,
  `account` varchar(30) NOT NULL,
  `category` varchar(30) default NULL,
  `name` varchar(100) NOT NULL,
  `method` varchar(10) NOT NULL,
  `link` varchar(255) default NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) NOT NULL,
  `mender` varchar(30) default NULL,
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `aid` (`aid`),
  KEY `account` (`account`),
  KEY `category` (`category`),
  KEY `name` (`name`),
  KEY `method` (`method`),
  KEY `link` (`link`)
) ENGINE=MyISAM;

-- ----------------------------
-- 頗埜桶
-- ----------------------------
DROP TABLE IF EXISTS `{TablePre}members`;
CREATE TABLE `{TablePre}members` (
  `id` int(11) NOT NULL,
  `account` varchar(40) NOT NULL,
  `name` varchar(40) default '',
  `sex` tinyint(4) default NULL,
  `blood` varchar(5) default NULL,
  `birthday` varchar(10) default NULL,
  `email` varchar(30) default NULL,
  `phone` varchar(15) default NULL,
  `qq` varchar(30) default NULL,
  `msn` varchar(30) default NULL,
  `idcard` varchar(20) default NULL,
  `address` varchar(50) default NULL,
  `marriage` tinyint(4) default NULL,
  `blog` varchar(100) default NULL,
  `career` varchar(100) default NULL,
  `company` varchar(100) default NULL,
  `tag_book` varchar(255) default NULL,
  `tag_music` varchar(255) default NULL,
  `tag_movie` varchar(255) default NULL,
  `tag_sport` varchar(255) default NULL,
  `tag_person` varchar(255) default NULL,
  `tag_other` varchar(255) default NULL,
  `tag_brand` varchar(255) default NULL,
  `tag_color` varchar(255) default NULL,
  `tag_yearn` varchar(255) default NULL,
  `stat_login` mediumint(9) default '0',
  `stat_level` mediumint(9) default '0',
  `stat_credit` mediumint(9) default '0',
  `config` varchar(255) default NULL,
  `auth` tinyint(4) NOT NULL default '0',
  `photo` varchar(100) default NULL,
  `identity` varchar(100) default NULL,
  `dateline` int(11) NOT NULL,
  `modify` int(11) NOT NULL default '0',
  `status` tinyint(4) default '1',
  `ip` varchar(15) NOT NULL,
  PRIMARY KEY  (`id`),
  KEY `account` (`account`),
  KEY `name` (`name`),
  KEY `sex` (`sex`),
  KEY `qq` (`qq`),
  KEY `email` (`email`),
  KEY `phone` (`phone`),
  KEY `idcard` (`idcard`),
  KEY `status` (`status`),
  KEY `stat_credit` (`stat_credit`),
  KEY `marriage` (`marriage`)
) ENGINE=MyISAM;