/*
 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:01
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role`  (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `u_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `r_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`(`u_name`) USING BTREE,
  INDEX `p_name`(`r_name`) USING BTREE,
  CONSTRAINT `user_role_rbfk1` FOREIGN KEY (`u_name`) REFERENCES `user` (`account_id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `user_role_rbfk2` FOREIGN KEY (`r_name`) REFERENCES `role` (`role_name`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of user_role
-- ----------------------------
INSERT INTO `user_role` VALUES (6, 'test2', 'testrole2', NULL, '2023-08-08 20:19:21');
INSERT INTO `user_role` VALUES (7, 'test2 ', 'testrole1', NULL, '2023-08-08 23:57:15');
INSERT INTO `user_role` VALUES (8, 'test1', 'testrole1', NULL, '2023-08-08 23:57:15');
INSERT INTO `user_role` VALUES (9, 'admin', 'admin', NULL, '2023-08-09 20:09:47');

SET FOREIGN_KEY_CHECKS = 1;
