微擎系统表结构以及数据关系说明

来源: dev:v0.6:dd – 微擎指导手册

Database: `we7_pro`

书写 SQL 语句时一定要注意规范, 不要加不必要的空格, Tab 等, “;” 结尾直接换行.

数据表图例

数据字典

核心 SQL

-- phpMyAdmin SQL Dump
-- version 4.1.6
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: 2015-01-27 11:00:31
-- 服务器版本: 5.5.39
-- PHP Version: 5.4.31
 
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";
 
--
-- Database: `we7_pro`
--
 
--
-- 表的结构 `ims_account`
--
 
CREATE TABLE IF NOT EXISTS `ims_account` (
  `acid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `hash` VARCHAR(8) NOT NULL,
  `type` tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT '1为微信,2为易信',
  `isconnect` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`acid`),
  KEY `idx_uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=437 ;
 
--
-- 表的结构 `ims_account_wechats`
--
 
CREATE TABLE IF NOT EXISTS `ims_account_wechats` (
  `acid` INT(10) UNSIGNED NOT NULL,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `token` VARCHAR(32) NOT NULL COMMENT '随机生成密钥',
  `encodingaeskey` VARCHAR(43) NOT NULL,
  `access_token` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '存取凭证结构',
  `jsapi_ticket` VARCHAR(1000) NOT NULL,
  `level` tinyint(4) UNSIGNED NOT NULL DEFAULT '0' COMMENT '接口权限级别, 0 普通订阅号, 1 认证订阅号|普通服务号, 2认证服务号',
  `name` VARCHAR(30) NOT NULL COMMENT '公众号名称',
  `account` VARCHAR(30) NOT NULL COMMENT '微信帐号',
  `original` VARCHAR(50) NOT NULL,
  `signature` VARCHAR(100) NOT NULL COMMENT '功能介绍',
  `country` VARCHAR(10) NOT NULL,
  `province` VARCHAR(3) NOT NULL,
  `city` VARCHAR(15) NOT NULL,
  `username` VARCHAR(30) NOT NULL,
  `password` VARCHAR(32) NOT NULL,
  `lastupdate` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `key` VARCHAR(50) NOT NULL,
  `secret` VARCHAR(50) NOT NULL,
  `styleid` INT(10) UNSIGNED NOT NULL DEFAULT '1' COMMENT '风格ID',
  `subscribeurl` VARCHAR(120) NOT NULL DEFAULT '' COMMENT '引导素材',
  PRIMARY KEY (`acid`),
  KEY `idx_key` (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
--
-- 表的结构 `ims_activity_coupon`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_coupon` (
  `couponid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '公号序号',
  `type` tinyint(4) NOT NULL COMMENT '优惠券类型. 1为折扣券, 2为代金券',
  `title` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '标题',
  `couponsn` VARCHAR(50) NOT NULL,
  `description` text COMMENT '描述',
  `discount` DECIMAL(10,2) NOT NULL COMMENT '折扣券(折扣率), 代金券(面额)',
  `condition` DECIMAL(10,2) NOT NULL COMMENT '订单满多少可用',
  `starttime` INT(10) UNSIGNED NOT NULL COMMENT '开始时间',
  `endtime` INT(10) UNSIGNED NOT NULL COMMENT '结束时间',
  `limit` INT(11) NOT NULL DEFAULT '0' COMMENT '每人限领',
  `dosage` INT(11) UNSIGNED NOT NULL DEFAULT '0' COMMENT '已领取数量',
  `amount` INT(11) UNSIGNED NOT NULL COMMENT '总发行数量',
  `thumb` VARCHAR(500) NOT NULL COMMENT '缩略图',
  `credittype` VARCHAR(20) NOT NULL,
  `credit` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`couponid`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=39 ;
 
--
-- 表的结构 `ims_activity_coupon_allocation`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_coupon_allocation` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `couponid` INT(10) UNSIGNED NOT NULL,
  `groupid` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`,`couponid`,`groupid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=407 ;
 
--
-- 表的结构 `ims_activity_coupon_password`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_coupon_password` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `name` VARCHAR(50) NOT NULL DEFAULT '',
  `password` VARCHAR(200) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
 
--
-- 表的结构 `ims_activity_coupon_record`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_coupon_record` (
  `recid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '序号',
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL COMMENT '用户编号',
  `grantmodule` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '发放模块',
  `granttime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '发放时间',
  `usemodule` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '使用模块',
  `usetime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '使用时间',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '状态: 0 未发放, 1 已发放, 2 已使用',
  `operator` VARCHAR(30) NOT NULL COMMENT '操作员',
  `remark` VARCHAR(300) NOT NULL DEFAULT '',
  `couponid` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`recid`),
  KEY `couponid` (`uid`,`grantmodule`,`usemodule`,`status`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=60 ;
 
--
-- 表的结构 `ims_activity_exchange`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_exchange` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(11) NOT NULL,
  `title` VARCHAR(100) NOT NULL COMMENT '物品名称',
  `description` VARCHAR(1000) NOT NULL COMMENT '描述信息',
  `thumb` VARCHAR(500) NOT NULL COMMENT '缩略图',
  `type` tinyint(1) UNSIGNED NOT NULL COMMENT '物品类型,1折扣券,2代金券,3实物,4虚拟物品(未启用),5营销模块操作次数',
  `extra` VARCHAR(3000) NOT NULL DEFAULT '' COMMENT '兑换产品属性',
  `credit` INT(10) UNSIGNED NOT NULL COMMENT '兑换积分数量',
  `credittype` VARCHAR(10) NOT NULL COMMENT '兑换积分类型',
  `pretotal` INT(11) NOT NULL COMMENT '每个人最大兑换次数',
  `num` INT(11) NOT NULL COMMENT '已兑换礼品数量',
  `total` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '总量',
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT '状态',
  `starttime` INT(10) UNSIGNED NOT NULL,
  `endtime` INT(10) NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL,
  `couponid` INT(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=72 ;
 
--
-- 表的结构 `ims_activity_exchange_trades`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_exchange_trades` (
  `tid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '统一公号',
  `uid` INT(10) UNSIGNED NOT NULL COMMENT '用户(粉丝)id',
  `exid` INT(10) UNSIGNED NOT NULL COMMENT '兑换产品 exchangeid',
  `type` INT(10) UNSIGNED NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '交换记录创建时间',
  PRIMARY KEY (`tid`),
  KEY `uniacid` (`uniacid`,`uid`,`exid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
 
--
-- 表的结构 `ims_activity_exchange_trades_shipping`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_exchange_trades_shipping` (
  `tid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `exid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '订单状态,0为正常,-1为关闭,1为已发货,2为已完成',
  `createtime` INT(10) UNSIGNED NOT NULL,
  `province` VARCHAR(30) NOT NULL,
  `city` VARCHAR(30) NOT NULL,
  `district` VARCHAR(30) NOT NULL,
  `address` VARCHAR(255) NOT NULL,
  `zipcode` VARCHAR(6) NOT NULL,
  `mobile` VARCHAR(30) NOT NULL,
  `name` VARCHAR(30) NOT NULL COMMENT '收件人',
  PRIMARY KEY (`tid`),
  KEY `uniacid` (`uniacid`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=16 ;
 
--
-- 表的结构 `ims_activity_modules`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_modules` (
  `mid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '公号ID',
  `exid` INT(10) UNSIGNED NOT NULL COMMENT '活动参与次数id',
  `module` VARCHAR(50) NOT NULL COMMENT '模块名称',
  `uid` INT(10) UNSIGNED NOT NULL COMMENT '用户ID',
  `available` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '可用次数',
  PRIMARY KEY (`mid`),
  KEY `uniacid` (`uniacid`),
  KEY `module` (`module`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=21 ;
 
--
-- 表的结构 `ims_activity_modules_record`
--
 
CREATE TABLE IF NOT EXISTS `ims_activity_modules_record` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `mid` INT(10) UNSIGNED NOT NULL,
  `num` tinyint(3) NOT NULL DEFAULT '0' COMMENT 'num=1表示兑换,num=-1表示消费',
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `mid` (`mid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
 
--
-- 表的结构 `ims_basic_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_basic_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `content` VARCHAR(1000) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=246 ;
 
--
-- 表的结构 `ims_core_attachment`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_attachment` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `filename` VARCHAR(255) NOT NULL,
  `attachment` VARCHAR(255) NOT NULL,
  `type` tinyint(3) UNSIGNED NOT NULL COMMENT '1.图片; 2.音乐;',
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=694 ;
 
--
-- 表的结构 `ims_core_cache`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_cache` (
  `key` VARCHAR(50) NOT NULL COMMENT '缓存键名',
  `value` mediumtext NOT NULL COMMENT '缓存内容',
  PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='缓存表';
 
 
 
--
-- 表的结构 `ims_core_paylog`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_paylog` (
  `plid` INT(11) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` VARCHAR(20) NOT NULL DEFAULT '',
  `uniacid` INT(11) NOT NULL,
  `acid` INT(11) NOT NULL,
  `openid` VARCHAR(40) NOT NULL DEFAULT '',
  `tid` VARCHAR(64) NOT NULL,
  `fee` DECIMAL(10,2) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `module` VARCHAR(50) NOT NULL DEFAULT '',
  `tag` VARCHAR(2000) NOT NULL DEFAULT '',
  PRIMARY KEY (`plid`),
  KEY `idx_openid` (`openid`),
  KEY `idx_tid` (`tid`),
  KEY `idx_uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=51 ;
 
--
-- 表的结构 `ims_core_performance`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_performance` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `type` tinyint(1) NOT NULL COMMENT '1:系统,2:数据库',
  `runtime` VARCHAR(10) NOT NULL COMMENT '运行时间',
  `runurl` VARCHAR(512) NOT NULL COMMENT '运行页面url',
  `runsql` VARCHAR(512) NOT NULL COMMENT '运行sql语句',
  `createtime` INT(10) NOT NULL COMMENT '记录时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=297223 ;
 
--
-- 表的结构 `ims_core_queue`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_queue` (
  `qid` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '逻辑主键',
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `acid` INT(10) UNSIGNED NOT NULL,
  `message` VARCHAR(2000) NOT NULL DEFAULT '',
  `params` VARCHAR(1000) NOT NULL DEFAULT '',
  `keyword` VARCHAR(1000) NOT NULL DEFAULT '',
  `response` VARCHAR(2000) NOT NULL DEFAULT '',
  `module` VARCHAR(50) NOT NULL DEFAULT '',
  `dateline` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`qid`),
  KEY `uniacid` (`uniacid`,`acid`),
  KEY `module` (`module`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5475 ;
 
--
-- 表的结构 `ims_core_resource`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_resource` (
  `mid` INT(11) NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `media_id` VARCHAR(100) NOT NULL,
  `trunk` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `type` VARCHAR(10) NOT NULL,
  `dateline` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`mid`),
  KEY `acid` (`uniacid`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
 
--
-- 表的结构 `ims_core_sessions`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_sessions` (
  `sid` CHAR(32) NOT NULL DEFAULT '' COMMENT 'sessionid唯一标识',
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '所属公众号',
  `openid` VARCHAR(50) NOT NULL COMMENT '用户唯一标识',
  `data` VARCHAR(500) NOT NULL,
  `expiretime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '超时时间',
  PRIMARY KEY (`sid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
--
-- 表的结构 `ims_core_settings`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_settings` (
  `key` VARCHAR(200) NOT NULL COMMENT '设置键名',
  `value` text NOT NULL COMMENT '设置内容,大量数据将序列化',
  PRIMARY KEY (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
--
-- 表的结构 `ims_core_wechats_attachment`
--
 
CREATE TABLE IF NOT EXISTS `ims_core_wechats_attachment` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `filename` VARCHAR(255) NOT NULL,
  `attachment` VARCHAR(255) NOT NULL,
  `media_id` VARCHAR(255) NOT NULL,
  `type` VARCHAR(15) NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `media_id` (`media_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=650 ;
 
--
-- 表的结构 `ims_cover_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_cover_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `multiid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `rid` INT(10) UNSIGNED NOT NULL,
  `module` VARCHAR(30) NOT NULL DEFAULT '',
  `do` VARCHAR(30) NOT NULL DEFAULT '',
  `title` VARCHAR(255) NOT NULL DEFAULT '',
  `description` VARCHAR(255) NOT NULL DEFAULT '',
  `thumb` VARCHAR(255) NOT NULL DEFAULT '',
  `url` VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=96 ;
 
--
-- 表的结构 `ims_cron`
--
 
CREATE TABLE IF NOT EXISTS `ims_cron` (
  `cronid` SMALLINT(6) UNSIGNED NOT NULL AUTO_INCREMENT,
  `available` tinyint(1) NOT NULL DEFAULT '0',
  `type` enum('user','system','plugin') NOT NULL DEFAULT 'user',
  `name` CHAR(50) NOT NULL DEFAULT '',
  `filename` CHAR(50) NOT NULL DEFAULT '',
  `lastrun` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `nextrun` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `weekday` tinyint(1) NOT NULL DEFAULT '0',
  `day` tinyint(2) NOT NULL DEFAULT '0',
  `hour` tinyint(2) NOT NULL DEFAULT '0',
  `minute` CHAR(36) NOT NULL DEFAULT '',
  PRIMARY KEY (`cronid`),
  KEY `nextrun` (`available`,`nextrun`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
 
--
-- 表的结构 `ims_custom_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_custom_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `start1` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `end1` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `start2` INT(10) UNSIGNED NOT NULL,
  `end2` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `rid` (`rid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=7 ;
 
--
-- 表的结构 `ims_images_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_images_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '规则ID',
  `title` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '标题',
  `description` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '介绍',
  `mediaid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '图片id',
  `createtime` INT(10) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=131 ;
 
--
-- 表的结构 `ims_mc_card`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_card` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `title` VARCHAR(100) NOT NULL DEFAULT '',
  `color` VARCHAR(255) NOT NULL DEFAULT '',
  `background` VARCHAR(255) NOT NULL DEFAULT '',
  `logo` VARCHAR(255) NOT NULL DEFAULT '',
  `format` VARCHAR(50) NOT NULL DEFAULT '',
  `fields` VARCHAR(1000) NOT NULL DEFAULT '',
  `snpos` INT(11) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '是否启用1:启用0:关闭',
  `business` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
 
--
-- 表的结构 `ims_mc_card_members`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_card_members` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) DEFAULT NULL,
  `cid` INT(10) NOT NULL DEFAULT '0',
  `cardsn` VARCHAR(20) NOT NULL DEFAULT '',
  `status` tinyint(1) NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=85 ;
 
--
-- 表的结构 `ims_mc_chats_record`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_chats_record` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `acid` INT(10) UNSIGNED NOT NULL,
  `flag` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  `openid` VARCHAR(32) NOT NULL,
  `msgtype` VARCHAR(15) NOT NULL,
  `content` VARCHAR(10000) NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`,`acid`),
  KEY `openid` (`openid`),
  KEY `createtime` (`createtime`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=86 ;
 
--
-- 表的结构 `ims_mc_credits_recharge`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_credits_recharge` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `tid` VARCHAR(20) NOT NULL,
  `transid` VARCHAR(30) NOT NULL,
  `fee` VARCHAR(10) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_uniacid_uid` (`uniacid`,`uid`),
  KEY `idx_tid` (`tid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;
 
--
-- 表的结构 `ims_mc_credits_record`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_credits_record` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `uid` INT(10) UNSIGNED NOT NULL,
  `uniacid` INT(11) NOT NULL,
  `credittype` VARCHAR(10) NOT NULL DEFAULT '',
  `num` DECIMAL(10,2) NOT NULL DEFAULT '0.00',
  `operator` INT(10) UNSIGNED NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL,
  `remark` VARCHAR(200) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `uid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=367 ;
 
--
-- 表的结构 `ims_mc_fans_groups`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_fans_groups` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `acid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `groups` VARCHAR(10000) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=5 ;
 
--
-- 表的结构 `ims_mc_groups`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_groups` (
  `groupid` INT(11) NOT NULL AUTO_INCREMENT,
  `uniacid` INT(11) NOT NULL DEFAULT '0',
  `title` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '会员组名称',
  `orderlist` tinyint(4) UNSIGNED NOT NULL DEFAULT '0',
  `isdefault` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`groupid`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=277 ;
 
--
-- 表的结构 `ims_mc_handsel`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_handsel` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) NOT NULL,
  `touid` INT(10) UNSIGNED NOT NULL COMMENT '用户uid',
  `fromuid` VARCHAR(32) NOT NULL COMMENT '来源',
  `module` VARCHAR(30) NOT NULL COMMENT '模块名称',
  `sign` VARCHAR(100) NOT NULL COMMENT '赠送积分的对象',
  `action` VARCHAR(20) NOT NULL COMMENT '动作(分享,阅读)',
  `credit_value` INT(10) UNSIGNED NOT NULL COMMENT '赠送积分多少',
  `createtime` INT(10) UNSIGNED NOT NULL COMMENT '记录添加时间',
  PRIMARY KEY (`id`),
  KEY `uid` (`touid`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=17 ;
 
--
-- 表的结构 `ims_mc_mapping_fans`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_mapping_fans` (
  `fanid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `acid` INT(10) UNSIGNED NOT NULL COMMENT '公众号ID',
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '统一公号(冗余列)',
  `uid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '统一用户',
  `openid` VARCHAR(255) NOT NULL COMMENT '用户的唯一身份ID',
  `groupid` INT(10) UNSIGNED DEFAULT '0' COMMENT '粉丝所在组id',
  `salt` CHAR(8) NOT NULL DEFAULT '' COMMENT '加密盐',
  `follow` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '是否订阅',
  `followtime` INT(10) UNSIGNED NOT NULL,
  `unfollowtime` INT(10) UNSIGNED NOT NULL,
  `tag` VARCHAR(1000) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
  `updatetime` INT(10) UNSIGNED DEFAULT '0' COMMENT '粉丝信息最后更新时间',
  PRIMARY KEY (`fanid`),
  UNIQUE KEY `sasdf` (`salt`),
  KEY `acid` (`acid`),
  KEY `uniacid` (`uniacid`),
  KEY `openid` (`openid`),
  KEY `updatetime` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=75171 ;
 
--
-- 表的结构 `ims_mc_members`
--
 
CREATE TABLE IF NOT EXISTS `ims_mc_members` (
  `uid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '统一公号ID',
  `mobile` VARCHAR(11) NOT NULL DEFAULT '' COMMENT '手机号码',
  `email` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '电子邮箱',
  `password` VARCHAR(32) NOT NULL DEFAULT '' COMMENT '密码',
  `salt` VARCHAR(8) NOT NULL DEFAULT '' COMMENT '盐',
  `groupid` INT(11) NOT NULL DEFAULT '0',
  `credit1` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '积分',
  `credit2` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00' COMMENT '余额',
  `credit3` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `credit4` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `credit5` DECIMAL(10,2) UNSIGNED NOT NULL DEFAULT '0.00',
  `createtime` INT(10) UNSIGNED NOT NULL COMMENT '加入时间',
  `realname` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '真实姓名',
  `nickname` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '昵称',
  `avatar` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '头像',
  `qq` VARCHAR(15) NOT NULL DEFAULT '' COMMENT 'QQ号',
  `vip` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT 'VIP级别,0为普通会员',
  `gender` tinyint(1) NOT NULL DEFAULT '0' COMMENT '性别(0:保密 1:男 2:女)',
  `birthyear` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0' COMMENT '生日年',
  `birthmonth` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT '生日月',
  `birthday` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT '生日',
  `constellation` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '星座',
  `zodiac` VARCHAR(5) NOT NULL DEFAULT '' COMMENT '生肖',
  `telephone` VARCHAR(15) NOT NULL DEFAULT '' COMMENT '固定电话',
  `idcard` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '证件号码',
  `studentid` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '学号',
  `grade` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '班级',
  `address` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '邮寄地址',
  `zipcode` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '邮编',
  `nationality` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '国籍',
  `resideprovince` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '居住省份',
  `residecity` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '居住城市',
  `residedist` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '居住行政区/县',
  `graduateschool` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '毕业学校',
  `company` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '公司',
  `education` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '学历',
  `occupation` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '职业',
  `position` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '职位',
  `revenue` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '年收入',
  `affectivestatus` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '情感状态',
  `lookingfor` VARCHAR(255) NOT NULL DEFAULT '' COMMENT ' 交友目的',
  `bloodtype` VARCHAR(5) NOT NULL DEFAULT '' COMMENT '血型',
  `height` VARCHAR(5) NOT NULL DEFAULT '' COMMENT '身高',
  `weight` VARCHAR(5) NOT NULL DEFAULT '' COMMENT '体重',
  `alipay` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '支付宝帐号',
  `msn` VARCHAR(30) NOT NULL DEFAULT '' COMMENT 'MSN',
  `taobao` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '阿里旺旺',
  `site` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '主页',
  `bio` text NOT NULL COMMENT '自我介绍',
  `interest` text NOT NULL COMMENT '兴趣爱好',
  PRIMARY KEY (`uid`),
  KEY `groupid` (`groupid`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9983 ;
 
--
-- 表的结构 `ims_modules`
--
 
CREATE TABLE IF NOT EXISTS `ims_modules` (
  `mid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(100) NOT NULL COMMENT '标识',
  `type` VARCHAR(20) NOT NULL DEFAULT '' COMMENT '类型',
  `title` VARCHAR(100) NOT NULL COMMENT '名称',
  `version` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '版本',
  `ability` VARCHAR(500) NOT NULL COMMENT '功能描述',
  `description` VARCHAR(1000) NOT NULL COMMENT '介绍',
  `author` VARCHAR(50) NOT NULL COMMENT '作者',
  `url` VARCHAR(255) NOT NULL COMMENT '发布页面',
  `settings` tinyint(1) NOT NULL DEFAULT '0' COMMENT '扩展设置项',
  `subscribes` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '订阅的消息类型',
  `handles` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '能够直接处理的消息类型',
  `isrulefields` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否有规则嵌入项',
  `issystem` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否是系统模块',
  `issolution` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `target` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  PRIMARY KEY (`mid`),
  KEY `idx_name` (`name`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=399 ;
 
--
-- 表的结构 `ims_modules_bindings`
--
 
CREATE TABLE IF NOT EXISTS `ims_modules_bindings` (
  `eid` INT(11) NOT NULL AUTO_INCREMENT,
  `module` VARCHAR(30) NOT NULL DEFAULT '',
  `entry` VARCHAR(10) NOT NULL DEFAULT '',
  `call` VARCHAR(50) NOT NULL DEFAULT '',
  `title` VARCHAR(50) NOT NULL,
  `do` VARCHAR(30) NOT NULL,
  `state` VARCHAR(200) NOT NULL,
  `direct` INT(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`eid`),
  KEY `idx_module` (`module`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2670 ;
 
--
-- 表的结构 `ims_music_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_music_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '规则ID',
  `title` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '标题',
  `description` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '介绍',
  `url` VARCHAR(300) NOT NULL DEFAULT '' COMMENT '音乐地址',
  `hqurl` VARCHAR(300) NOT NULL DEFAULT '' COMMENT '高清地址',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=167 ;
 
--
-- 表的结构 `ims_news_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_news_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL,
  `title` VARCHAR(50) NOT NULL,
  `author` VARCHAR(64) NOT NULL DEFAULT '' COMMENT '作者',
  `description` VARCHAR(255) NOT NULL,
  `thumb` VARCHAR(255) NOT NULL COMMENT '封面图片',
  `content` text NOT NULL,
  `url` VARCHAR(255) NOT NULL,
  `displayorder` INT(10) NOT NULL,
  `incontent` tinyint(1) NOT NULL DEFAULT '0' COMMENT '封面是否显示在正文中',
  `createtime` INT(10) NOT NULL COMMENT '发布时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=763 ;
 
--
-- 表的结构 `ims_profile_fields`
--
 
CREATE TABLE IF NOT EXISTS `ims_profile_fields` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `field` VARCHAR(255) NOT NULL,
  `available` tinyint(1) NOT NULL DEFAULT '1',
  `title` VARCHAR(255) NOT NULL,
  `description` VARCHAR(255) NOT NULL,
  `displayorder` SMALLINT(6) NOT NULL DEFAULT '0',
  `required` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否必填',
  `unchangeable` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否不可修改',
  `showinregister` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示在注册表单',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=37 ;
 
--
-- 表的结构 `ims_qrcode`
--
 
CREATE TABLE IF NOT EXISTS `ims_qrcode` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `acid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `qrcid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '二维码场景ID',
  `name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '场景名称',
  `keyword` VARCHAR(100) NOT NULL COMMENT '关联关键字',
  `model` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '模式,1临时,2为永久',
  `ticket` VARCHAR(250) NOT NULL DEFAULT '' COMMENT '标识',
  `expire` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '过期时间',
  `subnum` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '关注扫描次数',
  `createtime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '生成时间',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '0为未启用,1为启用',
  PRIMARY KEY (`id`),
  KEY `idx_qrcid` (`qrcid`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=24 ;
 
--
-- 表的结构 `ims_qrcode_stat`
--
 
CREATE TABLE IF NOT EXISTS `ims_qrcode_stat` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `acid` INT(10) UNSIGNED NOT NULL,
  `qid` INT(10) UNSIGNED NOT NULL,
  `openid` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '用户的唯一身份ID',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT '0' COMMENT '是否发生在订阅时',
  `qrcid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '二维码场景ID',
  `name` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '场景名称',
  `createtime` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '生成时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=8 ;
 
--
-- 表的结构 `ims_rule`
--
 
CREATE TABLE IF NOT EXISTS `ims_rule` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `name` VARCHAR(50) NOT NULL DEFAULT '',
  `module` VARCHAR(50) NOT NULL,
  `displayorder` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '规则排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '规则状态,0禁用,1启用,2置顶',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=432 ;
 
--
-- 表的结构 `ims_rule_keyword`
--
 
CREATE TABLE IF NOT EXISTS `ims_rule_keyword` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '规则ID',
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属帐号',
  `module` VARCHAR(50) NOT NULL COMMENT '对应模块',
  `content` VARCHAR(255) NOT NULL COMMENT '内容',
  `type` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '类型1匹配,2包含,3正则',
  `displayorder` tinyint(3) UNSIGNED NOT NULL DEFAULT '1' COMMENT '规则排序,255为置顶,其它为普通排序',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '规则状态,0禁用,1启用',
  PRIMARY KEY (`id`),
  KEY `idx_content` (`content`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1832 ;
 
--
-- 表的结构 `ims_site_article`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_article` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '关联规则id',
  `kid` INT(10) UNSIGNED NOT NULL COMMENT '关联关键字id',
  `iscommend` tinyint(1) NOT NULL DEFAULT '0',
  `ishot` tinyint(1) UNSIGNED NOT NULL DEFAULT '0',
  `pcate` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '一级分类',
  `ccate` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '二级分类',
  `template` VARCHAR(30) NOT NULL COMMENT '内容模板',
  `title` VARCHAR(100) NOT NULL DEFAULT '',
  `description` VARCHAR(100) NOT NULL DEFAULT '',
  `content` mediumtext NOT NULL,
  `thumb` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '缩略图',
  `source` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '来源',
  `author` VARCHAR(50) NOT NULL COMMENT '作者',
  `displayorder` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `linkurl` VARCHAR(500) NOT NULL DEFAULT '',
  `createtime` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `type` VARCHAR(10) NOT NULL DEFAULT '',
  `credit` VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `idx_iscommend` (`iscommend`),
  KEY `idx_ishot` (`ishot`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;
 
--
-- 表的结构 `ims_site_category`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_category` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '所属帐号',
  `nid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '关联导航id',
  `name` VARCHAR(50) NOT NULL COMMENT '分类名称',
  `parentid` INT(10) UNSIGNED NOT NULL DEFAULT '0' COMMENT '上级分类ID,0为第一级',
  `displayorder` tinyint(3) UNSIGNED NOT NULL DEFAULT '0' COMMENT '排序',
  `enabled` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '是否开启',
  `icon` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '分类图标',
  `description` VARCHAR(100) NOT NULL DEFAULT '' COMMENT '分类描述',
  `styleid` INT(10) UNSIGNED NOT NULL COMMENT '风格id',
  `templatefile` VARCHAR(100) NOT NULL DEFAULT '',
  `linkurl` VARCHAR(500) NOT NULL DEFAULT '',
  `ishomepage` tinyint(1) NOT NULL DEFAULT '0',
  `icontype` tinyint(1) UNSIGNED NOT NULL,
  `css` VARCHAR(500) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
 
--
-- 表的结构 `ims_site_multi`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_multi` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `title` VARCHAR(30) NOT NULL,
  `styleid` INT(10) UNSIGNED NOT NULL COMMENT '风格id',
  `site_info` text NOT NULL,
  `quickmenu` VARCHAR(2000) NOT NULL,
  `status` tinyint(3) UNSIGNED NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='多微站' AUTO_INCREMENT=183 ;
 
--
-- 表的结构 `ims_site_nav`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_nav` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `multiid` INT(10) UNSIGNED NOT NULL,
  `section` tinyint(4) NOT NULL DEFAULT '0',
  `module` VARCHAR(50) NOT NULL DEFAULT '',
  `displayorder` SMALLINT(5) UNSIGNED NOT NULL COMMENT '排序',
  `name` VARCHAR(50) NOT NULL COMMENT '导航名称',
  `description` VARCHAR(1000) NOT NULL DEFAULT '',
  `position` tinyint(4) NOT NULL DEFAULT '1' COMMENT '显示位置,1首页,2个人中心',
  `url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '链接地址',
  `icon` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '图标',
  `css` VARCHAR(1000) NOT NULL DEFAULT '' COMMENT '扩展CSS',
  `status` tinyint(1) UNSIGNED NOT NULL DEFAULT '1' COMMENT '0为隐藏,1为显示',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `muiltiid` (`multiid`),
  KEY `multiid` (`multiid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=381 ;
 
--
-- 表的结构 `ims_site_slide`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_slide` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `multiid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `title` VARCHAR(255) NOT NULL,
  `url` VARCHAR(255) NOT NULL DEFAULT '',
  `thumb` VARCHAR(255) NOT NULL DEFAULT '',
  `displayorder` tinyint(4) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `uniacid` (`uniacid`),
  KEY `multiid` (`multiid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;
 
--
-- 表的结构 `ims_site_styles`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_styles` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `templateid` INT(10) UNSIGNED NOT NULL,
  `name` VARCHAR(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=170 ;
 
--
-- 表的结构 `ims_site_styles_vars`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_styles_vars` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `templateid` INT(10) UNSIGNED NOT NULL COMMENT '风格ID',
  `styleid` INT(10) UNSIGNED NOT NULL,
  `variable` VARCHAR(50) NOT NULL COMMENT '模板预设变量',
  `content` text NOT NULL COMMENT '变量值',
  `description` VARCHAR(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=3 ;
 
--
-- 表的结构 `ims_site_templates`
--
 
CREATE TABLE IF NOT EXISTS `ims_site_templates` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(30) NOT NULL DEFAULT '' COMMENT '标识',
  `version` VARCHAR(10) NOT NULL,
  `title` VARCHAR(30) NOT NULL COMMENT '名称',
  `description` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '描述',
  `author` VARCHAR(50) NOT NULL COMMENT '作者',
  `url` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '发布页面',
  `type` VARCHAR(20) NOT NULL DEFAULT '',
  `sections` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=212 ;
 
--
-- 表的结构 `ims_stat_keyword`
--
 
CREATE TABLE IF NOT EXISTS `ims_stat_keyword` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '所属帐号ID',
  `rid` VARCHAR(10) NOT NULL COMMENT '规则ID',
  `kid` INT(10) UNSIGNED NOT NULL COMMENT '关键字ID',
  `hit` INT(10) UNSIGNED NOT NULL COMMENT '命中次数',
  `lastupdate` INT(10) UNSIGNED NOT NULL COMMENT '最后触发时间',
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_createtime` (`createtime`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1028 ;
 
--
-- 表的结构 `ims_stat_msg_history`
--
 
CREATE TABLE IF NOT EXISTS `ims_stat_msg_history` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '所属帐号ID',
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '命中规则ID',
  `kid` INT(10) UNSIGNED NOT NULL COMMENT '命中关键字ID',
  `from_user` VARCHAR(50) NOT NULL COMMENT '用户的唯一身份ID',
  `module` VARCHAR(50) NOT NULL COMMENT '命中模块',
  `message` VARCHAR(1000) NOT NULL COMMENT '用户发送的消息',
  `type` VARCHAR(10) NOT NULL DEFAULT '' COMMENT '消息类型',
  `createtime` INT(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_createtime` (`createtime`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=4221 ;
 
--
-- 表的结构 `ims_stat_rule`
--
 
CREATE TABLE IF NOT EXISTS `ims_stat_rule` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL COMMENT '所属帐号ID',
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '规则ID',
  `hit` INT(10) UNSIGNED NOT NULL COMMENT '命中次数',
  `lastupdate` INT(10) UNSIGNED NOT NULL COMMENT '最后触发时间',
  `createtime` INT(10) UNSIGNED NOT NULL COMMENT '记录新建的日期',
  PRIMARY KEY (`id`),
  KEY `idx_createtime` (`createtime`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=2572 ;
 
--
-- 表的结构 `ims_uni_account`
--
 
CREATE TABLE IF NOT EXISTS `ims_uni_account` (
  `uniacid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `groupid` INT(10) NOT NULL DEFAULT '0',
  `name` VARCHAR(100) NOT NULL,
  `description` VARCHAR(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`uniacid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=444 ;
 
--
-- 表的结构 `ims_uni_account_modules`
--
 
CREATE TABLE IF NOT EXISTS `ims_uni_account_modules` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `module` VARCHAR(50) NOT NULL DEFAULT '',
  `enabled` tinyint(1) UNSIGNED NOT NULL,
  `settings` text NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_module` (`module`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=1674 ;
 
--
-- 表的结构 `ims_uni_account_users`
--
 
CREATE TABLE IF NOT EXISTS `ims_uni_account_users` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `role` VARCHAR(255) NOT NULL COMMENT 'manager管理员,operator操作者',
  PRIMARY KEY (`id`),
  KEY `idx_memberid` (`uid`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=442 ;
 
--
-- 表的结构 `ims_uni_group`
--
 
CREATE TABLE IF NOT EXISTS `ims_uni_group` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(50) NOT NULL,
  `modules` VARCHAR(5000) NOT NULL DEFAULT '',
  `templates` VARCHAR(5000) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
 
--
-- 表的结构 `ims_uni_settings`
--
 
CREATE TABLE IF NOT EXISTS `ims_uni_settings` (
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `passport` VARCHAR(200) NOT NULL DEFAULT '' COMMENT '会员中心注册参数',
  `oauth` VARCHAR(100) NOT NULL DEFAULT '',
  `jsauth_acid` INT(10) UNSIGNED NOT NULL,
  `uc` VARCHAR(500) NOT NULL COMMENT 'ucenter 通信参数',
  `notify` VARCHAR(2000) NOT NULL DEFAULT '',
  `creditnames` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '积分别名',
  `creditbehaviors` VARCHAR(500) NOT NULL DEFAULT '' COMMENT '积分行为说明',
  `welcome` VARCHAR(60) NOT NULL DEFAULT '',
  `default` VARCHAR(60) NOT NULL DEFAULT '',
  `default_message` VARCHAR(1000) NOT NULL DEFAULT '',
  `shortcuts` VARCHAR(5000) NOT NULL DEFAULT '',
  `payment` VARCHAR(2000) NOT NULL DEFAULT '',
  `groupdata` VARCHAR(100) NOT NULL,
  `stat` VARCHAR(300) NOT NULL,
  `menuset` text NOT NULL,
  `default_site` INT(10) UNSIGNED DEFAULT '0',
  `sync` tinyint(3) UNSIGNED NOT NULL,
  PRIMARY KEY (`uniacid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
 
--
-- 表的结构 `ims_users`
--
 
CREATE TABLE IF NOT EXISTS `ims_users` (
  `uid` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户编号',
  `groupid` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `username` VARCHAR(30) NOT NULL COMMENT '用户名',
  `password` VARCHAR(200) NOT NULL COMMENT '用户密码',
  `salt` VARCHAR(10) NOT NULL COMMENT '加密盐',
  `status` tinyint(4) NOT NULL DEFAULT '0',
  `joindate` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `joinip` VARCHAR(15) NOT NULL DEFAULT '',
  `lastvisit` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `lastip` VARCHAR(15) NOT NULL DEFAULT '',
  `remark` VARCHAR(500) NOT NULL DEFAULT '',
  PRIMARY KEY (`uid`),
  UNIQUE KEY `username` (`username`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 COMMENT='用户表' AUTO_INCREMENT=74 ;
 
--
-- 表的结构 `ims_users_group`
--
 
CREATE TABLE IF NOT EXISTS `ims_users_group` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` VARCHAR(50) NOT NULL,
  `package` VARCHAR(5000) NOT NULL DEFAULT '',
  `maxaccount` INT(10) UNSIGNED NOT NULL DEFAULT '0',
  `maxsubaccount` INT(10) UNSIGNED NOT NULL COMMENT '子公号最多添加数量,为0为不可以添加',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=11 ;
 
--
-- 表的结构 `ims_users_permission`
--
 
CREATE TABLE IF NOT EXISTS `ims_users_permission` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uniacid` INT(10) UNSIGNED NOT NULL,
  `uid` INT(10) UNSIGNED NOT NULL,
  `url` VARCHAR(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=22 ;
 
--
-- 表的结构 `ims_users_profile`
--
 
CREATE TABLE IF NOT EXISTS `ims_users_profile` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `uid` INT(10) UNSIGNED NOT NULL,
  `createtime` INT(10) UNSIGNED NOT NULL COMMENT '加入时间',
  `realname` VARCHAR(10) NOT NULL DEFAULT '',
  `nickname` VARCHAR(20) NOT NULL DEFAULT '',
  `avatar` VARCHAR(100) NOT NULL DEFAULT '',
  `qq` VARCHAR(15) NOT NULL DEFAULT '',
  `mobile` VARCHAR(11) NOT NULL DEFAULT '',
  `fakeid` VARCHAR(30) NOT NULL,
  `vip` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `gender` tinyint(1) NOT NULL DEFAULT '0',
  `birthyear` SMALLINT(6) UNSIGNED NOT NULL DEFAULT '0',
  `birthmonth` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `birthday` tinyint(3) UNSIGNED NOT NULL DEFAULT '0',
  `constellation` VARCHAR(10) NOT NULL DEFAULT '',
  `zodiac` VARCHAR(5) NOT NULL DEFAULT '',
  `telephone` VARCHAR(15) NOT NULL DEFAULT '',
  `idcard` VARCHAR(30) NOT NULL DEFAULT '',
  `studentid` VARCHAR(50) NOT NULL DEFAULT '',
  `grade` VARCHAR(10) NOT NULL DEFAULT '',
  `address` VARCHAR(255) NOT NULL DEFAULT '',
  `zipcode` VARCHAR(10) NOT NULL DEFAULT '',
  `nationality` VARCHAR(30) NOT NULL DEFAULT '',
  `resideprovince` VARCHAR(30) NOT NULL DEFAULT '',
  `residecity` VARCHAR(30) NOT NULL DEFAULT '',
  `residedist` VARCHAR(30) NOT NULL DEFAULT '',
  `graduateschool` VARCHAR(50) NOT NULL DEFAULT '',
  `company` VARCHAR(50) NOT NULL DEFAULT '',
  `education` VARCHAR(10) NOT NULL DEFAULT '',
  `occupation` VARCHAR(30) NOT NULL DEFAULT '',
  `position` VARCHAR(30) NOT NULL DEFAULT '',
  `revenue` VARCHAR(10) NOT NULL DEFAULT '',
  `affectivestatus` VARCHAR(30) NOT NULL DEFAULT '',
  `lookingfor` VARCHAR(255) NOT NULL DEFAULT '',
  `bloodtype` VARCHAR(5) NOT NULL DEFAULT '',
  `height` VARCHAR(5) NOT NULL DEFAULT '',
  `weight` VARCHAR(5) NOT NULL DEFAULT '',
  `alipay` VARCHAR(30) NOT NULL DEFAULT '',
  `msn` VARCHAR(30) NOT NULL DEFAULT '',
  `email` VARCHAR(50) NOT NULL DEFAULT '',
  `taobao` VARCHAR(30) NOT NULL DEFAULT '',
  `site` VARCHAR(30) NOT NULL DEFAULT '',
  `bio` text NOT NULL COMMENT '自我介绍',
  `interest` text NOT NULL COMMENT '兴趣爱好',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=19 ;
 
--
-- 表的结构 `ims_video_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_video_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '规则ID',
  `title` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '标题',
  `description` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '介绍',
  `mediaid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '视频id',
  `createtime` INT(10) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=157 ;
 
--
-- 表的结构 `ims_voice_reply`
--
 
CREATE TABLE IF NOT EXISTS `ims_voice_reply` (
  `id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `rid` INT(10) UNSIGNED NOT NULL COMMENT '规则ID',
  `title` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '标题',
  `mediaid` VARCHAR(255) NOT NULL DEFAULT '' COMMENT '语音id',
  `createtime` INT(10) NOT NULL COMMENT '创建时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=9 ;
赞(0) 打赏
分享到: 更多 (0)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

微信扫一扫打赏