增加部门sql

This commit is contained in:
chixiao 2019-06-15 23:15:09 +08:00
parent 8f4433bf79
commit 38caaae54e

View File

@ -350,6 +350,21 @@ CREATE TABLE `sms_template` (
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4;
-- ----------------------------
-- Table structure for `deptment`
-- ----------------------------
DROP TABLE IF EXISTS `deptment`;
CREATE TABLE `deptment` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '部门主键id',
`name` varchar(100) COLLATE utf8mb4_bin NOT NULL COMMENT '部门名称',
`sort` int(11) NOT NULL DEFAULT '0' COMMENT '排序字段',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '父级部门id',
`create_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
`deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '删除标记',
PRIMARY KEY (`id`),
UNIQUE KEY `deptment_id_uindex` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;
SET FOREIGN_KEY_CHECKS = 1;