/* Navicat Premium Data Transfer Source Server : 本机 Source Server Type : MySQL Source Server Version : 50723 Source Host : localhost:3306 Source Schema : ci Target Server Type : MySQL Target Server Version : 50723 File Encoding : 65001 Date: 27/03/2019 19:16:41 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for s_ads -- ---------------------------- DROP TABLE IF EXISTS `s_ads`; CREATE TABLE `s_ads` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `type` char(60) NOT NULL DEFAULT '', `name` char(60) NOT NULL DEFAULT '', `url` char(100) NOT NULL DEFAULT '', `pic` char(100) NOT NULL DEFAULT '', `sort` tinyint(4) unsigned NOT NULL DEFAULT '1', `isshow` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; -- ---------------------------- -- Table structure for s_articles -- ---------------------------- DROP TABLE IF EXISTS `s_articles`; CREATE TABLE `s_articles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user_id` int(10) unsigned NOT NULL COMMENT '用户ID', `catalog_id` int(10) unsigned NOT NULL COMMENT '栏目ID', `title` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '标题', `shorttitle` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '小标题', `pic` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '图片', `file` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `author` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '作者', `source` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '来源', `published_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '发布时间', `click_num` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '点击数', `is_top` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '置顶', `is_recommend` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '推荐', `is_bold` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '加粗', `is_slide` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '幻灯片', `is_link` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '链接', `url` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '链接地扯', `color` char(12) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '颜色', `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '描述文字', `audit` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '审核', `body` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '内容', `gallery` text COLLATE utf8_unicode_ci, `gallery_info` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=59 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_catalogs -- ---------------------------- DROP TABLE IF EXISTS `s_catalogs`; CREATE TABLE `s_catalogs` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `catalog_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属栏目', `is_nav` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '是否导航显示k', `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `typename` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '栏目名称', `typename_en` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `typeurl` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '栏目链接', `typepic` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '栏目图片', `channltype` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '频道类型', `pagetype` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '页面类型', `tempindex` char(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '单页模板', `templist` char(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '列表页模板', `temparticle` char(60) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '内容页模板', `seotitle` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'SEO标题', `keywords` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'SEO关键词', `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT 'SEO描述', `content` longtext COLLATE utf8_unicode_ci NOT NULL COMMENT '文章内容', `pagesnum` tinyint(3) unsigned NOT NULL DEFAULT '15' COMMENT '文章分页数', `gallery` text COLLATE utf8_unicode_ci, `gallery_info` text COLLATE utf8_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_categories -- ---------------------------- DROP TABLE IF EXISTS `s_categories`; CREATE TABLE `s_categories` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `category_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '所属栏目', `sort` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '排序', `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '栏目名称', `name_en` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_conclusions -- ---------------------------- DROP TABLE IF EXISTS `s_conclusions`; CREATE TABLE `s_conclusions` ( `id` int(10) NOT NULL AUTO_INCREMENT, `body` text, `sort` int(10) NOT NULL, `message_id` int(10) NOT NULL, `score_min` int(10) DEFAULT NULL, `score_max` int(10) DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE=MyISAM AUTO_INCREMENT=213 DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for s_enterprises -- ---------------------------- DROP TABLE IF EXISTS `s_enterprises`; CREATE TABLE `s_enterprises` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL DEFAULT '', `uri` varchar(255) NOT NULL DEFAULT '', `title_logo` varchar(255) NOT NULL DEFAULT '', `logo` varchar(255) NOT NULL DEFAULT '', `content` text NOT NULL, `status` int(11) NOT NULL DEFAULT '1', `free_access` int(11) NOT NULL DEFAULT '0', `is_register` int(11) NOT NULL DEFAULT '0', `category_ids` varchar(255) NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for s_flinks -- ---------------------------- DROP TABLE IF EXISTS `s_flinks`; CREATE TABLE `s_flinks` ( `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT, `typeid` smallint(5) unsigned NOT NULL DEFAULT '0', `name` char(60) NOT NULL DEFAULT '', `url` char(100) NOT NULL DEFAULT '', `pic` char(100) NOT NULL DEFAULT '', `sort` tinyint(4) unsigned NOT NULL DEFAULT '1', `isshow` tinyint(4) NOT NULL DEFAULT '1', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT; -- ---------------------------- -- Table structure for s_gbooks -- ---------------------------- DROP TABLE IF EXISTS `s_gbooks`; CREATE TABLE `s_gbooks` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `nickname` varchar(255) NOT NULL DEFAULT '', `phone` char(15) NOT NULL DEFAULT '', `email` char(60) NOT NULL DEFAULT '', `qq` char(15) NOT NULL DEFAULT '', `company` varchar(255) NOT NULL DEFAULT '', `msg` text, `reply` text, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_members -- ---------------------------- DROP TABLE IF EXISTS `s_members`; CREATE TABLE `s_members` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `mobile` char(30) NOT NULL DEFAULT '', `password` char(32) NOT NULL DEFAULT '', `nickname` char(30) NOT NULL DEFAULT '', `avatar` varchar(255) NOT NULL DEFAULT '', `birthday` date DEFAULT NULL, `sex` enum('2','1','0') NOT NULL DEFAULT '2' COMMENT '0女,1男,2保密', `status` enum('1','0') NOT NULL DEFAULT '1' COMMENT '0禁用,正常', `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_menu_role -- ---------------------------- DROP TABLE IF EXISTS `s_menu_role`; CREATE TABLE `s_menu_role` ( `menu_id` int(10) unsigned NOT NULL, `role_id` int(10) unsigned NOT NULL, PRIMARY KEY (`menu_id`,`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Table structure for s_menus -- ---------------------------- DROP TABLE IF EXISTS `s_menus`; CREATE TABLE `s_menus` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `menu_id` int(11) NOT NULL, `name` char(30) NOT NULL DEFAULT '', `route` char(30) NOT NULL DEFAULT '', `sort` tinyint(4) unsigned NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED; -- ---------------------------- -- Table structure for s_messages -- ---------------------------- DROP TABLE IF EXISTS `s_messages`; CREATE TABLE `s_messages` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) NOT NULL DEFAULT '', `category_id` int(10) NOT NULL DEFAULT '0', `description` varchar(255) NOT NULL DEFAULT '', `body` text, `img` varchar(255) NOT NULL DEFAULT '', `img_thumb` varchar(255) NOT NULL DEFAULT '', `price` decimal(10,0) NOT NULL DEFAULT '0', `is_top` int(1) NOT NULL DEFAULT '0', `is_publish` int(1) NOT NULL DEFAULT '0', `start_at` timestamp NULL DEFAULT NULL, `end_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for s_options -- ---------------------------- DROP TABLE IF EXISTS `s_options`; CREATE TABLE `s_options` ( `id` int(10) NOT NULL AUTO_INCREMENT, `body` text, `sort` int(10) NOT NULL, `question_id` int(10) NOT NULL, `next_type` tinyint(1) NOT NULL, `next_id` int(10) NOT NULL, `score` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) USING BTREE ) ENGINE=MyISAM AUTO_INCREMENT=1204 DEFAULT CHARSET=utf8; -- ---------------------------- -- Table structure for s_role_user -- ---------------------------- DROP TABLE IF EXISTS `s_role_user`; CREATE TABLE `s_role_user` ( `user_id` int(10) unsigned NOT NULL, `role_id` int(10) unsigned NOT NULL, PRIMARY KEY (`user_id`,`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Table structure for s_roles -- ---------------------------- DROP TABLE IF EXISTS `s_roles`; CREATE TABLE `s_roles` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `desc` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- ---------------------------- -- Table structure for s_sysconfigs -- ---------------------------- DROP TABLE IF EXISTS `s_sysconfigs`; CREATE TABLE `s_sysconfigs` ( `id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键ID', `name` char(30) NOT NULL DEFAULT '' COMMENT '配置名称', `field_name` char(30) NOT NULL DEFAULT '' COMMENT '配置字段名称', `type` char(10) NOT NULL DEFAULT '' COMMENT '类型', `value` varchar(255) NOT NULL DEFAULT '' COMMENT '名称值', PRIMARY KEY (`id`) ) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; -- ---------------------------- -- Table structure for s_users -- ---------------------------- DROP TABLE IF EXISTS `s_users`; CREATE TABLE `s_users` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `role_id` int(10) NOT NULL DEFAULT '0', `enterprise_id` int(10) NOT NULL DEFAULT '0', `create_user_id` int(10) NOT NULL DEFAULT '0', `username` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT '用户名', `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户密码', `salt` varchar(10) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `avatar` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `mobile` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `truename` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '', `nickname` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '用户昵称', `logined_at` timestamp NULL DEFAULT NULL COMMENT '登录时间', `logined_ip` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '登录IP', `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `free_access` int(10) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `deleted_at` timestamp NULL DEFAULT NULL, `origin_id` int(10) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `users_username_unique` (`username`) ) ENGINE=InnoDB AUTO_INCREMENT=473 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC; SET FOREIGN_KEY_CHECKS = 1;