-- phpMyAdmin SQL Dump
-- version 3.4.8
-- http://www.phpmyadmin.net
--
-- 主机: localhost
-- 生成日期: 2018 年 11 月 10 日 17:52
-- 服务器版本: 5.5.54
-- PHP 版本: 5.4.45

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

--
-- 数据库: `temmoku`
--

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_home_menu`
--

DROP TABLE IF EXISTS `temmoku_home_menu`;
CREATE TABLE IF NOT EXISTS `temmoku_home_menu` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `sup` mediumint(9) DEFAULT '0' COMMENT '上一级',
  `name` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  `color` varchar(255) NOT NULL DEFAULT '',
  `target` tinyint(3) NOT NULL DEFAULT '0',
  `state` tinyint(3) DEFAULT '0',
  `reorder` int(11) DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='导航菜单' AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- 表的结构 `temmoku_integral_log`
--

DROP TABLE IF EXISTS `temmoku_integral_log`;
CREATE TABLE IF NOT EXISTS `temmoku_integral_log` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(9) DEFAULT '0' COMMENT '用户uid',
  `integral` int(11) DEFAULT '0' COMMENT '积分',
  `content` tinytext COMMENT '内容',
  `posttime` int(11) DEFAULT NULL COMMENT '时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='积分日志' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_modular`
--

DROP TABLE IF EXISTS `temmoku_modular`;
CREATE TABLE IF NOT EXISTS `temmoku_modular` (
  `id` smallint(6) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT '' COMMENT '模块名称',
  `dir` varchar(255) DEFAULT '' COMMENT '模块目录名称',
  `table` varchar(255) DEFAULT '' COMMENT '模块字段前戳',
  `user_show` tinyint(3) DEFAULT '1',
  `admin_show` tinyint(3) DEFAULT '0',
  `state` tinyint(3) DEFAULT '1' COMMENT '模块状态 1为开启 0 为关闭',
  `setting` text COMMENT '相关配置',
  `domain` varchar(255) DEFAULT '' COMMENT '访问网址',
  `initial_name` varchar(255) DEFAULT '' COMMENT '初始模块名称，不可以随意更改',
  `version` varchar(255) DEFAULT '' COMMENT '版本号,不可随意更改',
  `update` int(11) DEFAULT NULL COMMENT '更新时间',
  `icon` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='模块' AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- 表的结构 `temmoku_plugin`
--

DROP TABLE IF EXISTS `temmoku_plugin`;
CREATE TABLE IF NOT EXISTS `temmoku_plugin` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `dir` varchar(255) DEFAULT '' COMMENT '文件夹名称，应该保存在app/plugin/下',
  `table` varchar(255) DEFAULT '' COMMENT '表名，不含前戳',
  `state` tinyint(1) DEFAULT '0' COMMENT '插件状态 1为开启 0为关闭',
  `setting` text,
  `user_show` tinyint(1) DEFAULT '0' COMMENT '是否允许前台显示 1为显示，0为不',
  `admin_show` tinyint(3) DEFAULT '0',
  `is_copy` tinyint(3) DEFAULT '0' COMMENT '是否允许复制 0为可以，1不可以',
  `is_del` tinyint(3) DEFAULT '0' COMMENT '是否允许删除，0为可以，1为不可以',
  `initial_name` varchar(255) DEFAULT '' COMMENT '初始插件名称，不可随意更改',
  `version` varchar(255) DEFAULT '' COMMENT '版本号，不可更改',
  `update` int(11) DEFAULT NULL,
  `icon` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='插件' AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- 表的结构 `temmoku_setting`
--

DROP TABLE IF EXISTS `temmoku_setting`;
CREATE TABLE IF NOT EXISTS `temmoku_setting` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `s_key` varchar(255) NOT NULL DEFAULT '',
  `s_name` text,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='核心设置' AUTO_INCREMENT=43 ;

--
-- 转存表中的数据 `temmoku_setting`
--

INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(1, 'webstate', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(3, 'ssl', '0');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(4, 'weburl', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(5, 'cookie_domain', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(6, 'webname', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(7, 'web_seo_webname', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(8, 'web_seo_keywords', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(9, 'web_seo_description', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(10, 'miibeian_num', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(11, 'upfiles_types', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(12, 'select_template', 'default');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(13, 'iswrite_Template', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(14, 'md5', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(15, 'html', '.html');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(16, 'is_log', '0');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(17, 'gd', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(18, 'gd_time', '0');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(19, 'gd_copy', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(20, 'gd_thumb', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(21, 'gd_thumb_width', '100');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(22, 'gd_thumb_height', '90');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(23, 'gd_water', '2');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(24, 'gd_water_text', '11');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(25, 'gd_water_text_size', '20');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(26, 'gd_water_text_color', '072942');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(27, 'gd_water_text_font', 'msyh.ttf');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(28, 'gd_water_img', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(29, 'gd_water_alpha', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(30, 'gd_water_min_width', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(31, 'gd_water_min_height', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(32, 'gd_water_position', '5');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(33, 'articletimedir', 'Y/m/d/');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(34, 'articledirclass', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(35, 'function_m', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(36, 'upfiles_catalog', 'attachment');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(37, 'images_get_down', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(38, 'content_del_link', '1');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(39, 'content_link_white_list', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(40, 'admin_login_yz', '0');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(41, 'admin_login_ip', '');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(42, 'admin_login_is_yzm', '0');
INSERT INTO `temmoku_setting` (`id`, `s_key`, `s_name`) VALUES(43, 'cookie_is_en', '1');

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_station_message`
--

DROP TABLE IF EXISTS `temmoku_station_message`;
CREATE TABLE IF NOT EXISTS `temmoku_station_message` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '收信人',
  `from_uid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '发信人',
  `from_username` varchar(255) NOT NULL DEFAULT '' COMMENT '发信人名称',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '标题',
  `content` text,
  `is_read` tinyint(3) NOT NULL DEFAULT '0' COMMENT '是否为已读 1 为已读，0为 未读',
  `posttime` int(10) DEFAULT NULL COMMENT '发送时间',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`),
  KEY `fromuid` (`from_uid`,`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='站内信息' AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- 表的结构 `temmoku_user`
--

DROP TABLE IF EXISTS `temmoku_user`;
CREATE TABLE IF NOT EXISTS `temmoku_user` (
  `uid` mediumint(9) NOT NULL AUTO_INCREMENT COMMENT '自动生成的id',
  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名',
  `password` varchar(32) NOT NULL DEFAULT '' COMMENT '用户密码MD5加密',
  `groupid` smallint(5) NOT NULL DEFAULT '0' COMMENT '群组级别',
  `rand` varchar(4) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '' COMMENT '用户email',
  `email_rz_state` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT 'email认证状态',
  `state` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态',
  `mobile` varchar(255) NOT NULL DEFAULT '' COMMENT '电话号码',
  `mobile_rz_state` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT '手机号码认证状态',
  `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '缩略头像',
  `integral` int(10) NOT NULL DEFAULT '0' COMMENT '积分',
  `regtime` int(10) DEFAULT NULL COMMENT '注册时间',
  `lasttime` varchar(255) NOT NULL DEFAULT '' COMMENT '最后登陆时间',
  `lastip` varchar(255) NOT NULL DEFAULT '' COMMENT '最后登陆IP',
  `regip` varchar(255) NOT NULL DEFAULT '' COMMENT '注册IP',
  `qq` varchar(11) NOT NULL DEFAULT '' COMMENT 'QQ号码',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '联系地址',
  `sex` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别',
  `real_name` varchar(255) NOT NULL DEFAULT '' COMMENT '真实名字',
  `id_number` varchar(18) NOT NULL DEFAULT '' COMMENT '身份证号码',
  `id_type`	tinyint(1) NOT NULL DEFAULT '0' COMMENT '身份认证类型',
  `id_rz_state` TINYINT( 1 ) NOT NULL DEFAULT '0' COMMENT '身份认证状态',
  `message_num` int(11) NOT NULL DEFAULT '0' COMMENT '短信息数量',
  `qq_openid` varchar(255) NOT NULL DEFAULT '',
  `is_login` tinyint(3) NOT NULL DEFAULT '1',
  `not_login_star_time` int(10) DEFAULT 0,
  `not_login_end_time` int(10) DEFAULT 0,
  `wechat_openid` varchar(255) NOT NULL DEFAULT '0',
  `wechat_is_attention` tinyint(3) NOT NULL DEFAULT '0',
  PRIMARY KEY (`uid`),
  KEY `username` (`username`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='用户信息' AUTO_INCREMENT=1 ;


-- --------------------------------------------------------

--
-- 表的结构 `temmoku_user_group`
--

DROP TABLE IF EXISTS `temmoku_user_group`;
CREATE TABLE IF NOT EXISTS `temmoku_user_group` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `if_login_admin` tinyint(1) NOT NULL DEFAULT '0',
  `if_login_user` tinyint(4) NOT NULL DEFAULT '1',
  `setting` text,
  KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='权限群组' AUTO_INCREMENT=4 ;

--
-- 转存表中的数据 `temmoku_user_group`
--

INSERT INTO `temmoku_user_group` (`id`, `name`, `type`, `if_login_admin`, `if_login_user`, `setting`) VALUES(2, '普通会员', 1, 0, 1, 'a:1:{s:12:"upfiles_type";s:30:".rar .gif .png .zip .jpeg .jpg";}');
INSERT INTO `temmoku_user_group` (`id`, `name`, `type`, `if_login_admin`, `if_login_user`, `setting`) VALUES(3, '超级管理', 0, 1, 1, 'a:2:{s:5:"power";a:5:{s:5:"index";a:6:{i:0;s:5:"index";i:1;s:3:"map";i:2;s:5:"login";i:3;s:3:"out";i:4;s:7:"modular";i:5;s:6:"plugin";}s:7:"setting";a:4:{i:0;s:3:"set";i:1;s:7:"article";i:2;s:4:"smtp";i:3;s:3:"yzm";}s:5:"group";a:2:{i:0;s:3:"add";i:1;s:4:"edit";}s:4:"user";a:4:{i:0;s:3:"add";i:1;s:4:"edit";i:2;s:2:"yz";i:3;s:3:"del";}s:2:"ad";a:3:{i:0;s:3:"add";i:1;s:4:"edit";i:2;s:3:"del";}}s:12:"upfiles_type";s:30:".rar .gif .png .zip .jpeg .jpg";}');
INSERT INTO `temmoku_user_group` (`id`, `name`, `type`, `if_login_admin`, `if_login_user`, `setting`) VALUES(1, '游客', 1, 0, 1, 'a:1:{s:12:"upfiles_type";s:0:"";}');

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_yzm`
--

DROP TABLE IF EXISTS `temmoku_yzm`;
CREATE TABLE IF NOT EXISTS `temmoku_yzm` (
  `user_uid` double  DEFAULT NULL,
  `value` varchar(255) NOT NULL DEFAULT '',
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `posttime` int(10) DEFAULT NULL,
  KEY `user_uid` (`user_uid`,`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='验证码';


--
-- 表的结构 `temmoku_article`
--

DROP TABLE IF EXISTS `temmoku_article`;
CREATE TABLE IF NOT EXISTS `temmoku_article` (
  `aid` mediumint(9) NOT NULL AUTO_INCREMENT COMMENT '自动生成的ID',
  `cid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '栏目的cid',
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目名称',
  `mid` mediumint(9) DEFAULT '0' COMMENT '模型mid',
  `uid` mediumint(7) NOT NULL DEFAULT '0' COMMENT '发布人的UID',
  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '发布人',
  `title` varchar(255) NOT NULL DEFAULT '' COMMENT '文章标题',
  `seotitle` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo标题',
  `color` varchar(255) NOT NULL DEFAULT '' COMMENT '标题颜色',
  `bold` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否加粗，1为是 ，0为否',
  `keyword` varchar(255) NOT NULL DEFAULT '' COMMENT '文章关键词',
  `description` text COMMENT '文章简要',
  `author` varchar(255) NOT NULL DEFAULT '' COMMENT '作者',
  `source` varchar(255) NOT NULL DEFAULT '' COMMENT '来源',
  `source_url` varchar(255) NOT NULL DEFAULT '' COMMENT '来源网址',
  `thumb` varchar(255) NOT NULL DEFAULT '' COMMENT '缩略图地址',
  `is_pic` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否有缩略图1为是 ，默认0不是',
  `posttime` int(10) DEFAULT NULL COMMENT '发布时间',
  `clicks` int(10) NOT NULL DEFAULT '0' COMMENT '查看次数',
  `state` tinyint(3) NOT NULL DEFAULT '0' COMMENT '审核状态 1为审 2为未',
  `state_time` int(10) DEFAULT NULL COMMENT '审核时间',
  `is_recommend` tinyint(3) NOT NULL DEFAULT '0' COMMENT '推荐状态 1为推，2为未',
  `reorder` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  `comment_num` mediumint(7) NOT NULL DEFAULT '0' COMMENT '评论数量',
  `password` varchar(32) NOT NULL DEFAULT '' COMMENT '是否是加密文章',
  `sell_jifen` mediumint(9) NOT NULL DEFAULT '0' COMMENT '如果不为false 则为出售文章',
  `is_comment` tinyint(3) NOT NULL DEFAULT '0' COMMENT '是否允许评论 0为可以 1为不可以',
  PRIMARY KEY (`aid`),
  UNIQUE KEY `id` (`aid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_buyarticle`
--

DROP TABLE IF EXISTS `temmoku_buyarticle`;
CREATE TABLE IF NOT EXISTS `temmoku_buyarticle` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `aid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '文章的aid',
  `uid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '用户的uid',
  `username` varchar(255) NOT NULL DEFAULT '' COMMENT '用户名称',
  `integral` int(11) NOT NULL DEFAULT '0' COMMENT '所付积分',
  `posttime` int(11) DEFAULT NULL COMMENT '付费时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='文章购买' AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_category`
--

DROP TABLE IF EXISTS `temmoku_category`;
CREATE TABLE IF NOT EXISTS `temmoku_category` (
  `cid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `upcid` int(11) NOT NULL DEFAULT '0',
  `level` int(11) NOT NULL DEFAULT '0' COMMENT '从上到下的级别',
  `type` tinyint(1) NOT NULL DEFAULT '0',
  `cmid` int(11) NOT NULL DEFAULT '0',
  `reorder` int(11) NOT NULL DEFAULT '0' COMMENT '排序专用',
  `dir_name` varchar(255) NOT NULL DEFAULT '',
  `seo_name` varchar(255) NOT NULL DEFAULT '',
  `seo_keywords` varchar(255) NOT NULL DEFAULT '',
  `seo_description` varchar(255) NOT NULL DEFAULT '',
  `content` text COMMENT '单页内容',
  `setting` text,
  PRIMARY KEY (`cid`),
  KEY `fid` (`cid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_comment`
--

DROP TABLE IF EXISTS `temmoku_comment`;
CREATE TABLE IF NOT EXISTS `temmoku_comment` (
  `id` mediumint(7) NOT NULL AUTO_INCREMENT,
  `aid` mediumint(7) NOT NULL DEFAULT '0',
  `uid` mediumint(7) NOT NULL DEFAULT '0',
  `state` tinyint(1) NOT NULL DEFAULT '0',
  `username` varchar(255) NOT NULL DEFAULT '游客',
  `content` text,
  `posttime` int(10) DEFAULT NULL,
  `reply_id` mediumint(7) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `aid` (`aid`),
  KEY `reply_id` (`reply_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_content`
--

DROP TABLE IF EXISTS `temmoku_content`;
CREATE TABLE IF NOT EXISTS `temmoku_content` (
  `nid` mediumint(7) NOT NULL AUTO_INCREMENT,
  `aid` mediumint(7) NOT NULL DEFAULT '0',
  `content` mediumtext,
  PRIMARY KEY (`nid`),
  UNIQUE KEY `nid` (`nid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------



--
-- 表的结构 `temmoku_special_article`
--

DROP TABLE IF EXISTS `temmoku_special_article`;
CREATE TABLE IF NOT EXISTS `temmoku_special_article` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT COMMENT '自动生成的ID',
  `lid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '专题的listid',
  `aid` mediumint(9) NOT NULL DEFAULT '0',
  `uid` mediumint(9) NOT NULL DEFAULT '0',
  `username` varchar(255) NOT NULL DEFAULT '',
  `posttime` int(10) DEFAULT NULL COMMENT '添加时间',
  `reorder` int(10) NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`id`),
  UNIQUE KEY `id` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_special_category`
--

DROP TABLE IF EXISTS `temmoku_special_category`;
CREATE TABLE IF NOT EXISTS `temmoku_special_category` (
  `sid` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `upsid` int(11) NOT NULL DEFAULT '0',
  `level` int(11) NOT NULL DEFAULT '0' COMMENT '从上到下的级别',
  `reorder` int(11) NOT NULL DEFAULT '0' COMMENT '排序专用',
  `dir_name` varchar(255) NOT NULL DEFAULT '',
  `seo_name` varchar(255) NOT NULL DEFAULT '',
  `seo_keywords` varchar(255) NOT NULL DEFAULT '',
  `seo_description` varchar(255) NOT NULL DEFAULT '',
  `setting` text,
  PRIMARY KEY (`sid`),
  KEY `sid` (`sid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_special_comment`
--

DROP TABLE IF EXISTS `temmoku_special_comment`;
CREATE TABLE IF NOT EXISTS `temmoku_special_comment` (
  `id` mediumint(7) NOT NULL AUTO_INCREMENT,
  `lid` mediumint(7) NOT NULL DEFAULT '0',
  `uid` mediumint(7) NOT NULL DEFAULT '0',
  `state` tinyint(1) NOT NULL DEFAULT '0',
  `username` varchar(255) NOT NULL DEFAULT '游客',
  `content` text,
  `posttime` int(10) DEFAULT NULL,
  `reply_id` mediumint(7) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `aid` (`lid`),
  KEY `reply_id` (`reply_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_special_list`
--

DROP TABLE IF EXISTS `temmoku_special_list`;
CREATE TABLE IF NOT EXISTS `temmoku_special_list` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `keyword` varchar(255) NOT NULL DEFAULT '',
  `thumb` varchar(255) NOT NULL DEFAULT '',
  `sid` int(11) NOT NULL DEFAULT '0',
  `reorder` int(11) NOT NULL DEFAULT '0' COMMENT '排序专用',
  `is_comment` tinyint(3) NOT NULL DEFAULT '1',
  `dir_name` varchar(255) NOT NULL DEFAULT '',
  `seo_name` varchar(255) NOT NULL DEFAULT '',
  `seo_keywords` varchar(255) NOT NULL DEFAULT '',
  `seo_description` varchar(255) NOT NULL DEFAULT '',
  `content` text COMMENT '说明',
  `setting` text,
  `clicks` mediumint(9) NOT NULL DEFAULT '0',
  `comment_num` mediumint(9) NOT NULL DEFAULT '0',
  `state` tinyint(3) NOT NULL DEFAULT '0',
  `posttime` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `fid` (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC AUTO_INCREMENT=1 ;


--
-- 表的结构 `temmoku_module`
--

DROP TABLE IF EXISTS `temmoku_module`;
CREATE TABLE IF NOT EXISTS `temmoku_module` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '目录名称',
  `close` tinyint(1) NOT NULL DEFAULT '0' COMMENT '禁用？',
  `reorder` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `dirname` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='万能模块模型表' AUTO_INCREMENT=1 ;


--
-- 表的结构 `temmoku_hook`
--

DROP TABLE IF EXISTS `temmoku_hook`;
CREATE TABLE IF NOT EXISTS `temmoku_hook` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '',
  `content` tinytext,
  `state` tinyint(3) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- 转存表中的数据 `temmoku_hook`
--

INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('global_user_begin', '会员初始检测权限之前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('global_user_end', '会员初始检测权限之后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('global_admin_begin', '后台初始检测权限之前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('global_admin_end', '后台初始检测权限之后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('index_power_begin', '前台初始检测会员权限之前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('index_power_end', '前台初始检测会员权限之后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('tpl_head', '模板头部', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('tpl_foot', '模板底部', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('cms_post_begin', 'home模块发布文章前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('cms_post_end', 'home模块发布文章后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('cms_articles_del', 'home模块删除文章前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('cms_articles_state', 'home模块审核&取消审核文章前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('cms_articles_recommend', 'home模块推荐&取消推荐文章前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_edit_my_profile_begin', '会员中心模块修改个人资料前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_edit_my_profile_end', '会员中心模块修改个人资料后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_sms_read_begin', '会员中心阅读短消息前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_sms_read_end', '会员中心阅读短消息后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_sms_post_begin', '会员中心发送短消息前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_sms_post_end', '会员中心发送短消息后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_setting_begin', '后台认证设置前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_setting_end', '后台认证设置后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_setting_tpl_sort', '后台认证设置模板连接', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_setting_tpl_main', '后台认证设置模板连接的内容', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_index_begin', '后台认证列表前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_index_end', '后台认证列表后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_index_tpl_sort', '后台认证列表模板连接', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_index_tpl_list', '后台认证列表模板连接列表内容', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_content', '后台认证详情前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_renzheng_content_post', '后台认证详情操作后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('public_renzheng_give_begin', '公共类认证完成前(赠积分/人民币)', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('public_renzheng_give_end', '公共类认证完成后(赠积分/人民币)', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_begin', '会员中心认证列表前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_end', '会员中心认证列表后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_approve_begin', '会员中心认证操作前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_approve_end', '会员中心认证操作后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_send_begin', '会员中心认证操作外发信息前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('user_renzheng_send_end', '会员中心认证操作外发信息后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('display_begin', '视图控制器display前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('display_end', '视图控制器display后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_edit_begin', '编辑模块数据发送前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_edit_end', '编辑模块数据发送后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_install_begin', '安装模块发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_install_end', '安装模块发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_uninstall_begin', '模块卸载发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_uninstall_end', '模块卸载发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_del_begin', '模块删除发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_del_end', '模块删除发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_copy_begin', '复制模块发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('modular_copy_end', '复制模块发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_install_begin', '安装插件数据发送前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_install_end', '安装插件数据发送后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_uninstall_begin', '卸载插件发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_uninstall_end', '卸载插件发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_del_begin', '删除插件发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_del_end', '删除插件发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_copy_begin', '复制插件发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('plugin_copy_end', '复制插件发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_add_begin', '添加会员发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_add_end', '添加会员发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_edit_begin', '修改会员发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_edit_end', '修改会员发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_state_begin', '修改会员状态发送数据前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_state_end', '修改会员状态发送数据后', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_del_begin', '删除会员前', 1);
INSERT INTO `temmoku_hook` (`name`, `content`, `state`) VALUES('admin_user_del_end', '删除会员后', 1);



-- --------------------------------------------------------

--
-- 表的结构 `temmoku_hook_list`
--

DROP TABLE IF EXISTS `temmoku_hook_list`;
CREATE TABLE IF NOT EXISTS `temmoku_hook_list` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `class` varchar(255) NOT NULL DEFAULT '' COMMENT '执行类',
  `method` varchar(255) NOT NULL DEFAULT '',
  `hook_name` varchar(255) NOT NULL DEFAULT '',
  `content` tinytext,
  `developer` varchar(255) NOT NULL DEFAULT '' COMMENT '开发者',
  `homepage` varchar(255) NOT NULL DEFAULT '',
  `version` varchar(255) NOT NULL DEFAULT '',
  `state` tinyint(3) NOT NULL DEFAULT '1' COMMENT '状态',
  `reorder` int(11) NOT NULL DEFAULT '0' COMMENT '执行顺序，数值越大越优先执行',
  `cloud_id` mediumint(9) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `state` (`state`),
  KEY `method` (`method`),
  KEY `cloud_id` (`cloud_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- 表的结构 `temmoku_address`
--

DROP TABLE IF EXISTS `temmoku_address`;
CREATE TABLE IF NOT EXISTS `temmoku_address` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `uid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '关联的用户',
  `truename` varchar(255) NOT NULL DEFAULT '' COMMENT '真实名字',
  `mob` varchar(255) NOT NULL DEFAULT '' COMMENT '手机',
  `tel` varchar(255) NOT NULL DEFAULT '' COMMENT '固话',
  `proviceid` int(11) NOT NULL DEFAULT '0' COMMENT '省级id',
  `cityid` int(11) NOT NULL DEFAULT '0' COMMENT '市级id',
  `countyid` int(11) NOT NULL DEFAULT '0' COMMENT '县级id',
  `townid` int(11) NOT NULL DEFAULT '0' COMMENT '镇id',
  `address` varchar(255) NOT NULL DEFAULT '' COMMENT '详细地址',
  `delivery_time` varchar(255) NOT NULL DEFAULT '' COMMENT '送货时间',
  `is_defalut` tinyint(3) NOT NULL DEFAULT '0' COMMENT '是否为默认地址',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='收获地址' AUTO_INCREMENT=1 ;

--
-- 表的结构 `temmoku_cloud`
--

DROP TABLE IF EXISTS `temmoku_cloud`;
CREATE TABLE IF NOT EXISTS `temmoku_cloud` (
  `id` mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
  `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '1为模块，2为插件，3为钩子，4为模板',
  `initial_name` varchar(255) NOT NULL DEFAULT '',
  `developer` varchar(255) NOT NULL DEFAULT '' COMMENT '开发者',
  `homepage` varchar(255) NOT NULL DEFAULT '' COMMENT '开发者主页',
  `version` varchar(255) NOT NULL DEFAULT '' COMMENT '版本信息',
  `cloud_id` mediumint(9) NOT NULL DEFAULT '0' COMMENT '云平台的id',
  `install_path` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='云平台数据' AUTO_INCREMENT=1 ;

--
-- 表的结构 `temmoku_attribute_list`
--
DROP TABLE IF EXISTS `temmoku_attribute_list`;
CREATE TABLE IF NOT EXISTS `temmoku_attribute_list` (
  `id` mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
  `aid` mediumint(9) NOT NULL DEFAULT '0',
  `cid` mediumint(9) NOT NULL DEFAULT '0',
  `mid` mediumint(9) NOT NULL DEFAULT '0',
  `value` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

-- --------------------------------------------------------

--
-- 表的结构 `temmoku_field`
--
DROP TABLE IF EXISTS `temmoku_field`;
CREATE TABLE IF NOT EXISTS `temmoku_field` (
  `id` mediumint(9) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL DEFAULT '' COMMENT '字段名称',
  `field` varchar(255) NOT NULL DEFAULT '' COMMENT '字段名',
  `field_attr` varchar(255) NOT NULL DEFAULT '' COMMENT '字段属性',
  `field_length` varchar(255) DEFAULT NULL COMMENT '字段长度',
  `type` varchar(255) NOT NULL DEFAULT '' COMMENT '字段类型',
  `unit` varchar(255) NOT NULL DEFAULT '' COMMENT '单位名称',
  `mid` mediumint(9) DEFAULT NULL COMMENT '所属模型',
  `is_search` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否开启检索 1为可以 0不可以',
  `choice_model` tinyint(3) NOT NULL DEFAULT '0' COMMENT '选择模式，0为单选，1为多选。一般用在前台，比如商城',
  `value` text COMMENT '预设值',
  `is_required` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否必填 1为必填',
  `is_regular` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否正则验证',
  `regular` varchar(255) NOT NULL DEFAULT '' COMMENT '正则表达式',
  `regular_msg` varchar(255) NOT NULL DEFAULT '' COMMENT '正则验证不通过时的说明',
  `is_xss` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'XSS过滤 0为不，1为过滤',
  `msg` varchar(255) NOT NULL DEFAULT '' COMMENT '字段输入提示',
  `setting` text COMMENT '其它配置参数，应该是序列化后的数据',
  `height` smallint(6) NOT NULL DEFAULT '0' COMMENT '输入框高度，一般用于textarea',
  `reorder` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;

--
-- 表的结构 `temmoku_renzheng_log`
--

DROP TABLE IF EXISTS `temmoku_renzheng_log`;
CREATE TABLE `temmoku_renzheng_log` (
  `id` mediumint(9) unsigned NOT NULL AUTO_INCREMENT,
  `uid` mediumint(9) NOT NULL DEFAULT '0',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '1为完成，其它为未',
  `msg` text,
  `posttime` int(10) NOT NULL,
  `action_uid` mediumint(9) NOT NULL DEFAULT '0' COMMENT '操作人',
  PRIMARY KEY (`id`),
  KEY `uid` (`uid`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
