CREATE TABLE pre_forum_post_tableid (
`pid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Post ID',
PRIMARY KEY (`pid`)
) ENGINE=MyISAM COMMENT='post分表协调表' ;
CREATE TABLE pre_forum_postposition (
`tid` mediumint(8) unsigned NOT NULL,
`position` int(10) unsigned NOT NULL AUTO_INCREMENT,
`pid` int(10) unsigned NOT NULL,
PRIMARY KEY (`tid`,`position`),
KEY `pid` (`pid`)
) ENGINE=MyISAM COMMENT='抢楼帖楼层记录表';
CREATE TABLE pre_forum_poststick (
`tid` mediumint(8) unsigned NOT NULL,
`pid` int(10) unsigned NOT NULL,
`position` int(10) unsigned NOT NULL,
`dateline` int(10) unsigned NOT NULL,
PRIMARY KEY (`tid`,`pid`),
KEY `dateline` (`tid`,`dateline`)
) ENGINE=MyISAM COMMENT='回帖置顶表';
CREATE TABLE pre_forum_promotion (
ip char(15) NOT NULL default '' COMMENT 'IP地址',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
username char(15) NOT NULL default '' COMMENT '会员名',
PRIMARY KEY (ip)
) ENGINE=MyISAM COMMENT='论坛推广';
CREATE TABLE pre_forum_ratelog (
pid int(10) unsigned NOT NULL default '0' COMMENT '帖子id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
username char(15) NOT NULL default '' COMMENT '会员名',
extcredits tinyint(1) unsigned NOT NULL default '0' COMMENT '评分字段',
dateline int(10) unsigned NOT NULL default '0' COMMENT '评分时间',
score smallint(6) NOT NULL default '0' COMMENT '分数',
reason char(40) NOT NULL default '' COMMENT '操作理由',
KEY pid (pid,dateline),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='帖子评分记录表';
CREATE TABLE pre_forum_relatedthread (
tid mediumint(8) NOT NULL default '0' COMMENT '主题id',
`type` enum('general','trade') NOT NULL default 'general' COMMENT '关键词类型',
expiration int(10) NOT NULL default '0' COMMENT '过期时间',
keywords varchar(255) NOT NULL default '' COMMENT '关键字',
relatedthreads text NOT NULL COMMENT '相关主题序列',
PRIMARY KEY (tid,`type`)
) ENGINE=MyISAM COMMENT='相关主题表';
CREATE TABLE pre_forum_rsscache (
lastupdate int(10) unsigned NOT NULL default '0' COMMENT '最后更新时间',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '论坛id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '发表时间',
forum char(50) NOT NULL default '' COMMENT '论坛名称',
author char(15) NOT NULL default '' COMMENT '作者',
`subject` char(80) NOT NULL default '' COMMENT '标题',
description char(255) NOT NULL default '' COMMENT '解释说明',
UNIQUE KEY tid (tid),
KEY fid (fid,dateline)
) ENGINE=MyISAM COMMENT='rss缓存表';
CREATE TABLE pre_forum_replycredit (
tid mediumint(6) unsigned NOT NULL COMMENT '主题tid',
extcredits mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT '单次回复奖励额度',
extcreditstype tinyint(1) NOT NULL DEFAULT '0' COMMENT '本规则下奖励积分的类型',
times smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '回复奖励次数',
membertimes smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '单个用户参与次数',
random tinyint(1) NOT NULL DEFAULT '0' COMMENT '用户设置的回帖奖励几率',
PRIMARY KEY (tid)
) ENGINE=MyISAM COMMENT='主题回帖获得积分规则表' ;
CREATE TABLE pre_common_searchindex (
searchid int(10) unsigned NOT NULL auto_increment COMMENT '缓存id',
srchmod tinyint(3) unsigned NOT NULL COMMENT 'mod模块',
keywords varchar(255) NOT NULL default '' COMMENT '关键字',
searchstring text NOT NULL COMMENT '查找字符串',
useip varchar(15) NOT NULL default '' COMMENT '搜索人IP',
uid mediumint(10) unsigned NOT NULL default '0' COMMENT '会员id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '搜索时间',
expiration int(10) unsigned NOT NULL default '0' COMMENT '过期时间',
threadsortid smallint(6) unsigned NOT NULL default '0' COMMENT '分类信息id',
num smallint(6) unsigned NOT NULL default '0' COMMENT '主题数量',
ids text NOT NULL COMMENT '主题id序列',
PRIMARY KEY (searchid),
KEY srchmod (srchmod)
) ENGINE=MyISAM COMMENT='搜索缓存表' ;
CREATE TABLE pre_common_sphinxcounter (
`indexid` tinyint(1) NOT NULL,
`maxid` int(10) NOT NULL,
PRIMARY KEY (`indexid`)
) ENGINE=MyISAM COMMENT='Sphinx 增量索引记录表';
CREATE TABLE pre_forum_spacecache (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户 uid',
variable varchar(20) NOT NULL COMMENT '缓存变量的名称',
`value` text NOT NULL COMMENT '缓存变量的值',
expiration int(10) unsigned NOT NULL default '0' COMMENT '过期时间',
PRIMARY KEY (uid,variable)
) ENGINE=MyISAM COMMENT='minispace缓存表';
CREATE TABLE pre_forum_statlog (
`logdate` date NOT NULL COMMENT '日志日期',
`fid` mediumint(8) unsigned NOT NULL COMMENT '版块ID',
`type` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '记录类型 `value` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '记录值',
PRIMARY KEY (`logdate`,`fid`)
) ENGINE=MyISAM COMMENT='版块统计日志表';
CREATE TABLE pre_common_task (
taskid smallint(6) unsigned NOT NULL auto_increment COMMENT '任务id',
relatedtaskid smallint(6) unsigned NOT NULL default '0' COMMENT '依存任务id\n必须完成依存任务才能申请该任务',
available tinyint(1) NOT NULL default '0' COMMENT '是否启用',
`name` varchar(50) NOT NULL default '' COMMENT '任务名称',
description text NOT NULL COMMENT '任务描述',
icon varchar(150) NOT NULL default '' COMMENT '任务图标',
applicants mediumint(8) unsigned NOT NULL default '0' COMMENT '已申请任务人次',
achievers mediumint(8) unsigned NOT NULL default '0' COMMENT '已完成任务人次',
tasklimits mediumint(8) unsigned NOT NULL default '0' COMMENT '允许申请并完成该任务的人次上限',
applyperm text NOT NULL COMMENT '允许申请任务的用户组id, 格式:
1
2
3',
scriptname varchar(50) NOT NULL default '' COMMENT '任务脚本文件名',
starttime int(10) unsigned NOT NULL default '0' COMMENT '任务上线时间',
endtime int(10) unsigned NOT NULL default '0' COMMENT '任务下线时间',
period int(10) unsigned NOT NULL default '0' COMMENT '任务周期 单位:小时 默认为0表示一次性任务 设置为24即1天表示日常任务',
periodtype tinyint(1) NOT NULL default '0' COMMENT '任务间隔周期单位 0:小时 1:天 2:周 3:月',
reward enum('credit','magic','medal','invite','group') NOT NULL default 'credit' COMMENT '奖励类型\n(credit:积分 magic:道具 medal:勋章 invite:邀请码 group:特殊用户组)',
prize varchar(15) NOT NULL default '' COMMENT '奖品: 哪一个扩展积分, 道具id, 勋章id,邀请码有效期, 特殊用户组id',
bonus int(10) NOT NULL default '0' COMMENT '奖品数量/有效期: \n积分数量, 道具数量, 勋章有效期, 邀请码数量,特殊用户组有效期',
displayorder smallint(6) unsigned NOT NULL default '0' COMMENT '显示顺序',
version varchar(15) NOT NULL default '' COMMENT '任务脚本版本号',
PRIMARY KEY (taskid)
) ENGINE=MyISAM COMMENT='论坛任务表';
CREATE TABLE pre_common_taskvar (
taskvarid mediumint(8) unsigned NOT NULL auto_increment COMMENT '任务变量id',
taskid smallint(6) unsigned NOT NULL default '0' COMMENT '任务id',
sort enum('apply','complete') NOT NULL default 'complete' COMMENT '变量类别\n(apply:申请任务条件 complete:完成任务条件)',
`name` 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 '变量值',
PRIMARY KEY (taskvarid),
KEY taskid (taskid)
) ENGINE=MyISAM COMMENT='论坛任务设置表' ;
CREATE TABLE pre_forum_thread (
tid mediumint(8) unsigned NOT NULL auto_increment COMMENT '主题id',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '上级论坛',
posttableid smallint(6) unsigned NOT NULL default '0' COMMENT '帖子表ID',
typeid smallint(6) unsigned NOT NULL default '0' COMMENT '主题分类id',
sortid smallint(6) unsigned NOT NULL default '0' COMMENT '分类信息id',
readperm tinyint(3) unsigned NOT NULL default '0' COMMENT '阅读权限',
price smallint(6) NOT NULL default '0' COMMENT '价格',
author char(15) NOT NULL default '' COMMENT '会员名',
authorid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
`subject` char(80) NOT NULL default '' COMMENT '标题',
dateline int(10) unsigned NOT NULL default '0' COMMENT '发表时间',
lastpost int(10) unsigned NOT NULL default '0' COMMENT '最后发表',
lastposter char(15) NOT NULL default '' COMMENT '最后发表人id',
views int(10) unsigned NOT NULL default '0' COMMENT '浏览次数',
replies mediumint(8) unsigned NOT NULL default '0' COMMENT '回复次数',
displayorder tinyint(1) NOT NULL default '0' COMMENT '显示顺序',
highlight tinyint(1) NOT NULL default '0' COMMENT '是否高亮',
digest tinyint(1) NOT NULL default '0' COMMENT '是否精华',
rate tinyint(1) NOT NULL default '0' COMMENT '是否评分',
special tinyint(1) NOT NULL default '0' COMMENT '特殊主题',
attachment tinyint(1) NOT NULL default '0' COMMENT '附件,0无附件 1普通附件 2有图片附件',
moderated tinyint(1) NOT NULL default '0' COMMENT '是否被管理员改动',
closed mediumint(8) unsigned NOT NULL default '0' COMMENT '是否关闭',
stickreply tinyint(1) unsigned NOT NULL default '0' COMMENT '是否有回帖置顶',
recommends smallint(6) NOT NULL default '0' COMMENT '推荐指数',
recommend_add smallint(6) NOT NULL default '0' COMMENT '支持人数',
recommend_sub smallint(6) NOT NULL default '0' COMMENT '反对人数',
heats int(10) unsigned NOT NULL default '0' COMMENT '主题热度值',
status smallint (6) unsigned NOT NULL default '0' ,
isgroup tinyint(1) NOT NULL default '0' COMMENT '是否为群组帖子',
favtimes mediumint(8) NOT NULL default '0' COMMENT '主题收藏次数',
sharetimes mediumint(8) NOT NULL default '0' COMMENT '主题分享次数',
`stamp` tinyint(3) NOT NULL default '-1' COMMENT '主题图章',
`icon` tinyint(3) NOT NULL default '-1' COMMENT '主题图标',
pushedaid mediumint(8) NOT NULL default '0' COMMENT '被推送到的文章aid',
cover smallint(6) NOT NULL default '0' COMMENT '主题封面 负数:远程 正数:本地 0:无封面',
replycredit smallint(6) NOT NULL default '0' COMMENT '回帖奖励积分主题记录积分值',
PRIMARY KEY (tid),
KEY digest (digest),
KEY sortid (sortid),
KEY displayorder (fid,displayorder,lastpost),
KEY typeid (fid,typeid,displayorder,lastpost),
KEY recommends (recommends),
KEY heats (heats),
KEY authorid (authorid),
KEY isgroup (isgroup, lastpost),
KEY special (special)
) ENGINE=MyISAM COMMENT='主题表' ;
CREATE TABLE pre_forum_threadmod (
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
username char(15) NOT NULL default '' COMMENT '会员名',
dateline int(10) unsigned NOT NULL default '0' COMMENT '操作时间',
expiration int(10) unsigned NOT NULL default '0' COMMENT '有效时间',
`action` char(5) NOT NULL default '' COMMENT '操作',
`status` tinyint(1) NOT NULL default '0' COMMENT '状态',
magicid smallint(6) unsigned NOT NULL COMMENT '使用道具id',
`stamp` TINYINT(3) NOT NULL,
reason char(40) NOT NULL DEFAULT '',
KEY tid (tid,dateline),
KEY expiration (expiration,`status`)
) ENGINE=MyISAM COMMENT='主题管理记录表';
CREATE TABLE pre_forum_threadpartake (
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 '参与时间',
KEY tid (tid,uid)
) ENGINE=MyISAM COMMENT='主题参与者记录表';
CREATE TABLE pre_forum_threadrush (
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '主题id',
stopfloor 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 '结束时间',
rewardfloor varchar(255) NOT NULL default '' COMMENT '奖励楼层',
PRIMARY KEY (tid)
) ENGINE=MyISAM COMMENT='抢楼设置表';
CREATE TABLE pre_forum_threadtype (
typeid smallint(6) unsigned NOT NULL auto_increment COMMENT '主题分类id',
`fid` mediumint(8) unsigned NOT NULL DEFAULT '0',
displayorder smallint(6) NOT NULL default '0' COMMENT '显示顺序',
`name` varchar(255) NOT NULL default '' COMMENT '名称',
description varchar(255) NOT NULL default '' COMMENT '解释说明',
`icon` varchar(255) NOT NULL default '' COMMENT '分类图标URL',
special smallint(6) NOT NULL default '0' COMMENT '分类状态',
modelid smallint(6) unsigned NOT NULL default '0' COMMENT '分类模型id',
expiration tinyint(1) NOT NULL default '0' COMMENT '分类有效期',
template text NOT NULL COMMENT '分类信息内容模板',
stemplate text NOT NULL COMMENT '分类信息主题模板',
ptemplate text NOT NULL COMMENT '分类信息发帖模板',
btemplate text NOT NULL COMMENT '分类信息模块调用模板',
PRIMARY KEY (typeid)
) ENGINE=MyISAM COMMENT='主题分类表' ;
CREATE TABLE pre_forum_trade (
tid mediumint(8) unsigned NOT NULL COMMENT '主题id',
pid int(10) unsigned NOT NULL COMMENT '帖子id',
typeid smallint(6) unsigned NOT NULL COMMENT '主题分类id',
sellerid mediumint(8) unsigned NOT NULL COMMENT '卖家id',
seller char(15) NOT NULL COMMENT '卖家名',
account char(50) NOT NULL COMMENT '卖家帐号',
tenpayaccount char(20) NOT NULL default '' COMMENT '卖家财付通账号',
`subject` char(100) NOT NULL COMMENT '标题',
price decimal(8,2) NOT NULL COMMENT '价格',
amount smallint(6) unsigned NOT NULL default '1' COMMENT '数量',
quality tinyint(1) unsigned NOT NULL default '0' COMMENT '成色',
locus char(20) NOT NULL COMMENT '所在地',
transport tinyint(1) NOT NULL default '0' COMMENT '物流方式',
ordinaryfee smallint(4) unsigned NOT NULL default '0' COMMENT '平邮附加费',
expressfee smallint(4) unsigned NOT NULL default '0' COMMENT '快递附加费',
emsfee smallint(4) unsigned NOT NULL default '0' COMMENT 'EMS附加费',
itemtype tinyint(1) NOT NULL default '0' COMMENT '商品类型',
dateline int(10) unsigned NOT NULL default '0' COMMENT '交易时间',
expiration int(10) unsigned NOT NULL default '0' COMMENT '过期时间',
lastbuyer char(15) NOT NULL COMMENT '最后买家用户名',
lastupdate int(10) unsigned NOT NULL default '0' COMMENT '最后交易时间',
totalitems smallint(5) unsigned NOT NULL default '0' COMMENT '总交易量',
tradesum decimal(8,2) NOT NULL default '0.00' COMMENT '总交易额',
closed tinyint(1) NOT NULL default '0' COMMENT '是否关闭',
aid mediumint(8) unsigned NOT NULL COMMENT '商品图片的 Aid',
displayorder tinyint(1) NOT NULL COMMENT '显示顺序',
costprice decimal(8,2) NOT NULL COMMENT '商品原价',
credit int(10) unsigned NOT NULL default '0' COMMENT '积分价格',
costcredit int(10) unsigned NOT NULL default '0' COMMENT '积分原价',
credittradesum int(10) unsigned NOT NULL default '0' COMMENT '总积分交易额',
PRIMARY KEY (tid,pid),
KEY pid (pid),
KEY sellerid (sellerid),
KEY totalitems (totalitems),
KEY tradesum (tradesum),
KEY displayorder (tid,displayorder),
KEY sellertrades (sellerid,tradesum,totalitems),
KEY typeid (typeid),
KEY credittradesum (credittradesum),
KEY expiration (expiration)
) ENGINE=MyISAM COMMENT='商品数据表';
CREATE TABLE pre_forum_threadclass (
`typeid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类ID',
`fid` mediumint(8) unsigned NOT NULL COMMENT '所属版块ID',
`name` varchar(255) NOT NULL COMMENT '分类名称',
`displayorder` mediumint(9) NOT NULL COMMENT '显示顺序',
`icon` varchar(255) NOT NULL COMMENT '分类图标URL',
`moderators` tinyint(1) NOT NULL default '0' COMMENT '仅管理者可用',
PRIMARY KEY (`typeid`),
KEY fid (fid, displayorder)
) ENGINE=MyISAM COMMENT='主题分类表';
CREATE TABLE pre_forum_tradecomment (
id mediumint(8) NOT NULL auto_increment COMMENT 'id',
orderid char(32) NOT NULL COMMENT '订单 id',
pid int(10) unsigned NOT NULL COMMENT '帖子 id',
`type` tinyint(1) NOT NULL COMMENT '类型',
raterid mediumint(8) unsigned NOT NULL COMMENT '评价方会员id',
rater char(15) NOT NULL COMMENT '评价方用户名',
rateeid mediumint(8) unsigned NOT NULL COMMENT '被评价方会员id',
ratee char(15) NOT NULL COMMENT '被评价方用户名',
message char(200) NOT NULL COMMENT '评价内容',
explanation char(200) NOT NULL COMMENT '解释',
score tinyint(1) NOT NULL COMMENT '评分',
dateline int(10) unsigned NOT NULL COMMENT '评价时间',
PRIMARY KEY (id),
KEY raterid (raterid,`type`,dateline),
KEY rateeid (rateeid,`type`,dateline),
KEY orderid (orderid)
) ENGINE=MyISAM COMMENT='信用评价' ;
CREATE TABLE pre_forum_tradelog (
tid mediumint(8) unsigned NOT NULL COMMENT '主题id',
pid int(10) unsigned NOT NULL COMMENT '帖子id',
orderid varchar(32) NOT NULL COMMENT '订单号id',
tradeno varchar(32) NOT NULL COMMENT '支付宝订单号',
paytype tinyint(1) unsigned NOT NULL default '0' COMMENT '在线支付方式',
`subject` varchar(100) NOT NULL COMMENT '标题',
price decimal(8,2) NOT NULL default '0.00' COMMENT '价格',
quality tinyint(1) unsigned NOT NULL default '0' COMMENT '成色',
itemtype tinyint(1) NOT NULL default '0' COMMENT '商品类型',
number smallint(5) unsigned NOT NULL default '0' COMMENT '数量',
tax decimal(6,2) unsigned NOT NULL default '0.00' COMMENT '交易手续费',
locus varchar(100) NOT NULL COMMENT '物品所在地',
sellerid mediumint(8) unsigned NOT NULL COMMENT '卖家id',
seller varchar(15) NOT NULL COMMENT '卖家名',
selleraccount varchar(50) NOT NULL COMMENT '卖家交易帐号',
tenpayaccount varchar(20) NOT NULL default '0' COMMENT '卖家财付通账号',
buyerid mediumint(8) unsigned NOT NULL COMMENT '买家id',
buyer varchar(15) NOT NULL COMMENT '买家名',
buyercontact varchar(50) NOT NULL COMMENT '买家联系方式',
buyercredits smallint(5) unsigned NOT NULL default '0' COMMENT '买家暂扣积分',
buyermsg varchar(200) default NULL COMMENT '买家留言',
`status` tinyint(1) NOT NULL default '0' COMMENT '状态',
lastupdate int(10) unsigned NOT NULL default '0' COMMENT '状态最后更新',
offline tinyint(1) NOT NULL default '0' COMMENT '是否离线交易',
buyername varchar(50) NOT NULL COMMENT '买家姓名',
buyerzip varchar(10) NOT NULL COMMENT '买家邮编',
buyerphone varchar(20) NOT NULL COMMENT '买家电话',
buyermobile varchar(20) NOT NULL COMMENT '买家手机',
transport tinyint(1) NOT NULL default '0' COMMENT '运输方式',
transportfee smallint(6) unsigned NOT NULL default '0' COMMENT '运输费用',
baseprice decimal(8,2) NOT NULL COMMENT '商品原价',
discount tinyint(1) NOT NULL default '0' COMMENT '折扣',
ratestatus tinyint(1) NOT NULL default '0' COMMENT '评价状态',
message text NOT NULL COMMENT '订单留言',
credit int(10) unsigned NOT NULL default '0' COMMENT '积分价格',
basecredit int(10) unsigned NOT NULL default '0' COMMENT '积分原价',
UNIQUE KEY orderid (orderid),
KEY sellerid (sellerid),
KEY buyerid (buyerid),
KEY `status` (`status`),
KEY buyerlog (buyerid,`status`,lastupdate),
KEY sellerlog (sellerid,`status`,lastupdate),
KEY tid (tid,pid),
KEY pid (pid)
) ENGINE=MyISAM COMMENT='交易记录表';
CREATE TABLE pre_forum_typeoption (
optionid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类信息项目ID',
classid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '分类信息上级项目ID',
displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '分类信息排序',
expiration tinyint(1) NOT NULL COMMENT '分类信息项目是否受有效期限制',
protect varchar(255) NOT NULL COMMENT '分类信息项目是否是保护项目',
title varchar(255) NOT NULL DEFAULT '' COMMENT '分类信息项目标题',
description varchar(255) NOT NULL DEFAULT '' COMMENT '分类信息项目描述',
identifier varchar(255) NOT NULL DEFAULT '' COMMENT '分类信息项目标识',
`type` varchar(255) NOT NULL DEFAULT '' COMMENT '分类信息项目类型',
unit varchar(255) NOT NULL COMMENT '分类信息项目单位',
rules mediumtext NOT NULL COMMENT '分类信息项目规则',
PRIMARY KEY (optionid),
KEY classid (classid)
) ENGINE=MyISAM COMMENT='分类信息设置项目表' ;
CREATE TABLE pre_forum_typeoptionvar (
sortid smallint(6) unsigned NOT NULL default '0' COMMENT '分类信息id',
tid mediumint(8) unsigned NOT NULL default '0' COMMENT '分类信息数据对应帖子id',
fid mediumint(8) unsigned NOT NULL default '0' COMMENT '分类信息数据对应帖子板块id',
optionid smallint(6) unsigned NOT NULL default '0' COMMENT '分类信息数据对应选项id',
expiration int(10) unsigned NOT NULL default '0' COMMENT '分类信息数据有效期',
`value` mediumtext NOT NULL COMMENT '分类信息数据数值',
KEY sortid (sortid),
KEY tid (tid),
KEY fid (fid)
) ENGINE=MyISAM COMMENT='分类信息项目数据表';
CREATE TABLE pre_forum_typevar (
sortid smallint(6) NOT NULL default '0' COMMENT '分类信息id',
optionid smallint(6) NOT NULL default '0' COMMENT '分类信息对应项目id',
available tinyint(1) NOT NULL default '0' COMMENT '分类信息对应项目是否可用',
required tinyint(1) NOT NULL default '0' COMMENT '分类信息对应项目是否必填',
unchangeable tinyint(1) NOT NULL default '0' COMMENT '分类信息对应项目是否可修改',
search tinyint(1) NOT NULL default '0' COMMENT '分类信息对应项目是否可搜索',
displayorder tinyint(3) NOT NULL default '0' COMMENT '分类信息对应项目顺序',
subjectshow TINYINT(1) NOT NULL DEFAULT '0',
UNIQUE KEY optionid (sortid,optionid),
KEY sortid (sortid)
) ENGINE=MyISAM COMMENT='分类信息对应项目表';
CREATE TABLE pre_forum_warning (
wid smallint(6) unsigned NOT NULL auto_increment COMMENT '记录id',
pid int(10) unsigned NOT NULL COMMENT '帖子 pid',
operatorid mediumint(8) unsigned NOT NULL COMMENT '警告者 Uid',
operator char(15) NOT NULL COMMENT '警告者用户名',
authorid mediumint(8) unsigned NOT NULL COMMENT '被警告者 uid',
author char(15) NOT NULL COMMENT '被警告者用户名',
dateline int(10) unsigned NOT NULL COMMENT '警告时间',
reason char(40) NOT NULL COMMENT '警告原因',
PRIMARY KEY (wid),
UNIQUE KEY pid (pid),
KEY authorid (authorid)
) ENGINE=MyISAM COMMENT='警告记录表' ;
CREATE TABLE pre_home_album (
albumid mediumint(8) unsigned NOT NULL auto_increment COMMENT '相册ID ',
albumname varchar(50) NOT NULL default '' COMMENT '相册名字',
catid smallint(6) unsigned NOT NULL default '0' COMMENT '相册系统分类',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '相册用户ID ',
username varchar(15) NOT NULL default '' COMMENT '相册用户名',
dateline int(10) unsigned NOT NULL default '0' COMMENT '相册建立时间戳',
updatetime int(10) unsigned NOT NULL default '0' COMMENT '相册最后修改时间戳',
picnum smallint(6) unsigned NOT NULL default '0' COMMENT '相册照片数量',
pic varchar(60) NOT NULL default '' COMMENT '相册封面照片',
picflag tinyint(1) NOT NULL default '0' COMMENT '相册是否有图片',
friend tinyint(1) NOT NULL default '0' COMMENT '相册隐私设置:"0"全站用户可见,"1"为全好友可见,"2"为仅指定的好友可见,"3"为仅自己可见,"4"为凭密码查看 ',
`password` varchar(10) NOT NULL default '' COMMENT '相册密码',
target_ids text NOT NULL COMMENT '允许查看相册的用户ID,多个用户ID用"m"间隔 ',
favtimes mediumint(8) unsigned NOT NULL COMMENT '相册收藏次数',
sharetimes mediumint(8) unsigned NOT NULL COMMENT '相册分享次数',
depict text NOT NULL COMMENT '相册描述 ',
PRIMARY KEY (albumid),
KEY uid (uid,updatetime),
KEY updatetime (updatetime)
) ENGINE=MyISAM COMMENT='相册表';
CREATE TABLE pre_home_appcreditlog (
logid mediumint(8) unsigned NOT NULL auto_increment COMMENT '序列id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户id',
appid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户名',
appname varchar(60) NOT NULL default '' COMMENT '应用名称',
`type` tinyint(1) NOT NULL default '0' COMMENT '积分转入转出类型',
credit mediumint(8) unsigned NOT NULL default '0' COMMENT '积分数',
note text NOT NULL COMMENT '备注',
dateline int(10) unsigned NOT NULL default '0' COMMENT '操作时间',
PRIMARY KEY (logid),
KEY uid (uid,dateline),
KEY appid (appid)
) ENGINE=MyISAM;
CREATE TABLE pre_home_blacklist (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户ID ',
buid mediumint(8) unsigned NOT NULL default '0' COMMENT '被屏蔽的用户ID ',
dateline int(10) unsigned NOT NULL default '0' COMMENT '被屏蔽的时间戳',
PRIMARY KEY (uid,buid),
KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='屏蔽黑名单表';
CREATE TABLE pre_common_block (
bid mediumint(8) unsigned NOT NULL auto_increment COMMENT '模块ID',
blockclass varchar(255) NOT NULL default '0' COMMENT '模块分类 article/pic/member/board/poll',
blocktype tinyint(1) NOT NULL default '0' COMMENT '调用类型 0为模板调用 1为js调用',
`name` varchar(255) NOT NULL default '' COMMENT '模块标名称',
title text NOT NULL COMMENT '模块标题名',
classname varchar(255) NOT NULL default '' COMMENT '指定样式class',
summary text NOT NULL COMMENT '模块自定义内容',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '创建者用户ID ',
username varchar(255) NOT NULL default '' COMMENT '创建者用户名',
styleid smallint(6) unsigned NOT NULL default '0' COMMENT '模块风格ID',
blockstyle text NOT NULL COMMENT '自定义风格',
picwidth smallint(6) unsigned NOT NULL default '0' COMMENT '显示图片长度',
picheight smallint(6) unsigned NOT NULL default '0' COMMENT '显示图片宽度',
target varchar(255) NOT NULL default '' COMMENT '模块链接打开方式: _blank, _self, _top',
dateformat varchar(255) NOT NULL default '' COMMENT '时间格式: H:i; u; Y-m-d等',
dateuformat tinyint(1) NOT NULL default '0' COMMENT '是否使用个性化时间格式',
script varchar(255) NOT NULL default '' COMMENT '模块获取数据脚本名',
param text NOT NULL COMMENT '模块参数配置序列化存储',
shownum smallint(6) unsigned NOT NULL default '0' COMMENT '获取数据数目',
cachetime int(10) NOT NULL default '0' COMMENT '模块缓存更新时间间隔',
punctualupdate tinyint(1) NOT NULL default '0' COMMENT '是否严格按照缓存时间更新(忽略优化)',
hidedisplay tinyint(1) NOT NULL default '0' COMMENT '是否屏蔽输出',
dateline int(10) unsigned NOT NULL default '0' COMMENT '模块缓存创建时间戳',
notinherited tinyint(1) NOT NULL default '0' COMMENT '是否继承所在页面权限',
isblank tinyint(1) NOT NULL default '0' COMMENT '是否为空白模块,只显示准送数据',
PRIMARY KEY (bid)
) ENGINE=MyISAM COMMENT='模块表';
CREATE TABLE pre_common_block_style (
styleid smallint(6) unsigned NOT NULL auto_increment COMMENT '模块样式ID',
blockclass varchar(255) NOT NULL default '' COMMENT '模块分类',
`name` varchar(255) NOT NULL default '' COMMENT '样式名称',
template text NOT NULL COMMENT '样式模板',
`hash` varchar(255) NOT NULL default '' COMMENT '样式hash(blockclass + template)',
getpic tinyint(1) NOT NULL default '0' COMMENT '是否需要获取pic数据',
getsummary tinyint(1) NOT NULL default '0' COMMENT '是否需要获取summary数据',
makethumb tinyint(1) NOT NULL default '0' COMMENT '是否需要block设置缩略图',
settarget tinyint(1) NOT NULL default '0' COMMENT '是否需要设置链接打开方式',
fields text NOT NULL COMMENT '模板中用到的模块分类字段',
PRIMARY KEY (styleid),
KEY `hash` (`hash`),
KEY `blockclass` (`blockclass`)
) ENGINE=MyISAM COMMENT='模块模板表';
CREATE TABLE pre_common_block_item (
itemid int(10) unsigned NOT NULL auto_increment COMMENT '信息ID',
bid mediumint(8) unsigned NOT NULL default '0' COMMENT '模块ID',
id int(10) unsigned NOT NULL default '0' COMMENT '来源ID',
idtype varchar(255) NOT NULL default '' COMMENT '来源ID TYPE',
itemtype tinyint(1) NOT NULL default '0' COMMENT '信息类型 0为自动 1为手工输入 2已编辑',
title varchar(255) NOT NULL default '' COMMENT '信息标题名',
url varchar(255) NOT NULL default '' COMMENT '信息链接地址',
pic varchar(255) NOT NULL default '' COMMENT '信息图片',
picflag tinyint(1) NOT NULL default '0' COMMENT '图片类型 0为url 1为本地 2 为ftp远程',
makethumb tinyint(1) NOT NULL default '0' COMMENT '是否已生成缩略图',
thumbpath varchar(255) NOT NULL default '' COMMENT '缩略图地址',
summary text NOT NULL COMMENT '信息摘要',
showstyle text NOT NULL COMMENT '显示样式',
related text NOT NULL COMMENT '相关链接',
`fields` text NOT NULL COMMENT '信息附属num/author/authorid/dateline',
displayorder smallint(6) NOT NULL default '0' COMMENT '显示顺序',
startdate int(10) unsigned NOT NULL default '0' COMMENT '开始时间戳',
enddate int(10) unsigned NOT NULL default '0' COMMENT '结束时间戳',
PRIMARY KEY (itemid),
KEY bid (bid)
) ENGINE=MyISAM COMMENT='模块数据表';
CREATE TABLE pre_common_block_pic (
picid int(10) unsigned NOT NULL auto_increment COMMENT '图片ID',
bid mediumint(8) unsigned NOT NULL default '0' COMMENT '模块ID',
itemid int(10) unsigned NOT NULL default '0' COMMENT '信息ID',
pic varchar(255) NOT NULL default '' COMMENT '信息图片',
picflag tinyint(1) NOT NULL default '0' COMMENT '图片类型 0为本地 1为ftp远程',
`type` tinyint(1) NOT NULL default '0' COMMENT '信息类型 0为模块缩略图 1为上传的图',
PRIMARY KEY (picid),
KEY bid (bid,itemid)
) ENGINE=MyISAM COMMENT='模块使用图片表';
CREATE TABLE pre_common_block_item_data (
dataid int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '推荐信息ID',
bid mediumint(8) unsigned NOT NULL default '0' COMMENT '模块ID',
id int(10) unsigned NOT NULL default '0' COMMENT '来源ID',
idtype varchar(255) NOT NULL default '' COMMENT '来源ID TYPE',
itemtype tinyint(1) NOT NULL default '0' COMMENT '信息类型 0为自动 1为手工输入 3推荐数据',
title varchar(255) NOT NULL default '' COMMENT '信息标题名',
url varchar(255) NOT NULL default '' COMMENT '信息链接地址',
pic varchar(255) NOT NULL default '' COMMENT '信息图片',
picflag tinyint(1) NOT NULL default '0' COMMENT '图片类型 0为url 1为本地 2 为ftp远程',
makethumb tinyint(1) NOT NULL default '0' COMMENT '是否已生成缩略图',
summary text NOT NULL COMMENT '信息摘要',
showstyle text NOT NULL COMMENT '显示样式',
related text NOT NULL COMMENT '相关链接',
`fields` text NOT NULL COMMENT '信息附属num/author/authorid/dateline',
displayorder smallint(6) NOT NULL default '0' COMMENT '显示顺序',
startdate int(10) unsigned NOT NULL default '0' COMMENT '开始时间戳',
enddate int(10) unsigned NOT NULL default '0' COMMENT '结束时间戳',
uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '推荐者 UID',
username varchar(255) NOT NULL DEFAULT '' COMMENT '推荐者用户名',
dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '推荐日期',
isverified tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否已通过审核',
verifiedtime int(10) unsigned NOT NULL DEFAULT '0' COMMENT '通过审核日期',
stickgrade tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '置顶等级: 0~10',
PRIMARY KEY (dataid),
KEY bid (bid, stickgrade, verifiedtime)
) ENGINE=MyISAM COMMENT '模块推荐信息表';
CREATE TABLE pre_common_block_xml (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'ID',
`name` varchar(255) NOT NULL COMMENT 'XML扩展 名称',
`version` varchar(255) NOT NULL COMMENT 'XML扩展 版本',
`url` varchar(255) NOT NULL COMMENT 'XML扩展 URL',
`clientid` varchar(255) NOT NULL COMMENT '客户端ID',
`key` varchar(255) NOT NULL COMMENT '通信密钥',
`signtype` varchar(255) NOT NULL COMMENT '签名的加密方式:目前只支持MD5方式,空为不使用签名,直接使用通信密钥',
`data` text NOT NULL COMMENT 'XML扩展 数据',
PRIMARY KEY (`id`)
) ENGINE=MyISAM COMMENT '模块 XML 扩展类数据表';
CREATE TABLE pre_common_block_favorite (
favid mediumint(8) unsigned NOT NULL auto_increment COMMENT '收藏id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '会员id',
bid mediumint(8) unsigned NOT NULL default '0' COMMENT '模块id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '收藏时间',
PRIMARY KEY (favid),
KEY uid (uid,dateline)
) ENGINE=MyISAM COMMENT='模块收藏表';
CREATE TABLE pre_home_blog (
blogid mediumint(8) unsigned NOT NULL auto_increment COMMENT '日志ID',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '日志所属用户ID ',
username char(15) NOT NULL default '' COMMENT '日志所属用户名',
`subject` char(80) NOT NULL default '' COMMENT '日志标题',
classid smallint(6) unsigned NOT NULL default '0' COMMENT '个人分类id',
catid smallint(6) unsigned NOT NULL default '0' COMMENT '系统分类id',
viewnum mediumint(8) unsigned NOT NULL default '0' COMMENT '日志查看数',
replynum mediumint(8) unsigned NOT NULL default '0' COMMENT '日志回复数',
hot mediumint(8) unsigned NOT NULL default '0' COMMENT '热度',
dateline int(10) unsigned NOT NULL default '0' COMMENT '日志发布时间',
picflag tinyint(1) NOT NULL default '0' COMMENT '日志是否有图片',
noreply tinyint(1) NOT NULL default '0' COMMENT '是否允许评论:"0"为允许,"1"为不允许 ',
friend tinyint(1) NOT NULL default '0' COMMENT '日志隐私设置:"0"为全站用户可见,"1"为全好友可见,"2"为仅指定的好友可见,"3"为仅自己可见,"4"为凭密码查看 ',
`password` char(10) NOT NULL default '' COMMENT '日志密码',
favtimes mediumint(8) unsigned NOT NULL default '0' COMMENT '日志收藏次数',
sharetimes mediumint(8) unsigned NOT NULL default '0' COMMENT '日志分享次数',
`status` tinyint(1) unsigned NOT NULL default '0' COMMENT 'blog状态 1-审核',
click1 smallint(6) unsigned NOT NULL default '0' COMMENT '表态1 id',
click2 smallint(6) unsigned NOT NULL default '0' COMMENT '表态2 id',
click3 smallint(6) unsigned NOT NULL default '0' COMMENT '表态3 id',
click4 smallint(6) unsigned NOT NULL default '0' COMMENT '表态4 id',
click5 smallint(6) unsigned NOT NULL default '0' COMMENT '表态5 id',
click6 smallint(6) unsigned NOT NULL default '0' COMMENT '表态6 id',
click7 smallint(6) unsigned NOT NULL default '0' COMMENT '表态7 id',
click8 smallint(6) unsigned NOT NULL default '0' COMMENT '表态8 id',
PRIMARY KEY (blogid),
KEY uid (uid,dateline),
KEY hot (hot),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='日志表';
CREATE TABLE pre_home_blogfield (
blogid mediumint(8) unsigned NOT NULL default '0' COMMENT '日志id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '日志所属用户ID ',
pic varchar(255) NOT NULL default '' COMMENT '标题图片',
tag varchar(255) NOT NULL default '' COMMENT '日志TAG ',
message mediumtext NOT NULL COMMENT '日志内容',
postip varchar(255) NOT NULL default '' COMMENT '发表日志的IP ',
related text NOT NULL COMMENT '相关日志的数据信息',
relatedtime int(10) unsigned NOT NULL default '0' COMMENT '相关日志产生时间戳',
target_ids text NOT NULL COMMENT '允许查看日志的用户ID多个ID以","间隔 ',
hotuser text NOT NULL COMMENT '热点用户',
magiccolor tinyint(6) NOT NULL default '0' COMMENT '道具彩色灯id',
magicpaper tinyint(6) NOT NULL default '0' COMMENT '道具信纸id',
pushedaid mediumint(8) NOT NULL default '0' COMMENT '被推送到的文章aid',
PRIMARY KEY (blogid)
) ENGINE=MyISAM COMMENT='日志字段表';
CREATE TABLE pre_home_class (
classid mediumint(8) unsigned NOT NULL auto_increment COMMENT '个人分类id',
classname char(40) NOT NULL default '' COMMENT '分类名称',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '分类所属用户ID ',
dateline int(10) unsigned NOT NULL default '0' COMMENT '分类创建时间戳',
PRIMARY KEY (classid),
KEY uid (uid)
) ENGINE=MyISAM;
CREATE TABLE pre_home_click (
clickid smallint(6) unsigned NOT NULL auto_increment COMMENT '表态ID',
`name` char(50) NOT NULL default '' COMMENT '表态名称',
icon char(100) NOT NULL default '' COMMENT '表态图标',
idtype char(15) NOT NULL default '' COMMENT '表态类型',
available tinyint(1) unsigned NOT NULL default '0' COMMENT '是否有效',
displayorder tinyint(6) unsigned NOT NULL default '0' COMMENT '排序',
PRIMARY KEY (clickid),
KEY idtype (idtype, displayorder)
) ENGINE=MyISAM COMMENT '表态动作';
CREATE TABLE pre_home_clickuser (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '表态用户id',
username varchar(15) NOT NULL default '' COMMENT '表态用户名',
id mediumint(8) unsigned NOT NULL default '0' COMMENT '作用对象id',
idtype varchar(15) NOT NULL default '' COMMENT '作用对象id类型',
clickid smallint(6) unsigned NOT NULL default '0' COMMENT '表态id',
dateline int(10) unsigned NOT NULL default '0' COMMENT '发表表态时间戳',
KEY id (id,idtype,dateline),
KEY uid (uid,idtype,dateline)
) ENGINE=MyISAM COMMENT='用户表态表';
CREATE TABLE pre_home_comment (
cid 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' COMMENT '评论对象id',
idtype varchar(20) NOT NULL default '' COMMENT '评论对象的id类型:blogid,picid,uid',
authorid mediumint(8) unsigned NOT NULL default '0' COMMENT '若为回复,回复作者用户ID ',
author varchar(15) NOT NULL default '' COMMENT '若为回复,回复作者用户名 ',
ip varchar(20) NOT NULL default '' COMMENT '评论IP ',
dateline int(10) unsigned NOT NULL default '0' COMMENT '评论时间戳',
message text NOT NULL COMMENT '评论内容',
magicflicker tinyint(1) NOT NULL default '0' COMMENT '是否使用了道具彩虹炫',
status tinyint(1) NOT NULL default '0' COMMENT '评论状态 1-审核',
PRIMARY KEY (cid),
KEY authorid (authorid,idtype),
KEY id (id,idtype,dateline)
) ENGINE=MyISAM COMMENT='用户评论表';
CREATE TABLE pre_home_docomment (
id int(10) unsigned NOT NULL auto_increment COMMENT '记录回复id',
upid int(10) unsigned NOT NULL default '0' COMMENT '上级记录回复id',
doid 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 '发布记录者用户名',
dateline int(10) unsigned NOT NULL default '0' COMMENT '记录回复时间戳',
message text NOT NULL COMMENT '记录回复内容',
ip varchar(20) NOT NULL default '' COMMENT '发布记录ip',
grade smallint(6) unsigned NOT NULL default '0' COMMENT '记录回复的层级',
PRIMARY KEY (id),
KEY doid (doid,dateline),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='用户记录回复表';
CREATE TABLE pre_home_doing (
doid mediumint(8) unsigned NOT NULL auto_increment COMMENT '记录id',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '记录发布者用户id',
username varchar(15) NOT NULL default '' COMMENT '记录发布者用户名',
`from` varchar(20) NOT NULL default '' COMMENT '记录的发表来源',
dateline int(10) unsigned NOT NULL default '0' COMMENT '记录发布时间戳',
message text NOT NULL COMMENT '记录内容',
ip varchar(20) NOT NULL default '' COMMENT '记录发布ip',
replynum int(10) unsigned NOT NULL default '0' COMMENT '记录回复数',
status tinyint(1) unsigned NOT NULL default '0' COMMENT '记录状态 1-审核',
PRIMARY KEY (doid),
KEY uid (uid,dateline),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='用户记录表';
CREATE TABLE pre_home_feed (
feedid int(10) unsigned NOT NULL auto_increment COMMENT 'feed的ID ',
appid smallint(6) unsigned NOT NULL default '0' COMMENT '应用程序ID ',
icon varchar(30) NOT NULL default '' COMMENT 'feed图标 ',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '产生feed的用户ID ',
username varchar(15) NOT NULL default '' COMMENT '产生feed的用户名 ',
dateline int(10) unsigned NOT NULL default '0' COMMENT 'feed产生时间戳 ',
friend tinyint(1) NOT NULL default '0' COMMENT '产生feed信息的隐私设置 ',
hash_template varchar(32) NOT NULL default '' COMMENT '模板hash:md5(title_template"\t"body_template) ',
hash_data varchar(32) NOT NULL default '' COMMENT '数据内容hash:md5(title_templat"\t"title_data"\t"body_template"\t"body_data) ',
title_template text NOT NULL COMMENT 'feed标题模板 ',
title_data text NOT NULL COMMENT 'feed标题 ',
body_template text NOT NULL COMMENT 'feed内容模板 ',
body_data text NOT NULL COMMENT 'feed内容 ',
body_general text NOT NULL COMMENT '用户填写的信息 ',
image_1 varchar(255) NOT NULL default '' COMMENT 'feed图1',
image_1_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接1',
image_2 varchar(255) NOT NULL default '' COMMENT 'feed图片2',
image_2_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接2',
image_3 varchar(255) NOT NULL default '' COMMENT 'feed图片3',
image_3_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接3',
image_4 varchar(255) NOT NULL default '' COMMENT 'feed图片4',
image_4_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接4',
target_ids text NOT NULL COMMENT '产生feed信息允许查看的好友ID ',
id mediumint(8) unsigned NOT NULL default '0' COMMENT 'feed对应对象id',
idtype varchar(15) NOT NULL default '' COMMENT 'feed对应对象类型',
hot mediumint(8) unsigned NOT NULL default '0' COMMENT '热度',
PRIMARY KEY (feedid),
KEY uid (uid,dateline),
KEY dateline (dateline),
KEY hot (hot),
KEY id (id,idtype)
) ENGINE=MyISAM COMMENT='站点feed表';
CREATE TABLE pre_home_feed_app (
feedid int(10) unsigned NOT NULL auto_increment COMMENT '应用feed id',
appid smallint(6) unsigned NOT NULL default '0' COMMENT '应用程序ID',
icon varchar(30) NOT NULL default '' COMMENT 'feed图标 ',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '产生feed的用户ID ',
username varchar(15) NOT NULL default '' COMMENT '产生feed的用户名 ',
dateline int(10) unsigned NOT NULL default '0' COMMENT 'feed产生时间戳 ',
friend tinyint(1) NOT NULL default '0' COMMENT '产生feed信息的隐私设置 ',
hash_template varchar(32) NOT NULL default '' COMMENT '模板hash:md5(title_template"\t"body_template) ',
hash_data varchar(32) NOT NULL default '' COMMENT '数据内容hash:md5(title_templat"\t"title_data"\t"body_template"\t"body_data) ',
title_template text NOT NULL COMMENT 'feed标题模板 ',
title_data text NOT NULL COMMENT 'feed标题 ',
body_template text NOT NULL COMMENT 'feed内容模板 ',
body_data text NOT NULL COMMENT 'feed内容 ',
body_general text NOT NULL COMMENT '用户填写的信息 ',
image_1 varchar(255) NOT NULL default '' COMMENT 'feed图1',
image_1_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接1',
image_2 varchar(255) NOT NULL default '' COMMENT 'feed图片2',
image_2_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接2',
image_3 varchar(255) NOT NULL default '' COMMENT 'feed图片3',
image_3_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接3',
image_4 varchar(255) NOT NULL default '' COMMENT 'feed图片4',
image_4_link varchar(255) NOT NULL default '' COMMENT 'feed图片链接4',
target_ids text NOT NULL COMMENT '产生feed信息允许查看的好友ID ',
PRIMARY KEY (feedid),
KEY uid (uid,dateline),
KEY dateline (dateline)
) ENGINE=MyISAM COMMENT='应该feed表';
CREATE TABLE pre_home_friend (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户ID ',
fuid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户好友ID ',
fusername varchar(15) NOT NULL default '' COMMENT '用户好友名',
gid smallint(6) unsigned NOT NULL default '0' COMMENT '好友所在的好友组ID ',
num mediumint(8) unsigned NOT NULL default '0' COMMENT '好友之间的任务关系数',
dateline int(10) unsigned NOT NULL default '0' COMMENT '加好友的时间戳',
note varchar(255) NOT NULL default '' COMMENT '好友备注',
PRIMARY KEY (uid,fuid),
KEY fuid (fuid),
KEY `uid` (uid,num,dateline)
) ENGINE=MyISAM COMMENT='用户好友表';
CREATE TABLE pre_home_friend_request (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户ID ',
fuid mediumint(8) unsigned NOT NULL default '0' COMMENT '被请求用户ID ',
fusername char(15) NOT NULL default '' COMMENT '被请求用户名称',
gid smallint(6) unsigned NOT NULL default '0' COMMENT '好友所在的好友组ID ',
note char(60) NOT NULL default '' COMMENT '申请附言',
dateline int(10) unsigned NOT NULL default '0' COMMENT '请求好友时间戳',
PRIMARY KEY (uid,fuid),
KEY fuid (fuid),
KEY `dateline` (uid, dateline)
) ENGINE=MyISAM COMMENT='申请好友表';
CREATE TABLE pre_home_friendlog (
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '用户ID ',
fuid mediumint(8) unsigned NOT NULL default '0' COMMENT '好友用户ID ',
`action` varchar(10) NOT NULL default '' COMMENT '好友动作:"add"添加,"update"更新 ',
dateline int(10) unsigned NOT NULL default '0' COMMENT '好友动作时间',
PRIMARY KEY (uid,fuid)
) ENGINE=MyISAM COMMENT='用户好友动作日志表';
CREATE TABLE pre_common_magiclog (
uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
magicid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '道具id',
action tinyint(1) NOT NULL DEFAULT '0' COMMENT '操作动作 1 购买 2 使用 3 赠送',
dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '操作时间',
amount smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '操作数量',
credit tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '操作积分',
price mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '操作价格',
`targetid` int(10) unsigned NOT NULL DEFAULT '0',
`idtype` char(6) DEFAULT NULL,
targetuid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '道具目标uid',
KEY uid (uid,dateline),
KEY `action` (`action`),
KEY targetuid (targetuid,dateline),
KEY magicid (magicid,dateline)
) ENGINE=MyISAM COMMENT='道具日志表';
CREATE TABLE pre_common_magic (
magicid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '道具id',
available tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否可用',
name varchar(50) NOT NULL COMMENT '名称',
identifier varchar(40) NOT NULL COMMENT '唯一标识',
description varchar(255) NOT NULL COMMENT '描述',
displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '顺序',
credit tinyint(1) NOT NULL DEFAULT '0' COMMENT '使用的积分',
price mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '价格',
num smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '数量',
salevolume smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '销售量',
supplytype tinyint(1) NOT NULL DEFAULT '0' COMMENT '自动补货类型',
supplynum smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '自动补货数量',
useperoid tinyint(1) NOT NULL DEFAULT '0' COMMENT '使用周期',
usenum smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '周期使用数量',
weight tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '重量',
magicperm text NOT NULL COMMENT '权限',
useevent tinyint(1) NOT NULL DEFAULT '0' COMMENT '0:只在特定环境使用 1:可以在道具中心使用',
PRIMARY KEY (magicid),
UNIQUE KEY identifier (identifier),
KEY displayorder (available,displayorder)
) ENGINE=MyISAM COMMENT='道具数据表';
CREATE TABLE pre_home_notification (
id mediumint(8) unsigned NOT NULL auto_increment COMMENT '通知ID ',
uid mediumint(8) unsigned NOT NULL default '0' COMMENT '通知用户ID ',
`type` varchar(20) NOT NULL default '' COMMENT '通知类型:"doing"记录,"friend"好友请求,"sharenotice"好友分享,"post"话题回复, ',
`new` tinyint(1) NOT NULL default '0' COMMENT '通知是否为新:"1"为新通知,"0"为通知已读 ',
authorid mediumint(8) unsigned NOT NULL default '0' COMMENT '作者用户ID ',
author varchar(15) NOT NULL default '' COMMENT '用户名',
note text NOT NULL COMMENT '通知内容',
dateline int(10) unsigned NOT NULL default '0' COMMENT '通知产生的时间戳',
from_id mediumint(8) unsigned NOT NULL default '0' COMMENT '来源对象id',
from_idtype varchar(20) NOT NULL default '' COMMENT '来源对象类型',
from_num mediumint(8) unsigned NOT NULL default '0' COMMENT '来源量',
PRIMARY KEY (id),
KEY uid (uid,new,dateline),
KEY from_id (from_id,from_idtype)
) ENGINE=MyISAM COMMENT='通知表';