多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
~~~[sql] /* Navicat Premium Data Transfer Source Server : dfc Source Server Type : MySQL Source Server Version : 50717 Source Host : localhost:3306 Source Schema : material Target Server Type : MySQL Target Server Version : 50717 File Encoding : 65001 Date: 14/06/2018 17:45:27 */ SET NAMES utf8mb4; SET FOREIGN_KEY_CHECKS = 0; -- ---------------------------- -- Table structure for admin_named_user -- ---------------------------- DROP TABLE IF EXISTS `admin_named_user`; CREATE TABLE `admin_named_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `username` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户名', `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', `user_id` int(11) NOT NULL COMMENT '所属用户id', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `user_id`(`user_id`) USING BTREE, UNIQUE INDEX `username`(`username`) USING BTREE, CONSTRAINT `admin_named_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '命名用户登录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for admin_oauth_user -- ---------------------------- DROP TABLE IF EXISTS `admin_oauth_user`; CREATE TABLE `admin_oauth_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `open_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'open_id', `type` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '第三方登录类型,qq、wechat等', `user_id` int(11) NOT NULL COMMENT '所属用户id', `ext` json NULL COMMENT '额外信息', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `type`(`type`, `open_id`) USING BTREE, INDEX `user_id`(`user_id`) USING BTREE, CONSTRAINT `admin_oauth_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '第三方登录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for admin_phone_user -- ---------------------------- DROP TABLE IF EXISTS `admin_phone_user`; CREATE TABLE `admin_phone_user` ( `id` int(11) NOT NULL AUTO_INCREMENT, `phone` varchar(11) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号', `password` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '密码', `user_id` int(11) NOT NULL COMMENT '所属用户id', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `user_id`(`user_id`) USING BTREE, UNIQUE INDEX `phone`(`phone`) USING BTREE, CONSTRAINT `admin_phone_user_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '手机号登录表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for admin_user_config -- ---------------------------- DROP TABLE IF EXISTS `admin_user_config`; CREATE TABLE `admin_user_config` ( `id` int(11) NOT NULL AUTO_INCREMENT, `configs` json NULL COMMENT '配置项', `user_id` int(11) NOT NULL COMMENT '所属用户', PRIMARY KEY (`id`) USING BTREE, UNIQUE INDEX `user_id`(`user_id`) USING BTREE, CONSTRAINT `admin_user_config_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户配置信息' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for admin_user_info -- ---------------------------- DROP TABLE IF EXISTS `admin_user_info`; CREATE TABLE `admin_user_info` ( `id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '用户昵称', `recent_login_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '最后登录', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户信息表' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for advert -- ---------------------------- DROP TABLE IF EXISTS `advert`; CREATE TABLE `advert` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题', `img` varchar(160) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '图片地址', `url` varchar(160) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '连接地址', `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '详细内容', `is_enable` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否启用', `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '广告' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for banner -- ---------------------------- DROP TABLE IF EXISTS `banner`; CREATE TABLE `banner` ( `id` int(11) NOT NULL AUTO_INCREMENT, `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题', `img` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '图片地址', `url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '链接地址', `is_enable` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否启用', `page` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所在页面', `position` enum('top','center','bottom') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '所在位置', `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = 'banner' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for cooperation -- ---------------------------- DROP TABLE IF EXISTS `cooperation`; CREATE TABLE `cooperation` ( `id` int(11) NOT NULL AUTO_INCREMENT, `source` enum('website','android','ios','mall') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '来源', `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '合作者姓名', `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号', `email` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '邮箱', `intention` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '合作意向', `status` enum('pending','processed','ignore') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending' COMMENT '处理状态', `delete_time` timestamp(0) NULL DEFAULT NULL COMMENT '标记删除时间', `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp(0) NULL DEFAULT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '合作信息' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for feedback -- ---------------------------- DROP TABLE IF EXISTS `feedback`; CREATE TABLE `feedback` ( `id` int(11) NOT NULL AUTO_INCREMENT, `source` enum('website','android','ios','mall') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '来源', `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '反馈人姓名', `phone` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '手机号', `email` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT '' COMMENT '邮箱', `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '反馈的内容', `status` enum('pending','processed','ignore') CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL DEFAULT 'pending' COMMENT '处理状态', `delete_time` timestamp(0) NULL DEFAULT NULL COMMENT '标记删除时间', `create_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `update_time` timestamp(0) NULL DEFAULT NULL, `user_id` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'app用户id', PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '问题反馈' ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for migrations -- ---------------------------- DROP TABLE IF EXISTS `migrations`; CREATE TABLE `migrations` ( `version` bigint(20) NOT NULL, `migration_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL, `start_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `end_time` timestamp(0) NOT NULL DEFAULT CURRENT_TIMESTAMP, `breakpoint` tinyint(1) NOT NULL DEFAULT 0, PRIMARY KEY (`version`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rbac_permissions -- ---------------------------- DROP TABLE IF EXISTS `rbac_permissions`; CREATE TABLE `rbac_permissions` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Lft` int(11) NOT NULL, `Rght` int(11) NOT NULL, `Title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `Description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (`ID`) USING BTREE, INDEX `Lft`(`Lft`) USING BTREE, INDEX `Rght`(`Rght`) USING BTREE, INDEX `Title`(`Title`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rbac_rolepermissions -- ---------------------------- DROP TABLE IF EXISTS `rbac_rolepermissions`; CREATE TABLE `rbac_rolepermissions` ( `RoleID` int(11) NOT NULL, `PermissionID` int(11) NOT NULL, `AssignmentDate` int(11) NOT NULL, PRIMARY KEY (`RoleID`, `PermissionID`) USING BTREE ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rbac_roles -- ---------------------------- DROP TABLE IF EXISTS `rbac_roles`; CREATE TABLE `rbac_roles` ( `ID` int(11) NOT NULL AUTO_INCREMENT, `Lft` int(11) NOT NULL, `Rght` int(11) NOT NULL, `Title` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `Description` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, PRIMARY KEY (`ID`) USING BTREE, INDEX `Lft`(`Lft`) USING BTREE, INDEX `Rght`(`Rght`) USING BTREE, INDEX `Title`(`Title`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for rbac_userroles -- ---------------------------- DROP TABLE IF EXISTS `rbac_userroles`; CREATE TABLE `rbac_userroles` ( `UserID` int(11) NOT NULL, `RoleID` int(11) NOT NULL, `AssignmentDate` int(11) NOT NULL, PRIMARY KEY (`UserID`, `RoleID`) USING BTREE, CONSTRAINT `rbac_userroles_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `admin_user_info` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic; -- ---------------------------- -- Table structure for system_jobs -- ---------------------------- DROP TABLE IF EXISTS `system_jobs`; CREATE TABLE `system_jobs` ( `id` int(11) NOT NULL AUTO_INCREMENT, `queue` char(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, `attempts` int(3) UNSIGNED NOT NULL, `reserved` int(3) UNSIGNED NOT NULL, `reserved_at` int(10) UNSIGNED NULL DEFAULT NULL, `available_at` int(10) UNSIGNED NOT NULL, `created_at` int(10) UNSIGNED NOT NULL, PRIMARY KEY (`id`) USING BTREE ) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '消息队列使用的表' ROW_FORMAT = Dynamic; SET FOREIGN_KEY_CHECKS = 1; ~~~