mirror of
https://github.com/dataease/dataease.git
synced 2025-03-02 00:32:53 +08:00
16 lines
795 B
MySQL
16 lines
795 B
MySQL
![]() |
|
||
|
CREATE TABLE IF NOT EXISTS `sys_dept` (
|
||
|
`dept_id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
|
||
|
`pid` bigint(20) DEFAULT NULL COMMENT '上级部门',
|
||
|
`sub_count` int(5) DEFAULT 0 COMMENT '子部门数目',
|
||
|
`name` varchar(255) NOT NULL COMMENT '名称',
|
||
|
`dept_sort` int(5) DEFAULT 999 COMMENT '排序',
|
||
|
`enabled` bit(1) NOT NULL COMMENT '状态',
|
||
|
`create_by` varchar(255) DEFAULT NULL COMMENT '创建者',
|
||
|
`update_by` varchar(255) DEFAULT NULL COMMENT '更新者',
|
||
|
`create_time` datetime DEFAULT NULL COMMENT '创建日期',
|
||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
|
||
|
PRIMARY KEY (`dept_id`) USING BTREE,
|
||
|
KEY `inx_pid` (`pid`),
|
||
|
KEY `inx_enabled` (`enabled`)
|
||
|
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 ROW_FORMAT=COMPACT COMMENT='部门';
|