From 9f49b5a60fd41e53fa0d2405265575dc765ea388 Mon Sep 17 00:00:00 2001
From: hexiaohao <1634696506@qq.com>
Date: 星期四, 08 八月 2024 09:47:04 +0800
Subject: [PATCH] 更新

---
 Client/何小豪/code/quanxian.sql   |   23 +++++++++++++++++++----
 Client/何小豪/log/日志_何小豪_0807.doc |    0 
 2 files changed, 19 insertions(+), 4 deletions(-)

diff --git "a/Client/\344\275\225\345\260\217\350\261\252/code/quanxian.sql" "b/Client/\344\275\225\345\260\217\350\261\252/code/quanxian.sql"
index 210dae1..b1e3956 100644
--- "a/Client/\344\275\225\345\260\217\350\261\252/code/quanxian.sql"
+++ "b/Client/\344\275\225\345\260\217\350\261\252/code/quanxian.sql"
@@ -30,12 +30,16 @@
   CONSTRAINT `FK_permissions_roles` FOREIGN KEY (`role`) REFERENCES `roles` (`role`) ON DELETE SET NULL ON UPDATE SET NULL
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
--- 鏁版嵁瀵煎嚭琚彇娑堥�夋嫨銆�
+-- 姝e湪瀵煎嚭琛�  uesr.permissions 鐨勬暟鎹細~1 rows (澶х害)
+DELETE FROM `permissions`;
+INSERT INTO `permissions` (`user_id`, `user_name`, `role`) VALUES
+	(1, 'admin', 'role_admin');
 
 -- 瀵煎嚭  琛� uesr.roles 缁撴瀯
 DROP TABLE IF EXISTS `roles`;
 CREATE TABLE IF NOT EXISTS `roles` (
-  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '瑙掕壊',
+  `role_id` int NOT NULL AUTO_INCREMENT,
+  `role` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '瑙掕壊',
   `Permissions_admin` tinyint unsigned DEFAULT '0' COMMENT '鏉冮檺绠$悊鏉冮檺',
   `Permissions_query` tinyint unsigned DEFAULT '0' COMMENT '鍘嗗彶鏌ヨ鍒嗘瀽鏉冮檺',
   `Permissions_alert` tinyint unsigned DEFAULT '0' COMMENT '璀︽姤绠$悊鏉冮檺',
@@ -44,10 +48,21 @@
   `Permissions_produce` tinyint unsigned DEFAULT '0' COMMENT '鐢熶骇璁″垝鏉冮檺',
   `Permissions_equipment` tinyint unsigned DEFAULT '0' COMMENT '璁惧绠$悊鏉冮檺',
   `Permissions_version` tinyint unsigned DEFAULT '0' COMMENT '鐗堟湰绠$悊鏉冮檺',
+  PRIMARY KEY (`role_id`),
   KEY `role` (`role`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
+) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
 
--- 鏁版嵁瀵煎嚭琚彇娑堥�夋嫨銆�
+-- 姝e湪瀵煎嚭琛�  uesr.roles 鐨勬暟鎹細~8 rows (澶х害)
+DELETE FROM `roles`;
+INSERT INTO `roles` (`role_id`, `role`, `Permissions_admin`, `Permissions_query`, `Permissions_alert`, `Permissions_Log`, `Permissions_map`, `Permissions_produce`, `Permissions_equipment`, `Permissions_version`) VALUES
+	(1, 'role_admin', 1, 1, 1, 1, 1, 1, 1, 1),
+	(2, 'role_query', 0, 1, 0, 0, 0, 0, 0, 0),
+	(3, 'role_alert', 0, 0, 1, 0, 0, 0, 0, 0),
+	(4, 'role_Log', 0, 0, 0, 1, 0, 0, 0, 0),
+	(5, 'role_map', 0, 0, 0, 0, 1, 0, 0, 0),
+	(6, 'role_produce', 0, 0, 0, 0, 0, 1, 0, 0),
+	(7, 'role_equipment', 0, 0, 0, 0, 0, 0, 1, 0),
+	(8, 'role_version', 0, 0, 0, 0, 0, 0, 0, 1);
 
 /*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
 /*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
diff --git "a/Client/\344\275\225\345\260\217\350\261\252/log/\346\227\245\345\277\227_\344\275\225\345\260\217\350\261\252_0807.doc" "b/Client/\344\275\225\345\260\217\350\261\252/log/\346\227\245\345\277\227_\344\275\225\345\260\217\350\261\252_0807.doc"
new file mode 100644
index 0000000..e83dcad
--- /dev/null
+++ "b/Client/\344\275\225\345\260\217\350\261\252/log/\346\227\245\345\277\227_\344\275\225\345\260\217\350\261\252_0807.doc"
Binary files differ

--
Gitblit v1.8.0