jforum 数据库设计文档
2015-12-31 15:51
363 查看
版表
版块表CREATE TABLE `jforum_forums` ( `forum_id` int(11) NOT NULL AUTO_INCREMENT, //版块id `categories_id` int(11) NOT NULL DEFAULT '1', `forum_name` varchar(150) NOT NULL DEFAULT '', `forum_desc` varchar(255) DEFAULT NULL, `forum_order` int(11) DEFAULT '1', `forum_topics` int(11) NOT NULL DEFAULT '0', `forum_last_post_id` int(11) NOT NULL DEFAULT '0', `moderated` tinyint(1) DEFAULT '0', PRIMARY KEY (`forum_id`), KEY `categories_id` (`categories_id`), KEY `idx_forums_cats` (`categories_id`) ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8
帖子
帖子分2种,一种是主题帖,一种是回复帖。主题帖表
CREATE TABLE `jforum_topics` ( `topic_id` int(11) NOT NULL AUTO_INCREMENT, //主题id `forum_id` int(11) NOT NULL DEFAULT '0', `topic_title` varchar(100) NOT NULL DEFAULT '', `user_id` int(11) NOT NULL DEFAULT '0', `topic_time` datetime DEFAULT NULL, `topic_views` int(11) DEFAULT '1', `topic_replies` int(11) DEFAULT '0', `topic_status` tinyint(3) DEFAULT '0', `topic_vote_id` int(11) NOT NULL DEFAULT '0', `topic_type` tinyint(3) DEFAULT '0', `topic_first_post_id` int(11) DEFAULT '0', `topic_last_post_id` int(11) NOT NULL DEFAULT '0', `topic_moved_id` int(11) DEFAULT '0', `moderated` tinyint(1) DEFAULT '0', PRIMARY KEY (`topic_id`), KEY `forum_id` (`forum_id`), KEY `user_id` (`user_id`), KEY `topic_first_post_id` (`topic_first_post_id`), KEY `topic_last_post_id` (`topic_last_post_id`), KEY `topic_moved_id` (`topic_moved_id`) ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8
回复贴
回复贴,又分为回复贴表和回复帖内容表。回复帖表
CREATE TABLE `jforum_posts` ( `post_id` int(11) NOT NULL AUTO_INCREMENT, //回复id `topic_id` int(11) NOT NULL DEFAULT '0', `forum_id` int(11) NOT NULL DEFAULT '0', `user_id` int(11) NOT NULL DEFAULT '0', `post_time` datetime DEFAULT NULL, `poster_ip` varchar(15) DEFAULT NULL, `enable_bbcode` tinyint(1) NOT NULL DEFAULT '1', `enable_html` tinyint(1) NOT NULL DEFAULT '1', `enable_smilies` tinyint(1) NOT NULL DEFAULT '1', `enable_sig` tinyint(1) NOT NULL DEFAULT '1', `post_edit_time` datetime DEFAULT NULL, `post_edit_count` int(11) NOT NULL DEFAULT '0', `status` tinyint(1) DEFAULT '1', `attach` tinyint(1) DEFAULT '0', `need_moderate` tinyint(1) DEFAULT '0', PRIMARY KEY (`post_id`), KEY `user_id` (`user_id`), KEY `topic_id` (`topic_id`), KEY `forum_id` (`forum_id`), KEY `post_time` (`post_time`), KEY `need_moderate` (`need_moderate`) ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8
回复帖内容表
CREATE TABLE `jforum_posts_text` ( `post_id` int(11) NOT NULL, //回复id `post_text` text, //回复内容 `post_subject` varchar(100) DEFAULT NULL, //主题名字 PRIMARY KEY (`post_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8
http://wenku.baidu.com/link?url=LJa0jX9Iye67_O78XCYN5Llx4AKBDBmTH0hb9NXrJB2c2TzXtADUdDxdZ64sAlPoXQiSy34DjyG2HYtrdEVGEY7UlINVe65EXh19uBTa5D7
相关文章推荐
- jforum 学习资料
- jforum中对各种servlet对象都进行了封装
- jforum Action的基类
- Jforum二次开发中遇到的问题与解决
- jforum数据库字典
- jforum二次开发相关笔记——(一)页面请求机制
- jforum 发布中文乱码 、 中文汉化发帖
- JForum2.1.9 安装过程
- Java开源论坛JForum二次开发技术资料之源码导入安装
- jforum二次开发中常见问题及解决方法
- JForum 2.1.7 源程序编译草记 推荐
- JForum论坛搭建
- 【转载】Jforum环境安装
- JForum框架结构和主要配置文件说明
- JForum论坛安装及配置
- JForum论坛源码部署
- 关于jforum的发表文章、回复一直出现中文乱码的问题
- jforum二次开发相关笔记——页面请求机制
- 搭建开源论坛之JForum安装+简易二次修改
- 搭建开源论坛JForum测试环境(mysql数据库)