/*
 Navicat Premium Data Transfer

 Source Server         : hw-test
 Source Server Type    : MySQL
 Source Server Version : 50730
 Source Host           : hw.1ydt.cn:3306
 Source Schema         : test

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

 Date: 10/06/2020 17:47:59
*/

SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_permssion
-- ----------------------------
DROP TABLE IF EXISTS `sys_permssion`;
CREATE TABLE `sys_permssion`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `xid` varchar(64) NOT NULL,
  `parent` varchar(64) NULL DEFAULT NULL,
  `title` varchar(100) NULL DEFAULT NULL,
  `value` varchar(100) NULL DEFAULT NULL,
  `times` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  `sort` int(11) NULL DEFAULT 10,
  PRIMARY KEY (`id`, `xid`) USING BTREE,
  INDEX `IDX_sys_permssion_parent`(`parent`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 11 ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_permssion
-- ----------------------------
INSERT INTO `sys_permssion` VALUES (1, 'common', NULL, '通用', 'common', '2019-10-23 11:29:32', 0);
INSERT INTO `sys_permssion` VALUES (2, 'login', 'common', '登录', 'login', '2019-10-23 11:29:40', 11);
INSERT INTO `sys_permssion` VALUES (3, 'uppass', 'common', '修改密码', 'comm:uppass', '2020-03-01 21:47:42', 12);
INSERT INTO `sys_permssion` VALUES (4, 'admin', NULL, '后台界面', 'admin', '2019-10-27 00:11:30', 2);
INSERT INTO `sys_permssion` VALUES (5, 'roles', NULL, '角色管理', 'role:list', '2019-11-03 13:48:58', 3);
INSERT INTO `sys_permssion` VALUES (6, 'role1', 'roles', '角色编辑', 'role:edit', '2019-11-03 13:49:21', 11);
INSERT INTO `sys_permssion` VALUES (7, 'role2', 'roles', '角色删除', 'role:del', '2019-11-03 13:49:22', 12);
INSERT INTO `sys_permssion` VALUES (8, 'grant', 'roles', '用户授权', 'user:grant', '2019-11-04 09:52:47', 13);
INSERT INTO `sys_permssion` VALUES (9, 'users', NULL, '用户管理', 'user:list', '2019-11-04 09:51:14', 4);
INSERT INTO `sys_permssion` VALUES (10, 'userxg', 'users', '用户编辑', 'user:edit', '2019-11-04 20:27:02', 10);

-- ----------------------------
-- Table structure for sys_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_role`;
CREATE TABLE `sys_role`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `xid` varchar(64) NOT NULL,
  `title` varchar(100) NULL DEFAULT NULL,
  `perms` text NULL,
  `times` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0),
  PRIMARY KEY (`id`, `xid`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_role
-- ----------------------------
INSERT INTO `sys_role` VALUES (1, 'common', '通用权限', 'common,login,uppass', '2019-10-23 11:31:34');
INSERT INTO `sys_role` VALUES (2, 'admin', '权限管理员', 'admin,roles,role1,role2,users,grant', '2019-11-03 13:49:35');

-- ----------------------------
-- Table structure for sys_user
-- ----------------------------
DROP TABLE IF EXISTS `sys_user`;
CREATE TABLE `sys_user`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `xid` varchar(64) NOT NULL,
  `name` varchar(50) NOT NULL,
  `pass` varchar(100) NULL DEFAULT NULL,
  `phone` varchar(50) NULL DEFAULT NULL COMMENT '备用电话',
  `times` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '创建时间',
  `logintm` datetime(0) NULL DEFAULT NULL COMMENT '登陆时间',
  `fwtm` datetime(0) NULL DEFAULT NULL COMMENT '访问时间',
  PRIMARY KEY (`id`, `xid`, `name`) USING BTREE,
  INDEX `IDX_sys_user_phone`(`phone`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_user
-- ----------------------------
INSERT INTO `sys_user` VALUES (1, 'admin', 'root', 'E10ADC3949BA59ABBE56E057F20F883E', '', '2020-03-01 23:28:35', '2020-06-10 17:34:57', '2020-06-10 17:34:51');

-- ----------------------------
-- Table structure for sys_user_role
-- ----------------------------
DROP TABLE IF EXISTS `sys_user_role`;
CREATE TABLE `sys_user_role`  (
  `user_code` varchar(64) NOT NULL,
  `role_codes` text NULL,
  `limits` text NULL,
  PRIMARY KEY (`user_code`) USING BTREE
) ENGINE = InnoDB ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of sys_user_role
-- ----------------------------
INSERT INTO `sys_user_role` VALUES ('admin', 'admin', NULL);

SET FOREIGN_KEY_CHECKS = 1;
