DROP TABLE IF EXISTS `project_manager`;
CREATE TABLE `project_manager` (
                                   `id` int NOT NULL AUTO_INCREMENT COMMENT '序号',
                                   `project_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项目名称',
                                   `manager` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '项目联系人（支持多个）',
                                   `phone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '联系方式',
                                   PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci ROW_FORMAT=DYNAMIC COMMENT='项目信息负责人';


alter table huzhou_contractinfo add flag varchar(128) null comment '标识符:区分计划和实际';

INSERT INTO `guoyan_huzhou`.`huzhou_changefieldmanage`(`isshow`, `id`, `field_name`, `isChange`, `isuploadFile`, `isapproval`, `create_user`, `create_date`, `edit_user`, `edit_date`, `field_value`) VALUES ('1', '21', '项目负责人', '1', '0', '0', NULL, NULL, '1', NULL, 'manager');

INSERT INTO `guoyan_huzhou`.`huzhou_changefieldmanage`(`isshow`, `id`, `field_name`, `isChange`, `isuploadFile`, `isapproval`, `create_user`, `create_date`, `edit_user`, `edit_date`, `field_value`) VALUES ('1', '22', '项目负责人联系方式', '1', '0', '0', NULL, NULL, '1', NULL, 'managerPhone');

# 2025-03-06 增加项目计划修改标识用于限制修改次数
ALTER TABLE huzhou_projectinfo
    ADD COLUMN update_plan_flag VARCHAR(1) NOT NULL DEFAULT '0' COMMENT '项目计划修改标识 默认:0 审批中:1 审批通过:2"';

ALTER TABLE huzhou_sub_projectinfo
    ADD COLUMN update_plan_flag VARCHAR(1) NOT NULL DEFAULT '0' COMMENT '项目计划修改标识 默认:0 审批中:1 审批通过:2"';


# 2025-03-16 新增菜单
INSERT INTO `guoyan_huzhou`.`sys_permission`(`id`, `parent_id`, `type`, `title`, `name`, `code`, `icon`, `path`, `component`, `external`, `order_no`, `display`, `open_mode`, `status`, `remarks`, `version`, `create_user`, `create_date`, `edit_user`, `edit_date`) VALUES ('1899280234855800833', '1803680740161212418', 'menu', '机制建设', NULL, NULL, 'ant-design:book-filled', '/informationSub/mechanism/index', '/informationSub/mechanism/index', '0', 3, '1', '1', '1', NULL, 0, '1', '2025-03-11 10:04:29', '1', '2025-03-11 10:04:29');
INSERT INTO `guoyan_huzhou`.`sys_permission`(`id`, `parent_id`, `type`, `title`, `name`, `code`, `icon`, `path`, `component`, `external`, `order_no`, `display`, `open_mode`, `status`, `remarks`, `version`, `create_user`, `create_date`, `edit_user`, `edit_date`) VALUES ('1899280498354561025', '1803680740161212418', 'menu', '标志性成果', NULL, NULL, 'ant-design:book-filled', '/informationSub/iconic/index', '/informationSub/iconic/index', '0', 4, '1', '1', '1', NULL, 0, '1', '2025-03-11 10:05:32', '1', '2025-03-11 10:05:32');
INSERT INTO `sys_permission`(`id`, `parent_id`, `type`, `title`, `name`, `code`, `icon`, `path`, `component`, `external`, `order_no`, `display`, `open_mode`, `status`, `remarks`, `version`, `create_user`, `create_date`, `edit_user`, `edit_date`) VALUES ('1901553744693288961', '1797801685624832001', 'menu', '项目节点未完成数', NULL, NULL, 'ant-design:bars-outlined', '/projectBoard/unfinishNode/index', '/projectBoard/unfinishNode/index', '0', 19, '1', '1', '1', NULL, 0, '1', '2025-03-17 16:38:36', '1', '2025-03-17 16:38:36');

# 创建信息材料表
CREATE TABLE `huzhou_information_material` (
                                              `name` varchar(255) DEFAULT NULL COMMENT '期刊名称',
                                              `publish_time` date DEFAULT NULL COMMENT '发布日期',
                                              `id` varchar(255) NOT NULL COMMENT 'id',
                                              `document_name` varchar(255) DEFAULT NULL COMMENT '文件名称',
                                              `document_type` varchar(255) DEFAULT NULL COMMENT '文件类型',
                                              `document_path` varchar(255) DEFAULT NULL COMMENT '文件位置',
                                              `size` bigint(20) DEFAULT NULL COMMENT '文件尺寸',
                                              `status` varchar(255) DEFAULT NULL COMMENT '文件状态',
                                              `create_date` datetime DEFAULT NULL COMMENT '创建时间',
                                              `create_user` varchar(255) DEFAULT NULL COMMENT '创建人',
                                              `edit_date` datetime DEFAULT NULL COMMENT '更新时间',
                                              `edit_user` varchar(255) DEFAULT NULL COMMENT '更新人',
                                              `type` varchar(255) DEFAULT NULL COMMENT '类型',
                                              `duty_workplace` varchar(255) DEFAULT NULL COMMENT '责任单位',
                                              PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 ROW_FORMAT=DYNAMIC;