Discuz7.2数据字典[2] 不指定

jed , 2010-9-15 09:54 , 代码编程 , 评论(0) , 阅读(9327) , Via 本站原创 | |
DROP TABLE IF EXISTS cdb_prompttype;
CREATE TABLE cdb_prompttype (
   id SMALLINT(6) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '提醒类型id',
   key VARCHAR(255) NOT NULL DEFAULT '' COMMENT '提醒唯一标示符',
   name VARCHAR(255) NOT NULL DEFAULT '' COMMENT '提醒条目',
   script VARCHAR(255) NOT NULL DEFAULT '' COMMENT '外部提醒填写脚本url,内部提醒留空',
   PRIMARY KEY (`id`),
   UNIQUE KEY `key` (`key`)
) TYPE=MyISAM COMMENT='提醒类型';

DROP TABLE IF EXISTS cdb_promptmsgs;
CREATE TABLE cdb_promptmsgs (
   id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '提醒id',
   typeid SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0' COMMENT '提醒类型id',
   uid MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' COMMENT '会员id',
   extraid INTEGER(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '扩展id',
   new TINYINT(1) NOT NULL DEFAULT '0' COMMENT '是否未读',
   dateline INTEGER(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '时间',
   message TEXT NOT NULL COMMENT '提醒内容',
   actor TEXT NOT NULL COMMENT '相关人',
   PRIMARY KEY (`id`),
   KEY `uid` (`uid`, `typeid`),
   KEY `new` (`new`),
   KEY `dateline` (`dateline`),
   KEY `extraid` (`extraid`)
) TYPE=MyISAM COMMENT='提醒数据';

DROP TABLE IF EXISTS cdb_ranks;
CREATE TABLE cdb_ranks (
   rankid smallint(6) unsigned NOT NULL AUTO_INCREMENT COMMENT '级别id',
   ranktitle varchar(30) NOT NULL DEFAULT '' COMMENT '级别头衔',
   postshigher mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '发帖数阀值',
   stars tinyint(3) NOT NULL DEFAULT '0' COMMENT '星星数',
   color varchar(7) NOT NULL DEFAULT '' COMMENT '颜色',
   PRIMARY KEY   (rankid)
) TYPE=MyISAM COMMENT='级别表';

DROP TABLE IF EXISTS cdb_ratelog;
CREATE TABLE cdb_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)
) TYPE=MyISAM COMMENT='帖子评分记录表';

DROP TABLE IF EXISTS cdb_regips;
CREATE TABLE cdb_regips (
   ip char(15) NOT NULL DEFAULT '' COMMENT 'IP地址',
   dateline int(10) unsigned NOT NULL DEFAULT '0' COMMENT '限制时间',
   count smallint(6) NOT NULL DEFAULT '0' COMMENT '限制数量',
   KEY ip (ip)
) TYPE=MyISAM COMMENT='注册IP限制表';

DROP TABLE IF EXISTS cdb_relatedthreads;
CREATE TABLE cdb_relatedthreads (
   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`)
) TYPE=MyISAM COMMENT='相关主题表';

DROP TABLE IF EXISTS cdb_reportlog;
CREATE TABLE cdb_reportlog (
   id int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id',
   fid smallint(6) unsigned NOT NULL COMMENT '版块 fid',
   pid int(10) unsigned NOT NULL COMMENT '帖子 pid',
   uid mediumint(8) unsigned NOT NULL COMMENT '报告人 uid',
   username char(15) NOT NULL COMMENT '报告人 username',
   status tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '报告状态\n(1:未处理 0:已处理)',
   type tinyint(1) NOT NULL COMMENT '报告类型\n(1:推荐 -1:投诉)',
   reason char(40) NOT NULL COMMENT '报告原因',
   dateline int(10) unsigned NOT NULL COMMENT '报告时间',
   PRIMARY KEY (id),
   UNIQUE KEY pid (pid,uid),
   KEY dateline (fid,dateline)
) TYPE=MyISAM COMMENT '相关主题序列';

DROP TABLE IF EXISTS cdb_request;
CREATE TABLE cdb_request (
   variable varchar(32) NOT NULL DEFAULT '' COMMENT '变量名',
   value mediumtext NOT NULL COMMENT '值',
   type tinyint(1) NOT NULL COMMENT '调用类型',
   system tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统调用(无法删除的)',
   PRIMARY KEY   (variable),
   KEY `type` (`type`)
) TYPE=MyISAM COMMENT='数据调用表';

DROP TABLE IF EXISTS cdb_rewardlog;
CREATE TABLE cdb_rewardlog (
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   authorid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '作者id',
   answererid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '回答者id',
   dateline int(10) unsigned DEFAULT '0' COMMENT '悬赏发布时间',
   netamount int(10) unsigned NOT NULL DEFAULT '0' COMMENT '悬赏金额',
   KEY userid (authorid,answererid)
) TYPE=MyISAM COMMENT='悬赏日志表';

DROP TABLE IF EXISTS cdb_rsscaches;
CREATE TABLE cdb_rsscaches (
   lastupdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后更新时间',
   fid smallint(6) 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)
) TYPE=MyISAM COMMENT='rss缓存表';

DROP TABLE IF EXISTS cdb_searchindex;
CREATE TABLE cdb_searchindex (
   searchid int(10) unsigned NOT NULL auto_increment COMMENT '缓存id',
   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',
   threads smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '主题数量',
   tids text NOT NULL COMMENT '主题id序列',
   PRIMARY KEY   (searchid)
) TYPE=MyISAM COMMENT='搜索缓存表';

DROP TABLE IF EXISTS cdb_sessions;
CREATE TABLE cdb_sessions (
   sid char(6) binary NOT NULL DEFAULT '' COMMENT 'sid',
   ip1 tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'IP段',
   ip2 tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'IP段',
   ip3 tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'IP段',
   ip4 tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'IP段',
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   username char(15) NOT NULL DEFAULT '' COMMENT '会员名',
   groupid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '会员组',
   styleid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '风格id',
   invisible tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否隐身登录',
   action tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '当前动作',
   lastactivity int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后活动时间',
   lastolupdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后更新时间',
   pageviews smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '页面访问量',
   seccode mediumint(6) unsigned NOT NULL DEFAULT '0' COMMENT '记录验证码',
   fid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '论坛id',
   tid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '主题id',
   bloguid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '正在浏览的文集',
   UNIQUE KEY sid (sid),
   KEY uid (uid),
   KEY bloguid (bloguid)
) TYPE=HEAP COMMENT='会员认证表';

DROP TABLE IF EXISTS cdb_settings;
CREATE TABLE cdb_settings (
   variable varchar(32) NOT NULL DEFAULT '' COMMENT '变量名',
   value text NOT NULL COMMENT '值',
   PRIMARY KEY   (variable)
) TYPE=MyISAM COMMENT='设置表';

DROP TABLE IF EXISTS cdb_smilies;
CREATE TABLE cdb_smilies (
   id smallint(6) unsigned NOT NULL auto_increment COMMENT '表情id',
   typeid smallint(6) unsigned NOT NULL COMMENT '表情分类 id',
   displayorder tinyint(1) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   type enum('smiley','icon') NOT NULL DEFAULT 'smiley' COMMENT '类型',
   code varchar(30) NOT NULL DEFAULT '' COMMENT '标记',
   url varchar(30) NOT NULL DEFAULT '' COMMENT '路径',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='表情表';

DROP TABLE IF EXISTS cdb_spacecaches;
CREATE TABLE cdb_spacecaches (
   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)
) TYPE=MyISAM COMMENT='minispace缓存表';

DROP TABLE IF EXISTS cdb_stats;
CREATE TABLE cdb_stats (
   type char(10) NOT NULL DEFAULT '' COMMENT '类型',
   variable char(10) NOT NULL DEFAULT '' COMMENT '变量名',
   count int(10) unsigned NOT NULL DEFAULT '0' COMMENT '数量',
   PRIMARY KEY   (type,variable)
) TYPE=MyISAM COMMENT='统计表';

DROP TABLE IF EXISTS cdb_statvars;
CREATE TABLE cdb_statvars (
   type varchar(20) NOT NULL DEFAULT '' COMMENT '类型',
   variable varchar(20) NOT NULL DEFAULT '' COMMENT '变量名',
   value mediumtext NOT NULL COMMENT '值',
   PRIMARY KEY   (type,variable)
) TYPE=MyISAM COMMENT='统计变量表';

DROP TABLE IF EXISTS cdb_styles;
CREATE TABLE cdb_styles (
   styleid smallint(6) unsigned NOT NULL auto_increment COMMENT '风格id',
   name varchar(20) NOT NULL DEFAULT '' COMMENT '风格名称',
   available tinyint(1) NOT NULL DEFAULT '1' COMMENT '风格是否可用',
   templateid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '对应模板id',
   PRIMARY KEY   (styleid)
) TYPE=MyISAM COMMENT='风格表';

DROP TABLE IF EXISTS cdb_stylevars;
CREATE TABLE cdb_stylevars (
   stylevarid smallint(6) unsigned NOT NULL auto_increment COMMENT '风格变量id',
   styleid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '风格id',
   variable text NOT NULL COMMENT '变量名',
   substitute text NOT NULL COMMENT '变量赋值',
   PRIMARY KEY   (stylevarid),
   KEY styleid (styleid)
) TYPE=MyISAM COMMENT='风格变量表';

DROP TABLE IF EXISTS cdb_tags;
CREATE TABLE cdb_tags (
   tagname char(20) NOT NULL COMMENT 'TAG名',
   closed tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否关闭',
   total mediumint(8) unsigned NOT NULL COMMENT '使用此TAG的总数',
   PRIMARY KEY   (tagname),
   KEY total (total),
   KEY closed (closed)
) TYPE=MyISAM COMMENT='论坛标签数据表';

DROP TABLE IF EXISTS cdb_tasks;
CREATE TABLE cdb_tasks (
   taskid smallint(6) unsigned NOT NULL AUTO_INCREMENT,
   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天表示日常任务',
   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)
) TYPE=MyISAM COMMENT='论坛任务表';

DROP TABLE IF EXISTS cdb_taskvars;
CREATE TABLE cdb_taskvars (
   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 '变量值',
   extra text NOT NULL COMMENT '变量附加值',
   PRIMARY KEY   (taskvarid),
   KEY taskid (taskid)
) TYPE=MyISAM COMMENT='论坛任务设置表';

DROP TABLE IF EXISTS cdb_templates;
CREATE TABLE cdb_templates (
   templateid smallint(6) unsigned NOT NULL auto_increment COMMENT '模板id',
   name varchar(30) NOT NULL DEFAULT '' COMMENT '名称',
   directory varchar(100) NOT NULL DEFAULT '' COMMENT '目录',
   copyright varchar(100) NOT NULL DEFAULT '' COMMENT '版权',
   PRIMARY KEY   (templateid)
) TYPE=MyISAM COMMENT='模版表';


DROP TABLE IF EXISTS cdb_threads;
CREATE TABLE cdb_threads (
   tid mediumint(8) unsigned NOT NULL auto_increment COMMENT '主题id',
   fid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '上级论坛',
   iconid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '图标',
   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 '附件',
   moderated tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否被管理员改动',
   closed mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '是否关闭',
   itemid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'supe关联id',
   supe_pushstatus tinyint(1) NOT NULL DEFAULT '0' COMMENT 'supe推送状态',

   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 '主题热度值',
   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)

) TYPE=MyISAM COMMENT='主题表';
DROP TABLE IF EXISTS cdb_threadsmod;
CREATE TABLE cdb_threadsmod (
   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',
   KEY tid (tid,dateline),
   KEY expiration (expiration,status)
) TYPE=MyISAM COMMENT='主题管理记录表';

DROP TABLE IF EXISTS cdb_threadtags;
CREATE TABLE cdb_threadtags (
   tagname char(20) NOT NULL COMMENT '标签名称',
   tid int(10) unsigned NOT NULL COMMENT '标签对应主题id',
   KEY tagname (tagname),
   KEY tid (tid)
) TYPE=MyISAM COMMENT='主题标签表';

DROP TABLE IF EXISTS cdb_threadtypes;
CREATE TABLE cdb_threadtypes (
   typeid smallint(6) unsigned NOT NULL auto_increment COMMENT '主题分类id',
   displayorder smallint(6) NOT NULL DEFAULT '0' COMMENT '显示顺序',
   name varchar(255) NOT NULL DEFAULT '' COMMENT '名称',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '解释说明',
   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 '分类信息模板',
   PRIMARY KEY   (typeid)
) TYPE=MyISAM COMMENT='主题分类表';

DROP TABLE IF EXISTS cdb_tradecomments;
CREATE TABLE cdb_tradecomments (
   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)
) TYPE=MyISAM COMMENT='信用评价';

DROP TABLE IF EXISTS cdb_tradelog;
CREATE TABLE cdb_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 '支付宝订单号',
   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 '卖家交易帐号',
   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)
) TYPE=MyISAM COMMENT='交易记录表';

DROP TABLE IF EXISTS cdb_tradeoptionvars;
CREATE TABLE cdb_tradeoptionvars (
   sortid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '商品分类信息id',
   pid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '商品分类信息数据对应分类帖子id',
   optionid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '商品分类信息数据对应选项id',
   value mediumtext NOT NULL COMMENT '商品分类信息数据',
   KEY sortid (sortid),
   KEY pid (pid)
) TYPE=MyISAM COMMENT='商品分类信息设置项目数据表';

DROP TABLE IF EXISTS cdb_trades;
CREATE TABLE cdb_trades (
   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 '买家帐号',
   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 sellerid (sellerid),
   KEY totalitems (totalitems),
   KEY tradesum (tradesum),
   KEY displayorder (tid,displayorder),
   KEY sellertrades (sellerid,tradesum,totalitems),
   KEY typeid (typeid),
   KEY credittradesum(credittradesum)
) TYPE=MyISAM COMMENT='商品数据表';

DROP TABLE IF EXISTS cdb_typemodels;
CREATE TABLE cdb_typemodels (
   id smallint(6) unsigned NOT NULL auto_increment COMMENT '分类模型id',
   name varchar(20) NOT NULL COMMENT '分类模型名称',
   displayorder tinyint(3) NOT NULL DEFAULT '0' COMMENT '分类模型顺序',
   type tinyint(1) NOT NULL DEFAULT '0' COMMENT '分类模型类型',
   options mediumtext NOT NULL COMMENT '分类模型系统项目',
   customoptions mediumtext NOT NULL COMMENT '分类模型自定义项目',
   PRIMARY KEY   (id)

) TYPE=MyISAM COMMENT='分类信息模型表';

DROP TABLE IF EXISTS cdb_typeoptions;
CREATE TABLE cdb_typeoptions (
   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 '分类信息选项顺序',
   title varchar(100) NOT NULL DEFAULT '' COMMENT '分类信息选项名称',
   description varchar(255) NOT NULL DEFAULT '' COMMENT '分类信息选项描述',
   identifier varchar(40) NOT NULL DEFAULT '' COMMENT '分类信息选项标识',
   type varchar(20) NOT NULL DEFAULT '' COMMENT '分类信息选项类型',
   rules mediumtext NOT NULL COMMENT '分类信息选项规则',
   PRIMARY KEY   (optionid),
   KEY classid (classid)
) TYPE=MyISAM COMMENT='分类信息设置项目表';

DROP TABLE IF EXISTS cdb_typeoptionvars;
CREATE TABLE cdb_typeoptionvars (
   sortid smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '分类信息id',
   tid 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)
) TYPE=MyISAM COMMENT='分类信息项目数据表';

DROP TABLE IF EXISTS cdb_typevars;
CREATE TABLE cdb_typevars (
   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 '分类信息对应项目顺序',
   UNIQUE KEY optionid (sortid,optionid),
   KEY sortid (sortid)
) TYPE=MyISAM COMMENT='分类信息对应项目表';

DROP TABLE IF EXISTS cdb_usergroups;
CREATE TABLE cdb_usergroups (
   groupid smallint(6) unsigned NOT NULL auto_increment COMMENT '会员组id',
   radminid tinyint(3) NOT NULL DEFAULT '0' COMMENT '关联关管理组',
   type enum('system','special','member') NOT NULL DEFAULT 'member' COMMENT '类型',
   system char(8) NOT NULL DEFAULT 'private' COMMENT '会员是否可以自由进出',
   grouptitle char(30) NOT NULL DEFAULT '' COMMENT '组头衔',
   creditshigher int(10) NOT NULL DEFAULT '0' COMMENT '该组的积分上限',
   creditslower int(10) NOT NULL DEFAULT '0' COMMENT '该组的积分下限',
   stars tinyint(3) NOT NULL DEFAULT '0' COMMENT '星星数量',
   color char(7) NOT NULL DEFAULT '' COMMENT '组头衔颜色',
   groupavatar char(60) NOT NULL DEFAULT '' COMMENT '组头像图标',
   readaccess tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '阅读权限',
   allowvisit tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许访问',
   allowpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发帖',
   allowreply tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许回复',
   allowpostpoll tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发表投票',
   allowpostreward tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发表悬赏',
   allowposttrade tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发表交易',
   allowpostactivity tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发表活动',
   allowdirectpost tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否需要审核',
   allowgetattach tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许下载附件',
   allowpostattach tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许上传附件',
   allowvote tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许参与投票',
   allowmultigroups tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许加入/离开公共用户组',
   allowsearch tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许搜索',
   allowcstatus tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许自定义头衔',
   allowuseblog tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用论坛文集',
   allowinvisible tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许隐身登录',
   allowtransfer tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许积分转帐',
   allowsetreadperm tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许设置阅读权限',
   allowsetattachperm tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许设置附件权限',
   allowhidecode tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用hide代码',
   allowhtml tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用html',
   allowcusbbcode tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用自定义bbocde',
   allowanonymous tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许匿名发帖',
   allownickname tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用昵称',
   allowsigbbcode tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许签名使用bbocde',
   allowsigimgcode tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用img',
   allowviewpro tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许查看会员资料',
   allowviewstats tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许查看统计数据',
   disableperiodctrl tinyint(1) NOT NULL DEFAULT '0' COMMENT '不受时间段限制',
   reasonpm tinyint(1) NOT NULL DEFAULT '0' COMMENT '操作理由短信通知作者',
   maxprice smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '主题最大售价',
   maxsigsize smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '最大签名尺寸',
   maxattachsize mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '最大附件尺寸',
   maxsizeperday int(10) unsigned NOT NULL DEFAULT '0' COMMENT '每天最大附件总尺寸',
   maxpostsperhour tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '每小时发帖数限制',
   attachextensions char(100) NOT NULL DEFAULT '' COMMENT '允许发表的附件类型',
   raterange char(150) NOT NULL DEFAULT '' COMMENT '评分范围',
   mintradeprice smallint(6) unsigned NOT NULL DEFAULT '1' COMMENT '交易最小积分',
   maxtradeprice smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '交易最大积分',
   minrewardprice smallint(6) unsigned NOT NULL DEFAULT '1' COMMENT '悬赏最小积分',
   maxrewardprice smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '悬赏最大积分',
   magicsdiscount tinyint(1) NOT NULL COMMENT '道具折扣',
   allowmagics tinyint(1) unsigned NOT NULL COMMENT '允许使用道具',
   maxmagicsweight smallint(6) unsigned NOT NULL COMMENT '道具负载最大值',
   allowbiobbcode tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '允许在自我介绍里面discuzcode标签',
   allowbioimgcode tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '允许在自我介绍里面img标签',
   maxbiosize smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '自我介绍最大字数限制',
   allowinvite tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许使用邀请注册',
   allowmailinvite tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许通过论坛邮件系统发送邀请码',
   maxinvitenum tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '最大邀请码拥有数量',
   inviteprice smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码购买价格',
   maxinviteday smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '邀请码有效期',
   allowpostdebate tinyint(1) NOT NULL DEFAULT '0' COMMENT '允许发表辩论',
   tradestick tinyint(1) unsigned NOT NULL COMMENT '可商品推荐数',
   exempt tinyint(1) unsigned NOT NULL COMMENT '用户组表达式',
   allowsendpm tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否允许发送短信息',
   maxattachnum smallint(6) NOT NULL DEFAULT '0' COMMENT '最大每天附件数量',
   allowposturl tinyint(1) NOT NULL DEFAULT '3' COMMENT '是否允许发送含 url 内容',
   allowrecommend TINYINT(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否允许评价主题',
   PRIMARY KEY   (groupid),
   KEY creditsrange (creditshigher,creditslower)
) TYPE=MyISAM COMMENT='会员用户组表';

DROP TABLE IF EXISTS cdb_validating;
CREATE TABLE cdb_validating (
   uid mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '会员id',
   submitdate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '提交日期',
   moddate int(10) unsigned NOT NULL DEFAULT '0' COMMENT '审核日期',
   admin varchar(15) NOT NULL DEFAULT '' COMMENT '管理员名',
   submittimes tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '提交的次数',
   status tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
   message text NOT NULL COMMENT '注册原因',
   remark text NOT NULL COMMENT '管理员留言',
   PRIMARY KEY   (uid),
   KEY status (status)
) TYPE=MyISAM COMMENT='用户审核表';

DROP TABLE IF EXISTS cdb_warnings;
CREATE TABLE cdb_warnings (
   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)
) TYPE=MyISAM COMMENT='警告记录表';

DROP TABLE IF EXISTS cdb_words;
CREATE TABLE cdb_words (
   id smallint(6) unsigned NOT NULL auto_increment COMMENT '词汇id',
   admin varchar(15) NOT NULL DEFAULT '' COMMENT '管理员名',
   find varchar(255) NOT NULL DEFAULT '' COMMENT '不良词语',
   replacement varchar(255) NOT NULL DEFAULT '' COMMENT '替换内容',
   extra varchar(255) NOT NULL DEFAULT '',
   PRIMARY KEY   (id)
) TYPE=MyISAM COMMENT='词语过滤表';



发表评论

昵称

网址

电邮

打开HTML 打开UBB 打开表情 隐藏 记住我 [登入] [注册]