SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for sys_dept
-- ----------------------------
DROP TABLE IF EXISTS `sys_dept`;
CREATE TABLE `sys_dept` (
                            `dept_id` integer NOT NULL,
                            `name` varchar(50),
                            `sort_order` int NOT NULL ,
                            `create_by` varchar(64) ,
                            `update_by` varchar(64) ,
                            `create_time` date,
                            `update_time` date,
                            `del_flag` char(1) ,
                            `parent_id` integer NULL,
                            `tenant_id` integer NULL
);

comment on table SJTB.sys_dept is '部门管理';
comment on column SJTB.sys_dept.dept_id is '部门ID';
comment on column SJTB.sys_dept.name is '部门名称';
comment on column SJTB.sys_dept.sort_order is '排序';
comment on column SJTB.sys_dept.create_by is '创建人';
comment on column SJTB.sys_dept.update_by is '修改人';
comment on column SJTB.sys_dept.create_time is '创建时间';
comment on column SJTB.sys_dept.update_time is '修改时间';
comment on column SJTB.sys_dept.del_flag is '是否删除 0删除 1 使用';
comment on column SJTB.sys_dept.parent_id is '父级ID';
comment on column SJTB.sys_dept.tenant_id is '所属租户';


