令令对接.sql 976 B

1234567891011121314151617181920
  1. CREATE TABLE `tb_device_perm_group`(
  2. `ID` BIGINT(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  3. `group_type` INT(1) COMMENT '权限组类型 1 员工;2 访客',
  4. `group_name` VARCHAR(45) COMMENT '权限组名',
  5. `remark` VARCHAR(45) COMMENT '备注',
  6. `create_time` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '添加时间',
  7. `creator` BIGINT(20) DEFAULT NULL COMMENT '添加人',
  8. `modify_time` DATETIME DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP COMMENT '修改时间',
  9. `modify` BIGINT(20) DEFAULT NULL COMMENT '修改人',
  10. PRIMARY KEY (`ID`)
  11. )ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='设备权限组表';
  12. CREATE TABLE `tr_perm_group_device` (
  13. `device_perm_group_id` BIGINT(20) NOT NULL COMMENT '设备组ID',
  14. `device_id` INT(11) NOT NULL COMMENT '设备部ID',
  15. KEY `fk_group_id` (`device_perm_group_id`) USING BTREE,
  16. KEY `fk_device_id` (`device_id`) USING BTREE
  17. ) ENGINE=INNODB DEFAULT CHARSET=utf8 COMMENT='设备组-设备关系表'