discuz的数据字典2


CREATE TABLE pre_common_tagitem (
  tagid smallint(6) NOT NULL default '0' COMMENT '标签id',
  tagname varchar(20) NOT NULL default '' COMMENT '标签名',
  itemid mediumint(8) NOT NULL default '0' COMMENT 'itemid',
  idtype varchar(255) NOT NULL default '' COMMENT '内容类型',
  KEY tagid (tagid, idtype),
  KEY idtype (idtype, itemid)
) ENGINE=MyISAM COMMENT='标签内容表' ;



CREATE TABLE pre_forum_access (
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
  allowview tinyint(1) NOT NULL default '0' COMMENT '允许浏览',
  allowpost tinyint(1) NOT NULL default '0' COMMENT '允许发表',
  allowreply tinyint(1) NOT NULL default '0' COMMENT '允许回复',
  allowgetattach tinyint(1) NOT NULL default '0' COMMENT '允许下载附件',
  allowgetimage tinyint(1) NOT NULL default '0' COMMENT '允许查看图片',
  allowpostattach tinyint(1) NOT NULL default '0' COMMENT '允许上传附件',
  allowpostimage tinyint(1) NOT NULL default '0' COMMENT '允许上传图片',
  adminuser mediumint(8) unsigned NOT NULL default '0' COMMENT '管理员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '时间',
  PRIMARY KEY  (uid,fid),
  KEY listorder (fid,dateline)
) ENGINE=MyISAM COMMENT='访问权限表';



CREATE TABLE pre_forum_activity (
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  aid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题图片id',
  cost mediumint(8) unsigned NOT NULL default '0' COMMENT '每人花销',
  starttimefrom int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
  starttimeto int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
  place varchar(255) NOT NULL default '' COMMENT '地点',
  class varchar(255) NOT NULL default '' COMMENT '类别',
  gender tinyint(1) NOT NULL default '0' COMMENT '性别',
  number smallint(5) unsigned NOT NULL default '0' COMMENT '人数',
  applynumber smallint(5) unsigned NOT NULL default '0' COMMENT '已参加人数',
  expiration int(10) unsigned NOT NULL default '0' COMMENT '报名截止日期',
  ufield TEXT NOT NULL COMMENT '用户定制项目',
  credit smallint(6) unsigned NOT NULL default '0' COMMENT '需消耗的积分',
  PRIMARY KEY  (tid),
  KEY uid (uid,starttimefrom),
  KEY starttimefrom (starttimefrom),
  KEY expiration (expiration),
  KEY applynumber (applynumber)
) ENGINE=MyISAM COMMENT='活动表';



CREATE TABLE pre_forum_activityapply (
  applyid int(10) unsigned NOT NULL auto_increment COMMENT '申请id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  username varchar(255) NOT NULL default '' COMMENT '用户名',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  message varchar(255) NOT NULL default '' COMMENT '消息',
  verified tinyint(1) NOT NULL default '0' COMMENT '是否审核通过\n(0:N 1:Y 2:需完善资料)',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '申请时间',
  payment mediumint(8) NOT NULL default '0' COMMENT '每人花销',
  ufielddata TEXT NOT NULL COMMENT '用户定制项目数据',
  PRIMARY KEY  (applyid),
  KEY uid (uid),
  KEY tid (tid),
  KEY dateline (tid,dateline)
) ENGINE=MyISAM COMMENT='活动申请表';



CREATE TABLE pre_common_addon (
  `key` varchar(255) NOT NULL default '' COMMENT '资源提供商ID',
  title varchar(255) NOT NULL default '' COMMENT '名称',
  sitename varchar(255) NOT NULL default '' COMMENT '站点名称',
  siteurl varchar(255) NOT NULL default '' COMMENT '站点 URL',
  description varchar(255) NOT NULL default '' COMMENT '说明',
  contact varchar(255) NOT NULL default '' COMMENT '联系方式',
  logo varchar(255) NOT NULL default '' COMMENT 'LOGO 图片 URL',
  system tinyint(1) NOT NULL default '0' COMMENT '是否系统提商(无法删除的)',
  PRIMARY KEY  (`key`)
) ENGINE=MyISAM COMMENT='扩展中心资源提供商';


CREATE TABLE pre_forum_announcement (
  id smallint(6) unsigned NOT NULL auto_increment COMMENT '公告id',
  author varchar(15) NOT NULL default '' COMMENT '作者姓名',
  `subject` varchar(255) NOT NULL default '' COMMENT '公告标题',
  `type` tinyint(1) NOT NULL default '0' COMMENT '公告类型\n(0:文字公告 1:网址链接)',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  starttime int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
  endtime int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
  message text NOT NULL COMMENT '消息',
  groups text NOT NULL COMMENT '接受用户组',
  PRIMARY KEY  (id),
  KEY timespan (starttime,endtime)
) ENGINE=MyISAM COMMENT='公告表';

CREATE TABLE pre_forum_threadimage (
  `tid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  KEY tid (tid)
) ENGINE=MyISAM COMMENT='主题图片表';



CREATE TABLE pre_forum_attachment (
  aid mediumint(8) unsigned NOT NULL auto_increment COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  tableid tinyint(1) unsigned NOT NULL default '0' COMMENT '附件表id',
  downloads mediumint(8) NOT NULL default '0' COMMENT '下载次数',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件索引表';

CREATE TABLE pre_forum_attachment_unused (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  PRIMARY KEY (aid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='未使用附件表';

CREATE TABLE pre_forum_attachment_0 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_1 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_2 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_3 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_4 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_5 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_6 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_7 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_8 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';

CREATE TABLE pre_forum_attachment_9 (
  aid mediumint(8) unsigned NOT NULL COMMENT '附件id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '上传时间',
  filename varchar(255) NOT NULL default '' COMMENT '原文件名',
  filesize int(10) unsigned NOT NULL default '0' COMMENT '文件大小',
  attachment varchar(255) NOT NULL default '' COMMENT '服务器路径',
  remote tinyint(1) unsigned NOT NULL default '0' COMMENT '是否远程附件',
  description varchar(255) NOT NULL COMMENT '说明',
  readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
  price smallint(6) unsigned NOT NULL default '0' COMMENT '附件价格',
  isimage tinyint(1) NOT NULL default '0' COMMENT '是否图片',
  width smallint(6) unsigned NOT NULL default '0' COMMENT '附件宽度',
  thumb tinyint(1) unsigned NOT NULL default '0' COMMENT '是否是缩率图',
  picid mediumint(8) NOT NULL default '0' COMMENT '相册图片ID ',
  PRIMARY KEY (aid),
  KEY tid (tid),
  KEY pid (pid),
  KEY uid (uid)
) ENGINE=MyISAM COMMENT='附件表';




CREATE TABLE pre_forum_attachtype (
  id smallint(6) unsigned NOT NULL auto_increment COMMENT '类型id',
  extension char(12) NOT NULL default '' COMMENT '扩展名',
  maxsize int(10) unsigned NOT NULL default '0' COMMENT '允许上传最大值',
  PRIMARY KEY  (id)
) ENGINE=MyISAM COMMENT='附件类型表';



CREATE TABLE pre_forum_bbcode (
  id mediumint(8) unsigned NOT NULL auto_increment COMMENT '代码id',
  available tinyint(1) NOT NULL default '0' COMMENT '是否启用\n(0:不启用 1:启用但不显示 2:启用并显示)',
  tag varchar(100) NOT NULL default '' COMMENT '标签',
  icon varchar(255) NOT NULL COMMENT '图标',
  replacement text NOT NULL COMMENT '替换内容',
  example varchar(255) NOT NULL default '' COMMENT '例子',
  explanation text NOT NULL COMMENT '解释说明',
  params tinyint(1) unsigned NOT NULL default '1' COMMENT '参数个数',
  prompt text NOT NULL COMMENT '标签描述',
  nest tinyint(3) unsigned NOT NULL default '1' COMMENT '嵌套层次',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  perm text NOT NULL COMMENT '有权使用的用户组',
  PRIMARY KEY  (id)
) ENGINE=MyISAM COMMENT='Discuz! 代码表';



CREATE TABLE pre_forum_creditslog (
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  fromto char(15) NOT NULL default '' COMMENT '来自/到',
  sendcredits tinyint(1) NOT NULL default '0' COMMENT '转出积分字段',
  receivecredits tinyint(1) NOT NULL default '0' COMMENT '接受积分字段',
  send int(10) unsigned NOT NULL default '0' COMMENT '转出积分',
  receive int(10) unsigned NOT NULL default '0' COMMENT '接受积分',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '转帐日期',
  operation char(3) NOT NULL default '' COMMENT '操作',
  KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='转帐记录表';



CREATE TABLE pre_forum_debate (
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '发起人id',
  starttime int(10) unsigned NOT NULL default '0' COMMENT '开始时间',
  endtime int(10) unsigned NOT NULL default '0' COMMENT '结束时间',
  affirmdebaters mediumint(8) unsigned NOT NULL default '0' COMMENT '正方辩论人数',
  negadebaters mediumint(8) unsigned NOT NULL default '0' COMMENT '反方辩论人数',
  affirmvotes mediumint(8) unsigned NOT NULL default '0' COMMENT '正方得票数',
  negavotes mediumint(8) unsigned NOT NULL default '0' COMMENT '反方得票数',
  umpire varchar(15) NOT NULL default '' COMMENT '裁判用户名',
  winner tinyint(1) NOT NULL default '0' COMMENT '获胜方\n(0:平局 1:为正方 2:为反方)\n裁判评判结果',
  bestdebater varchar(50) NOT NULL default '' COMMENT '最佳辩手用户名',
  affirmpoint text NOT NULL COMMENT '正方观点',
  negapoint text NOT NULL COMMENT '反方观点',
  umpirepoint text NOT NULL COMMENT '裁判观点,裁判结束辩论时填写',
  affirmvoterids text NOT NULL COMMENT '正方投票人的 id 集合',
  negavoterids text NOT NULL COMMENT '反方投票人的 id 集合',
  affirmreplies mediumint(8) unsigned NOT NULL COMMENT '正方回复次数,用来翻页',
  negareplies mediumint(8) unsigned NOT NULL COMMENT '反方回复次数,用来翻页',
  PRIMARY KEY  (tid),
  KEY uid (uid,starttime)
) ENGINE=MyISAM COMMENT='辩论主题表';



CREATE TABLE pre_forum_debatepost (
  pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
  stand tinyint(1) NOT NULL default '0' COMMENT '立场\n(0:中立 1:正方 2:为反方)',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '发起人id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '发表的时间',
  voters mediumint(10) unsigned NOT NULL default '0' COMMENT '投票人数',
  voterids text NOT NULL COMMENT '投票人的 id 集合',
  PRIMARY KEY  (pid),
  KEY pid (pid,stand),
  KEY tid (tid,uid)
) ENGINE=MyISAM COMMENT='辩论帖子表';



CREATE TABLE pre_forum_faq (
  id smallint(6) NOT NULL auto_increment COMMENT '帮助id',
  fpid smallint(6) unsigned NOT NULL default '0' COMMENT '帮助父id',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '排序',
  identifier varchar(20) NOT NULL COMMENT '帮助标识',
  keyword varchar(50) NOT NULL COMMENT '帮助关键词',
  title varchar(50) NOT NULL COMMENT '帮助标题',
  message text NOT NULL COMMENT '帮助内容',
  PRIMARY KEY  (id),
  KEY displayplay (displayorder)
) ENGINE=MyISAM COMMENT='论坛帮助表';



CREATE TABLE pre_home_favorite (
  favid mediumint(8) unsigned NOT NULL auto_increment COMMENT '收藏id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  id mediumint(8) unsigned NOT NULL default '0',
  idtype varchar(255) NOT NULL default '',
  spaceuid mediumint(8) unsigned NOT NULL default '0' COMMENT '空间会员id',
  title varchar(255) NOT NULL default '',
  description text NOT NULL,
  dateline int(10) unsigned NOT NULL default '0',
  PRIMARY KEY (favid),
  KEY idtype (id,idtype),
  KEY uid (uid,idtype,dateline)
) ENGINE=MyISAM COMMENT='收藏表';



CREATE TABLE pre_forum_forum (
  fid mediumint(8) unsigned NOT NULL auto_increment COMMENT '论坛id',
  fup mediumint(8) unsigned NOT NULL default '0' COMMENT '上级论坛id',
  `type` enum('group','forum','sub') NOT NULL default 'forum' COMMENT '类型\n(group:分类 forum:普通论坛 sub:子论坛)',
  `name` char(50) NOT NULL default '' COMMENT '名称',
  `status` tinyint(1) NOT NULL default '0' COMMENT '显示状态\n(0:隐藏 1:正常 3:群组)',
  displayorder smallint(6) NOT NULL default '0' COMMENT '显示顺序',
  styleid smallint(6) unsigned NOT NULL default '0' COMMENT '风格id',
  threads mediumint(8) unsigned NOT NULL default '0' COMMENT '主题数量',
  posts mediumint(8) unsigned NOT NULL default '0' COMMENT '帖子数量',
  todayposts mediumint(8) unsigned NOT NULL default '0' COMMENT '今日发帖数量',
  lastpost char(110) NOT NULL default '' COMMENT '最后发表',
  domain char(15) NOT NULL default '' COMMENT '绑定的二级域名',
  allowsmilies tinyint(1) NOT NULL default '0' COMMENT '允许使用表情',
  allowhtml tinyint(1) NOT NULL default '0' COMMENT '允许使用html',
  allowbbcode tinyint(1) NOT NULL default '0' COMMENT '允许bbcode',
  allowimgcode tinyint(1) NOT NULL default '0' COMMENT '允许img',
  allowmediacode tinyint(1) NOT NULL default '0' COMMENT '允许使用多媒体代码',
  allowanonymous tinyint(1) NOT NULL default '0' COMMENT '允许匿名',
  allowpostspecial smallint(6) unsigned NOT NULL default '0' COMMENT '允许发表特殊主题',
  allowspecialonly tinyint(1) unsigned NOT NULL default '0' COMMENT '只允许发表特殊主题',
  allowappend tinyint(1) unsigned NOT NULL default '0' COMMENT '是否开启帖子补充',
  alloweditrules tinyint(1) NOT NULL default '0' COMMENT '允许版主修改论坛规则',
  allowfeed tinyint(1) NOT NULL default '0' COMMENT '允许推送动态',
  allowside tinyint(1) NOT NULL default '0' COMMENT '显示边栏',
  recyclebin tinyint(1) NOT NULL default '0' COMMENT '是否启用回收站',
  modnewposts tinyint(1) NOT NULL default '0' COMMENT '是否审核发帖',
  jammer tinyint(1) NOT NULL default '0' COMMENT '是否启用干扰码',
  disablewatermark tinyint(1) NOT NULL default '0' COMMENT '是否图片附件增加水印',
  inheritedmod tinyint(1) NOT NULL default '0' COMMENT '本论坛或分类版主的权力继承到下级论坛',
  autoclose smallint(6) NOT NULL default '0' COMMENT '自动关闭主题',
  forumcolumns tinyint(3) unsigned NOT NULL default '0' COMMENT '增加论坛水平横排设置',
  catforumcolumns tinyint(3) unsigned NOT NULL default '0' COMMENT '增加分区版块水平横排设置',
  threadcaches tinyint(1) NOT NULL default '0' COMMENT '主题缓存功能设置',
  alloweditpost tinyint(1) unsigned NOT NULL default '1' COMMENT '允许编辑帖子',
  `simple` tinyint(1) unsigned NOT NULL default '0' COMMENT '只显示子版块',
  modworks tinyint(1) unsigned NOT NULL default '0' COMMENT '本版有待处理的管理事项',
  allowglobalstick tinyint(1) NOT NULL default '1' COMMENT '是否显示全局置顶',
  level smallint(6) unsigned NOT NULL default '0' COMMENT '群组等级',
  commoncredits int(10) unsigned NOT NULL default '0' COMMENT '群组公共积分',
  `archive` tinyint(1) NOT NULL default '0' COMMENT '是否有存档表',
  recommend smallint(6) unsigned NOT NULL default '0' COMMENT '推荐到的版块',
  favtimes mediumint(8) unsigned NOT NULL default '0' COMMENT '版块或群组的收藏次数',
  sharetimes mediumint(8) unsigned NOT NULL default '0' COMMENT '版块或群组的分享次数',
  disablethumb tinyint(1) NOT NULL default '0' COMMENT '是否添加缩略图',
  PRIMARY KEY  (fid),
  KEY forum (`status`,`type`,displayorder),
  KEY fup_type (`fup`,`type`,displayorder),
  KEY fup (fup)
) ENGINE=MyISAM COMMENT='版块表' ;



CREATE TABLE pre_forum_forumfield (
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '版块id',
  description text NOT NULL COMMENT '解释说明',
  `password` varchar(12) NOT NULL default '' COMMENT '私密论坛密码',
  icon varchar(255) NOT NULL default '' COMMENT '图标',
  redirect varchar(255) NOT NULL default '' COMMENT 'URL转发',
  attachextensions varchar(255) NOT NULL default '' COMMENT '允许上传附件类型',
  creditspolicy mediumtext NOT NULL COMMENT '版块积分策略',
  formulaperm text NOT NULL COMMENT '版块权限表达式',
  moderators text NOT NULL COMMENT '版主列表,格式:admin',
  rules text NOT NULL COMMENT '版块规则',
  threadtypes text NOT NULL COMMENT '主题分类,序列化存放的设置,格式为一个数组',
  threadsorts text NOT NULL COMMENT '分类信息,序列化存放的设置,格式为一个数组',
  viewperm text NOT NULL COMMENT '阅读权限, 格式: 1 4 5',
  postperm text NOT NULL COMMENT '发表权限, 格式: 1 4 5',
  replyperm text NOT NULL COMMENT '回复权限, 格式: 1 4 5',
  getattachperm text NOT NULL COMMENT '下载附件权限, 格式: 1 4 5',
  postattachperm text NOT NULL COMMENT '上传附件权限, 格式: 1 4 5',
  postimageperm text NOT NULL COMMENT '上传图片权限, 格式: 1 4 5',
  spviewperm text NOT NULL COMMENT '不受限于版权权限表达式, 格式: 1 4 5',
  seotitle text NOT NULL COMMENT '版块seo标题',
  keywords text NOT NULL COMMENT '版块seo关键词',
  seodescription text NOT NULL COMMENT '版块seo描述',
  supe_pushsetting text NOT NULL COMMENT 'supe推送设置,序列化存放设置数据,格式为一个数组。',
  modrecommend text NOT NULL COMMENT '版主推荐规则',
  threadplugin text NOT NULL COMMENT '特殊主题插件数据',
  extra TEXT NOT NULL,
  jointype tinyint(1) NOT NULL default '0' COMMENT '加入群组方式 -1为关闭,0为公开, 2邀请',
  gviewperm tinyint(1) unsigned NOT NULL default '0' COMMENT '群组浏览权限 0:仅成员 1:所有用户',
  membernum smallint(6) unsigned NOT NULL default '0' COMMENT '群组成员数',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '群组创建时间',
  lastupdate int(10) unsigned NOT NULL default '0' COMMENT '群组最后更新时间',
  activity int(10) unsigned NOT NULL default '0' COMMENT '群组活跃度',
  founderuid mediumint(8) unsigned NOT NULL default '0' COMMENT '群组创始人UID',
  foundername varchar(255) NOT NULL default '' COMMENT '群组创始人名称',
  banner varchar(255) NOT NULL default '' COMMENT '群组头图片',
  groupnum smallint(6) unsigned NOT NULL default '0' COMMENT '分类下的群组数量',
  commentitem TEXT NOT NULL,
  relatedgroup TEXT NOT NULL,
  picstyle tinyint(1) NOT NULL default '0' COMMENT '帖子列表是否以图片形式显示 0:否 1:是',
  widthauto tinyint(1) NOT NULL default '0' COMMENT '默认是否宽屏 0:全局 -1:宽屏 1:窄屏',
  PRIMARY KEY  (fid),
  KEY membernum (membernum),
  KEY dateline (dateline),
  KEY lastupdate (lastupdate),
  KEY activity (activity)
) ENGINE=MyISAM COMMENT='版块扩展表';



CREATE TABLE pre_forum_forum_threadtable (
  `fid` smallint(6) unsigned NOT NULL COMMENT '版块id',
  `threadtableid` smallint(6) unsigned NOT NULL COMMENT 'thread分区id',
  `threads` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '主题数',
  `posts` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '帖子数',
  PRIMARY KEY (`fid`,`threadtableid`)
) ENGINE=MyISAM COMMENT '版块存档信息';



CREATE TABLE pre_forum_forumrecommend (
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '版块id',
  tid mediumint(8) unsigned NOT NULL COMMENT '帖子id',
  typeid smallint(6) NOT NULL COMMENT '是否含有附件图片',
  displayorder tinyint(1) NOT NULL COMMENT '推荐顺序',
  `subject` char(80) NOT NULL COMMENT '推荐主题标题',
  author char(15) NOT NULL COMMENT '推荐主题作者',
  authorid mediumint(8) NOT NULL COMMENT '推荐主题作者id',
  moderatorid mediumint(8) NOT NULL COMMENT '推荐管理人员id',
  expiration int(10) unsigned NOT NULL COMMENT '推荐主题有效期',
  position tinyint(1) NOT NULL default '0' COMMENT '显示位置',
  highlight tinyint(1) NOT NULL default '0' COMMENT '高亮颜色',
  aid mediumint(8) unsigned NOT NULL default '0' COMMENT '附件ID',
  filename char(100) NOT NULL default '' COMMENT '附件文件',
  PRIMARY KEY  (tid),
  KEY displayorder (fid,displayorder),
  KEY position (position)
) ENGINE=MyISAM COMMENT='版主推荐表';



CREATE TABLE pre_forum_imagetype (
  typeid smallint(6) unsigned NOT NULL auto_increment COMMENT '分类id',
  available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
  `name` char(20) NOT NULL COMMENT '分类名称',
  `type` enum('smiley','icon','avatar') NOT NULL default 'smiley' COMMENT '分类类型\n(smiley:表情 icon:图标 avatar:头像)',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '分类顺序',
  `directory` char(100) NOT NULL COMMENT '图片目录',
  PRIMARY KEY  (typeid)
) ENGINE=MyISAM COMMENT='图片 表情 头像等 分类';



CREATE TABLE pre_forum_medal (
  medalid smallint(6) unsigned NOT NULL auto_increment COMMENT '勋章id',
  `name` varchar(50) NOT NULL default '' COMMENT '勋章名称',
  available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
  image varchar(255) NOT NULL default '' COMMENT '勋章图片',
  `type` tinyint(1) NOT NULL default '0' COMMENT '勋章类型',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '勋章显示顺序',
  description varchar(255) NOT NULL COMMENT '勋章描述',
  expiration smallint(6) unsigned NOT NULL default '0' COMMENT '勋章有效期',
  permission mediumtext NOT NULL COMMENT '勋章获得条件表达式',
  PRIMARY KEY  (medalid),
  KEY displayorder (displayorder),
  KEY `available` (`available`,`displayorder`)
) ENGINE=MyISAM COMMENT='勋章表' ;



CREATE TABLE pre_forum_medallog (
  id mediumint(8) unsigned NOT NULL auto_increment COMMENT '记录id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '勋章拥有着用户id',
  medalid smallint(6) unsigned NOT NULL default '0' COMMENT '勋章id',
  `type` tinyint(1) NOT NULL default '0' COMMENT '勋章类型id',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '颁发时间id',
  expiration int(10) unsigned NOT NULL default '0' COMMENT '有效期id',
  `status` tinyint(1) NOT NULL default '0' COMMENT '勋章状态id',
  PRIMARY KEY  (id),
  KEY `type` (`type`),
  KEY `status` (`status`,expiration),
  KEY uid (uid,medalid,`type`),
  KEY `dateline` (`dateline`)
) ENGINE=MyISAM COMMENT='勋章日志表' ;



CREATE TABLE pre_common_member_magic (
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户uid',
  magicid smallint(6) unsigned NOT NULL default '0' COMMENT '道具id',
  num smallint(6) unsigned NOT NULL default '0' COMMENT '拥有数量',
   PRIMARY KEY (uid,magicid)
) ENGINE=MyISAM COMMENT='用户道具数据表';



CREATE TABLE pre_forum_memberrecommend (
  tid mediumint(8) unsigned NOT NULL COMMENT '主题ID',
  recommenduid mediumint(8) unsigned NOT NULL COMMENT '推荐会员ID',
  dateline int(10) unsigned NOT NULL COMMENT '推荐时间',
  KEY tid (tid),
  KEY uid (recommenduid)
) ENGINE=MyISAM COMMENT='用户推荐表';



CREATE TABLE pre_forum_moderator (
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  inherited tinyint(1) NOT NULL default '0' COMMENT '是否继承',
  PRIMARY KEY  (uid,fid)
) ENGINE=MyISAM COMMENT='版主表';



CREATE TABLE pre_forum_modwork (
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  modaction char(3) NOT NULL default '' COMMENT '动作',
  dateline date NOT NULL default '2006-01-01' COMMENT '时间段',
  count smallint(6) unsigned NOT NULL default '0' COMMENT '登录次数',
  posts smallint(6) unsigned NOT NULL default '0' COMMENT '发表数',
  KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='论坛管理统计表';



CREATE TABLE pre_common_mytask (
  uid mediumint(8) unsigned NOT NULL COMMENT '用户Uid',
  username char(15) NOT NULL default '' COMMENT '用户名',
  taskid smallint(6) unsigned NOT NULL COMMENT '任务id',
  `status` tinyint(1) NOT NULL default '0' COMMENT '任务状态\n(-1:失败 0:进行中 1:已完成)',
  csc char(255) NOT NULL default '' COMMENT '任务进度',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '申请任务时间',
  PRIMARY KEY  (uid,taskid),
  KEY parter (taskid,dateline)
) ENGINE=MyISAM COMMENT='我的任务表';



CREATE TABLE pre_forum_onlinelist (
  groupid smallint(6) unsigned NOT NULL default '0' COMMENT '会员组id',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  title varchar(30) NOT NULL default '' COMMENT '组名称',
  url varchar(30) NOT NULL default '' COMMENT '图例URL'
) ENGINE=MyISAM COMMENT='在线列表定制';



CREATE TABLE pre_forum_order (
  orderid char(32) NOT NULL default '' COMMENT '订单号id',
  `status` char(3) NOT NULL default '' COMMENT '状态',
  buyer char(50) NOT NULL default '' COMMENT '购买者姓名',
  admin char(15) NOT NULL default '' COMMENT '补单管理员姓名',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '购买者id',
  amount int(10) unsigned NOT NULL default '0' COMMENT '数量',
  price float(7,2) unsigned NOT NULL default '0.00' COMMENT '价格',
  submitdate int(10) unsigned NOT NULL default '0' COMMENT '提交日期',
  confirmdate int(10) unsigned NOT NULL default '0' COMMENT '确认日期',
  email char(40) NOT NULL default '' COMMENT '购买时的Email',
  ip char(15) NOT NULL default '' COMMENT '购买时的IP',
  UNIQUE KEY orderid (orderid),
  KEY submitdate (submitdate),
  KEY uid (uid,submitdate)
) ENGINE=MyISAM COMMENT='订单信息表';




CREATE TABLE pre_forum_groupfield (
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '群组关联fid',
  privacy tinyint(1) unsigned NOT NULL default '0' COMMENT '群组隐私设置',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '缓存生成时间',
  type varchar(255) NOT NULL COMMENT '缓存类型',
  data text NOT NULL COMMENT '缓存数据',
  UNIQUE KEY types (fid,type),
  KEY fid (fid),
  KEY type (type)
) ENGINE = MyISAM COMMENT='群组扩展信息缓存';



CREATE TABLE pre_forum_groupinvite (
  fid MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '群组id',
  uid MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '邀请人id',
  inviteuid MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '被邀请人id',
  dateline INT( 10 ) UNSIGNED NOT NULL default '0' COMMENT '邀请时间',
  UNIQUE KEY ids (fid,inviteuid),
  KEY dateline (dateline)
) ENGINE = MYISAM COMMENT='群组邀请';



CREATE TABLE pre_forum_groupranking (
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '群组id',
  yesterday smallint(6) unsigned NOT NULL default '0' COMMENT '昨日排名',
  today smallint(6) unsigned NOT NULL default '0' COMMENT '今日排名',
  trend tinyint(1) NOT NULL default '0' COMMENT '排名趋势',
  PRIMARY KEY (fid),
  KEY today (today)
) ENGINE = MyISAM COMMENT='群组排行';



CREATE TABLE pre_forum_groupuser (
  fid MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '群组关联fid',
  uid MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '成员id',
  username CHAR( 15 ) NOT NULL COMMENT '成员名',
  level TINYINT( 3 ) UNSIGNED NOT NULL default '0' COMMENT '成员等级\n(0:待审核 1:群主 2:副群主 3:明星成员 4:普通成员)',
  threads MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '成员主题数',
  replies MEDIUMINT( 8 ) UNSIGNED NOT NULL default '0' COMMENT '成员回复数',
  joindateline INT( 10 ) UNSIGNED NOT NULL default '0' COMMENT '成员加入群组时间',
  lastupdate INT( 10 ) UNSIGNED NOT NULL default '0' COMMENT '成员最后活动时间',
  privacy TINYINT( 1 ) UNSIGNED NOT NULL default '0' COMMENT '成员隐私设置',
  PRIMARY KEY (fid,uid),
  KEY uid_lastupdate (uid,lastupdate),
  KEY userlist (fid,level,lastupdate)
) ENGINE = MYISAM COMMENT='群组成员';


CREATE TABLE pre_common_plugin (
  pluginid smallint(6) unsigned NOT NULL auto_increment COMMENT '插件id',
  available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
  adminid tinyint(1) unsigned NOT NULL default '0' COMMENT '管理员id',
  `name` varchar(40) NOT NULL default '' COMMENT '名称',
  identifier varchar(40) NOT NULL default '' COMMENT '唯一标识符',
  description varchar(255) NOT NULL default '' COMMENT '解释说明',
  datatables varchar(255) NOT NULL default '' COMMENT '插件数据表',
  `directory` varchar(100) NOT NULL default '' COMMENT '插件目录',
  copyright varchar(100) NOT NULL default '' COMMENT '版权信息',
  modules text NOT NULL COMMENT '插件信息',
  version varchar(20) NOT NULL default '' COMMENT '插件版本',
  PRIMARY KEY  (pluginid),
  UNIQUE KEY identifier (identifier)
) ENGINE=MyISAM COMMENT='插件表' ;



CREATE TABLE pre_common_pluginvar (
  pluginvarid mediumint(8) unsigned NOT NULL auto_increment COMMENT '插件变量id',
  pluginid smallint(6) unsigned NOT NULL default '0' COMMENT '插件id',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  title varchar(100) NOT NULL default '' COMMENT '名称',
  description varchar(255) NOT NULL default '' COMMENT '解释说明',
  variable varchar(40) NOT NULL default '' COMMENT '变量名',
  `type` varchar(20) NOT NULL default 'text' COMMENT '类型',
  `value` text NOT NULL COMMENT '值',
  extra text NOT NULL COMMENT '附加',
  PRIMARY KEY  (pluginvarid),
  KEY pluginid (pluginid)
) ENGINE=MyISAM COMMENT='插件变量表' ;




CREATE TABLE pre_common_moderate (
  id int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'ID',
  idtype varchar(15) NOT NULL default '' COMMENT 'ID类型',
  status tinyint(3) NOT NULL default '0' COMMENT '状态 0 审核中,1 已忽略',
  `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY  (id, idtype),
  KEY idtype (idtype, status, dateline)
) ENGINE=MyISAM COMMENT='审核数据表' ;



CREATE TABLE pre_forum_postlog (
  `pid` int(10) unsigned NOT NULL DEFAULT '0',
  `tid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `fid` smallint(6) unsigned NOT NULL DEFAULT '0',
  `uid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `action` char(10) NOT NULL DEFAULT '',
  `dateline` int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (pid, tid),
  KEY fid (fid),
  KEY uid (uid),
  KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='漫游帖子日志';



CREATE TABLE pre_forum_threadlog (
 `tid` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `fid` smallint(6) unsigned NOT NULL DEFAULT '0',
 `uid` mediumint(8) unsigned NOT NULL DEFAULT '0',
 `otherid` smallint(6) unsigned NOT NULL DEFAULT '0',
 `action` char(10) NOT NULL,
 `expiry` int(10) unsigned NOT NULL DEFAULT '0',
 `dateline` int(10) unsigned NOT NULL DEFAULT '0',
 PRIMARY KEY (tid,fid,uid),
 KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='漫游主题日志';




CREATE TABLE pre_forum_poll (
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  overt tinyint(1) NOT NULL default '0' COMMENT '是否公开投票参与人',
  multiple tinyint(1) NOT NULL default '0' COMMENT '是否多选',
  visible tinyint(1) NOT NULL default '0' COMMENT '是否投票后可见',
  maxchoices tinyint(3) unsigned NOT NULL default '0' COMMENT '最大可选项数',
  expiration int(10) unsigned NOT NULL default '0' COMMENT '过期时间',
  pollpreview varchar(255) NOT NULL default '' COMMENT '选项内容前两项预览',
  voters mediumint(8) unsigned NOT NULL default '0' COMMENT '投票人数',
  PRIMARY KEY  (tid)
) ENGINE=MyISAM COMMENT='投票表';



CREATE TABLE pre_forum_pollvoter (
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
  username varchar(15) NOT NULL default '' COMMENT '会员名',
  `options` text NOT NULL default '' COMMENT '选项 \t 分隔',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '发表时间',
  KEY tid (tid),
  KEY uid (uid, dateline)
) ENGINE=MyISAM COMMENT='投票用户表';



CREATE TABLE pre_forum_polloption (
  polloptionid int(10) unsigned NOT NULL auto_increment COMMENT '选项id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  votes mediumint(8) unsigned NOT NULL default '0' COMMENT '票数',
  displayorder tinyint(3) NOT NULL default '0' COMMENT '显示顺序',
  polloption varchar(80) NOT NULL default '' COMMENT '选项内容',
  voterids mediumtext NOT NULL COMMENT '投票人id',
  PRIMARY KEY  (polloptionid),
  KEY tid (tid,displayorder)
) ENGINE=MyISAM COMMENT='投票选项表' ;



CREATE TABLE pre_forum_post (
  pid int(10) unsigned NOT NULL auto_increment COMMENT '帖子id',
  fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
  tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
  `first` tinyint(1) NOT NULL default '0' COMMENT '是否是首贴',
  author varchar(15) NOT NULL default '' COMMENT '作者姓名',
  authorid mediumint(8) unsigned NOT NULL default '0' COMMENT '作者id',
  `subject` varchar(80) NOT NULL default '' COMMENT '标题',
  dateline int(10) unsigned NOT NULL default '0' COMMENT '发表时间',
  message mediumtext NOT NULL COMMENT '消息',
  useip varchar(15) NOT NULL default '' COMMENT '发帖者IP',
  invisible tinyint(1) NOT NULL default '0' COMMENT '是否通过审核',
  anonymous tinyint(1) NOT NULL default '0' COMMENT '是否匿名',
  usesig tinyint(1) NOT NULL default '0' COMMENT '是否启用签名',
  htmlon tinyint(1) NOT NULL default '0' COMMENT '是否允许HTML',
  bbcodeoff tinyint(1) NOT NULL default '0' COMMENT '是否关闭BBCODE',
  smileyoff tinyint(1) NOT NULL default '0' COMMENT '是否关闭表情',
  parseurloff tinyint(1) NOT NULL default '0' COMMENT '是否允许粘贴URL',
  attachment tinyint(1) NOT NULL default '0' COMMENT '附件',
  rate smallint(6) NOT NULL default '0' COMMENT '评分分数',
  ratetimes tinyint(3) unsigned NOT NULL default '0' COMMENT '评分次数',
  `status` tinyint(1) NOT NULL default '0' COMMENT '帖子状态',
  tags varchar(255) NOT NULL default '0' COMMENT '新增字段,用于存放tag',
  `comment` tinyint(1) NOT NULL default '0' COMMENT '是否存在点评',
  replycredit smallint(6) NOT NULL default '0' COMMENT '回帖获得积分记录',
  PRIMARY KEY  (pid),
  KEY fid (fid),
  KEY authorid (authorid),
  KEY dateline (dateline),
  KEY invisible (invisible),
  KEY displayorder (tid,invisible,dateline),
  KEY `first` (tid,`first`)
) ENGINE=MyISAM COMMENT='帖子表' ;



CREATE TABLE pre_forum_postcomment (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tid` mediumint(8) unsigned NOT NULL default '0' COMMENT '主题ID',
  `pid` int(10) unsigned NOT NULL default '0' COMMENT '帖子ID',
  `author` varchar(15) NOT NULL default '' COMMENT '作者',
  `authorid` mediumint(8) NOT NULL default '0' COMMENT '作者ID x1.5以后:0为游客 -1为观点',
  `dateline` int(10) unsigned NOT NULL default '0' COMMENT '时间',
  `comment` varchar(255) NOT NULL default '' COMMENT '点评内容',
  `score` tinyint(1) NOT NULL default '0' COMMENT '是否包含点评观点',
  `useip` varchar(15) NOT NULL default '' COMMENT '发帖者IP',
  `rpid` int(10) unsigned NOT NULL default '0' COMMENT '关联的帖子ID',
  PRIMARY KEY (`id`),
  KEY `tid` (`tid`),
  KEY authorid (authorid),
  KEY score (score),
  KEY rpid (rpid),
  KEY `pid` (`pid`,`dateline`)
) ENGINE=MyISAM COMMENT='点评帖子表' ;

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值