SET FOREIGN_KEY_CHECKS=0; DROP TABLE IF EXISTS `sys_menu`; CREATE TABLE IF NOT EXISTS `sys_dept` ( `dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '部门id', `parent_id` bigint(20) DEFAULT 0 COMMENT '父部门id 默认0', `ancestors` varchar(50) DEFAULT '' COMMENT '祖级列表', `dept_name` varchar(128) DEFAULT '' COMMENT '部门名称', `order_num` int(11) DEFAULT 0 COMMENT '显示顺序', `leader` varchar(20) DEFAULT NULL COMMENT '负责人', `phone` varchar(11) DEFAULT NULL COMMENT '联系电话', `email` varchar(50) DEFAULT NULL COMMENT '邮箱', `status` char(1) DEFAULT '0' COMMENT '部门状态(0停用 1正常)', `del_flag` char(1) DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)', `create_by` varchar(50) DEFAULT '' COMMENT '创建者', `create_time` bigint(20) DEFAULT 0 COMMENT '创建时间', `update_by` varchar(50) DEFAULT '' COMMENT '更新者', `update_time` bigint(20) DEFAULT 0 COMMENT '更新时间', PRIMARY KEY (`dept_id`) USING BTREE ) ENGINE=InnoDB AUTO_INCREMENT=200 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表'; INSERT IGNORE INTO `sys_dept` VALUES (100, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0); INSERT IGNORE INTO `sys_dept` VALUES (101, 100, '0,100', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053); SET FOREIGN_KEY_CHECKS=1;