drop table if exists cp_project_layer;

CREATE TABLE `cp_project_layer` (
  `id` varchar(32) COLLATE utf8mb4_bin NOT NULL COMMENT '模板主键',
  `project_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '项目主键',
  `root_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '根项目主键id',
  `template_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '管理模板主键',
  `layer_num` int(2) DEFAULT NULL COMMENT '项目层级',
  `layer_type` varchar(10) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '类型定义',
  `created_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '创建人',
  `created_time` datetime DEFAULT NULL COMMENT '创建时间',
  `updated_by` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '修改人',
  `updated_time` datetime DEFAULT NULL COMMENT '修改时间',
  `tenant_id` varchar(32) COLLATE utf8mb4_bin DEFAULT NULL COMMENT '租户id',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='项目管理层级表';

