/*
 Navicat Premium Data Transfer

 Source Server         : local_mariadb
 Source Server Type    : MariaDB
 Source Server Version : 100338 (10.3.38-MariaDB)
 Source Host           : localhost:33066
 Source Schema         : omc_db

 Target Server Type    : MariaDB
 Target Server Version : 100338 (10.3.38-MariaDB)
 File Encoding         : 65001

 Date: 10/08/2023 08:44:23
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `r_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `p_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `create_at` datetime NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `r_name`(`r_name`) USING BTREE,
  INDEX `role_permission_ibfk_2`(`p_name`) USING BTREE,
  CONSTRAINT `role_permission_ibfk_1` FOREIGN KEY (`r_name`) REFERENCES `role` (`role_name`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `role_permission_ibfk_2` FOREIGN KEY (`p_name`) REFERENCES `permission_map` (`permission_name`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of role_permission
-- ----------------------------
INSERT INTO `role_permission` VALUES (1, 'testrole1', 'get#dm.omcdb', NULL, '2023-08-08 18:40:25');
INSERT INTO `role_permission` VALUES (2, 'testrole2', 'post#dm.omcdb', NULL, '2023-08-08 18:40:52');
INSERT INTO `role_permission` VALUES (3, 'testrole2', 'put#dm.omcdb', NULL, '2023-08-08 18:41:08');
INSERT INTO `role_permission` VALUES (4, 'testrole2', 'del#dm.omcdb', NULL, '2023-08-08 18:41:30');
INSERT INTO `role_permission` VALUES (8, 'testrole1', 'get#dm.omcdb.mmlcmd', NULL, '2023-08-08 23:41:58');
INSERT INTO `role_permission` VALUES (9, 'admin', '*#*', NULL, '2023-08-09 20:08:58');

SET FOREIGN_KEY_CHECKS = 1;
