Files
be.ems/database/upgrade/upg_sys_dept.sql
2024-05-13 11:38:42 +08:00

25 lines
1.5 KiB
SQL
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
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=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='部门表';
INSERT IGNORE INTO `sys_dept` VALUES (1, 0, '0', 'dept.root', 0, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, NULL, 0);
INSERT IGNORE INTO `sys_dept` VALUES (2, 1, '0,1', 'dept.root.item1', 1, 'supervisor', NULL, NULL, '1', '0', 'supervisor', 1699348237468, 'supervisor', 1715570736053);
SET FOREIGN_KEY_CHECKS=1;