-- TableName pw_weibo_bind 用户微博绑定关系表
-- Created By phpwind@2011-3-28
-- Fields uid             用户id
-- Fields weibotype 绑定的微博类型
-- Fields info            绑定信息
DROP TABLE IF EXISTS pw_weibo_bind;
CREATE TABLE IF NOT EXISTS `pw_weibo_bind` (
  `uid` int(10) unsigned NOT NULL default '0',
  `weibotype` varchar(20) NOT NULL,
  `info` text NOT NULL,
  UNIQUE KEY `uid_weibotype` (`uid`,`weibotype`)
) TYPE=MyISAM;



-- TableName pw_log_setting 日志配置表
-- Created By phpwind@2011-3-25
-- Fields id           主键ID
-- Fields vector       向量
-- Fields cipher       密钥
-- Fileds field1       扩展1
-- Fileds field2       扩展2
-- Fileds field3       扩展3
-- Fileds field4       扩展4
DROP TABLE IF EXISTS pw_log_setting;
CREATE TABLE pw_log_setting(
    id int(10) unsigned not null auto_increment,
    vector varchar(255) not null default '',
    cipher varchar(255) not null default '',
    field1 varchar(255) not null default '',
    field2 varchar(255) not null default '',
    field3 int(10) unsigned not null default '0',
    field4 int(10) unsigned not null default '0',
    primary key(id)
)ENGINE=MyISAM;



-- TableName pw_auth_certificate 证件认证表
-- Created By zhangpeihong@2011-02-23 
-- Fields id                    主键ID
-- Fields uid                   用户ID
-- Fields type                  证件类型
-- Fields number                证件号码
-- Fields attach1               证件图片正面
-- Fields attach2               证件图片反面
-- Fields createtime            提交认证时间
-- Fields admintime             管理员操作时间
-- Fields state                 审核状态
DROP TABLE IF EXISTS pw_auth_certificate; 
CREATE TABLE IF NOT EXISTS `pw_auth_certificate` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uid` int(10) NOT NULL DEFAULT '0',
  `type` tinyint(3) NOT NULL DEFAULT '0',
  `number` char(32) NOT NULL DEFAULT '',
  `attach1` varchar(80) NOT NULL DEFAULT '',
  `attach2` varchar(80) NOT NULL DEFAULT '',
  `createtime` int(10) NOT NULL DEFAULT '0',
  `admintime` int(10) NOT NULL DEFAULT '0',
  `state` tinyint(3) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_uid` (`uid`),
  KEY `idx_state` (`state`)
) ENGINE=MyISAM;



-- TableName pw_user_career  用户工作经历表
-- Created By phpwind@2010-12-28 
-- Fields careerid          主键ID
-- Fields uid          用户uid
-- Fields companyid         公司ID
-- Fields starttime        开始时间
DROP TABLE IF EXISTS pw_user_career;
CREATE TABLE `pw_user_career` (
`careerid` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`uid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`companyid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`starttime` INT(11) UNSIGNED NOT NULL DEFAULT '0',
 PRIMARY KEY (`careerid`),
 KEY `idx_uid_companyid` (`uid`,`companyid`)
) ENGINE = MYISAM;



-- TableName pw_user_education  用户教育经历表
-- Created By phpwind@2010-12-28
-- Fields educationid          主键ID
-- Fields uid             用户uid
-- Fields schoolid             学校ID
-- Fields educationlevel       级别
-- Fields starttime           开始时间
DROP TABLE IF EXISTS pw_user_education;
CREATE TABLE `pw_user_education` (
`educationid` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`uid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`schoolid` INT(11) UNSIGNED NOT NULL DEFAULT '0',
`educationlevel` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0',
`starttime` INT(11) UNSIGNED NOT NULL DEFAULT '0',
 PRIMARY KEY (`educationid`),
 KEY `idx_uid_schoolid` (`uid`,`schoolid`)
) ENGINE = MYISAM ;



-- TableName pw_company      公司表
-- Created By phpwind@2010-12-28
-- Fields companyid          主键ID
-- Fields companyname           名称
DROP TABLE IF EXISTS pw_company;
CREATE TABLE `pw_company` (
`companyid` int(11) unsigned  NOT NULL AUTO_INCREMENT ,
`companyname` VARCHAR(60) NOT NULL DEFAULT '',
 PRIMARY KEY (`companyid`),
 UNIQUE KEY `idx_companyname` (`companyname`)
) ENGINE = MYISAM;



-- TableName pw_school       学校表
-- Created By phpwind@2010-12-28
-- Fields schoolid           主键ID
-- Fields name           名称
-- Fields areaid         地区ID
-- Fields type           分类 1大学2中学3小学
DROP TABLE IF EXISTS pw_school;
CREATE TABLE `pw_school` (
  `schoolid` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `schoolname` VARCHAR(32) NOT NULL DEFAULT '',
  `areaid` int(11) NOT NULL DEFAULT '0',
  `type` tinyint(3) NOT NULL DEFAULT '0',
  PRIMARY KEY (`schoolid`),
  KEY `idx_areaid_type` (`areaid`,`type`)
) ENGINE = MYISAM;



-- TableName pw_threads_img 图酷贴表
-- Created By phpwind@2010-12-28
-- Fields tid               帖子ID
-- Fields fid               板块ID
-- Fields tpcnum            主楼图片数
-- Fields totalnum          总图片数
-- Fields collectnum        收藏数
-- Fields cover             封面
DROP TABLE IF EXISTS pw_threads_img;
CREATE TABLE `pw_threads_img` (
  `tid` int(10) unsigned NOT NULL,
  `fid` smallint(6) unsigned NOT NULL DEFAULT '0',
  `tpcnum` smallint(5) unsigned NOT NULL DEFAULT '0',
  `totalnum` smallint(5) unsigned NOT NULL DEFAULT '0',
  `collectnum` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `cover` varchar(80) NOT NULL DEFAULT '',
  PRIMARY KEY (`tid`),
  KEY `idx_fid_tid` (`fid`,`tid`),
  KEY `idx_fid_totalnum` (`fid`,`totalnum`)
) ENGINE=MyISAM ;



-- TableName pw_areas        地区表
-- Created By phpwind@2010-12-28
-- Fields areaid             主键ID
-- Fields name         名称
-- Fields parentid         上级ID
-- Fields vieworder          排序
DROP TABLE IF EXISTS pw_areas;
CREATE TABLE `pw_areas` (
  `areaid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '',
  `joinname` varchar(150) NOT NULL DEFAULT '',
  `parentid` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `vieworder` smallint(6) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`areaid`),
  KEY `idx_name` (`name`),
  KEY `idx_parentid_vieworder` (`parentid`,`vieworder`)
) ENGINE=MyISAM ;



-- TableName pw_weibo_topics   话题
-- Created By phpwind@2010-12-28
-- Fields topicid              主键ID
-- Fields topicname            话题名称
-- Fields num             使用数量
-- Fields ifhot                是否允许热门话题
-- Fields crtime               创建时间
-- Fields lasttime             最后操作时间
DROP TABLE IF EXISTS pw_weibo_topics;
CREATE TABLE `pw_weibo_topics` (
  `topicid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `topicname` varchar(255) NOT NULL DEFAULT '',
  `num` int(10) unsigned NOT NULL DEFAULT '0',
  `ifhot` tinyint(3) NOT NULL DEFAULT '1',
  `crtime` int(10) NOT NULL DEFAULT '0',
  `lasttime` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`topicid`),
  UNIQUE KEY `idx_topicname` (`topicname`),
  KEY `idx_crtime_ifhot` (`crtime`,`ifhot`)
) ENGINE=MyISAM;



-- TableName pw_weibo_topicrelations 话题-新鲜事关系表
-- Created By phpwind@2010-12-28
-- Fields topicid                    话题ID
-- Fields mid                        新鲜事ID
-- Fields crtime                     创建时间
DROP TABLE IF EXISTS pw_weibo_topicrelations;
CREATE TABLE `pw_weibo_topicrelations` (
  `topicid` int(10) unsigned NOT NULL DEFAULT '0',
  `mid` int(10) unsigned NOT NULL DEFAULT '0',
  `crtime` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `idx_topicid_mid` (`topicid`,`mid`),
  KEY `idx_mid` (`mid`),
  KEY `idx_crtime` (`crtime`)
) ENGINE=MyISAM;



-- TableName pw_weibo_topicattention 关注的话题
-- Created By phpwind@2010-12-28
-- Fields userid                     用户ID
-- Fields topicid                    话题ID
-- Fields crtime                     创建时间
-- Fields lasttime                   最后操作时间
DROP TABLE IF EXISTS pw_weibo_topicattention;
CREATE TABLE `pw_weibo_topicattention` (
  `userid` int(10) unsigned NOT NULL DEFAULT '0',
  `topicid` int(10) unsigned NOT NULL DEFAULT '0',
  `crtime` int(10) unsigned NOT NULL DEFAULT '0',
  `lasttime` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `idx_userid_topicid` (`userid`,`topicid`)
) ENGINE=MyISAM;



-- TableName pw_membertags_relations 用户标签
-- Created By phpwind@2010-12-28
-- Fields tagid                      标签ID
-- Fields userid                     用户ID
-- Fields crtime                     创建时间
DROP TABLE IF EXISTS pw_membertags_relations;
CREATE TABLE `pw_membertags_relations` (
  `tagid` int(10) unsigned NOT NULL DEFAULT '0',
  `userid` int(10) unsigned NOT NULL DEFAULT '0',
  `crtime` int(10) unsigned NOT NULL DEFAULT '0',
  UNIQUE KEY `idx_tagid_userid` (`tagid`,`userid`),
  KEY `idx_userid` (`userid`),
  KEY `idx_crtime` (`crtime`)
) ENGINE=MyISAM;



-- TableName pw_membertags   个人标签表
-- Created By phpwind@2010-12-28
-- Fields tagid              主键ID
-- Fields tagname            标签名
-- Fields num                使用数量
-- Fields ifhot              是否允许为热门标签
DROP TABLE IF EXISTS pw_membertags;
CREATE TABLE `pw_membertags` (
  `tagid` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tagname` varchar(32) NOT NULL DEFAULT '',
  `num` int(10) unsigned NOT NULL DEFAULT '0',
  `ifhot` tinyint(3) NOT NULL DEFAULT '1',
  PRIMARY KEY (`tagid`),
  UNIQUE KEY `idx_tagname` (`tagname`),
  KEY `idx_ifhot_num` (`ifhot`,`num`)
) ENGINE=MyISAM;



-- TableName pw_log_forums 群组操作日志表  
-- Created By phpwind@2010-01-21 
-- Fields id            版块ID  
-- Fields sid           版块ID  
-- Fields operate       操作码    
DROP TABLE IF EXISTS pw_log_forums;  
CREATE TABLE pw_log_forums(      
id int(10) unsigned not null auto_increment,      
sid int(10) unsigned not null default '0',      
operate tinyint(3) not null default '1',      
modified_time int(10) unsigned not null default '0',      
primary key(id),      
unique key idx_sid_operate(sid,operate)  
)ENGINE=MyISAM; 



-- TableName pw_searchhotwords 热门关键字
-- Created By phpwind@2011-01-19
-- Fields id        主键ID
-- Fields keyword   关键字
-- Fields vieworder 显示顺序
-- Fields fromtype  来源类型
-- Fields posttime  发表时间
-- Fields expire    有效时间
DROP TABLE IF EXISTS pw_searchhotwords;
CREATE TABLE IF NOT EXISTS `pw_searchhotwords` (
  id mediumint(8) unsigned not null auto_increment,
  keyword varchar(32) not null default '',
  vieworder tinyint(3) not null default '0',
  fromtype enum('custom','auto') not null default 'custom',
  posttime int(10) unsigned not null default '0',
  expire int(10) unsigned not null default '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;



-- TableName pw_hits_threads 帖子点击率表
-- Created By phpwind@2010-1-18
-- Fields tid           帖子id
-- Fields hits          点击数
DROP TABLE IF EXISTS pw_hits_threads;
CREATE TABLE pw_hits_threads (
  tid int(10) unsigned NOT NULL DEFAULT '0',
  hits int(10) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (tid)
) ENGINE=MyISAM;



-- TableName pw_cache_distribute 分布式缓存表
-- Created By phpwind@2011-01-11
-- Fields ckey       key
-- Fields cvalue     value
-- Fields expire     有效时间
DROP TABLE IF EXISTS pw_cache_distribute;
CREATE TABLE pw_cache_distribute (
    ckey char(32) not null default '',
    cvalue text not null,
    typeid tinyint(3) not null default '0',
    expire int(10) unsigned not null default '0',
    primary key (ckey)
) ENGINE=MyISAM;



-- TableName pw_online_statistics 在线统计表
-- Created By phpwind@2010-12-08
-- Fields name           统计的名称
-- Fields value          统计的值
-- Fields lastupdate     最后统计时间
DROP TABLE IF EXISTS pw_online_statistics;
CREATE TABLE pw_online_statistics (
  name char(30) NOT NULL DEFAULT '',
  value int(10) unsigned NOT NULL DEFAULT '0',
  lastupdate int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY  (name)
) ENGINE=MyISAM;



-- TableName pw_online_guest 在线游客表
-- Created By phpwind@2010-12-08
-- Fields guestid        游客ID
-- Fields lastvisit      最后访问时间
-- Fields fid            版块id
-- Fields tid               帖子id
-- Fields action         目前所处位置 index,thread,read,cate,mode,other
-- Fields ifhide         是否隐身
DROP TABLE IF EXISTS pw_online_guest;
CREATE TABLE pw_online_guest (
  ip int(10) NOT NULL DEFAULT '0',
  token tinyint unsigned NOT NULL DEFAULT '0',
  lastvisit int(10) NOT NULL DEFAULT '0',
  fid smallint(6) NOT NULL DEFAULT '0',
  tid int(10) NOT NULL DEFAULT '0',
  action tinyint(3) NOT NULL DEFAULT '0',
  ifhide tinyint(1) NOT NULL DEFAULT '0',
  primary key (ip, token),
  KEY idx_ip(ip)
) ENGINE=MEMORY;



-- TableName pw_online_user 在线用户表
-- Created By phpwind@2010-12-08
-- Fields uid            用户ID
-- Fields username       用户名
-- Fields lastvisit      最后访问时间
-- Fields ip             ip地址
-- Fields fid            版块id
-- Fields tid               帖子id
-- Fields action         目前所处位置 index,thread,read,cate,mode,other
-- Fields ifhide         是否隐身
DROP TABLE IF EXISTS pw_online_user;
CREATE TABLE pw_online_user (
  uid int(10) unsigned NOT NULL default '0',
  username char(15) NOT NULL DEFAULT '',
  lastvisit int(10) NOT NULL DEFAULT '0',
  ip int(10) NOT NULL default '0',
  fid smallint(6) unsigned NOT NULL DEFAULT '0',
  tid int(10) unsigned NOT NULL DEFAULT '0',
  groupid tinyint(3) NOT NULL DEFAULT '0',
  action tinyint(3) NOT NULL DEFAULT '0',
  ifhide tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY  (uid),
  KEY idx_fid (fid)
) ENGINE=MEMORY;



-- TableName pw_searchadvert 搜索广告
-- Created By phpwind@2010-12-08
-- Fields id             主键ID
-- Fields keyword        关键词
-- Fields starttime      开始时间
-- Fields endtime        结束时间
-- Fields code           代码块
-- Fields ifshow         是否启用
-- Fields orderby        顺序
-- Fields config         扩展配置
DROP TABLE IF EXISTS pw_searchadvert;
CREATE TABLE IF NOT EXISTS `pw_searchadvert` (
  `id` mediumint(8) unsigned not null auto_increment,
  `keyword` varchar(32) not null default '',
  `starttime` int(10) unsigned not null default '0',
  `endtime` int(10) unsigned not null default '0',
  `code` text not null,
  `ifshow` tinyint(3) unsigned not null default '0',
  `orderby` tinyint(3) unsigned not null default '0',
  `config` text not null,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;



-- TableName pw_searchforum 搜索推荐版块
-- Created By phpwind@2010-12-08
-- Fields id             主键ID
-- Fields fid            版块id
-- Fields vieworder      排序
DROP TABLE IF EXISTS pw_searchforum;
CREATE TABLE IF NOT EXISTS `pw_searchforum` (
  `id` smallint(6) unsigned not null auto_increment,
  `fid` smallint(6) unsigned not null default '0',
  `vieworder` smallint(6) not null default '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;



-- TableName pw_statistics_daily 统计表
-- Created By phpwind@2010-11-26
-- Fields id                主键ID
-- Fields name            统计名
-- Fields typeid            统计项ID
-- Fields date              统计日期
-- Fields value      统计值
-- Fields updatetime      统计更新时间
CREATE TABLE IF NOT EXISTS `pw_statistics_daily` (
  `id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` char(32) NOT NULL DEFAULT '',
  `typeid` int(6) UNSIGNED NOT NULL DEFAULT '0',
  `date` date NOT NULL DEFAULT '0000-00-00',
  `value` int(11) UNSIGNED NOT NULL DEFAULT '0',
  `updatetime` int(11) UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `idx_name_date_typeid` (`name`,`date`,`typeid`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;



-- TableName pw_searchstatistic 搜索统计表
-- Created By phpwind@2010-11-16
-- Fields id            主键ID
-- Fields keyword        关键词
-- Fields num            统计次数
-- Fields created_time      创建时间
DROP TABLE IF EXISTS pw_searchstatistic;
CREATE TABLE IF NOT EXISTS `pw_searchstatistic` (
  `id` int(10) unsigned not null auto_increment,
  `keyword` varchar(32) not null default '',
  `num` mediumint(8) not null default '0',
  `created_time` int(10) not null default '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM;



-- TableName pw_attachdownload 版块下载附件扣除积分记录
-- Created By xufazhang@2010-11-8
-- Fields  aid       附件编号
-- Fields  uid       用户编号 
-- Fields  ctype     扣除积分类型
-- Fields  cost      扣除积分值
-- Fields createdate  扣除积分时间
CREATE TABLE IF NOT EXISTS `pw_attachdownload` (
  `aid` int(10) unsigned NOT NULL,
  `uid` int(10) unsigned NOT NULL,
  `ctype` varchar(20) NOT NULL DEFAULT '0',
  `cost` smallint(6) unsigned NOT NULL default '0',
  `createdtime` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`aid`,`uid`)
) ENGINE=MyISAM;



-- TableName pw_cache_members 缓存存储表
-- Created By phpwind@2010-11-23
-- Fields ckey       key
-- Fields cvalue     value
-- Fields expire     有效时间
CREATE TABLE pw_cache_members(
ckey char(32) not null default '',
cvalue text not null,
expire int(10) unsigned not null default '0',
primary key (ckey)
)ENGINE=MyISAM;



-- TableName pw_delta_diarys 实时索引表-日志
-- Created By phpwind@2010-11-20
-- Fields id       主键ID(如tid,uid,did,pid)
-- Fields state    状态 0/1(可自定义)
CREATE TABLE pw_delta_diarys(
 id int(10) unsigned not null auto_increment,
 state tinyint(3) unsigned not null default 0,
 primary key (id)
)ENGINE=MyISAM;



-- TableName pw_delta_posts 实时索引表-回复
-- Created By phpwind@2010-11-20
-- Fields id       主键ID(如tid,uid,did,pid)
-- Fields state    状态 0/1(可自定义)
CREATE TABLE pw_delta_posts(
 id int(10) unsigned not null auto_increment,
 state tinyint(3) unsigned not null default 0,
 primary key (id)
)ENGINE=MyISAM;



-- TableName pw_delta_members 实时索引表-用户
-- Created By phpwind@2010-11-20
-- Fields id       主键ID(如tid,uid,did,pid)
-- Fields state    状态 0/1(可自定义)
CREATE TABLE pw_delta_members(
 id int(10) unsigned not null auto_increment,
 state tinyint(3) unsigned not null default 0,
 primary key (id)
)ENGINE=MyISAM;



-- TableName pw_log_colonys 群组操作日志表
-- Created By phpwind@2010-10-25
-- Fields id 主键ID
-- Fields sid 帖子ID
-- Fields operate 操作码
DROP TABLE IF EXISTS pw_log_colonys;
CREATE TABLE pw_log_colonys(
id int(10) unsigned not null auto_increment,
sid int(10) unsigned not null default '0',
operate tinyint(3) not null default '1',
modified_time int(10) unsigned not null default '0',
primary key(id),
unique key idx_sid_operate(sid,operate)
)ENGINE=MyISAM;



-- TableName pw_log_members 日志操作日志表
-- Created By phpwind@2010-10-25
-- Fields id 主键ID
-- Fields sid 帖子ID
-- Fields operate 操作码
DROP TABLE IF EXISTS pw_log_members;
CREATE TABLE pw_log_members(
id int(10) unsigned not null auto_increment,
sid int(10) unsigned not null default '0',
operate tinyint(3) not null default '1',
modified_time int(10) unsigned not null default '0',
primary key(id),
unique key idx_sid_operate(sid,operate)
)ENGINE=MyISAM;



-- TableName pw_log_diary 日志操作日志表
-- Created By phpwind@2010-10-25
-- Fields id 主键ID
-- Fields sid 帖子ID
-- Fields operate 操作码
DROP TABLE IF EXISTS pw_log_diary;
CREATE TABLE pw_log_diary(
id int(10) unsigned not null auto_increment,
sid int(10) unsigned not null default '0',
operate tinyint(3) not null default '1',
modified_time int(10) unsigned not null default '0',
primary key(id),
unique key idx_sid_operate(sid,operate)
)ENGINE=MyISAM;



-- TableName pw_log_posts 回复操作日志表
-- Created By phpwind@2010-10-25
-- Fields id 主键ID
-- Fields sid 帖子ID
-- Fields operate 操作码
DROP TABLE IF EXISTS pw_log_posts;
CREATE TABLE pw_log_posts(
id int(10) unsigned not null auto_increment,
sid int(10) unsigned not null default '0',
operate tinyint(3) not null default '1',
modified_time int(10) unsigned not null default '0',
primary key(id),
unique key idx_sid_operate(sid,operate)
)ENGINE=MyISAM;



-- TableName pw_log_threads 贴子操作日志表
-- Created By phpwind@2010-10-25
-- Fields id 主键ID
-- Fields sid 帖子ID
-- Fields operate 操作码
DROP TABLE IF EXISTS pw_log_threads;
CREATE TABLE pw_log_threads(
id int(10) unsigned not null auto_increment,
sid int(10) unsigned not null default '0',
operate tinyint(3) not null default '1',
modified_time int(10) unsigned not null default '0',
primary key(id),
unique key idx_sid_operate(sid,operate)
)ENGINE=MyISAM;



-- alter log --
-- alter index --
-- TableName pw_write_smiles 特殊表情表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields smileid 表情id
-- Fields typeid 表情组id,预留
-- Fields vieworder 排序
-- Fields path 路径
-- Fields name 表情名称
-- Fields tag 表情标签
-- Fields desciption 描述,预留DROP TABLE IF EXISTS pw_write_smiles;
CREATE TABLE pw_write_smiles (
smileid smallint(6) unsigned NOT NULL auto_increment,
typeid smallint(6) unsigned NOT NULL default '0',
vieworder tinyint(3) unsigned  NOT NULL default '0',
path varchar(20) NOT NULL default '',
name varchar(20) NOT NULL default '',
tag varchar(30) NOT NULL default '',
desciption varchar(100) NOT NULL default '',
PRIMARY KEY  (smileid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_wordfb 不良词语过滤
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 不良词汇id
-- Fields word 不良词汇
-- Fields wordreplace 不良词汇替换词
-- Fields type 操作类型(1表示禁用——2表示替换)
-- Fields wordtime 敏感词添加时间
-- Fields custom 是否为自定义类型
-- Fields classidDROP TABLE IF EXISTS pw_wordfb;
CREATE TABLE pw_wordfb (
id smallint(6) unsigned NOT NULL auto_increment,
word varchar(100) NOT NULL default '',
wordreplace varchar(100) NOT NULL default '',
type tinyint(3) NOT NULL default '0',
wordtime int(10) unsigned NOT NULL default '0',
custom tinyint(3) NOT NULL default '0',
classid tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY  (id)
) TYPE=MyISAM;


-- TableName pw_windcode 自定义代码信息表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 自定义代码id
-- Fields name 标签名称
-- Fields icon 图标文件名
-- Fields pattern 参数类型
-- Fields replacement 替换规则
-- Fields param 自定义代码类型
-- Fields ifopen 是否启用
-- Fields title 标题
-- Fields descrip 提示语言DROP TABLE IF EXISTS pw_windcode;
CREATE TABLE pw_windcode (
id smallint(6) unsigned NOT NULL auto_increment,
name varchar(15) NOT NULL default '',
icon varchar(30) NOT NULL default '',
pattern varchar(30) NOT NULL default '',
replacement text NOT NULL,
param tinyint(3) NOT NULL default '0',
ifopen tinyint(3) NOT NULL default '0',
title varchar(30) NOT NULL default '',
descrip varchar(100) NOT NULL default '',
PRIMARY KEY  (id)
) TYPE=MyISAM;


-- TableName pw_weibo_relations 新鲜事“我关注的新鲜事”关系表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户ID
-- Fields mid 新鲜事ID
-- Fields authorid 新鲜事作者ID
-- Fields type 新鲜事类型,日志、相册等
-- Fields postdate 新鲜事发表时间
-- Fields KEYDROP TABLE IF EXISTS pw_weibo_relations;
CREATE TABLE pw_weibo_relations (
`uid` int(10) unsigned NOT NULL default '0',
`mid` int(10) unsigned NOT NULL default '0',
`authorid` int(10) unsigned NOT NULL default '0',
`type` tinyint(1) unsigned NOT NULL default '0',
`postdate` int(10) unsigned NOT NULL default '0',
KEY `idx_mid` (`mid`),
KEY `idx_uid_postdate` (`uid`,`postdate`)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_weibo_referto 新鲜事@我的 关联表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户id
-- Fields mid 新鲜事idDROP TABLE IF EXISTS pw_weibo_referto;
CREATE TABLE pw_weibo_referto (
`uid` int(10) unsigned NOT NULL,
`mid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`uid`,`mid`)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_weibo_content 新鲜事内容表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields mid 新鲜事ID
-- Fields uid 作者ID
-- Fields content 内容
-- Fields extra 扩展字段
-- Fields contenttype 新鲜事内容格式类型(纯文字、含图片)
-- Fields type 新鲜事类型,日志、相册等
-- Fields objectid 新鲜事类型id,如日志ID、相册ID、帖子ID等
-- Fields replies 新鲜事回复数
-- Fields transmit 新鲜事转发数
-- Fields postdate 发布时间
-- Fields PRIMARY
-- Fields KEY
-- Fields KEYDROP TABLE IF EXISTS pw_weibo_content;
CREATE TABLE pw_weibo_content (
`mid` int(10) unsigned NOT NULL auto_increment,
`uid` int(10) unsigned NOT NULL default '0',
`content` text NOT NULL,
`extra` text NOT NULL,
`contenttype` tinyint(3) unsigned  NOT NULL default '0',
`type` tinyint(3) unsigned NOT NULL default '0',
`objectid` int(10) unsigned NOT NULL default '0',
`replies` mediumint(8) unsigned NOT NULL default '0',
`transmit` mediumint(8) unsigned NOT NULL default '0',
`postdate` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`mid`),
KEY `idx_uid_postdate` (`uid`,`postdate`),
KEY `idx_type_objectid` (`type`,`objectid`),
KEY `idx_postdate`( `postdate` )
) TYPE=MyISAM;


-- TableName pw_weibo_comment 新鲜事评论表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields cid 评论ID
-- Fields uid 评论者ID
-- Fields mid 新鲜事ID
-- Fields content 内容
-- Fields extra 新鲜事评论表添加扩展字段
-- Fields postdate 评论时间DROP TABLE IF EXISTS pw_weibo_comment;
CREATE TABLE pw_weibo_comment (
`cid` INT(10) unsigned NOT NULL AUTO_INCREMENT PRIMARY KEY ,
`uid` INT(10) unsigned NOT NULL default '0',
`mid` INT(10) unsigned NOT NULL default '0' ,
`content` varchar(250) NOT NULL default '' ,
`extra` text NOT NULL,
`postdate` int(10) unsigned NOT NULL default '0' ,
KEY idx_mid_postdate( `mid` , `postdate` )
) TYPE=MYISAM;


-- alter log --
-- alter index --
-- TableName pw_weibo_cnrelations 群组与新鲜事关联表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields cyid 群组ID
-- Fields mid 新鲜事IDDROP TABLE IF EXISTS pw_weibo_cnrelations;
CREATE TABLE pw_weibo_cnrelations (
`cyid` int(10) unsigned NOT NULL default '0',
`mid` int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (`cyid`,`mid`)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_weibo_cmrelations 新鲜事评论关系表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields cid 评论ID
-- Fields uid 被评论者ID
-- Fields PRIMARYDROP TABLE IF EXISTS pw_weibo_cmrelations;
CREATE TABLE pw_weibo_cmrelations (
`cid` int(10) unsigned NOT NULL ,
`uid` int(10) unsigned NOT NULL ,
PRIMARY KEY ( `cid` , `uid` )
) TYPE=MYISAM;


-- alter log --
-- alter index --
-- TableName pw_voter 会员投票表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields tid 主题ID
-- Fields uid 投票人用户UID
-- Fields username 投票人用户名
-- Fields vote 投票选项
-- Fields time 投票时间
-- Fields KEYDROP TABLE IF EXISTS pw_voter;
CREATE TABLE pw_voter (
tid int(10) unsigned NOT NULL default '0',
uid int(10) unsigned NOT NULL default '0',
username varchar(15) NOT NULL default '',
vote tinyint(3) unsigned NOT NULL default '0',
time int(10) unsigned NOT NULL default '0',
KEY idx_tid (tid),
KEY idx_uid (uid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_usertool 道具交易数据信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户ID
-- Fields toolid 道具id
-- Fields nums 交易数量
-- Fields sellnums 出售数量
-- Fields sellprice 出售价格
-- Fields sellstatus 是否开启用户的道具店DROP TABLE IF EXISTS pw_usertool;
CREATE TABLE pw_usertool (
uid int(10) unsigned NOT NULL default '0',
toolid smallint(6) NOT NULL default '0',
nums smallint(6) NOT NULL default '0',
sellnums smallint(6) NOT NULL default '0',
sellprice varchar(255) NOT NULL default '',
sellstatus tinyint(3) unsigned NOT NULL default '1',
KEY idx_uid (uid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_usergroups 用户组信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields gid 用户组id
-- Fields gptype 用户组分类
-- Fields grouptitle 用户组头衔
-- Fields groupimg 等级图片号
-- Fields grouppost 升级点数需求
-- Fields ifdefault 是否为默认组
-- Fields PRIMARY
-- Fields KEYDROP TABLE IF EXISTS pw_usergroups;
CREATE TABLE pw_usergroups (
gid smallint(5) unsigned NOT NULL auto_increment,
gptype enum('default','member','system','special') NOT NULL default 'member',
grouptitle varchar(60) NOT NULL default '',
groupimg varchar(15) NOT NULL default '',
grouppost int(10) NOT NULL default '0',
ifdefault tinyint(3) unsigned NOT NULL default '1',
PRIMARY KEY  (gid),
KEY idx_gptype (gptype),
KEY idx_grouppost (grouppost)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_usercache 用户数据缓存表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户ID
-- Fields type 缓存类型
-- Fields typeid 缓存数据对象的id
-- Fields expire 缓存有效期
-- Fields num 缓存数据条数
-- Fields value 缓存数据DROP TABLE IF EXISTS pw_usercache;
CREATE TABLE pw_usercache (
uid int(10) unsigned NOT NULL,
type varchar(255) NOT NULL default '',
typeid int(10) unsigned NOT NULL default '0',
expire int(10) unsigned NOT NULL default '0',
num smallint(6) unsigned NOT NULL default '0',
value text NOT NULL,
PRIMARY KEY (uid,type)
) ENGINE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_userbinding 用户帐号绑定/切换
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 自增ID
-- Fields uid 用户ID
-- Fields password 用户密码
-- Fields PRIMARYDROP TABLE IF EXISTS pw_userbinding;
CREATE TABLE pw_userbinding (
id int(10) unsigned NOT NULL auto_increment,
uid int(10) unsigned NOT NULL default '0',
password varchar(40) NOT NULL default '',
PRIMARY KEY  (id,uid),
UNIQUE KEY idx_uid (uid)
) ENGINE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_userapp 用户添加的应用的数据表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户ID
-- Fields appid 应用ID
-- Fields appname 应用名称
-- Fields appinfo 第三方APP个人属性(比如拥有山寨股市资金)
-- Fields appevent 第三方APP事件信息DROP TABLE IF EXISTS pw_userapp;
CREATE TABLE pw_userapp (
uid int(10) unsigned NOT NULL,
appid mediumint(8) unsigned NOT NULL default '0',
appname varchar(20) NOT NULL default '',
appinfo text NOT NULL,
appevent text NOT NULL,
PRIMARY KEY (uid,appid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_ucsyncredit 用户中心同步积分通知队列
-- Created By phpwind@2010-9-28 19:43:20
-- Fields uid 用户idDROP TABLE IF EXISTS pw_ucsyncredit;
CREATE TABLE pw_ucsyncredit (
uid int(10) unsigned NOT NULL,
PRIMARY KEY  (uid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_ucnotify 用户操作通知队列
-- Created By phpwind@2010-9-28 19:43:20
-- Fields nid 自增id
-- Fields action 用户操作
-- Fields param 操作所用到的参数
-- Fields timestamp 通知生成时间
-- Fields complete 是否通知完毕
-- Fields priority 通知的优先级DROP TABLE IF EXISTS pw_ucnotify;
CREATE TABLE pw_ucnotify (
nid mediumint(8) NOT NULL auto_increment,
action varchar(20) NOT NULL default '',
param text NOT NULL,
timestamp int(10) unsigned NOT NULL default '0',
complete tinyint(3) unsigned NOT NULL default '0',
priority tinyint(3) NOT NULL default '0',
PRIMARY KEY  (nid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_ucapp 用户中心信息表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 自增id
-- Fields name 应用名称
-- Fields siteurl 应用链接
-- Fields secretkey 应用密钥
-- Fields interface 应用接口文件
-- Fields uc 用户中心属性 0-客户端 1-服务端DROP TABLE IF EXISTS pw_ucapp;
CREATE TABLE pw_ucapp (
id smallint(5) unsigned NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
siteurl varchar(50) NOT NULL default '',
secretkey varchar(40) NOT NULL default '',
interface varchar(30) NOT NULL default '',
uc tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY  (id)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_tradeorder 交易记录表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields oid 表自增ID
-- Fields order_no 交易串
-- Fields tid 交易帖子ID
-- Fields subject 商品名称
-- Fields buyer 购买用户的ID
-- Fields seller 出售用户的ID
-- Fields price 商品价格
-- Fields quantity 购买数量
-- Fields transportfee 运送费用
-- Fields transport 运送方式
-- Fields buydate 购买日期
-- Fields tradedate 交易日期
-- Fields ifpay 交易状态(0:等待买家付款;1:买家已付款,等待卖家发货;2:卖家已发货,确认收货;3:交易完成;4:交易失败)
-- Fields address 收货地址
-- Fields consignee 收货人
-- Fields tel 联系电话
-- Fields zip 邮政编码
-- Fields descrip 给卖家留言
-- Fields payment 支付类型
-- Fields tradeinfo 交易信息DROP TABLE IF EXISTS pw_tradeorder;
CREATE TABLE pw_tradeorder (
oid mediumint(8) unsigned NOT NULL auto_increment,
order_no varchar(30) NOT NULL default '0',
tid int(10) unsigned NOT NULL default '0',
subject varchar(80) NOT NULL default '',
buyer int(10) unsigned NOT NULL default '0',
seller int(10) unsigned NOT NULL default '0',
price decimal(6,2) NOT NULL default '0',
quantity smallint(6) unsigned NOT NULL default '0',
transportfee decimal(4,2) NOT NULL default '0',
transport tinyint(3) unsigned NOT NULL default '0',
buydate int(10) unsigned NOT NULL default '0',
tradedate int(10) unsigned NOT NULL default '0',
ifpay tinyint(3) NOT NULL default '0',
address varchar(80) NOT NULL default '',
consignee varchar(15) NOT NULL default '',
tel varchar(15) NOT NULL default '',
zip varchar(15) NOT NULL default '',
descrip varchar(255) NOT NULL default '',
payment tinyint(3) unsigned NOT NULL default '0',
tradeinfo varchar(255) NOT NULL default '',
PRIMARY KEY  (oid),
UNIQUE KEY idx_orderno (order_no),
KEY idx_tid (tid),
KEY idx_buyer (buyer),
KEY idx_seller (seller)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_trade 交易帖子信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields tid 帖子id
-- Fields uid 用户ID
-- Fields name 商品名称
-- Fields icon 商品图片
-- Fields degree 商品新旧(0:全新,1:二手)
-- Fields type 商品分类
-- Fields num 商品数量
-- Fields salenum 售出数量
-- Fields price 商品价格
-- Fields costprice 总花费
-- Fields locus 所在地
-- Fields paymethod 付款方式
-- Fields transport 运送方式
-- Fields mailfee 平邮
-- Fields expressfee 快递
-- Fields emsfee EMS
-- Fields deadline 交易完成时间
-- Fields PRIMARYDROP TABLE IF EXISTS pw_trade;
CREATE TABLE pw_trade (
tid int(10) unsigned NOT NULL,
uid int(10) unsigned NOT NULL default '0',
name varchar(80) NOT NULL default '',
icon varchar(80) NOT NULL default '',
degree tinyint(3) unsigned NOT NULL default '0',
type smallint(6) unsigned NOT NULL default '0',
num smallint(6) unsigned NOT NULL default '0',
salenum smallint(6) unsigned NOT NULL default '0',
price decimal(8,2) NOT NULL default '0',
costprice decimal(8,2) NOT NULL default '0',
locus varchar(30) NOT NULL default '',
paymethod tinyint(3) unsigned NOT NULL default '0',
transport tinyint(3) unsigned NOT NULL default '0',
mailfee decimal(4,2) NOT NULL default '0',
expressfee decimal(4,2) NOT NULL default '0',
emsfee decimal(4,2) NOT NULL default '0',
deadline int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (tid),
KEY idx_uid (uid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_tpl 门户页模板
-- Created By phpwind@2010-9-28 19:43:20
-- Fields tplid 模板ID
-- Fields type 类型
-- Fields name 名字
-- Fields descrip 描述
-- Fields tagcode 系统标签代码
-- Fields image 模板预览图片
-- Fields PRIMARYDROP TABLE IF EXISTS pw_tpl;
CREATE TABLE pw_tpl (
tplid smallint(6) unsigned NOT NULL auto_increment,
type varchar(50) NOT NULL default '',
name varchar(50) NOT NULL default '',
descrip varchar(255) NOT NULL default '',
tagcode text NOT NULL,
image varchar(255) NOT NULL default '',
PRIMARY KEY  (tplid),
KEY idx_type (type)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_topictype 版块主题分类表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 表自增ID
-- Fields fid 该分类所属的版块ID
-- Fields name 分类的名称
-- Fields logo 分类图标
-- Fields vieworder 分类在帖子列页面的显示的顺序
-- Fields upid 二级分类的上级分类的IDDROP TABLE IF EXISTS pw_topictype;
CREATE TABLE pw_topictype (
id smallint(6) unsigned NOT NULL AUTO_INCREMENT,
fid smallint(6) unsigned NOT NULL default '0',
name varchar(255) NOT NULL default '',
logo varchar(255) NOT NULL default '',
vieworder tinyint(3) NOT NULL default '0',
upid smallint(6) unsigned NOT NULL default '0',
PRIMARY KEY  (id)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_topicmodel 主题分类模板信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields modelid 模板ID
-- Fields name 模板名称
-- Fields cateid 所在分类主题id
-- Fields ifable 是否可用
-- Fields vieworder 顺序
-- Fields PRIMARYDROP TABLE IF EXISTS pw_topicmodel;
CREATE TABLE pw_topicmodel (
modelid smallint(6) unsigned NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
cateid tinyint(3) unsigned NOT NULL default '0',
ifable tinyint(3) NOT NULL default '1',
vieworder tinyint(3) NOT NULL default '0',
PRIMARY KEY  (modelid),
KEY idx_cateid (cateid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_topicfield 主题分类模板字段表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields fieldid 字段ID
-- Fields name 字段名称
-- Fields fieldname 系统给予的字段名称,不可见
-- Fields modelid 所在模板ID
-- Fields vieworder 顺序
-- Fields type 字段类型
-- Fields rules 类型对应的使用规则
-- Fields ifable 是否可用
-- Fields ifsearch 是否为普通搜索条件
-- Fields ifasearch 是否为高级搜索条件
-- Fields threadshow 是否在主题列表页可见
-- Fields ifmust 是否为必填项
-- Fields textsize 框体显示长度
-- Fields descrip 字段描述
-- Fields PRIMARYDROP TABLE IF EXISTS pw_topicfield;
CREATE TABLE pw_topicfield (
fieldid smallint(6) unsigned NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
fieldname varchar(30) NOT NULL default '',
modelid smallint(6) unsigned NOT NULL default '0',
vieworder tinyint(3) NOT NULL default '0',
type varchar(20) NOT NULL default '0',
rules mediumtext NOT NULL,
ifable tinyint(3) NOT NULL default '1',
ifsearch tinyint(3) NOT NULL default '0',
ifasearch tinyint(3) NOT NULL default '0',
threadshow tinyint(3) NOT NULL default '0',
ifmust tinyint(3) NOT NULL default '1',
textsize tinyint(3) NOT NULL DEFAULT  '0',
descrip varchar(255) NOT NULL,
PRIMARY KEY  (fieldid),
KEY idx_modelid (modelid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_topiccate 主题分类表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields cateid 主题分类ID
-- Fields name 主题分类名称
-- Fields ifable 是否可用
-- Fields vieworder 顺序
-- Fields ifdel 是否可删除DROP TABLE IF EXISTS pw_topiccate;
CREATE TABLE pw_topiccate (
cateid tinyint(3) unsigned NOT NULL auto_increment,
name varchar(30) NOT NULL default '',
ifable tinyint(3) NOT NULL default '1',
vieworder tinyint(3) NOT NULL default '0',
ifdel tinyint(3) NOT NULL default '0',
PRIMARY KEY  (cateid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_tools 道具信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 道具id
-- Fields name 道具名称
-- Fields filename 文件名
-- Fields descrip 描述
-- Fields vieworder 显示顺序
-- Fields logo 连接
-- Fields state 是否可用
-- Fields price 价格
-- Fields creditype 使用积分限制
-- Fields rmb 道具现金价格
-- Fields type 道具分类
-- Fields stock 库存
-- Fields conditions 道具使用条件限制DROP TABLE IF EXISTS pw_tools;
CREATE TABLE pw_tools (
id smallint(6) NOT NULL auto_increment,
name varchar(20) NOT NULL default '',
filename varchar(20) NOT NULL default '',
descrip varchar(255) NOT NULL default '',
vieworder tinyint(3) NOT NULL default '0',
logo varchar(100) NOT NULL default '',
state tinyint(3) NOT NULL default '0',
price varchar(255) NOT NULL default '',
creditype varchar(10) NOT NULL default '',
rmb decimal(8,2) NOT NULL,
type tinyint(3) NOT NULL default '0',
stock smallint(6) NOT NULL default '0',
conditions text NOT NULL ,
PRIMARY KEY  (id)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_toollog 道具操作相关信息(与交易币相关)
-- Created By phpwind@2010-9-28 19:43:20
-- Fields id 操作id
-- Fields type 操作类型
-- Fields nums 数量
-- Fields money 价格
-- Fields descrip 描述
-- Fields uid 用户id
-- Fields username 用户名
-- Fields ip 用户ip地址
-- Fields time 时间
-- Fields filename 文件名
-- Fields touid 接受人id
-- Fields PRIMARY
-- Fields KEY
-- Fields KEYDROP TABLE IF EXISTS pw_toollog;
CREATE TABLE pw_toollog (
id int(10) unsigned NOT NULL auto_increment,
type varchar(10) NOT NULL default '',
nums smallint(6) NOT NULL default '0',
money smallint(6) NOT NULL default '0',
descrip varchar(255) NOT NULL default '',
uid int(10) unsigned NOT NULL default '0',
username varchar(15) NOT NULL default '',
ip varchar(15) NOT NULL default '',
time int(10) NOT NULL default '0',
filename varchar(20) NOT NULL default '',
touid int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (id),
KEY idx_uid (uid),
KEY idx_touid (touid),
KEY idx_type (type)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_tmsgs 贴子内容信息
-- Created By phpwind@2010-9-28 19:43:20
-- Fields tid 贴子id
-- Fields aid 贴子附件信息
-- Fields userip 来源ip
-- Fields ifsign 是否使用签名
-- Fields buy 贴子购买人信息
-- Fields ipfrom ip所在位置
-- Fields alterinfo 重编辑信息(不纪录论坛创始人和管理员的)
-- Fields remindinfo 管理提醒内容
-- Fields tags 标签
-- Fields ifconvert 是否进行windcode转换
-- Fields ifwordsfb 是否词语过滤
-- Fields content 贴子内容
-- Fields form 来源
-- Fields ifmark 评分信息
-- Fields c_from (文章系统)来源
-- Fields magic 魔法表情相关信息
-- Fields overprint 帖子印戳DROP TABLE IF EXISTS pw_tmsgs;
CREATE TABLE pw_tmsgs (
tid int(10) unsigned NOT NULL default '0',
aid SMALLINT(6) UNSIGNED NOT NULL DEFAULT  '0',
userip varchar(15) NOT NULL default '',
ifsign tinyint(3) NOT NULL default '0',
buy text NOT NULL,
ipfrom varchar(255) NOT NULL default '',
alterinfo varchar(50) NOT NULL default '',
remindinfo varchar(150) NOT NULL default '',
tags varchar(100) NOT NULL default '',
ifconvert tinyint(3) NOT NULL default '1',
ifwordsfb tinyint(3) NOT NULL default '1',
content mediumtext NOT NULL,
form varchar(30) NOT NULL default '',
ifmark varchar(255) NOT NULL default '',
c_from varchar(30) NOT NULL default '',
magic varchar(50) NOT NULL default '',
overprint smallint(6) not null default 0,
PRIMARY KEY  (tid)
) TYPE=MyISAM;


-- alter log --
-- alter index --
-- TableName pw_threads 帖子基本信息表
-- Created By phpwind@2010-9-28 19:43:20
-- Fields tid 贴子id
-- Fields fid 版块id
-- Fields icon 贴子图标
-- Fields titlefont 标题修饰(颜色,粗体等)
-- Fields author 发贴人
-- Fields authorid 发贴人id
-- Fields subject 标题
-- Fields toolinfo 使用道具记录
-- Fields toolfield 使用道具的时间
-- Fields ifcheck 是否验证
-- Fields type 贴子分类
-- Fields postdate 发贴时间
-- Fields lastpost 最后回复时间
-- Fields lastposter 最后回复人
-- Fields hits 点击率
-- Fields replies 回复人数
-- Fields favors 帖子被收藏次数
-- Fields modelid 分类模块ID
-- Fields shares 帖子分享次数
-- Fields topped 顶置信息0为不顶置,以此类推
-- Fields topreplays 被置顶到的版块
-- Fields locked 是否锁定
-- Fields digest 精华标志(跟顶置信息类似)0不是精华/1精华1/2精华2
-- Fields special 特殊帖
-- Fields state 帖子状态
-- Fields ifupload 是否上传附件
-- Fields ifmail 是否邮件通知有新回复
-- Fields ifmark 评分(总分数
-- Fields ifshield 是否被屏蔽
-- Fields anonymous 是否匿名帖
-- Fields dig 帖子支持数
-- Fields fight 帖子反对数(6.3已无效,不用)
-- Fields ptable 回复帖子内容所在分表
-- Fields ifmagic 是否为魔法表情帖
-- Fields ifhide 是否隐藏贴
-- Fields inspect 版主已阅
-- Fields tpcstatus 帖子状态信息
-- Fields PRIMARY
-- Fields KEY
-- Fields KEY
-- Fields KEY
-- Fields KEY
-- Fields KEYDROP TABLE IF EXISTS pw_threads;
-- Fields KEYDROP TABLE IF EXISTS pw_threads;
CREATE TABLE pw_threads (
tid int(10) unsigned NOT NULL auto_increment,
fid smallint(6) unsigned NOT NULL default '0',
icon tinyint(3) NOT NULL default '0',
titlefont varchar(15) NOT NULL default '',
author varchar(15) NOT NULL default '',
authorid int(10) unsigned NOT NULL default '0',
subject varchar(100) NOT NULL default '',
toolinfo varchar(16) NOT NULL default '',
toolfield varchar(21) NOT NULL default '',
ifcheck tinyint(3) NOT NULL default '0',
type smallint(6) NOT NULL default '0',
postdate int(10) unsigned NOT NULL default '0',
lastpost int(10) unsigned NOT NULL default '0',
lastposter varchar(15) NOT NULL default '',
hits int(10) unsigned NOT NULL default '0',
replies int(10) unsigned NOT NULL default '0',
favors INT( 10 ) NOT NULL DEFAULT '0',
modelid smallint(6) unsigned NOT NULL default '0',
shares mediumint(8) unsigned NOT NULL default '0',
topped smallint(6) NOT NULL default '0',
topreplays smallint(6) NOT NULL default '0',
locked tinyint(3) NOT NULL default '0',
digest tinyint(3) NOT NULL default '0',
special tinyint(3) NOT NULL default '0',
state tinyint(3) NOT NULL default '0',
ifupload tinyint(3) NOT NULL default '0',
ifmail tinyint(3) NOT NULL default '0',
ifmark smallint(6) NOT NULL default '0',
ifshield tinyint(3) NOT NULL default '0',
anonymous tinyint(3) NOT NULL default '0',
dig int(10) NOT NULL default '0',
fight int(10) NOT NULL default '0',
ptable tinyint(3) NOT NULL default '0',
ifmagic tinyint(3) NOT NULL default '0',
ifhide tinyint(3) NOT NULL default '0',
inspect varchar(30) NOT NULL default '',
tpcstatus int(10) unsigned NOT NULL default '0',
PRIMARY KEY  (tid),
本文链接:http://www.20m8.com/101.html

热门文章

phpMyAdmin各版本所需PHP版本说明

phpMyAdmin每个版本所支持的PHP版本都是不一样的,看了这个文章,你就不会再下载错了哈,省时省力。

查看全文 hehu158 于 2019-11-12 14:56 发表在 PHP开发 ( 阅读:11392 )

大商创后台邮箱服务器设置

查看全文 hehu158 于 2019-02-14 10:45 发表在 PHP开发 ( 阅读:6104 )

谷地网络GOOD设计

谷地网络GOOD设计,php开发,ucenter整合,qq互联申请开发

查看全文 hehu158 于 2014-07-22 11:56 发表在 PHP开发 ( 阅读:4773 )

ucenter整合 二次开发 调试

ucenter整合 二次开发 调试

查看全文 hehu158 于 2015-10-15 12:28 发表在 PHP开发 ( 阅读:4059 )

phpmailer配置发送邮件

phpmailer配置

查看全文 hehu158 于 2015-10-15 12:25 发表在 PHP开发 ( 阅读:4049 )

thinkphp二次开发

thinkphp二次开发

查看全文 hehu158 于 2015-10-15 12:26 发表在 PHP开发 ( 阅读:3948 )

大商创购买用户下单在线支付支付失败 签名错误 mch_id参数格式错误

查看全文 hehu158 于 2019-02-14 10:51 发表在 PHP开发 ( 阅读:3861 )

windows10 windows11如何安装宝塔7.x

通过windows10子系统,安装ubuntu,然后在ubuntu里安装最新版本的宝塔。

查看全文 hehu158 于 2020-02-12 10:57 发表在 PHP开发 ( 阅读:3749 )

onethink忘记密码

查看全文 hehu158 于 2018-05-24 10:35 发表在 PHP开发 ( 阅读:3558 )

给你的新订单新增一个实时微信提醒功能

微信模板消息,只要你有一个微信,一部有流量的手机,只要给你自己的网站增加一些功能,新订单提醒等内容随时随地第一时间掌握。

查看全文 hehu158 于 2019-11-14 09:36 发表在 PHP开发 ( 阅读:3414 )