/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80035 (8.0.35)
 Source Host           : localhost:3306
 Source Schema         : apply_room_record

 Target Server Type    : MySQL
 Target Server Version : 80035 (8.0.35)
 File Encoding         : 65001

 Date: 26/02/2024 11:12:11
*/


-- ----------------------------
-- Table structure for tbl_access_record
-- ----------------------------
CREATE TABLE `tbl_access_record`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `entry_time` bigint NULL DEFAULT NULL COMMENT '进入时间',
  `out_time` bigint NULL DEFAULT NULL COMMENT '出去的时间',
  `state` smallint NULL DEFAULT NULL COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常',
  `update_time` bigint NULL DEFAULT NULL,
  `create_time` bigint NULL DEFAULT NULL,
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '被记录用户id',
  `room_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '进出的房间id',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_record_fk`(`user_id` ASC) USING BTREE,
  INDEX `room_record_fk`(`room_id` ASC) USING BTREE,
  CONSTRAINT `room_record_fk` FOREIGN KEY (`room_id`) REFERENCES `tbl_room` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `user_record_fk` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '进出记录' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_access_record
-- ----------------------------

-- ----------------------------
-- Table structure for tbl_application
-- ----------------------------
CREATE TABLE `tbl_application`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `reason` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '原因',
  `application_type` smallint NOT NULL COMMENT '申请类型：0：代表补卡申请。。',
  `matter_record_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '事项记录id,对什么已操作事项的申请',
  `handle_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '处理人id',
  `apply_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '申请人id',
  `state` smallint NOT NULL DEFAULT 0 COMMENT '状态：0：代表申请中，1：代表申请成功，2：代表申请失败',
  `remarks` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注,审核通过或者是拒绝的理由',
  `create_time` bigint NOT NULL COMMENT '创建时间',
  `update_time` bigint NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `handle_user_fk`(`handle_user_id` ASC) USING BTREE,
  INDEX `apply_user_fk`(`apply_user_id` ASC) USING BTREE,
  CONSTRAINT `apply_user_fk` FOREIGN KEY (`apply_user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `handle_user_fk` FOREIGN KEY (`handle_user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '申请表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_application
-- ----------------------------

-- ----------------------------
-- Table structure for tbl_message
-- ----------------------------
CREATE TABLE `tbl_message`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `message_type` smallint NOT NULL COMMENT '消息类型:待办通知：0 申请结果通知：1',
  `read_state` smallint NOT NULL DEFAULT 0 COMMENT '阅读状态:0未读，1已读',
  `content` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息内容',
  `message_receiver_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息接收者id',
  `message_sender_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '消息发送者id',
  `create_time` bigint NOT NULL COMMENT '创建时间',
  `update_time` bigint NOT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `message_receiver_fk`(`message_receiver_id` ASC) USING BTREE,
  INDEX `message_sender_fk`(`message_sender_id` ASC) USING BTREE,
  CONSTRAINT `message_receiver_fk` FOREIGN KEY (`message_receiver_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `message_sender_fk` FOREIGN KEY (`message_sender_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '消息表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_message
-- ----------------------------
INSERT INTO `tbl_message` VALUES ('533105d97d7d4bc3904945d587b431a8', 0, 1, '您收到来自User的6605房间预约申请，预约时间2024年02月23日 11:43至2024年02月23日 12:43，请您及时处理。', '8e6b34a790c046e5a5b8bbf47ce7c190', 'ae391d3580b2433fb8dcae22caae1643', 1708659823003, 1708659852847);

-- ----------------------------
-- Table structure for tbl_notice
-- ----------------------------
CREATE TABLE `tbl_notice`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `title` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标题',
  `content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '内容',
  `publish_user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '发布人id',
  `create_time` bigint NOT NULL COMMENT '创建时间',
  `update_time` bigint NOT NULL COMMENT '修改时间',
  `state` smallint NOT NULL DEFAULT 1 COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `publish_user_fk`(`publish_user_id` ASC) USING BTREE,
  CONSTRAINT `publish_user_fk` FOREIGN KEY (`publish_user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '公告表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_notice
-- ----------------------------
INSERT INTO `tbl_notice` VALUES ('1d962e4f10b54db482490465e0a219da', 'Test', '这是Test内容，这是test内容，这是一堆废话，这是一堆废话，这是一堆废话。', '8e6b34a790c046e5a5b8bbf47ce7c190', 1708655792370, 1708655792370, 1);

-- ----------------------------
-- Table structure for tbl_role
-- ----------------------------
CREATE TABLE `tbl_role`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标识',
  `role_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限名称',
  `role_des` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '权限描述',
  `state` smallint NULL DEFAULT NULL COMMENT '状态',
  `create_time` bigint NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '角色表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tbl_role
-- ----------------------------
INSERT INTO `tbl_role` VALUES ('0', 'user', '普通用户', 1, 1638605879181, 1638605879181);
INSERT INTO `tbl_role` VALUES ('1', 'admin', '管理员', 1, 1638605879166, 1638605879166);
INSERT INTO `tbl_role` VALUES ('2', 'super-admin', '超级管理员', 1, 1638605879166, 1638605879166);

-- ----------------------------
-- Table structure for tbl_room
-- ----------------------------
CREATE TABLE `tbl_room`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `school` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '校区',
  `teach_building` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '楼栋',
  `category` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '类别',
  `room_name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '房间名称：房间号+名字',
  `equipment_info` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备信息',
  `capacity` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '容量',
  `state` smallint NULL DEFAULT NULL COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常，5：代表房间不可预约',
  `update_time` bigint NULL DEFAULT NULL,
  `create_time` bigint NULL DEFAULT NULL,
  `charge_person` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '房间负责人姓名',
  `charge_person_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '房间负责人id',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房间' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_room
-- ----------------------------
INSERT INTO `tbl_room` VALUES ('07b4771ab015442eb5e47d5d95639b5b', '花江校区', '6', '会议室', '6605', '无', '100', 1, 1708659786255, 1708655939088, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('0c3d943fcb7b4817a778917c0321393c', '花江校区', '5', '会议室', '5505', '无', '100', 1, 1708659786440, 1708655854030, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('157170e44d824ee593c2c7e67b30e7d2', '花江校区', '5', '会议室', '5504', '无', '100', 1, 1708659786477, 1708655849920, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('216b6362a8894fd8b02ab96fd598318e', '花江校区', '5', '会议室', '5507', '无', '100', 1, 1708659786371, 1708655862205, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('28967db4f02143638044e990eb4b84ef', '花江校区', '6', '会议室', '6604', '无', '100', 1, 1708659786173, 1708655934721, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('8e83ff366b4a4a01b25b213b32651d85', '花江校区', '5', '会议室', '5502', '无', '100', 1, 1708659791852, 1708655840596, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('9f4cdde6d56b40408c0ec96636ec46dc', '花江校区', '5', '会议室', '5501', '无', '100', 1, 1708659791872, 1708655828621, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('aaafb423b9bf47a88bb1a4ff9958e2f7', '花江校区', '5', '会议室', '5508', '无', '100', 1, 1708659786331, 1708655866329, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('b0edd4756dbc47c2b259f66ff8538599', '花江校区', '5', '会议室', '5503', '无', '100', 1, 1708659786497, 1708655845603, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('bf3354cf8f14401fa6db095f6697f4e9', '花江校区', '6', '会议室', '6602', '无', '100', 1, 1708659786305, 1708655924532, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('f0ba52fff02448eab1488e8406e831a8', '花江校区', '5', '会议室', '5506', '无', '100', 1, 1708659786398, 1708655858390, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');
INSERT INTO `tbl_room` VALUES ('f4f7facadaec438788f937189adad17c', '花江校区', '6', '会议室', '6603', '无', '100', 1, 1708659786233, 1708655930151, 'Admin', '8e6b34a790c046e5a5b8bbf47ce7c190');

-- ----------------------------
-- Table structure for tbl_room_reservation
-- ----------------------------
CREATE TABLE `tbl_room_reservation`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `room_usage` varchar(521) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约用途',
  `reserve_start_time` bigint NULL DEFAULT NULL COMMENT '预约起始时间',
  `reserve_end_time` bigint NULL DEFAULT NULL COMMENT '预约结束时间',
  `verify_user_name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '审核人姓名',
  `state` smallint NULL DEFAULT NULL COMMENT '状态：0：代表会议室为待审核状态，2：代表会议室为预约成功状态，3：代表会议室预约主动取消，4：代表会议室的预约被驳回',
  `update_time` bigint NULL DEFAULT NULL,
  `create_time` bigint NULL DEFAULT NULL,
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '预约用户id',
  `room_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '房间id',
  `remark` varchar(256) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT '' COMMENT '备注，用于记录审核拒绝or通过原因',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `user_room_apply_fk`(`user_id` ASC) USING BTREE,
  INDEX `room_room_apply_fk`(`room_id` ASC) USING BTREE,
  CONSTRAINT `room_room_apply_fk` FOREIGN KEY (`room_id`) REFERENCES `tbl_room` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `user_room_apply_fk` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '房间预约表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_room_reservation
-- ----------------------------
INSERT INTO `tbl_room_reservation` VALUES ('c59e790117064e4488d325376b65213e', '这是预约理由，这是预约理由，这是预约理由', 1708659799950, 1708663399950, NULL, 0, 1708659822947, 1708659822947, 'ae391d3580b2433fb8dcae22caae1643', '07b4771ab015442eb5e47d5d95639b5b', '');

-- ----------------------------
-- Table structure for tbl_sys_config
-- ----------------------------
CREATE TABLE `tbl_sys_config`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `config_key` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置key',
  `config_value` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '配置value',
  `config_desc` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配置描述',
  `state` smallint NULL DEFAULT NULL COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常',
  `create_time` bigint NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '配置表' ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Records of tbl_sys_config
-- ----------------------------
INSERT INTO `tbl_sys_config` VALUES ('396c36037f1348a390d6b255db292344', 'schools', '{\"schools\":[\"花江校区\",\"金鸡岭校区\",\"北海校区\"]}', '校区', 1, 1661246797944, 1661248415646);
INSERT INTO `tbl_sys_config` VALUES ('3a66ccd7c4c1451395cbb6cbb2b94fc1', 'categories', '{\"categories\":[\"会议室\",\"研究室\",\"实验室\",\"休息室\",\"活动室\",\"教室\",\"企业校内研发基地\",\"创新基地\",\"创新实验基地\"]}', '房间类别列表', 1, 1661257570342, 1667382572793);
INSERT INTO `tbl_sys_config` VALUES ('4539b071182048dfb9e137de60157ee9', 'versionInfo', '{\"versionCode\":\"1.7.12\"}', '客户端系统版本', 1, 1676975518261, 1705385825349);
INSERT INTO `tbl_sys_config` VALUES ('55c10273a48d416e8a57878c716e71bb', 'userPrivacyPdfUrl', '{\"url\":\"your url\"}', '用户隐私协议pdf地址', 1, 1705909617883, 1705909617883);
INSERT INTO `tbl_sys_config` VALUES ('7e033e06bc5f4d0c9b22853f5fa2fe05', 'helpInfo', '{\"list\":[{\"title\":\"关雎\",\"content\":\"关关雎鸠，在河之洲。窈窕淑女，君子好逑。参差荇菜，左右流之。窈窕淑女，寤寐求之。求之不得，寤寐思服。悠哉悠哉，辗转反侧。参差荇菜，左右采之。窈窕淑女，琴瑟友之。参差荇菜，左右芼之。窈窕淑女，钟鼓乐之。\",\"disabled\":false},{\"title\":\"长歌行\",\"content\":\"青青园中葵，朝露待日晞。阳春布德泽，万物生光辉。常恐秋节至，焜黄华叶衰。百川东到海，何时复西归？少壮不努力，老大徒伤悲！\",\"disabled\":false},{\"title\":\"秋风辞\",\"content\":\"秋风起兮白云飞，草木黄落兮雁南归。兰有秀兮菊有芳，怀佳人兮不能忘。泛楼船兮济汾河，横中流兮扬素波。少壮几时兮奈老何！\",\"disabled\":false}]}', '帮助界面配置信息', 1, 1704961228686, 1704961228686);
INSERT INTO `tbl_sys_config` VALUES ('7efcce86346942ec9734a73041062743', 'commonPhrases', '{\"phrases\":[\"符合要求，给予通过。\",\"不符合要求，驳回。\",\"审批给予通过。\"]}', '审批快捷键入语', 1, 1704251696183, 1704251696183);
INSERT INTO `tbl_sys_config` VALUES ('88df7215b4bd48c3a7cec90f9e1e311f', 'applicationType', '{\"types\":[{\"name\":\"补卡申请\",\"type\":0},{\"name\":\"申请1类\",\"type\":1},{\"name\":\"申请2类\",\"type\":2},{\"name\":\"申请3类\",\"type\":3},{\"name\":\"申请4类\",\"type\":4},{\"name\":\"申请5类\",\"type\":5}]}', '申请类型，用于控制tab', 1, 1704780222048, 1704784673121);
INSERT INTO `tbl_sys_config` VALUES ('94c396213db941e5a4d8981146393cd5', 'webVersion', '{\"currentVersion\":\"1.2.3\"}', '管理端web的版本信息', 1, 1695886076312, 1697008435725);
INSERT INTO `tbl_sys_config` VALUES ('bf50a7ff964f422ca14900a5f6f0be60', 'signInNotice', '{\"content\":\"只允许申请本周非当天的打卡记录，最多只能申请三次，次周重置，被驳回的申请可重新申请，如有遗漏，请及时处理。\"}', '补卡申请界面的notice bar 内容', 1, 1703837737890, 1703837737890);
INSERT INTO `tbl_sys_config` VALUES ('e69c74e8969a461db5d1d940ae79d149', 'modalNotice', '{\"title\":\"这是标题，这是标题\",\"content\":\"这是最新弹窗公告，这是最新弹窗公告。\",\"version\":\"1.2\"}', '客户端弹窗公告', 1, 1705385937152, 1705387310708);
INSERT INTO `tbl_sys_config` VALUES ('ec15bc0c86f847cc9a91a40ffb6e109f', 'institutes', '{\"institutes\":[\"计算机与信息安全学院\",\"机电工程学院\",\"信息与通信学院\",\"艺术与设计学院\",\"商学院\",\"外国语学院\",\"数学与计算机科学学院\",\"电子工程与自动化学院\",\"法学院\",\"材料科学与工程学院\",\"马克思主义学院\",\"生命与环境科学学院\",\"建筑与交通工程学院\",\"国际学院\",\"海洋信息工程学院\"]}', '学院列表', 1, 1661246707014, 1661246707014);

-- ----------------------------
-- Table structure for tbl_user
-- ----------------------------
CREATE TABLE `tbl_user`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `nickname` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `pwd` varchar(512) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `stu_num` varchar(62) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `name` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `institute` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `state` smallint NULL DEFAULT NULL COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常',
  `update_time` bigint NULL DEFAULT NULL,
  `create_time` bigint NULL DEFAULT NULL,
  `mail` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '邮件',
  `open_id` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '微信标识',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_user
-- ----------------------------
INSERT INTO `tbl_user` VALUES ('8e6b34a790c046e5a5b8bbf47ce7c190', 'Admin', 'e10adc3949ba59abbe56e057f20f883e', '202300001', 'Admin', '计算机与信息安全学院', 1, 1708593290833, 1708593015901, '18326790543@163.com', NULL);
INSERT INTO `tbl_user` VALUES ('ae391d3580b2433fb8dcae22caae1643', 'User', '96fd1404eae4575d6a9061ab1334a16c', '202300002', 'User', '计算机与信息安全学院', 1, 1708659757517, 1708659757517, '2590213081@qq.com', NULL);

-- ----------------------------
-- Table structure for tbl_user_role
-- ----------------------------
CREATE TABLE `tbl_user_role`  (
  `id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '标识',
  `user_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户外键',
  `role_id` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '角色外键',
  `state` smallint NULL DEFAULT NULL COMMENT '状态：-1：代表数据已经逻辑删除，1：代表数据正常',
  `create_time` bigint NULL DEFAULT NULL COMMENT '创建时间',
  `update_time` bigint NULL DEFAULT NULL COMMENT '修改时间',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `role_user_fk`(`user_id` ASC) USING BTREE,
  INDEX `role_role_user_id`(`role_id` ASC) USING BTREE,
  CONSTRAINT `role_role_user_id` FOREIGN KEY (`role_id`) REFERENCES `tbl_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
  CONSTRAINT `role_user_fk` FOREIGN KEY (`user_id`) REFERENCES `tbl_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '用户角色表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of tbl_user_role
-- ----------------------------
INSERT INTO `tbl_user_role` VALUES ('06ba99d766f648c4a927cee56398db72', 'ae391d3580b2433fb8dcae22caae1643', '0', 1, 1708659757534, 1708659757534);
INSERT INTO `tbl_user_role` VALUES ('19a11cc62d6749f4bbcb731e6a141369', '8e6b34a790c046e5a5b8bbf47ce7c190', '0', 1, 1708593015946, 1708593015946);
INSERT INTO `tbl_user_role` VALUES ('2', '8e6b34a790c046e5a5b8bbf47ce7c190', '1', 1, 0, 0);
INSERT INTO `tbl_user_role` VALUES ('3', '8e6b34a790c046e5a5b8bbf47ce7c190', '2', 1, 0, 0);

