1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91
| CREATE DATABASE `micro_service_acl` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE `micro_service_acl`;
CREATE TABLE `acl_user` ( `id` char(19) NOT NULL COMMENT '会员id', `username` varchar(20) NOT NULL DEFAULT '' COMMENT '微信openid', `password` varchar(32) NOT NULL DEFAULT '' COMMENT '密码', `nick_name` varchar(50) DEFAULT NULL COMMENT '昵称', `salt` varchar(255) DEFAULT NULL COMMENT '用户头像', `token` varchar(100) DEFAULT NULL COMMENT '用户签名', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`), UNIQUE KEY `uk_username` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='用户表';
CREATE TABLE `acl_role` ( `id` char(19) NOT NULL DEFAULT '' COMMENT '角色id', `role_name` varchar(20) NOT NULL DEFAULT '' COMMENT '角色名称', `role_code` varchar(20) DEFAULT NULL COMMENT '角色编码', `remark` varchar(255) DEFAULT NULL COMMENT '备注', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `acl_permission` ( `id` char(19) NOT NULL DEFAULT '' COMMENT '编号', `pid` char(19) NOT NULL DEFAULT '' COMMENT '所属上级', `name` varchar(20) NOT NULL DEFAULT '' COMMENT '名称', `type` tinyint(3) NOT NULL DEFAULT '0' COMMENT '类型(1:菜单,2:按钮)', `permission_value` varchar(50) DEFAULT NULL COMMENT '权限值', `path` varchar(100) DEFAULT NULL COMMENT '访问路径', `component` varchar(100) DEFAULT NULL COMMENT '组件路径', `icon` varchar(50) DEFAULT NULL COMMENT '图标', `status` tinyint(4) DEFAULT NULL COMMENT '状态(0:禁止,1:正常)', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除', `gmt_create` datetime DEFAULT NULL COMMENT '创建时间', `gmt_modified` datetime DEFAULT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_pid` (`pid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='权限';
CREATE TABLE `acl_user_role` ( `id` char(19) NOT NULL DEFAULT '' COMMENT '主键id', `role_id` char(19) NOT NULL DEFAULT '0' COMMENT '角色id', `user_id` char(19) NOT NULL DEFAULT '0' COMMENT '用户id', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_role_id` (`role_id`), KEY `idx_user_id` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE `acl_role_permission` ( `id` char(19) NOT NULL DEFAULT '', `role_id` char(19) NOT NULL DEFAULT '', `permission_id` char(19) NOT NULL DEFAULT '', `is_deleted` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '逻辑删除 1(true)已删除, 0(false)未删除', `gmt_create` datetime NOT NULL COMMENT '创建时间', `gmt_modified` datetime NOT NULL COMMENT '更新时间', PRIMARY KEY (`id`), KEY `idx_role_id` (`role_id`), KEY `idx_permission_id` (`permission_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='角色权限';
INSERT INTO `acl_user` VALUES ('1','admin','96e79218965eb72c92a549dd5a330112','admin','',NULL,0,'2018-05-01 10:39:47','2018-05-01 10:39:47'),('2','test','96e79218965eb72c92a549dd5a330112','test',NULL,NULL,0,'2018-05-01 16:36:07','2018-05-01 16:40:08');
INSERT INTO `acl_role` VALUES ('1','普通管理员',NULL,NULL,0,'2018-05-11 13:09:32','2018-05-18 10:27:18'),('2','测试员',NULL,NULL,0,'2018-05-18 13:35:58','2018-05-18 13:35:58');
INSERT INTO `acl_permission` VALUES ('1','0','全部数据',0,NULL,NULL,NULL,NULL,NULL,0,'2018-05-15 17:13:06','2018-05-15 17:13:06'),('1195268474480156673','1','权限管理',1,NULL,'/acl','Layout',NULL,NULL,0,'2018-05-15 17:13:06','2018-05-18 13:54:25'),('1195268616021139457','1195268474480156673','用户管理',1,NULL,'user/list','/acl/user/list',NULL,NULL,0,'2018-05-15 17:13:40','2018-05-18 13:53:12'),('1195268788138598401','1195268474480156673','角色管理',1,NULL,'role/list','/acl/role/list',NULL,NULL,0,'2018-05-15 17:14:21','2018-05-15 17:14:21'),('1195268893830864898','1195268474480156673','菜单管理',1,NULL,'menu/list','/acl/menu/list',NULL,NULL,0,'2018-05-15 17:14:46','2018-05-15 17:14:46'),('1195269143060602882','1195268616021139457','查看',2,'user.list','','',NULL,NULL,0,'2018-05-15 17:15:45','2018-05-17 21:57:16'),('1195269295926206466','1195268616021139457','添加',2,'user.add','user/add','/acl/user/form',NULL,NULL,0,'2018-05-15 17:16:22','2018-05-15 17:16:22'),('1195269473479483394','1195268616021139457','修改',2,'user.update','user/update/:id','/acl/user/form',NULL,NULL,0,'2018-05-15 17:17:04','2018-05-15 17:17:04'),('1195269547269873666','1195268616021139457','删除',2,'user.remove','','',NULL,NULL,0,'2018-05-15 17:17:22','2018-05-15 17:17:22'),('1195269821262782465','1195268788138598401','修改',2,'role.update','role/update/:id','/acl/role/form',NULL,NULL,0,'2018-05-15 17:18:27','2018-05-15 17:19:53'),('1195269903542444034','1195268788138598401','查看',2,'role.list','','',NULL,NULL,0,'2018-05-15 17:18:47','2018-05-15 17:18:47'),('1195270037005197313','1195268788138598401','添加',2,'role.add','role/add','/acl/role/form',NULL,NULL,0,'2018-05-15 17:19:19','2018-05-18 11:05:42'),('1195270442602782721','1195268788138598401','删除',2,'role.remove','','',NULL,NULL,0,'2018-05-15 17:20:55','2018-05-15 17:20:55'),('1195270621548568578','1195268788138598401','角色权限',2,'role.acl','role/distribution/:id','/acl/role/roleForm',NULL,NULL,0,'2018-05-15 17:21:38','2018-05-15 17:21:38'),('1195270744097742849','1195268893830864898','查看',2,'permission.list','','',NULL,NULL,0,'2018-05-15 17:22:07','2018-05-15 17:22:07'),('1195270810560684034','1195268893830864898','添加',2,'permission.add','','',NULL,NULL,0,'2018-05-15 17:22:23','2018-05-15 17:22:23'),('1195270862100291586','1195268893830864898','修改',2,'permission.update','','',NULL,NULL,0,'2018-05-15 17:22:35','2018-05-15 17:22:35'),('1195270887933009922','1195268893830864898','删除',2,'permission.remove','','',NULL,NULL,0,'2018-05-15 17:22:41','2018-05-15 17:22:41'),('1196301740985311234','1195268616021139457','分配角色',2,'user.assgin','user/role/:id','/acl/user/roleForm',NULL,NULL,0,'2018-05-18 13:38:56','2018-05-18 13:38:56');
INSERT INTO `acl_role_permission` VALUES ('1196301979754455041','1','1',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979792203778','1','1195268474480156673',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979821563906','1','1195268616021139457',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979842535426','1','1195269143060602882',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979855118338','1','1195269295926206466',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979880284161','1','1195269473479483394',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979913838593','1','1195269547269873666',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979926421506','1','1196301740985311234',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301979951587330','1','1195268788138598401',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980014501889','1','1195269821262782465',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980035473410','1','1195269903542444034',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980052250626','1','1195270037005197313',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980077416450','1','1195270442602782721',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980094193665','1','1195270621548568578',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980119359489','1','1195268893830864898',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980136136706','1','1195270744097742849',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980249382913','1','1195270810560684034',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980270354434','1','1195270862100291586',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131649','1','1195270887933009922',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131748','2','1',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131835','2','1195268474480156673',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131836','2','1195268616021139457',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131837','2','1195269143060602882',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131838','2','1195269295926206466',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131839','2','1195269473479483394',0,'2018-05-18 13:39:53','2018-05-18 13:39:53'),('1196301980287131840','2','1195269547269873666',0,'2018-05-18 13:39:53','2018-05-18 13:39:53');
INSERT INTO `acl_user_role` VALUES ('1','1','1',0,'2018-05-11 13:09:53','2018-05-11 13:09:53'),('2','2','2',0,'2018-05-11 13:09:53','2018-05-11 13:09:53');
|