SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `cms_admin`
-- ----------------------------
DROP TABLE IF EXISTS `cms_admin`;
CREATE TABLE IF NOT EXISTS `cms_admin` (
`userid` mediumint(6) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(50) DEFAULT NULL COMMENT '用户名',
`password` varchar(50) DEFAULT NULL COMMENT '加密密码',
`login_attr` varchar(100) NOT NULL DEFAULT '' COMMENT '登录附加验证字符',
`roleid` varchar(255) NOT NULL COMMENT '权限id',
`encrypt` varchar(50) NOT NULL COMMENT '随机加密码',
`lastloginip` varchar(200) DEFAULT NULL COMMENT '最后登录Ip',
`lastlogintime` int(10) unsigned DEFAULT '0' COMMENT '最后登录时间',
`email` varchar(50) DEFAULT NULL COMMENT '邮箱地址',
`islock` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '账号锁定标识',
`realname` varchar(50) NOT NULL DEFAULT '' COMMENT '姓名',
`lang` VARCHAR(6) NOT NULL COMMENT '语言',
PRIMARY KEY (`userid`),
KEY `username` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_admin_login`
-- ----------------------------
DROP TABLE IF EXISTS `cms_admin_login`;
CREATE TABLE IF NOT EXISTS `cms_admin_login` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uid` mediumint(8) unsigned DEFAULT NULL COMMENT '会员uid',
`is_login` int(10) unsigned DEFAULT NULL COMMENT '是否首次登录',
`is_repwd` int(10) unsigned DEFAULT NULL COMMENT '是否重置密码',
`updatetime` int(10) unsigned NOT NULL COMMENT '修改密码时间',
`logintime` int(10) unsigned NOT NULL COMMENT '最近登录时间',
PRIMARY KEY (`id`),
KEY `uid` (`uid`),
KEY `logintime` (`logintime`),
KEY `updatetime` (`updatetime`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_admin_panel`
-- ----------------------------
DROP TABLE IF EXISTS `cms_admin_panel`;
CREATE TABLE IF NOT EXISTS `cms_admin_panel` (
`menuid` mediumint(8) unsigned NOT NULL COMMENT '菜单id',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '管理员userid',
`name` char(32) DEFAULT NULL COMMENT '名称',
`icon` varchar(255) NULL DEFAULT NULL COMMENT '图标标示',
`url` char(255) DEFAULT NULL COMMENT '外链地址',
`datetime` int(10) unsigned DEFAULT '0' COMMENT '时间',
UNIQUE KEY `userid` (`menuid`,`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_admin_role`
-- ----------------------------
DROP TABLE IF EXISTS `cms_admin_role`;
CREATE TABLE IF NOT EXISTS `cms_admin_role` (
`roleid` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`rolename` varchar(50) NOT NULL COMMENT '角色名称',
`description` text NOT NULL COMMENT '角色描述',
`listorder` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
`disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态',
PRIMARY KEY (`roleid`),
KEY `listorder` (`listorder`),
KEY `disabled` (`disabled`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_admin_role_priv`
-- ----------------------------
DROP TABLE IF EXISTS `cms_admin_role_priv`;
CREATE TABLE IF NOT EXISTS `cms_admin_role_priv` (
`roleid` tinyint(3) unsigned NOT NULL DEFAULT '0',
`menuid` mediumint(8) unsigned NOT NULL COMMENT '菜单id',
`m` char(20) NOT NULL,
`c` char(20) NOT NULL,
`a` char(20) NOT NULL,
`data` char(30) NOT NULL DEFAULT '',
`siteid` smallint(5) unsigned NOT NULL DEFAULT '0',
KEY `roleid` (`roleid`,`menuid`,`m`,`c`,`a`,`siteid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_attachment`
-- ----------------------------
DROP TABLE IF EXISTS `cms_attachment`;
CREATE TABLE IF NOT EXISTS `cms_attachment` (
`aid` int(10) unsigned NOT NULL AUTO_INCREMENT,
`module` char(15) NOT NULL,
`catid` smallint(5) unsigned NOT NULL DEFAULT '0',
`filename` varchar(255) NOT NULL,
`filepath` char(200) NOT NULL,
`filesize` int(10) unsigned NOT NULL DEFAULT '0',
`fileext` char(10) NOT NULL,
`isimage` tinyint(1) unsigned NOT NULL DEFAULT '0',
`isthumb` tinyint(1) unsigned NOT NULL DEFAULT '0',
`downloads` mediumint(8) unsigned NOT NULL DEFAULT '0',
`userid` mediumint(8) unsigned NOT NULL DEFAULT '0',
`uploadtime` int(10) unsigned NOT NULL DEFAULT '0',
`uploadip` char(200) NOT NULL,
`status` tinyint(1) NOT NULL DEFAULT '0',
`authcode` char(32) NOT NULL,
`filemd5` varchar(50) NOT NULL COMMENT '文件md5值',
`remote` tinyint(2) unsigned NOT NULL DEFAULT '0' COMMENT '远程附件id',
`attachinfo` text NOT NULL COMMENT '附件信息',
`related` varchar(50) NOT NULL COMMENT '相关表标识',
`siteid` smallint(5) unsigned NOT NULL DEFAULT '0',
PRIMARY KEY (`aid`),
KEY `authcode` (`authcode`),
KEY `relatedtid` (`related`),
KEY `fileext` (`fileext`),
KEY `filemd5` (`filemd5`),
KEY `siteid` (`siteid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_attachment_index`
-- ----------------------------
DROP TABLE IF EXISTS `cms_attachment_index`;
CREATE TABLE IF NOT EXISTS `cms_attachment_index` (
`keyid` char(30) NOT NULL,
`aid` char(10) NOT NULL,
KEY `keyid` (`keyid`),
KEY `aid` (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_attachment_remote`
-- ----------------------------
DROP TABLE IF EXISTS `cms_attachment_remote`;
CREATE TABLE IF NOT EXISTS `cms_attachment_remote` (
`id` tinyint(2) unsigned NOT NULL AUTO_INCREMENT,
`type` tinyint(2) NOT NULL COMMENT '类型',
`name` varchar(50) NOT NULL COMMENT '名称',
`url` varchar(255) NOT NULL COMMENT '访问地址',
`value` text NOT NULL COMMENT '参数值',
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_badword`
-- ----------------------------
DROP TABLE IF EXISTS `cms_badword`;
CREATE TABLE IF NOT EXISTS `cms_badword` (
`badid` smallint(5) unsigned NOT NULL auto_increment,
`badword` char(20) NOT NULL,
`level` tinyint(5) NOT NULL default '1',
`replaceword` char(20) NOT NULL default '0',
`lastusetime` int(10) unsigned NOT NULL default '0',
`listorder` tinyint(3) unsigned NOT NULL default '0',
PRIMARY KEY (`badid`),
UNIQUE KEY `badword` (`badword`),
KEY `usetimes` (`replaceword`,`listorder`),
KEY `hits` (`listorder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_block`
-- ----------------------------
DROP TABLE IF EXISTS `cms_block`;
CREATE TABLE IF NOT EXISTS `cms_block` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`siteid` smallint(5) unsigned DEFAULT '0',
`name` char(50) DEFAULT NULL,
`pos` char(30) DEFAULT NULL,
`type` tinyint(1) DEFAULT '0',
`data` text,
`template` text,
PRIMARY KEY (`id`),
KEY `pos` (`pos`),
KEY `type` (`type`),
KEY `siteid` (`siteid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_block_history`
-- ----------------------------
DROP TABLE IF EXISTS `cms_block_history`;
CREATE TABLE IF NOT EXISTS `cms_block_history` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`blockid` int(10) unsigned DEFAULT '0',
`data` text,
`creat_at` int(10) unsigned DEFAULT '0',
`userid` mediumint(8) unsigned DEFAULT '0',
`username` char(50) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE utf8mb4_unicode_ci;
-- ----------------------------
-- Table structure for `cms_block_priv`
-- ----------------------------
DROP TABLE IF EXISTS `cms_bloc