From 1c59b48d13a0c38ac7b09457f7072f6a79875c06 Mon Sep 17 00:00:00 2001 From: liuxinwang Date: Thu, 4 May 2023 16:36:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=AF=E6=8C=81=E8=A7=92=E8=89=B2=E6=9D=83?= =?UTF-8?q?=E9=99=90=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/init.sql | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/scripts/init.sql b/scripts/init.sql index d224c67..d0f0535 100644 --- a/scripts/init.sql +++ b/scripts/init.sql @@ -30,3 +30,13 @@ INSERT INTO `metrics` (`key`,`name`,`unit`,`created_at`,`updated_at`) VALUES ('S INSERT INTO `metrics` (`key`,`name`,`unit`,`created_at`,`updated_at`) VALUES ('THREADS_CONNECTED','连接数使用率','%',now(),now()); INSERT INTO `metrics` (`key`,`name`,`unit`,`created_at`,`updated_at`) VALUES ('THREADS_RUNNING_NUM','并发线程数','个',now(),now()); INSERT INTO `metrics` (`key`,`name`,`unit`,`created_at`,`updated_at`) VALUES ('TPS','事务数','个/秒',now(),now()); +-- insert menus +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (1,'instance',0,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.instance\"}','RouteView','/instance/list',NULL,'2023-04-17 15:32:49','2023-05-04 16:29:15','[]','[]'); +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (2,'system',0,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.system\"}','RouteView','/system/user',NULL,'2023-04-17 15:32:49','2023-05-04 16:29:15','[]','[]'); +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (1001,'instanceList',1,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.instance.list\"}','InstanceList',NULL,'/instance/list','2023-04-17 15:32:49','2023-05-04 16:29:15','[{\"action\": \"add\", \"describe\": \"新增\", \"defaultCheck\": false}, {\"action\": \"query\", \"describe\": \"查询\", \"defaultCheck\": false}, {\"action\": \"edit\", \"describe\": \"修改\", \"defaultCheck\": false}, {\"action\": \"delete\", \"describe\": \"删除\", \"defaultCheck\": false}]','[\"add\", \"query\", \"edit\", \"delete\"]'); +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (1002,'InstanceInspection',1,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.instance.inspection\"}','InstanceInspection',NULL,'/instance/inspection','2023-04-17 15:32:49','2023-05-04 16:29:15','[{\"action\": \"get\", \"describe\": \"详情\", \"defaultCheck\": false}, {\"action\": \"query\", \"describe\": \"查询\", \"defaultCheck\": false}]','[\"get\", \"query\"]'); +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (2001,'SystemUser',2,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.system.user\"}','SystemUser',NULL,'/system/user','2023-04-17 15:32:49','2023-05-04 16:29:53','[{\"action\": \"add\", \"describe\": \"新增\", \"defaultCheck\": false}, {\"action\": \"query\", \"describe\": \"查询\", \"defaultCheck\": false}, {\"action\": \"edit\", \"describe\": \"修改\", \"defaultCheck\": false}, {\"action\": \"delete\", \"describe\": \"删除\", \"defaultCheck\": false}, {\"action\": \"resetPassword\", \"describe\": \"重置密码\", \"defaultCheck\": false}]','[\"add\", \"query\", \"edit\", \"delete\", \"resetPassword\"]'); +INSERT INTO `menus` (`id`,`name`,`parent_id`,`meta`,`component`,`redirect`,`path`,`created_at`,`updated_at`,`action_data`,`action_list`) VALUES (2002,'SystemRole',2,'{\"icon\": \"table\", \"show\": true, \"title\": \"menu.system.role\"}','SystemRole',NULL,'/system/role','2023-04-17 15:32:49','2023-05-04 16:29:53','[{\"action\": \"add\", \"describe\": \"新增\", \"defaultCheck\": false}, {\"action\": \"query\", \"describe\": \"查询\", \"defaultCheck\": false}, {\"action\": \"edit\", \"describe\": \"修改\", \"defaultCheck\": false}, {\"action\": \"delete\", \"describe\": \"删除\", \"defaultCheck\": false}, {\"action\": \"funcPerms\", \"describe\": \"功能权限\", \"defaultCheck\": false}]','[\"add\", \"query\", \"edit\", \"delete\", \"funcPerms\"]'); +-- insert admin role permissions (ALL menu) +INSERT IGNORE INTO role_permissions(role_id, menu_id, action_data, action_list) +SELECT 'admin' AS role_id, id AS menu_id, action_data, action_list FROM menus; \ No newline at end of file