|
|
--
|
|
|
-- 表的结构 `cmf_admin_menu`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_admin_menu` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父菜单id',
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '菜单类型;1:有界面可访问菜单,2:无界面可访问菜单,0:只作为菜单',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态;1:显示,0:不显示',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`app` varchar(15) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '应用名',
|
|
|
`controller` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '控制器名',
|
|
|
`action` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '操作名称',
|
|
|
`param` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '额外参数',
|
|
|
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单名称',
|
|
|
`icon` varchar(20) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '菜单图标',
|
|
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '备注'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb4 COMMENT='后台菜单表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_admin_menu`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_admin_menu` VALUES ('1', '0', '0', '1', '20', 'admin', 'Plugin', 'default', '', '插件管理', 'cloud', '插件管理'), ('2', '1', '1', '1', '10000', 'admin', 'Hook', 'index', '', '钩子管理', '', '钩子管理'), ('3', '2', '1', '0', '10000', 'admin', 'Hook', 'plugins', '', '钩子插件管理', '', '钩子插件管理'), ('4', '2', '2', '0', '10000', 'admin', 'Hook', 'pluginListOrder', '', '钩子插件排序', '', '钩子插件排序'), ('5', '2', '1', '0', '10000', 'admin', 'Hook', 'sync', '', '同步钩子', '', '同步钩子'), ('6', '0', '0', '1', '0', 'admin', 'Setting', 'default', '', '设置', 'cogs', '系统设置入口'), ('7', '6', '1', '1', '50', 'admin', 'Link', 'index', '', '友情链接', '', '友情链接管理'), ('8', '7', '1', '0', '10000', 'admin', 'Link', 'add', '', '添加友情链接', '', '添加友情链接'), ('9', '7', '2', '0', '10000', 'admin', 'Link', 'addPost', '', '添加友情链接提交保存', '', '添加友情链接提交保存'), ('10', '7', '1', '0', '10000', 'admin', 'Link', 'edit', '', '编辑友情链接', '', '编辑友情链接'), ('11', '7', '2', '0', '10000', 'admin', 'Link', 'editPost', '', '编辑友情链接提交保存', '', '编辑友情链接提交保存'), ('12', '7', '2', '0', '10000', 'admin', 'Link', 'delete', '', '删除友情链接', '', '删除友情链接'), ('13', '7', '2', '0', '10000', 'admin', 'Link', 'listOrder', '', '友情链接排序', '', '友情链接排序'), ('14', '7', '2', '0', '10000', 'admin', 'Link', 'toggle', '', '友情链接显示隐藏', '', '友情链接显示隐藏'), ('15', '6', '1', '1', '10', 'admin', 'Mailer', 'index', '', '邮箱配置', '', '邮箱配置'), ('16', '15', '2', '0', '10000', 'admin', 'Mailer', 'indexPost', '', '邮箱配置提交保存', '', '邮箱配置提交保存'), ('17', '15', '1', '0', '10000', 'admin', 'Mailer', 'template', '', '邮件模板', '', '邮件模板'), ('18', '15', '2', '0', '10000', 'admin', 'Mailer', 'templatePost', '', '邮件模板提交', '', '邮件模板提交'), ('19', '15', '1', '0', '10000', 'admin', 'Mailer', 'test', '', '邮件发送测试', '', '邮件发送测试'), ('20', '6', '1', '0', '10000', 'admin', 'Menu', 'index', '', '后台菜单', '', '后台菜单管理'), ('21', '20', '1', '0', '10000', 'admin', 'Menu', 'lists', '', '所有菜单', '', '后台所有菜单列表'), ('22', '20', '1', '0', '10000', 'admin', 'Menu', 'add', '', '后台菜单添加', '', '后台菜单添加'), ('23', '20', '2', '0', '10000', 'admin', 'Menu', 'addPost', '', '后台菜单添加提交保存', '', '后台菜单添加提交保存'), ('24', '20', '1', '0', '10000', 'admin', 'Menu', 'edit', '', '后台菜单编辑', '', '后台菜单编辑'), ('25', '20', '2', '0', '10000', 'admin', 'Menu', 'editPost', '', '后台菜单编辑提交保存', '', '后台菜单编辑提交保存'), ('26', '20', '2', '0', '10000', 'admin', 'Menu', 'delete', '', '后台菜单删除', '', '后台菜单删除'), ('27', '20', '2', '0', '10000', 'admin', 'Menu', 'listOrder', '', '后台菜单排序', '', '后台菜单排序'), ('28', '20', '1', '0', '10000', 'admin', 'Menu', 'getActions', '', '导入新后台菜单', '', '导入新后台菜单'), ('29', '6', '1', '1', '30', 'admin', 'Nav', 'index', '', '导航管理', '', '导航管理'), ('30', '29', '1', '0', '10000', 'admin', 'Nav', 'add', '', '添加导航', '', '添加导航'), ('31', '29', '2', '0', '10000', 'admin', 'Nav', 'addPost', '', '添加导航提交保存', '', '添加导航提交保存'), ('32', '29', '1', '0', '10000', 'admin', 'Nav', 'edit', '', '编辑导航', '', '编辑导航'), ('33', '29', '2', '0', '10000', 'admin', 'Nav', 'editPost', '', '编辑导航提交保存', '', '编辑导航提交保存'), ('34', '29', '2', '0', '10000', 'admin', 'Nav', 'delete', '', '删除导航', '', '删除导航'), ('35', '29', '1', '0', '10000', 'admin', 'NavMenu', 'index', '', '导航菜单', '', '导航菜单'), ('36', '35', '1', '0', '10000', 'admin', 'NavMenu', 'add', '', '添加导航菜单', '', '添加导航菜单'), ('37', '35', '2', '0', '10000', 'admin', 'NavMenu', 'addPost', '', '添加导航菜单提交保存', '', '添加导航菜单提交保存'), ('38', '35', '1', '0', '10000', 'admin', 'NavMenu', 'edit', '', '编辑导航菜单', '', '编辑导航菜单'), ('39', '35', '2', '0', '10000', 'admin', 'NavMenu', 'editPost', '', '编辑导航菜单提交保存', '', '编辑导航菜单提交保存'), ('40', '35', '2', '0', '10000', 'admin', 'NavMenu', 'delete', '', '删除导航菜单', '', '删除导航菜单'), ('41', '35', '2', '0', '10000', 'admin', 'NavMenu', 'listOrder', '', '导航菜单排序', '', '导航菜单排序'), ('42', '1', '1', '1', '10000', 'admin', 'Plugin', 'index', '', '插件列表', '', '插件列表'), ('43', '42', '2', '0', '10000', 'admin', 'Plugin', 'toggle', '', '插件启用禁用', '', '插件启用禁用'), ('44', '42', '1', '0', '10000', 'admin', 'Plugin', 'setting', '', '插件设置', '', '插件设置'), ('45', '42', '2', '0', '10000', 'admin', 'Plugin', 'settingPost', '', '插件设置提交', '', '插件设置提交'), ('46', '42', '2', '0', '10000', 'admin', 'Plugin', 'install', '', '插件安装', '', '插件安装'), ('47', '42', '2', '0', '10000', 'admin', 'Plugin', 'update', '', '插件更新', '', '插件更新'), ('48', '42', '2', '0', '10000', 'admin', 'Plugin', 'uninstall', '', '卸载插件', '', '卸载插件'), ('49', '109', '0', '1', '10000', 'admin', 'User', 'default', '', '管理组', '', '管理组'), ('50', '49', '1', '1', '10000', 'admin', 'Rbac', 'index', '', '角色管理', '', '角色管理'), ('51', '50', '1', '0', '10000', 'admin', 'Rbac', 'roleAdd', '', '添加角色', '', '添加角色'), ('52', '50', '2', '0', '10000', 'admin', 'Rbac', 'roleAddPost', '', '添加角色提交', '', '添加角色提交'), ('53', '50', '1', '0', '10000', 'admin', 'Rbac', 'roleEdit', '', '编辑角色', '', '编辑角色'), ('54', '50', '2', '0', '10000', 'admin', 'Rbac', 'roleEditPost', '', '编辑角色提交', '', '编辑角色提交'), ('55', '50', '2', '0', '10000', 'admin', 'Rbac', 'roleDelete', '', '删除角色', '', '删除角色'), ('56', '50', '1', '0', '10000', 'admin', 'Rbac', 'authorize', '', '设置角色权限', '', '设置角色权限'), ('57', '50', '2', '0', '10000', 'admin', 'Rbac', 'authorizePost', '', '角色授权提交', '', '角色授权提交'), ('58', '0', '1', '0', '10000', 'admin', 'RecycleBin', 'index', '', '回收站', '', '回收站'), ('59', '58', '2', '0', '10000', 'admin', 'RecycleBin', 'restore', '', '回收站还原', '', '回收站还原'), ('60', '58', '2', '0', '10000', 'admin', 'RecycleBin', 'delete', '', '回收站彻底删除', '', '回收站彻底删除'), ('61', '6', '1', '1', '10000', 'admin', 'Route', 'index', '', 'URL美化', '', 'URL规则管理'), ('62', '61', '1', '0', '10000', 'admin', 'Route', 'add', '', '添加路由规则', '', '添加路由规则'), ('63', '61', '2', '0', '10000', 'admin', 'Route', 'addPost', '', '添加路由规则提交', '', '添加路由规则提交'), ('64', '61', '1', '0', '10000', 'admin', 'Route', 'edit', '', '路由规则编辑', '', '路由规则编辑'), ('65', '61', '2', '0', '10000', 'admin', 'Route', 'editPost', '', '路由规则编辑提交', '', '路由规则编辑提交'), ('66', '61', '2', '0', '10000', 'admin', 'Route', 'delete', '', '路由规则删除', '', '路由规则删除'), ('67', '61', '2', '0', '10000', 'admin', 'Route', 'ban', '', '路由规则禁用', '', '路由规则禁用'), ('68', '61', '2', '0', '10000', 'admin', 'Route', 'open', '', '路由规则启用', '', '路由规则启用'), ('69', '61', '2', '0', '10000', 'admin', 'Route', 'listOrder', '', '路由规则排序', '', '路由规则排序'), ('70', '61', '1', '0', '10000', 'admin', 'Route', 'select', '', '选择URL', '', '选择URL'), ('71', '6', '1', '1', '0', 'admin', 'Setting', 'site', '', '网站信息', '', '网站信息'), ('72', '71', '2', '0', '10000', 'admin', 'Setting', 'sitePost', '', '网站信息设置提交', '', '网站信息设置提交'), ('73', '6', '1', '0', '10000', 'admin', 'Setting', 'password', '', '密码修改', '', '密码修改'), ('74', '73', '2', '0', '10000', 'admin', 'Setting', 'passwordPost', '', '密码修改提交', '', '密码修改提交'), ('75', '6', '1', '1', '10000', 'admin', 'Setting', 'upload', '', '上传设置', '', '上传设置'), ('76', '75', '2', '0', '10000', 'admin', 'Setting', 'uploadPost', '', '上传设置提交', '', '上传设置提交'), ('77', '6', '1', '0', '10000', 'admin', 'Setting', 'clearCache', '', '清除缓存', '', '清除缓存'), ('78', '6', '1', '1', '40', 'admin', 'Slide', 'index', '', '幻灯片管理', '', '幻灯片管理'), ('79', '78', '1', '0', '10000', 'admin', 'Slide', 'add', '', '添加幻灯片', '', '添加幻灯片'), ('80', '78', '2', '0', '10000', 'admin', 'Slide', 'addPost', '', '添加幻灯片提交', '', '添加幻灯片提交'), ('81', '78', '1', '0', '10000', 'admin', 'Slide', 'edit', '', '编辑幻灯片', '', '编辑幻灯片'), ('82', '78', '2', '0', '10000', 'admin', 'Slide', 'editPost', '', '编辑幻灯片提交', '', '编辑幻灯片提交'), ('83', '78', '2', '0', '10000', 'admin', 'Slide', 'delete', '', '删除幻灯片', '', '删除幻灯片'), ('84', '78', '1', '0', '10000', 'admin', 'SlideItem', 'index', '', '幻灯片页面列表', '', '幻灯片页面列表'), ('85', '84', '1', '0', '10000', 'admin', 'SlideItem', 'add', '', '幻灯片页面添加', '', '幻灯片页面添加'), ('86', '84', '2', '0', '10000', 'admin', 'SlideItem', 'addPost', '', '幻灯片页面添加提交', '', '幻灯片页面添加提交'), ('87', '84', '1', '0', '10000', 'admin', 'SlideItem', 'edit', '', '幻灯片页面编辑', '', '幻灯片页面编辑'), ('88', '84', '2', '0', '10000', 'admin', 'SlideItem', 'editPost', '', '幻灯片页面编辑提交', '', '幻灯片页面编辑提交'), ('89', '84', '2', '0', '10000', 'admin', 'SlideItem', 'delete', '', '幻灯片页面删除', '', '幻灯片页面删除'), ('90', '84', '2', '0', '10000', 'admin', 'SlideItem', 'ban', '', '幻灯片页面隐藏', '', '幻灯片页面隐藏'), ('91', '84', '2', '0', '10000', 'admin', 'SlideItem', 'cancelBan', '', '幻灯片页面显示', '', '幻灯片页面显示'), ('92', '84', '2', '0', '10000', 'admin', 'SlideItem', 'listOrder', '', '幻灯片页面排序', '', '幻灯片页面排序'), ('93', '6', '1', '1', '10000', 'admin', 'Storage', 'index', '', '文件存储', '', '文件存储'), ('94', '93', '2', '0', '10000', 'admin', 'Storage', 'settingPost', '', '文件存储设置提交', '', '文件存储设置提交'), ('95', '6', '1', '1', '20', 'admin', 'Theme', 'index', '', '模板管理', '', '模板管理'), ('96', '95', '1', '0', '10000', 'admin', 'Theme', 'install', '', '安装模板', '', '安装模板'), ('97', '95', '2', '0', '10000', 'admin', 'Theme', 'uninstall', '', '卸载模板', '', '卸载模板'), ('98', '95', '2', '0', '10000', 'admin', 'Theme', 'installTheme', '', '模板安装', '', '模板安装'), ('99', '95', '2', '0', '10000', 'admin', 'Theme', 'update', '', '模板更新', '', '模板更新'), ('100', '95', '2', '0', '10000', 'admin', 'Theme', 'active', '', '启用模板', '', '启用模板'), ('101', '95', '1', '0', '10000', 'admin', 'Theme', 'files', '', '模板文件列表', '', '启用模板'), ('102', '95', '1', '0', '10000', 'admin', 'Theme', 'fileSetting', '', '模板文件设置', '', '模板文件设置'), ('103', '95', '1', '0', '10000', 'admin', 'Theme', 'fileArrayData', '', '模板文件数组数据列表', '', '模板文件数组数据列表'), ('104', '95', '2', '0', '10000', 'admin', 'Theme', 'fileArrayDataEdit', '', '模板文件数组数据添加编辑', '', '模板文件数组数据添加编辑'), ('105', '95', '2', '0', '10000', 'admin', 'Theme', 'fileArrayDataEditPost', '', '模板文件数组数据添加编辑提交保存', '', '模板文件数组数据添加编辑提交保存'), ('106', '95', '2', '0', '10000', 'admin', 'Theme', 'fileArrayDataDelete', '', '模板文件数组数据删除', '', '模板文件数组数据删除'), ('107', '95', '2', '0', '10000', 'admin', 'Theme', 'settingPost', '', '模板文件编辑提交保存', '', '模板文件编辑提交保存'), ('108', '95', '1', '0', '10000', 'admin', 'Theme', 'dataSource', '', '模板文件设置数据源', '', '模板文件设置数据源'), ('109', '0', '0', '1', '10', 'user', 'AdminIndex', 'default', '', '用户管理', 'group', '用户管理'), ('110', '49', '1', '1', '10000', 'admin', 'User', 'index', '', '管理员', '', '管理员管理'), ('111', '110', '1', '0', '10000', 'admin', 'User', 'add', '', '管理员添加', '', '管理员添加'), ('112', '110', '2', '0', '10000', 'admin', 'User', 'addPost', '', '管理员添加提交', '', '管理员添加提交'), ('113', '110', '1', '0', '10000', 'admin', 'User', 'edit', '', '管理员编辑', '', '管理员编辑'), ('114', '110', '2', '0', '10000', 'admin', 'User', 'editPost', '', '管理员编辑提交', '', '管理员编辑提交'), ('115', '110', '1', '0', '10000', 'admin', 'User', 'userInfo', '', '个人信息', '', '管理员个人信息修改'), ('116', '110', '2', '0', '10000', 'admin', 'User', 'userInfoPost', '', '管理员个人信息修改提交', '', '管理员个人信息修改提交'), ('117', '110', '2', '0', '10000', 'admin', 'User', 'delete', '', '管理员删除', '', '管理员删除'), ('118', '110', '2', '0', '10000', 'admin', 'User', 'ban', '', '停用管理员', '', '停用管理员'), ('119', '110', '2', '0', '10000', 'admin', 'User', 'cancelBan', '', '启用管理员', '', '启用管理员'), ('120', '0', '0', '1', '30', 'portal', 'AdminIndex', 'default', '', '门户管理', 'th', '门户管理'), ('121', '120', '1', '1', '10000', 'portal', 'AdminArticle', 'index', '', '文章管理', '', '文章列表'), ('122', '121', '1', '0', '10000', 'portal', 'AdminArticle', 'add', '', '添加文章', '', '添加文章'), ('123', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'addPost', '', '添加文章提交', '', '添加文章提交'), ('124', '121', '1', '0', '10000', 'portal', 'AdminArticle', 'edit', '', '编辑文章', '', '编辑文章'), ('125', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'editPost', '', '编辑文章提交', '', '编辑文章提交'), ('126', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'delete', '', '文章删除', '', '文章删除'), ('127', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'publish', '', '文章发布', '', '文章发布'), ('128', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'top', '', '文章置顶', '', '文章置顶'), ('129', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'recommend', '', '文章推荐', '', '文章推荐'), ('130', '121', '2', '0', '10000', 'portal', 'AdminArticle', 'listOrder', '', '文章排序', '', '文章排序'), ('131', '120', '1', '1', '10000', 'portal', 'AdminCategory', 'index', '', '分类管理', '', '文章分类列表'), ('132', '131', '1', '0', '10000', 'portal', 'AdminCategory', 'add', '', '添加文章分类', '', '添加文章分类'), ('133', '131', '2', '0', '10000', 'portal', 'AdminCategory', 'addPost', '', '添加文章分类提交', '', '添加文章分类提交'), ('134', '131', '1', '0', '10000', 'portal', 'AdminCategory', 'edit', '', '编辑文章分类', '', '编辑文章分类'), ('135', '131', '2', '0', '10000', 'portal', 'AdminCategory', 'editPost', '', '编辑文章分类提交', '', '编辑文章分类提交'), ('136', '131', '1', '0', '10000', 'portal', 'AdminCategory', 'select', '', '文章分类选择对话框', '', '文章分类选择对话框'), ('137', '131', '2', '0', '10000', 'portal', 'AdminCategory', 'listOrder', '', '文章分类排序', '', '文章分类排序'), ('138', '131', '2', '0', '10000', 'portal', 'AdminCategory', 'delete', '', '删除文章分类', '', '删除文章分类'), ('139', '120', '1', '1', '10000', 'portal', 'AdminPage', 'index', '', '页面管理', '', '页面管理'), ('140', '139', '1', '0', '10000', 'portal', 'AdminPage', 'add', '', '添加页面', '', '添加页面'), ('141', '139', '2', '0', '10000', 'portal', 'AdminPage', 'addPost', '', '添加页面提交', '', '添加页面提交'), ('142', '139', '1', '0', '10000', 'portal', 'AdminPage', 'edit', '', '编辑页面', '', '编辑页面'), ('143', '139', '2', '0', '10000', 'portal', 'AdminPage', 'editPost', '', '编辑页面提交', '', '编辑页面提交'), ('144', '139', '2', '0', '10000', 'portal', 'AdminPage', 'delete', '', '删除页面', '', '删除页面'), ('145', '120', '1', '1', '10000', 'portal', 'AdminTag', 'index', '', '文章标签', '', '文章标签'), ('146', '145', '1', '0', '10000', 'portal', 'AdminTag', 'add', '', '添加文章标签', '', '添加文章标签'), ('147', '145', '2', '0', '10000', 'portal', 'AdminTag', 'addPost', '', '添加文章标签提交', '', '添加文章标签提交'), ('148', '145', '2', '0', '10000', 'portal', 'AdminTag', 'upStatus', '', '更新标签状态', '', '更新标签状态'), ('149', '145', '2', '0', '10000', 'portal', 'AdminTag', 'delete', '', '删除文章标签', '', '删除文章标签'), ('150', '0', '1', '0', '10000', 'user', 'AdminAsset', 'index', '', '资源管理', 'file', '资源管理列表'), ('151', '150', '2', '0', '10000', 'user', 'AdminAsset', 'delete', '', '删除文件', '', '删除文件'), ('152', '109', '0', '1', '10000', 'user', 'AdminIndex', 'default1', '', '用户组', '', '用户组'), ('153', '152', '1', '1', '10000', 'user', 'AdminIndex', 'index', '', '本站用户', '', '本站用户'), ('154', '153', '2', '0', '10000', 'user', 'AdminIndex', 'ban', '', '本站用户拉黑', '', '本站用户拉黑'), ('155', '153', '2', '0', '10000', 'user', 'AdminIndex', 'cancelBan', '', '本站用户启用', '', '本站用户启用'), ('156', '152', '1', '1', '10000', 'user', 'AdminOauth', 'index', '', '第三方用户', '', '第三方用户'), ('157', '156', '2', '0', '10000', 'user', 'AdminOauth', 'delete', '', '删除第三方用户绑定', '', '删除第三方用户绑定'), ('158', '6', '1', '1', '10000', 'user', 'AdminUserAction', 'index', '', '用户操作管理', '', '用户操作管理'), ('159', '158', '1', '0', '10000', 'user', 'AdminUserAction', 'edit', '', '编辑用户操作', '', '编辑用户操作'), ('160', '158', '2', '0', '10000', 'user', 'AdminUserAction', 'editPost', '', '编辑用户操作提交', '', '编辑用户操作提交'), ('161', '158', '1', '0', '10000', 'user', 'AdminUserAction', 'sync', '', '同步用户操作', '', '同步用户操作');
|
|
|
|
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_asset`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_asset` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
|
|
|
`file_size` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '文件大小,单位B',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:可用,0:不可用',
|
|
|
`download_times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '下载次数',
|
|
|
`file_key` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '文件惟一码',
|
|
|
`filename` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '文件名',
|
|
|
`file_path` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '文件路径,相对于upload目录,可以为url',
|
|
|
`file_md5` varchar(32) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '文件md5值',
|
|
|
`file_sha1` varchar(40) CHARACTER SET utf8 NOT NULL DEFAULT '',
|
|
|
`suffix` varchar(10) NOT NULL DEFAULT '' COMMENT '文件后缀名,不包括点',
|
|
|
`more` text COMMENT '其它详细信息,JSON格式'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COMMENT='资源表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_auth_access`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_auth_access` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`role_id` int(10) unsigned NOT NULL COMMENT '角色',
|
|
|
`rule_name` varchar(100) NOT NULL DEFAULT '' COMMENT '规则唯一英文标识,全小写',
|
|
|
`type` varchar(30) NOT NULL DEFAULT '' COMMENT '权限规则分类,请加应用前缀,如admin_'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限授权表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_auth_rule`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_auth_rule` (
|
|
|
`id` int(10) unsigned NOT NULL COMMENT '规则id,自增主键',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否有效(0:无效,1:有效)',
|
|
|
`app` varchar(15) NOT NULL COMMENT '规则所属module',
|
|
|
`type` varchar(30) NOT NULL DEFAULT '' COMMENT '权限规则分类,请加应用前缀,如admin_',
|
|
|
`name` varchar(100) NOT NULL DEFAULT '' COMMENT '规则唯一英文标识,全小写',
|
|
|
`param` varchar(100) NOT NULL DEFAULT '' COMMENT '额外url参数',
|
|
|
`title` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '规则描述',
|
|
|
`condition` varchar(200) NOT NULL DEFAULT '' COMMENT '规则附加条件'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=154 DEFAULT CHARSET=utf8mb4 COMMENT='权限规则表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_auth_rule`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_auth_rule` VALUES ('1', '1', 'admin', 'admin_url', 'admin/Hook/index', '', '钩子管理', ''), ('2', '1', 'admin', 'admin_url', 'admin/Hook/plugins', '', '钩子插件管理', ''), ('3', '1', 'admin', 'admin_url', 'admin/Hook/pluginListOrder', '', '钩子插件排序', ''), ('4', '1', 'admin', 'admin_url', 'admin/Hook/sync', '', '同步钩子', ''), ('5', '1', 'admin', 'admin_url', 'admin/Link/index', '', '友情链接', ''), ('6', '1', 'admin', 'admin_url', 'admin/Link/add', '', '添加友情链接', ''), ('7', '1', 'admin', 'admin_url', 'admin/Link/addPost', '', '添加友情链接提交保存', ''), ('8', '1', 'admin', 'admin_url', 'admin/Link/edit', '', '编辑友情链接', ''), ('9', '1', 'admin', 'admin_url', 'admin/Link/editPost', '', '编辑友情链接提交保存', ''), ('10', '1', 'admin', 'admin_url', 'admin/Link/delete', '', '删除友情链接', ''), ('11', '1', 'admin', 'admin_url', 'admin/Link/listOrder', '', '友情链接排序', ''), ('12', '1', 'admin', 'admin_url', 'admin/Link/toggle', '', '友情链接显示隐藏', ''), ('13', '1', 'admin', 'admin_url', 'admin/Mailer/index', '', '邮箱配置', ''), ('14', '1', 'admin', 'admin_url', 'admin/Mailer/indexPost', '', '邮箱配置提交保存', ''), ('15', '1', 'admin', 'admin_url', 'admin/Mailer/template', '', '邮件模板', ''), ('16', '1', 'admin', 'admin_url', 'admin/Mailer/templatePost', '', '邮件模板提交', ''), ('17', '1', 'admin', 'admin_url', 'admin/Mailer/test', '', '邮件发送测试', ''), ('18', '1', 'admin', 'admin_url', 'admin/Menu/index', '', '后台菜单', ''), ('19', '1', 'admin', 'admin_url', 'admin/Menu/lists', '', '所有菜单', ''), ('20', '1', 'admin', 'admin_url', 'admin/Menu/add', '', '后台菜单添加', ''), ('21', '1', 'admin', 'admin_url', 'admin/Menu/addPost', '', '后台菜单添加提交保存', ''), ('22', '1', 'admin', 'admin_url', 'admin/Menu/edit', '', '后台菜单编辑', ''), ('23', '1', 'admin', 'admin_url', 'admin/Menu/editPost', '', '后台菜单编辑提交保存', ''), ('24', '1', 'admin', 'admin_url', 'admin/Menu/delete', '', '后台菜单删除', ''), ('25', '1', 'admin', 'admin_url', 'admin/Menu/listOrder', '', '后台菜单排序', ''), ('26', '1', 'admin', 'admin_url', 'admin/Menu/getActions', '', '导入新后台菜单', ''), ('27', '1', 'admin', 'admin_url', 'admin/Nav/index', '', '导航管理', ''), ('28', '1', 'admin', 'admin_url', 'admin/Nav/add', '', '添加导航', ''), ('29', '1', 'admin', 'admin_url', 'admin/Nav/addPost', '', '添加导航提交保存', ''), ('30', '1', 'admin', 'admin_url', 'admin/Nav/edit', '', '编辑导航', ''), ('31', '1', 'admin', 'admin_url', 'admin/Nav/editPost', '', '编辑导航提交保存', ''), ('32', '1', 'admin', 'admin_url', 'admin/Nav/delete', '', '删除导航', ''), ('33', '1', 'admin', 'admin_url', 'admin/NavMenu/index', '', '导航菜单', ''), ('34', '1', 'admin', 'admin_url', 'admin/NavMenu/add', '', '添加导航菜单', ''), ('35', '1', 'admin', 'admin_url', 'admin/NavMenu/addPost', '', '添加导航菜单提交保存', ''), ('36', '1', 'admin', 'admin_url', 'admin/NavMenu/edit', '', '编辑导航菜单', ''), ('37', '1', 'admin', 'admin_url', 'admin/NavMenu/editPost', '', '编辑导航菜单提交保存', ''), ('38', '1', 'admin', 'admin_url', 'admin/NavMenu/delete', '', '删除导航菜单', ''), ('39', '1', 'admin', 'admin_url', 'admin/NavMenu/listOrder', '', '导航菜单排序', ''), ('40', '1', 'admin', 'admin_url', 'admin/Plugin/default', '', '插件管理', ''), ('41', '1', 'admin', 'admin_url', 'admin/Plugin/index', '', '插件列表', ''), ('42', '1', 'admin', 'admin_url', 'admin/Plugin/toggle', '', '插件启用禁用', ''), ('43', '1', 'admin', 'admin_url', 'admin/Plugin/setting', '', '插件设置', ''), ('44', '1', 'admin', 'admin_url', 'admin/Plugin/settingPost', '', '插件设置提交', ''), ('45', '1', 'admin', 'admin_url', 'admin/Plugin/install', '', '插件安装', ''), ('46', '1', 'admin', 'admin_url', 'admin/Plugin/update', '', '插件更新', ''), ('47', '1', 'admin', 'admin_url', 'admin/Plugin/uninstall', '', '卸载插件', ''), ('48', '1', 'admin', 'admin_url', 'admin/Rbac/index', '', '角色管理', ''), ('49', '1', 'admin', 'admin_url', 'admin/Rbac/roleAdd', '', '添加角色', ''), ('50', '1', 'admin', 'admin_url', 'admin/Rbac/roleAddPost', '', '添加角色提交', ''), ('51', '1', 'admin', 'admin_url', 'admin/Rbac/roleEdit', '', '编辑角色', ''), ('52', '1', 'admin', 'admin_url', 'admin/Rbac/roleEditPost', '', '编辑角色提交', ''), ('53', '1', 'admin', 'admin_url', 'admin/Rbac/roleDelete', '', '删除角色', ''), ('54', '1', 'admin', 'admin_url', 'admin/Rbac/authorize', '', '设置角色权限', ''), ('55', '1', 'admin', 'admin_url', 'admin/Rbac/authorizePost', '', '角色授权提交', ''), ('56', '1', 'admin', 'admin_url', 'admin/RecycleBin/index', '', '回收站', ''), ('57', '1', 'admin', 'admin_url', 'admin/RecycleBin/restore', '', '回收站还原', ''), ('58', '1', 'admin', 'admin_url', 'admin/RecycleBin/delete', '', '回收站彻底删除', ''), ('59', '1', 'admin', 'admin_url', 'admin/Route/index', '', 'URL美化', ''), ('60', '1', 'admin', 'admin_url', 'admin/Route/add', '', '添加路由规则', ''), ('61', '1', 'admin', 'admin_url', 'admin/Route/addPost', '', '添加路由规则提交', ''), ('62', '1', 'admin', 'admin_url', 'admin/Route/edit', '', '路由规则编辑', ''), ('63', '1', 'admin', 'admin_url', 'admin/Route/editPost', '', '路由规则编辑提交', ''), ('64', '1', 'admin', 'admin_url', 'admin/Route/delete', '', '路由规则删除', ''), ('65', '1', 'admin', 'admin_url', 'admin/Route/ban', '', '路由规则禁用', ''), ('66', '1', 'admin', 'admin_url', 'admin/Route/open', '', '路由规则启用', ''), ('67', '1', 'admin', 'admin_url', 'admin/Route/listOrder', '', '路由规则排序', ''), ('68', '1', 'admin', 'admin_url', 'admin/Route/select', '', '选择URL', ''), ('69', '1', 'admin', 'admin_url', 'admin/Setting/default', '', '设置', ''), ('70', '1', 'admin', 'admin_url', 'admin/Setting/site', '', '网站信息', ''), ('71', '1', 'admin', 'admin_url', 'admin/Setting/sitePost', '', '网站信息设置提交', ''), ('72', '1', 'admin', 'admin_url', 'admin/Setting/password', '', '密码修改', ''), ('73', '1', 'admin', 'admin_url', 'admin/Setting/passwordPost', '', '密码修改提交', ''), ('74', '1', 'admin', 'admin_url', 'admin/Setting/upload', '', '上传设置', ''), ('75', '1', 'admin', 'admin_url', 'admin/Setting/uploadPost', '', '上传设置提交', ''), ('76', '1', 'admin', 'admin_url', 'admin/Setting/clearCache', '', '清除缓存', ''), ('77', '1', 'admin', 'admin_url', 'admin/Slide/index', '', '幻灯片管理', ''), ('78', '1', 'admin', 'admin_url', 'admin/Slide/add', '', '添加幻灯片', ''), ('79', '1', 'admin', 'admin_url', 'admin/Slide/addPost', '', '添加幻灯片提交', ''), ('80', '1', 'admin', 'admin_url', 'admin/Slide/edit', '', '编辑幻灯片', ''), ('81', '1', 'admin', 'admin_url', 'admin/Slide/editPost', '', '编辑幻灯片提交', ''), ('82', '1', 'admin', 'admin_url', 'admin/Slide/delete', '', '删除幻灯片', ''), ('83', '1', 'admin', 'admin_url', 'admin/SlideItem/index', '', '幻灯片页面列表', ''), ('84', '1', 'admin', 'admin_url', 'admin/SlideItem/add', '', '幻灯片页面添加', ''), ('85', '1', 'admin', 'admin_url', 'admin/SlideItem/addPost', '', '幻灯片页面添加提交', ''), ('86', '1', 'admin', 'admin_url', 'admin/SlideItem/edit', '', '幻灯片页面编辑', ''), ('87', '1', 'admin', 'admin_url', 'admin/SlideItem/editPost', '', '幻灯片页面编辑提交', ''), ('88', '1', 'admin', 'admin_url', 'admin/SlideItem/delete', '', '幻灯片页面删除', ''), ('89', '1', 'admin', 'admin_url', 'admin/SlideItem/ban', '', '幻灯片页面隐藏', ''), ('90', '1', 'admin', 'admin_url', 'admin/SlideItem/cancelBan', '', '幻灯片页面显示', ''), ('91', '1', 'admin', 'admin_url', 'admin/SlideItem/listOrder', '', '幻灯片页面排序', ''), ('92', '1', 'admin', 'admin_url', 'admin/Storage/index', '', '文件存储', ''), ('93', '1', 'admin', 'admin_url', 'admin/Storage/settingPost', '', '文件存储设置提交', ''), ('94', '1', 'admin', 'admin_url', 'admin/Theme/index', '', '模板管理', ''), ('95', '1', 'admin', 'admin_url', 'admin/Theme/install', '', '安装模板', ''), ('96', '1', 'admin', 'admin_url', 'admin/Theme/uninstall', '', '卸载模板', ''), ('97', '1', 'admin', 'admin_url', 'admin/Theme/installTheme', '', '模板安装', ''), ('98', '1', 'admin', 'admin_url', 'admin/Theme/update', '', '模板更新', ''), ('99', '1', 'admin', 'admin_url', 'admin/Theme/active', '', '启用模板', ''), ('100', '1', 'admin', 'admin_url', 'admin/Theme/files', '', '模板文件列表', ''), ('101', '1', 'admin', 'admin_url', 'admin/Theme/fileSetting', '', '模板文件设置', ''), ('102', '1', 'admin', 'admin_url', 'admin/Theme/fileArrayData', '', '模板文件数组数据列表', ''), ('103', '1', 'admin', 'admin_url', 'admin/Theme/fileArrayDataEdit', '', '模板文件数组数据添加编辑', ''), ('104', '1', 'admin', 'admin_url', 'admin/Theme/fileArrayDataEditPost', '', '模板文件数组数据添加编辑提交保存', ''), ('105', '1', 'admin', 'admin_url', 'admin/Theme/fileArrayDataDelete', '', '模板文件数组数据删除', ''), ('106', '1', 'admin', 'admin_url', 'admin/Theme/settingPost', '', '模板文件编辑提交保存', ''), ('107', '1', 'admin', 'admin_url', 'admin/Theme/dataSource', '', '模板文件设置数据源', ''), ('108', '1', 'admin', 'admin_url', 'admin/User/default', '', '管理组', ''), ('109', '1', 'admin', 'admin_url', 'admin/User/index', '', '管理员', ''), ('110', '1', 'admin', 'admin_url', 'admin/User/add', '', '管理员添加', ''), ('111', '1', 'admin', 'admin_url', 'admin/User/addPost', '', '管理员添加提交', ''), ('112', '1', 'admin', 'admin_url', 'admin/User/edit', '', '管理员编辑', ''), ('113', '1', 'admin', 'admin_url', 'admin/User/editPost', '', '管理员编辑提交', ''), ('114', '1', 'admin', 'admin_url', 'admin/User/userInfo', '', '个人信息', ''), ('115', '1', 'admin', 'admin_url', 'admin/User/userInfoPost', '', '管理员个人信息修改提交', ''), ('116', '1', 'admin', 'admin_url', 'admin/User/delete', '', '管理员删除', ''), ('117', '1', 'admin', 'admin_url', 'admin/User/ban', '', '停用管理员', ''), ('118', '1', 'admin', 'admin_url', 'admin/User/cancelBan', '', '启用管理员', ''), ('119', '1', 'portal', 'admin_url', 'portal/AdminArticle/index', '', '文章管理', ''), ('120', '1', 'portal', 'admin_url', 'portal/AdminArticle/add', '', '添加文章', ''), ('121', '1', 'portal', 'admin_url', 'portal/AdminArticle/addPost', '', '添加文章提交', ''), ('122', '1', 'portal', 'admin_url', 'portal/AdminArticle/edit', '', '编辑文章', ''), ('123', '1', 'portal', 'admin_url', 'portal/AdminArticle/editPost', '', '编辑文章提交', ''), ('124', '1', 'portal', 'admin_url', 'portal/AdminArticle/delete', '', '文章删除', ''), ('125', '1', 'portal', 'admin_url', 'portal/AdminArticle/publish', '', '文章发布', ''), ('126', '1', 'portal', 'admin_url', 'portal/AdminArticle/top', '', '文章置顶', ''), ('127', '1', 'portal', 'admin_url', 'portal/AdminArticle/recommend', '', '文章推荐', ''), ('128', '1', 'portal', 'admin_url', 'portal/AdminArticle/listOrder', '', '文章排序', ''), ('129', '1', 'portal', 'admin_url', 'portal/AdminCategory/index', '', '分类管理', ''), ('130', '1', 'portal', 'admin_url', 'portal/AdminCategory/add', '', '添加文章分类', ''), ('131', '1', 'portal', 'admin_url', 'portal/AdminCategory/addPost', '', '添加文章分类提交', ''), ('132', '1', 'portal', 'admin_url', 'portal/AdminCategory/edit', '', '编辑文章分类', ''), ('133', '1', 'portal', 'admin_url', 'portal/AdminCategory/editPost', '', '编辑文章分类提交', ''), ('134', '1', 'portal', 'admin_url', 'portal/AdminCategory/select', '', '文章分类选择对话框', ''), ('135', '1', 'portal', 'admin_url', 'portal/AdminCategory/listOrder', '', '文章分类排序', ''), ('136', '1', 'portal', 'admin_url', 'portal/AdminCategory/delete', '', '删除文章分类', ''), ('137', '1', 'portal', 'admin_url', 'portal/AdminIndex/default', '', '门户管理', ''), ('138', '1', 'portal', 'admin_url', 'portal/AdminPage/index', '', '页面管理', ''), ('139', '1', 'portal', 'admin_url', 'portal/AdminPage/add', '', '添加页面', ''), ('140', '1', 'portal', 'admin_url', 'portal/AdminPage/addPost', '', '添加页面提交', ''), ('141', '1', 'portal', 'admin_url', 'portal/AdminPage/edit', '', '编辑页面', ''), ('142', '1', 'portal', 'admin_url', 'portal/AdminPage/editPost', '', '编辑页面提交', ''), ('143', '1', 'portal', 'admin_url', 'portal/AdminPage/delete', '', '删除页面', ''), ('144', '1', 'portal', 'admin_url', 'portal/AdminTag/index', '', '文章标签', ''), ('145', '1', 'portal', 'admin_url', 'portal/AdminTag/add', '', '添加文章标签', ''), ('146', '1', 'portal', 'admin_url', 'portal/AdminTag/addPost', '', '添加文章标签提交', ''), ('147', '1', 'portal', 'admin_url', 'portal/AdminTag/upStatus', '', '更新标签状态', ''), ('148', '1', 'portal', 'admin_url', 'portal/AdminTag/delete', '', '删除文章标签', ''), ('149', '1', 'user', 'admin_url', 'user/AdminAsset/index', '', '资源管理', ''), ('150', '1', 'user', 'admin_url', 'user/AdminAsset/delete', '', '删除文件', ''), ('151', '1', 'user', 'admin_url', 'user/AdminIndex/default', '', '用户管理', ''), ('152', '1', 'user', 'admin_url', 'user/AdminIndex/default1', '', '用户组', ''), ('153', '1', 'user', 'admin_url', 'user/AdminIndex/index', '', '本站用户', ''), ('154', '1', 'user', 'admin_url', 'user/AdminIndex/ban', '', '本站用户拉黑', ''), ('155', '1', 'user', 'admin_url', 'user/AdminIndex/cancelBan', '', '本站用户启用', ''), ('156', '1', 'user', 'admin_url', 'user/AdminOauth/index', '', '第三方用户', ''), ('157', '1', 'user', 'admin_url', 'user/AdminOauth/delete', '', '删除第三方用户绑定', ''), ('158', '1', 'user', 'admin_url', 'user/AdminUserAction/index', '', '用户操作管理', ''), ('159', '1', 'user', 'admin_url', 'user/AdminUserAction/edit', '', '编辑用户操作', ''), ('160', '1', 'user', 'admin_url', 'user/AdminUserAction/editPost', '', '编辑用户操作提交', ''), ('161', '1', 'user', 'admin_url', 'user/AdminUserAction/sync', '', '同步用户操作', '');
|
|
|
|
|
|
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_comment`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_comment` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`parent_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '被回复的评论id',
|
|
|
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发表评论的用户id',
|
|
|
`to_user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '被评论的用户id',
|
|
|
`object_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论内容 id',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '评论时间',
|
|
|
`delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:已审核,0:未审核',
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '评论类型;1实名评论',
|
|
|
`table_name` varchar(64) NOT NULL DEFAULT '' COMMENT '评论内容所在表,不带表前缀',
|
|
|
`full_name` varchar(50) NOT NULL DEFAULT '' COMMENT '评论者昵称',
|
|
|
`email` varchar(255) NOT NULL DEFAULT '' COMMENT '评论者邮箱',
|
|
|
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '层级关系',
|
|
|
`url` text COMMENT '原文地址',
|
|
|
`content` text COMMENT '评论内容',
|
|
|
`more` text COMMENT '扩展属性'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='评论表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_hook`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_hook` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '钩子类型(1:系统钩子;2:应用钩子;3:模板钩子)',
|
|
|
`once` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否只允许一个插件运行(0:多个;1:一个)',
|
|
|
`name` varchar(30) NOT NULL DEFAULT '' COMMENT '钩子名称',
|
|
|
`hook` varchar(30) NOT NULL DEFAULT '' COMMENT '钩子',
|
|
|
`app` varchar(15) NOT NULL DEFAULT '' COMMENT '应用名(只有应用钩子才用)',
|
|
|
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '描述'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COMMENT='系统钩子表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_hook_plugin`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_hook_plugin` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`status` tinyint(4) NOT NULL DEFAULT '1' COMMENT '状态(0:禁用,1:启用)',
|
|
|
`hook` varchar(30) NOT NULL DEFAULT '' COMMENT '钩子名',
|
|
|
`plugin` varchar(30) NOT NULL DEFAULT '' COMMENT '插件'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COMMENT='系统钩子插件表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_link`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_link` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:显示;0:不显示',
|
|
|
`rating` int(11) NOT NULL DEFAULT '0' COMMENT '友情链接评级',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`description` varchar(255) NOT NULL DEFAULT '' COMMENT '友情链接描述',
|
|
|
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '友情链接地址',
|
|
|
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '友情链接名称',
|
|
|
`image` varchar(100) NOT NULL DEFAULT '' COMMENT '友情链接图标',
|
|
|
`target` varchar(10) NOT NULL DEFAULT '' COMMENT '友情链接打开方式',
|
|
|
`rel` varchar(50) NOT NULL DEFAULT '' COMMENT '链接与网站的关系'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='友情链接表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_link`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_link` (`id`, `status`, `rating`, `list_order`, `description`, `url`, `name`, `image`, `target`, `rel`) VALUES
|
|
|
(1, 1, 1, 8, '百荣官网', 'http://bronet.cn', '百荣科技', '', '_blank', '');
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_nav`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_nav` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`is_main` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否为主导航;1:是;0:不是',
|
|
|
`name` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '导航位置名称',
|
|
|
`remark` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '备注'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COMMENT='前台导航位置表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_nav`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_nav` (`id`, `is_main`, `name`, `remark`) VALUES
|
|
|
(1, 1, '主导航', '主导航'),
|
|
|
(2, 0, '底部导航', '');
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_nav_menu`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_nav_menu` (
|
|
|
`id` int(11) NOT NULL,
|
|
|
`nav_id` int(11) NOT NULL COMMENT '导航 id',
|
|
|
`parent_id` int(11) NOT NULL COMMENT '父 id',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:显示;0:隐藏',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '菜单名称',
|
|
|
`target` varchar(10) NOT NULL DEFAULT '' COMMENT '打开方式',
|
|
|
`href` varchar(100) NOT NULL DEFAULT '' COMMENT '链接',
|
|
|
`icon` varchar(20) NOT NULL DEFAULT '' COMMENT '图标',
|
|
|
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '层级关系'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COMMENT='前台导航菜单表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_nav_menu`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_nav_menu` (`id`, `nav_id`, `parent_id`, `status`, `list_order`, `name`, `target`, `href`, `icon`, `path`) VALUES
|
|
|
(1, 1, 0, 1, 0, '首页', '', 'home', '', '0-1');
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_option`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_option` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`autoload` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '是否自动加载;1:自动加载;0:不自动加载',
|
|
|
`option_name` varchar(64) NOT NULL DEFAULT '' COMMENT '配置名',
|
|
|
`option_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci COMMENT '配置值'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='全站配置表';
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_plugin`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_plugin` (
|
|
|
`id` int(11) unsigned NOT NULL COMMENT '自增id',
|
|
|
`type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '插件类型;1:网站;8:微信',
|
|
|
`has_admin` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否有后台管理,0:没有;1:有',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:开启;0:禁用',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '插件安装时间',
|
|
|
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '插件标识名,英文字母(惟一)',
|
|
|
`title` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '插件名称',
|
|
|
`hooks` varchar(255) NOT NULL DEFAULT '' COMMENT '实现的钩子;以“,”分隔',
|
|
|
`author` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '插件作者',
|
|
|
`version` varchar(20) NOT NULL DEFAULT '' COMMENT '插件版本号',
|
|
|
`description` varchar(255) NOT NULL COMMENT '插件描述',
|
|
|
`config` text COMMENT '插件配置'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='插件表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_portal_category`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_portal_category` (
|
|
|
`id` bigint(20) unsigned NOT NULL COMMENT '分类id',
|
|
|
`parent_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '分类父id',
|
|
|
`post_count` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '分类文章数',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:发布,0:不发布',
|
|
|
`delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '分类名称',
|
|
|
`description` varchar(255) NOT NULL COMMENT '分类描述',
|
|
|
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '分类层级关系路径',
|
|
|
`seo_title` varchar(100) NOT NULL DEFAULT '',
|
|
|
`seo_keywords` varchar(255) NOT NULL DEFAULT '',
|
|
|
`seo_description` varchar(255) NOT NULL DEFAULT '',
|
|
|
`list_tpl` varchar(50) NOT NULL DEFAULT '' COMMENT '分类列表模板',
|
|
|
`one_tpl` varchar(50) NOT NULL DEFAULT '' COMMENT '分类文章页模板',
|
|
|
`more` text COMMENT '扩展属性'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='portal应用 文章分类表';
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_portal_category_post`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_portal_category_post` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '文章id',
|
|
|
`category_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '分类id',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:发布;0:不发布'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='portal应用 分类文章对应表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_portal_post`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_portal_post` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`parent_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '父级id',
|
|
|
`post_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '类型,1:文章;2:页面',
|
|
|
`post_format` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '内容格式;1:html;2:md',
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '发表者用户id',
|
|
|
`post_status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:已发布;0:未发布;',
|
|
|
`comment_status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '评论状态;1:允许;0:不允许',
|
|
|
`is_top` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否置顶;1:置顶;0:不置顶',
|
|
|
`recommended` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否推荐;1:推荐;0:不推荐',
|
|
|
`post_hits` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '查看数',
|
|
|
`post_like` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '点赞数',
|
|
|
`comment_count` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '评论数',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
|
|
`published_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '发布时间',
|
|
|
`delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
|
|
|
`post_title` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'post标题',
|
|
|
`post_keywords` varchar(150) NOT NULL DEFAULT '' COMMENT 'seo keywords',
|
|
|
`post_excerpt` varchar(500) NOT NULL COMMENT 'post摘要',
|
|
|
`post_source` varchar(150) NOT NULL DEFAULT '' COMMENT '转载文章的来源',
|
|
|
`post_content` text COMMENT '文章内容',
|
|
|
`post_content_filtered` text COMMENT '处理过的文章内容',
|
|
|
`more` text COMMENT '扩展属性,如缩略图;格式为json'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='portal应用 文章表';
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_portal_tag`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_portal_tag` (
|
|
|
`id` bigint(20) unsigned NOT NULL COMMENT '分类id',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:发布,0:不发布',
|
|
|
`recommended` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否推荐;1:推荐;0:不推荐',
|
|
|
`post_count` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '标签文章数',
|
|
|
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '标签名称'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='portal应用 文章标签表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_portal_tag_post`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_portal_tag_post` (
|
|
|
`id` bigint(20) NOT NULL,
|
|
|
`tag_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '标签 id',
|
|
|
`post_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '文章 id',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:发布;0:不发布'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='portal应用 标签文章对应表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_recycle_bin`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_recycle_bin` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`object_id` int(11) DEFAULT '0' COMMENT '删除内容 id',
|
|
|
`create_time` int(10) unsigned DEFAULT '0' COMMENT '创建时间',
|
|
|
`table_name` varchar(60) DEFAULT '' COMMENT '删除内容所在表名',
|
|
|
`name` varchar(255) DEFAULT '' COMMENT '删除内容名称'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT=' 回收站';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_role`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_role` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`parent_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父角色ID',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '状态;0:禁用;1:正常',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
|
|
|
`list_order` float NOT NULL DEFAULT '0' COMMENT '排序',
|
|
|
`name` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '角色名称',
|
|
|
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COMMENT='角色表';
|
|
|
|
|
|
--
|
|
|
-- 转存表中的数据 `cmf_role`
|
|
|
--
|
|
|
|
|
|
INSERT INTO `cmf_role` (`id`, `parent_id`, `status`, `create_time`, `update_time`, `list_order`, `name`, `remark`) VALUES
|
|
|
(1, 0, 1, 1329633709, 1329633709, 0, '超级管理员', '拥有网站最高管理员权限!'),
|
|
|
(2, 0, 1, 1329633709, 1329633709, 0, '普通管理员', '权限由最高管理员分配!');
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_role_user`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_role_user` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`role_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '角色 id',
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '用户id'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 COMMENT='用户角色对应表';
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_route`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_route` (
|
|
|
`id` int(11) NOT NULL COMMENT '路由id',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`status` tinyint(2) NOT NULL DEFAULT '1' COMMENT '状态;1:启用,0:不启用',
|
|
|
`full_url` varchar(255) NOT NULL DEFAULT '' COMMENT '完整url',
|
|
|
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '实际显示的url'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='url路由表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_slide`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_slide` (
|
|
|
`id` int(11) NOT NULL,
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:显示,0不显示',
|
|
|
`delete_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '删除时间',
|
|
|
`name` varchar(50) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '幻灯片分类',
|
|
|
`remark` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '分类备注'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幻灯片表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_slide_item`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_slide_item` (
|
|
|
`id` int(10) unsigned NOT NULL,
|
|
|
`slide_id` int(11) NOT NULL DEFAULT '0' COMMENT '幻灯片id',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态,1:显示;0:隐藏',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`title` varchar(50) NOT NULL DEFAULT '' COMMENT '幻灯片名称',
|
|
|
`image` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '幻灯片图片',
|
|
|
`url` varchar(255) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '幻灯片链接',
|
|
|
`target` varchar(10) NOT NULL DEFAULT '' COMMENT '友情链接打开方式',
|
|
|
`description` varchar(255) CHARACTER SET utf8 NOT NULL COMMENT '幻灯片描述',
|
|
|
`content` text CHARACTER SET utf8 COMMENT '幻灯片内容',
|
|
|
`more` text COMMENT '链接打开方式'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='幻灯片子项表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_theme`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_theme` (
|
|
|
`id` int(11) NOT NULL,
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '安装时间',
|
|
|
`update_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后升级时间',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '模板状态,1:正在使用;0:未使用',
|
|
|
`is_compiled` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '是否为已编译模板',
|
|
|
`theme` varchar(20) NOT NULL DEFAULT '' COMMENT '主题目录名,用于主题的维一标识',
|
|
|
`name` varchar(20) NOT NULL DEFAULT '' COMMENT '主题名称',
|
|
|
`version` varchar(20) NOT NULL DEFAULT '' COMMENT '主题版本号',
|
|
|
`demo_url` varchar(50) NOT NULL DEFAULT '' COMMENT '演示地址,带协议',
|
|
|
`thumbnail` varchar(100) NOT NULL DEFAULT '' COMMENT '缩略图',
|
|
|
`author` varchar(20) NOT NULL DEFAULT '' COMMENT '主题作者',
|
|
|
`author_url` varchar(50) NOT NULL DEFAULT '' COMMENT '作者网站链接',
|
|
|
`lang` varchar(10) NOT NULL DEFAULT '' COMMENT '支持语言',
|
|
|
`keywords` varchar(50) NOT NULL DEFAULT '' COMMENT '主题关键字',
|
|
|
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '主题描述'
|
|
|
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_theme_file`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_theme_file` (
|
|
|
`id` int(11) NOT NULL,
|
|
|
`is_public` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否公共的模板文件',
|
|
|
`list_order` float NOT NULL DEFAULT '10000' COMMENT '排序',
|
|
|
`theme` varchar(20) NOT NULL DEFAULT '' COMMENT '模板名称',
|
|
|
`name` varchar(20) NOT NULL DEFAULT '' COMMENT '模板文件名',
|
|
|
`action` varchar(50) NOT NULL DEFAULT '' COMMENT '操作',
|
|
|
`file` varchar(50) NOT NULL DEFAULT '' COMMENT '模板文件,相对于模板根目录,如Portal/index.html',
|
|
|
`description` varchar(100) NOT NULL DEFAULT '' COMMENT '模板文件描述',
|
|
|
`more` text COMMENT '模板更多配置,用户自己后台设置的',
|
|
|
`config_more` text COMMENT '模板更多配置,来源模板的配置文件',
|
|
|
`draft_more` text COMMENT '模板更多配置,用户临时保存的配置'
|
|
|
) ENGINE=MyISAM AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_third_party_user`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_third_party_user` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '本站用户id',
|
|
|
`last_login_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后登录时间',
|
|
|
`expire_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'access_token过期时间',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '绑定时间',
|
|
|
`login_times` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '登录次数',
|
|
|
`status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '状态;1:正常;0:禁用',
|
|
|
`nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '用户昵称',
|
|
|
`third_party` varchar(20) NOT NULL DEFAULT '' COMMENT '第三方惟一码',
|
|
|
`app_id` varchar(64) NOT NULL DEFAULT '' COMMENT '第三方应用 id',
|
|
|
`last_login_ip` varchar(15) NOT NULL DEFAULT '' COMMENT '最后登录ip',
|
|
|
`access_token` varchar(512) NOT NULL DEFAULT '' COMMENT '第三方授权码',
|
|
|
`openid` varchar(40) NOT NULL DEFAULT '' COMMENT '第三方用户id',
|
|
|
`union_id` varchar(64) NOT NULL DEFAULT '' COMMENT '第三方用户多个产品中的惟一 id,(如:微信平台)',
|
|
|
`more` text COMMENT '扩展信息'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='第三方用户表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_user`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_user` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`user_type` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '用户类型;1:admin;2:会员',
|
|
|
`sex` tinyint(2) NOT NULL DEFAULT '0' COMMENT '性别;0:保密,1:男,2:女',
|
|
|
`birthday` int(11) NOT NULL DEFAULT '0' COMMENT '生日',
|
|
|
`last_login_time` int(11) NOT NULL DEFAULT '0' COMMENT '最后登录时间',
|
|
|
`score` int(11) NOT NULL DEFAULT '0' COMMENT '用户积分',
|
|
|
`coin` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '金币',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '注册时间',
|
|
|
`user_status` tinyint(3) unsigned NOT NULL DEFAULT '1' COMMENT '用户状态;0:禁用,1:正常,2:未验证',
|
|
|
`user_login` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户名',
|
|
|
`user_pass` varchar(64) NOT NULL DEFAULT '' COMMENT '登录密码;cmf_password加密',
|
|
|
`user_nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT '用户昵称',
|
|
|
`user_email` varchar(100) NOT NULL DEFAULT '' COMMENT '用户登录邮箱',
|
|
|
`user_url` varchar(100) NOT NULL DEFAULT '' COMMENT '用户个人网址',
|
|
|
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '用户头像',
|
|
|
`signature` varchar(255) NOT NULL DEFAULT '' COMMENT '个性签名',
|
|
|
`last_login_ip` varchar(15) NOT NULL DEFAULT '' COMMENT '最后登录ip',
|
|
|
`user_activation_key` varchar(60) NOT NULL DEFAULT '' COMMENT '激活码',
|
|
|
`mobile` varchar(20) NOT NULL DEFAULT '' COMMENT '用户手机号'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_user_action_log`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_user_action_log` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
|
|
|
`count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '访问次数',
|
|
|
`last_visit_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后访问时间',
|
|
|
`object` varchar(100) NOT NULL DEFAULT '' COMMENT '访问对象的id,格式:不带前缀的表名+id;如posts1表示xx_posts表里id为1的记录',
|
|
|
`action` varchar(50) NOT NULL DEFAULT '' COMMENT '操作名称;格式:应用名+控制器+操作名,也可自己定义格式只要不发生冲突且惟一;',
|
|
|
`ip` varchar(15) NOT NULL DEFAULT '' COMMENT '用户ip'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='访问记录表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_user_favorite`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_user_favorite` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`user_id` bigint(20) unsigned NOT NULL DEFAULT '0' COMMENT '用户 id',
|
|
|
`title` varchar(100) NOT NULL DEFAULT '' COMMENT '收藏内容的标题',
|
|
|
`url` varchar(255) CHARACTER SET utf8 DEFAULT '' COMMENT '收藏内容的原文地址,不带域名',
|
|
|
`description` varchar(500) CHARACTER SET utf8 DEFAULT '' COMMENT '收藏内容的描述',
|
|
|
`table_name` varchar(64) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '收藏实体以前所在表,不带前缀',
|
|
|
`object_id` int(10) unsigned DEFAULT '0' COMMENT '收藏内容原来的主键id',
|
|
|
`create_time` int(10) unsigned DEFAULT '0' COMMENT '收藏时间'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户收藏表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_user_login_attempt`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_user_login_attempt` (
|
|
|
`id` bigint(20) unsigned NOT NULL,
|
|
|
`login_attempts` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '尝试次数',
|
|
|
`attempt_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '尝试登录时间',
|
|
|
`locked_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '锁定时间',
|
|
|
`ip` varchar(15) NOT NULL DEFAULT '' COMMENT '用户 ip',
|
|
|
`account` varchar(100) NOT NULL DEFAULT '' COMMENT '用户账号,手机号,邮箱或用户名'
|
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=COMPACT COMMENT='用户登录尝试表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_user_token`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_user_token` (
|
|
|
`id` bigint(20) NOT NULL,
|
|
|
`user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户id',
|
|
|
`expire_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT ' 过期时间',
|
|
|
`create_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`token` varchar(64) NOT NULL DEFAULT '' COMMENT 'token',
|
|
|
`device_type` varchar(10) NOT NULL DEFAULT '' COMMENT '设备类型;mobile,android,iphone,ipad,web,pc,mac,wxapp'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户客户端登录 token 表';
|
|
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
|
|
--
|
|
|
-- 表的结构 `cmf_verification_code`
|
|
|
--
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `cmf_verification_code` (
|
|
|
`id` bigint(20) unsigned NOT NULL COMMENT '表id',
|
|
|
`count` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '当天已经发送成功的次数',
|
|
|
`send_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后发送成功时间',
|
|
|
`expire_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '验证码过期时间',
|
|
|
`code` varchar(8) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '最后发送成功的验证码',
|
|
|
`account` varchar(100) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '手机号或者邮箱'
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='手机邮箱数字验证码表';
|
|
|
|
|
|
--
|
|
|
-- Indexes for dumped tables
|
|
|
--
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_admin_menu`
|
|
|
--
|
|
|
ALTER TABLE `cmf_admin_menu`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `status` (`status`),
|
|
|
ADD KEY `parentid` (`parent_id`),
|
|
|
ADD KEY `model` (`controller`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_asset`
|
|
|
--
|
|
|
ALTER TABLE `cmf_asset`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_auth_access`
|
|
|
--
|
|
|
ALTER TABLE `cmf_auth_access`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `role_id` (`role_id`),
|
|
|
ADD KEY `rule_name` (`rule_name`) USING BTREE;
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_auth_rule`
|
|
|
--
|
|
|
ALTER TABLE `cmf_auth_rule`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD UNIQUE KEY `name` (`name`) USING BTREE,
|
|
|
ADD KEY `module` (`app`,`status`,`type`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_comment`
|
|
|
--
|
|
|
ALTER TABLE `cmf_comment`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `comment_post_ID` (`object_id`),
|
|
|
ADD KEY `comment_approved_date_gmt` (`status`),
|
|
|
ADD KEY `comment_parent` (`parent_id`),
|
|
|
ADD KEY `table_id_status` (`table_name`,`object_id`,`status`),
|
|
|
ADD KEY `createtime` (`create_time`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_hook`
|
|
|
--
|
|
|
ALTER TABLE `cmf_hook`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_hook_plugin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_hook_plugin`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_link`
|
|
|
--
|
|
|
ALTER TABLE `cmf_link`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `link_visible` (`status`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_nav`
|
|
|
--
|
|
|
ALTER TABLE `cmf_nav`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_nav_menu`
|
|
|
--
|
|
|
ALTER TABLE `cmf_nav_menu`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_option`
|
|
|
--
|
|
|
ALTER TABLE `cmf_option`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD UNIQUE KEY `option_name` (`option_name`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_plugin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_plugin`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_portal_category`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_category`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_portal_category_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_category_post`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `term_taxonomy_id` (`category_id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_portal_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_post`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `type_status_date` (`post_type`,`post_status`,`create_time`,`id`),
|
|
|
ADD KEY `post_parent` (`parent_id`),
|
|
|
ADD KEY `post_author` (`user_id`),
|
|
|
ADD KEY `post_date` (`create_time`) USING BTREE;
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_portal_tag`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_tag`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_portal_tag_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_tag_post`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `term_taxonomy_id` (`post_id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_recycle_bin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_recycle_bin`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_role`
|
|
|
--
|
|
|
ALTER TABLE `cmf_role`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `parentId` (`parent_id`),
|
|
|
ADD KEY `status` (`status`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_role_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_role_user`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `group_id` (`role_id`),
|
|
|
ADD KEY `user_id` (`user_id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_route`
|
|
|
--
|
|
|
ALTER TABLE `cmf_route`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_slide`
|
|
|
--
|
|
|
ALTER TABLE `cmf_slide`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_slide_item`
|
|
|
--
|
|
|
ALTER TABLE `cmf_slide_item`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `slide_cid` (`slide_id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_theme`
|
|
|
--
|
|
|
ALTER TABLE `cmf_theme`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_theme_file`
|
|
|
--
|
|
|
ALTER TABLE `cmf_theme_file`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_third_party_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_third_party_user`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `user_login` (`user_login`),
|
|
|
ADD KEY `user_nickname` (`user_nickname`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_user_action_log`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_action_log`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `user_object_action` (`user_id`,`object`,`action`),
|
|
|
ADD KEY `user_object_action_ip` (`user_id`,`object`,`action`,`ip`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_user_favorite`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_favorite`
|
|
|
ADD PRIMARY KEY (`id`),
|
|
|
ADD KEY `uid` (`user_id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_user_login_attempt`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_login_attempt`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_user_token`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_token`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- Indexes for table `cmf_verification_code`
|
|
|
--
|
|
|
ALTER TABLE `cmf_verification_code`
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
--
|
|
|
-- AUTO_INCREMENT for dumped tables
|
|
|
--
|
|
|
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_admin_menu`
|
|
|
--
|
|
|
ALTER TABLE `cmf_admin_menu`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=154;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_asset`
|
|
|
--
|
|
|
ALTER TABLE `cmf_asset`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=5;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_auth_access`
|
|
|
--
|
|
|
ALTER TABLE `cmf_auth_access`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_auth_rule`
|
|
|
--
|
|
|
ALTER TABLE `cmf_auth_rule`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则id,自增主键',AUTO_INCREMENT=154;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_comment`
|
|
|
--
|
|
|
ALTER TABLE `cmf_comment`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_hook`
|
|
|
--
|
|
|
ALTER TABLE `cmf_hook`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=24;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_hook_plugin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_hook_plugin`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=10;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_link`
|
|
|
--
|
|
|
ALTER TABLE `cmf_link`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=2;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_nav`
|
|
|
--
|
|
|
ALTER TABLE `cmf_nav`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=4;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_nav_menu`
|
|
|
--
|
|
|
ALTER TABLE `cmf_nav_menu`
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=17;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_option`
|
|
|
--
|
|
|
ALTER TABLE `cmf_option`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=7;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_plugin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_plugin`
|
|
|
MODIFY `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增id',AUTO_INCREMENT=14;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_portal_category`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_category`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类id',AUTO_INCREMENT=8;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_portal_category_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_category_post`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=117;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_portal_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_post`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=32;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_portal_tag`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_tag`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类id',AUTO_INCREMENT=4;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_portal_tag_post`
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_tag_post`
|
|
|
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_recycle_bin`
|
|
|
--
|
|
|
ALTER TABLE `cmf_recycle_bin`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=25;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_role`
|
|
|
--
|
|
|
ALTER TABLE `cmf_role`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_role_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_role_user`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_route`
|
|
|
--
|
|
|
ALTER TABLE `cmf_route`
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '路由id',AUTO_INCREMENT=12;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_slide`
|
|
|
--
|
|
|
ALTER TABLE `cmf_slide`
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_slide_item`
|
|
|
--
|
|
|
ALTER TABLE `cmf_slide_item`
|
|
|
MODIFY `id` int(10) unsigned NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_theme`
|
|
|
--
|
|
|
ALTER TABLE `cmf_theme`
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=19;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_theme_file`
|
|
|
--
|
|
|
ALTER TABLE `cmf_theme_file`
|
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=105;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_third_party_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_third_party_user`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_user`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=8;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_user_action_log`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_action_log`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=11;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_user_favorite`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_favorite`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=6;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_user_login_attempt`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_login_attempt`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_user_token`
|
|
|
--
|
|
|
ALTER TABLE `cmf_user_token`
|
|
|
MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT,AUTO_INCREMENT=3;
|
|
|
--
|
|
|
-- AUTO_INCREMENT for table `cmf_verification_code`
|
|
|
--
|
|
|
ALTER TABLE `cmf_verification_code`
|
|
|
MODIFY `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '表id',AUTO_INCREMENT=9;
|
|
|
|
|
|
ALTER TABLE `cmf_route` ADD `type` TINYINT NOT NULL DEFAULT '1' COMMENT 'URL规则类型;1:用户自定义;2:别名添加' AFTER `status`;
|
|
|
|
|
|
-- 2017-09-12 12:38 更改字段长度
|
|
|
ALTER TABLE `cmf_hook` CHANGE `hook` `hook` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子';
|
|
|
ALTER TABLE `cmf_hook` CHANGE `name` `name` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子名称';
|
|
|
ALTER TABLE `cmf_hook_plugin` CHANGE `hook` `hook` VARCHAR(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '钩子名';
|
|
|
|
|
|
INSERT INTO `cmf_hook` VALUES ('1', '1', '0', '应用初始化', 'app_init', 'cmf', '应用初始化'), ('2', '1', '0', '应用开始', 'app_begin', 'cmf', '应用开始'), ('3', '1', '0', '模块初始化', 'module_init', 'cmf', '模块初始化'), ('4', '1', '0', '控制器开始', 'action_begin', 'cmf', '控制器开始'), ('5', '1', '0', '视图输出过滤', 'view_filter', 'cmf', '视图输出过滤'), ('6', '1', '0', '应用结束', 'app_end', 'cmf', '应用结束'), ('7', '1', '0', '日志write方法', 'log_write', 'cmf', '日志write方法'), ('8', '1', '0', '输出结束', 'response_end', 'cmf', '输出结束'), ('9', '1', '0', '后台控制器初始化', 'admin_init', 'cmf', '后台控制器初始化'), ('10', '1', '0', '前台控制器初始化', 'home_init', 'cmf', '前台控制器初始化'), ('11', '1', '1', '发送手机验证码', 'send_mobile_verification_code', 'cmf', '发送手机验证码'), ('12', '3', '0', '模板 body标签开始', 'body_start', '', '模板 body标签开始'), ('13', '3', '0', '模板 head标签结束前', 'before_head_end', '', '模板 head标签结束前'), ('14', '3', '0', '模板底部开始', 'footer_start', '', '模板底部开始'), ('15', '3', '0', '模板底部开始之前', 'before_footer', '', '模板底部开始之前'), ('16', '3', '0', '模板底部结束之前', 'before_footer_end', '', '模板底部结束之前'), ('17', '3', '0', '模板 body 标签结束之前', 'before_body_end', '', '模板 body 标签结束之前'), ('18', '3', '0', '模板左边栏开始', 'left_sidebar_start', '', '模板左边栏开始'), ('19', '3', '0', '模板左边栏结束之前', 'before_left_sidebar_end', '', '模板左边栏结束之前'), ('20', '3', '0', '模板右边栏开始', 'right_sidebar_start', '', '模板右边栏开始'), ('21', '3', '0', '模板右边栏结束之前', 'before_right_sidebar_end', '', '模板右边栏结束之前'), ('22', '3', '1', '评论区', 'comment', '', '评论区'), ('23', '3', '1', '留言区', 'guestbook', '', '留言区'), ('24', '2', '0', '后台首页仪表盘', 'admin_dashboard', 'admin', '后台首页仪表盘'), ('25', '4', '0', '后台模板 head标签结束前', 'admin_before_head_end', '', '后台模板 head标签结束前'), ('26', '4', '0', '后台模板 body 标签结束之前', 'admin_before_body_end', '', '后台模板 body 标签结束之前'), ('27', '2', '0', '后台登录页面', 'admin_login', 'admin', '后台登录页面'), ('28', '1', '1', '前台模板切换', 'switch_theme', 'cmf', '前台模板切换'), ('29', '3', '0', '主要内容之后', 'after_content', '', '主要内容之后'), ('30', '2', '0', '文章显示之前', 'portal_before_assign_article', 'portal', '文章显示之前'), ('31', '2', '0', '后台文章保存之后', 'portal_admin_after_save_article', 'portal', '后台文章保存之后');
|
|
|
|
|
|
|
|
|
ALTER TABLE `cmf_plugin` ADD `demo_url` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '演示地址,带协议' AFTER `title`;
|
|
|
ALTER TABLE `cmf_plugin` ADD `author_url` VARCHAR(50) NOT NULL DEFAULT '' COMMENT '作者网站链接' AFTER `author`;
|
|
|
|
|
|
--
|
|
|
-- 2017-07-06 11:10 增加用户操作表
|
|
|
--
|
|
|
DROP TABLE IF EXISTS `cmf_user_action`;
|
|
|
CREATE TABLE `cmf_user_action` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`score` int(11) NOT NULL DEFAULT '0' COMMENT '更改积分,可以为负',
|
|
|
`coin` int(11) NOT NULL DEFAULT '0' COMMENT '更改金币,可以为负',
|
|
|
`reward_number` int(11) NOT NULL DEFAULT '0' COMMENT '奖励次数',
|
|
|
`cycle_type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '周期类型;0:不限;1:按天;2:按小时;3:永久',
|
|
|
`cycle_time` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '周期时间值',
|
|
|
`name` varchar(50) NOT NULL DEFAULT '' COMMENT '用户操作名称',
|
|
|
`action` varchar(50) NOT NULL DEFAULT '' COMMENT '用户操作名称',
|
|
|
`app` varchar(50) NOT NULL DEFAULT '' COMMENT '操作所在应用名或插件名等',
|
|
|
`url` text COMMENT '执行操作的url',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户操作表';
|
|
|
|
|
|
--
|
|
|
-- 2017-07-06 11:10 增加用户操作积分等奖励日志表
|
|
|
--
|
|
|
DROP TABLE IF EXISTS `cmf_user_score_log`;
|
|
|
CREATE TABLE `cmf_user_score_log` (
|
|
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
|
|
`user_id` bigint(20) NOT NULL DEFAULT '0' COMMENT '用户 id',
|
|
|
`create_time` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
|
|
|
`action` varchar(50) NOT NULL DEFAULT '' COMMENT '用户操作名称',
|
|
|
`score` int(11) NOT NULL DEFAULT '0' COMMENT '更改积分,可以为负',
|
|
|
`coin` int(11) NOT NULL DEFAULT '0' COMMENT '更改金币,可以为负',
|
|
|
PRIMARY KEY (`id`)
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COMMENT='用户操作积分等奖励日志表';
|
|
|
|
|
|
--
|
|
|
-- 2017-08-07 12:02:01 增加post_excerpt默认值
|
|
|
--
|
|
|
ALTER TABLE `cmf_portal_post` CHANGE `post_excerpt` `post_excerpt` VARCHAR(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT 'post摘要';
|
|
|
|
|
|
-- 2017-09-06 10:35更正 admin_menu表list_order 字段类型
|
|
|
ALTER TABLE `cmf_admin_menu` CHANGE `list_order` `list_order` FLOAT NOT NULL DEFAULT '10000' COMMENT '排序';
|
|
|
|
|
|
-- 2017-09-07 13:35 增加用户表 more 字段
|
|
|
ALTER TABLE `cmf_user` ADD `more` TEXT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '扩展属性' AFTER `mobile`;
|
|
|
|
|
|
|
|
|
|