/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.24.105
 Source Server Type    : MySQL
 Source Server Version : 50719
 Source Host           : 192.168.24.105:3306
 Source Schema         : oauth-center

 Target Server Type    : MySQL
 Target Server Version : 50719
 File Encoding         : 65001

 Date: 14/09/2020 14:14:05
*/

DROP DATABASE IF EXISTS `oauth-center`;
CREATE DATABASE `oauth-center`;
USE `oauth-center`;

-- ----------------------------
-- Table structure for sys_client_service
-- ----------------------------
CREATE TABLE `sys_client_service`  (
  `clientId` int(11) NOT NULL COMMENT '应用标识',
  `serviceId` int(11) NOT NULL COMMENT '服务权限标识',
  PRIMARY KEY (`clientId`, `serviceId`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_client_service
-- ----------------------------
INSERT INTO `sys_client_service` VALUES (4, 100);
INSERT INTO `sys_client_service` VALUES (4, 101);
INSERT INTO `sys_client_service` VALUES (4, 102);
INSERT INTO `sys_client_service` VALUES (4, 103);

-- ----------------------------
-- Table structure for sys_gateway_routes
-- ----------------------------
CREATE TABLE `sys_gateway_routes`  (
  `id` char(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'id',
  `uri` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT 'uri路径',
  `predicates` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '判定器',
  `filters` varchar(1000) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过滤器',
  `order` int(11) NULL DEFAULT NULL COMMENT '排序',
  `description` varchar(500) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '描述',
  `delFlag` int(11) NULL DEFAULT 0 COMMENT '删除标志 0 不删除 1 删除',
  `createTime` datetime(0) NOT NULL,
  `updateTime` datetime(0) NOT NULL,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '服务网关路由表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for sys_service
-- ----------------------------
CREATE TABLE `sys_service`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parentId` int(11) NOT NULL,
  `name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `url` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `path` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `css` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `sort` int(11) NOT NULL,
  `createTime` datetime(0) NOT NULL,
  `updateTime` datetime(0) NOT NULL,
  `isMenu` int(11) NULL DEFAULT NULL COMMENT '是否服务 1 是 2 不是',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 103002 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_service
-- ----------------------------
INSERT INTO `sys_service` VALUES (100, -1, '基础服务', NULL, '', NULL, 1, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 1);
INSERT INTO `sys_service` VALUES (101, -1, '商砼服务', NULL, '', NULL, 2, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 1);
INSERT INTO `sys_service` VALUES (102, -1, '监管服务', NULL, '', NULL, 3, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 1);
INSERT INTO `sys_service` VALUES (103, -1, '环卫服务', NULL, '', NULL, 4, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 1);
INSERT INTO `sys_service` VALUES (100001, 100, '位置存储', NULL, '', NULL, 1, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (100002, 100, '终端报警解码计算存储', NULL, '', NULL, 2, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (100003, 100, '平台报警计算存储', NULL, '', NULL, 3, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (100004, 100, '逆地址存储', NULL, '', NULL, 4, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (100005, 100, '平台统计、计算功能', NULL, '', NULL, 5, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (101001, 101, '工作状态计算', NULL, '', NULL, 1, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (101002, 101, '报警计算', NULL, '', NULL, 2, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (102001, 102, '统计、计算', NULL, '', NULL, 1, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);
INSERT INTO `sys_service` VALUES (103001, 103, '工作状态计算', NULL, '', NULL, 1, '2020-07-02 00:54:47', '2020-07-02 00:54:47', 2);

