text: DROP TABLE IF EXISTS `department`;
  CREATE TABLE `department`  (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
    `pid` bigint(20) NOT NULL COMMENT 'parent department',
    `enabled` bit(1) NOT NULL,
    `createAt` datetime NULL DEFAULT NULL,
    `updateAt` datetime NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
  
  DROP TABLE IF EXISTS `role`;
  CREATE TABLE `role`  (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `readable_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '可读名称',
    `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称',
    `remark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
    `createAt` datetime NULL DEFAULT NULL,
    `updateAt` datetime NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
  
  DROP TABLE IF EXISTS `user`;
  CREATE TABLE `user`  (
    `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
    `avatar_id` bigint(20) NULL DEFAULT NULL COMMENT '头像资源',
    `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '邮箱',
    `enabled` bit(1) NULL DEFAULT NULL COMMENT '状态',
    `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '密码',
    `username` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户名',
    `department_id` bigint(20) NULL DEFAULT NULL,
    `phone` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
    `createAt` datetime NULL DEFAULT NULL,
    `updateAt` datetime NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE INDEX `unique_email`(`email`) USING BTREE,
    UNIQUE INDEX `unique_username`(`username`) USING BTREE
  ) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
  
  DROP TABLE IF EXISTS `user_role`;
  CREATE TABLE `user_role`  (
    `user_id` bigint(20) NOT NULL COMMENT '用户ID',
    `role_id` bigint(20) NOT NULL COMMENT '角色ID',
    PRIMARY KEY (`user_id`, `role_id`) USING BTREE
  ) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = Compact;
  