-- 2024-06-10
ALTER TABLE t_c_final_score ADD culture_program_id BIGINT
    COMMENT '培养方案id' NULL after id;

ALTER TABLE t_c_paper_struct ADD culture_program_id BIGINT
    COMMENT '培养方案id' NOT NULL after id;

ALTER TABLE t_c_usual_score ADD culture_program_id BIGINT
    COMMENT '培养方案id' NULL after id;

ALTER TABLE t_r_basic_info ADD culture_program_id BIGINT
    COMMENT '培养方案id' NULL after id;

-- 2024-06-12
UPDATE sys_privilege
SET name='达成度统计', url='DegreeManage', `type`='MENU', parent_id=2000, `sequence`=2, property=NULL, related=NULL, enable=1, default_auth=0, front_display=1
WHERE id=1999;

INSERT INTO sys_privilege
(id, name, url, `type`, parent_id, `sequence`, property, related, enable, default_auth, front_display)
VALUES(2100, '基础数据', 'BasicDataManage', 'MENU', 2000, 3, NULL, NULL, 1, 0, 1);

UPDATE sys_privilege
SET name='成绩管理', url='TargetScoreManage', `type`='MENU', parent_id=2100, `sequence`=1, property=NULL, related='2003,2004,2005', enable=1, default_auth=0, front_display=1
WHERE id=2001;
UPDATE sys_privilege
SET name='课程目标达成度统计', url='TargetReportManage', `type`='MENU', parent_id=1999, `sequence`=2, property=NULL, related='2021,2022,2023', enable=1, default_auth=0, front_display=1
WHERE id=2002;

-- 2024-06-13
UPDATE sys_privilege
SET name='毕业要求达成度雷达图', url='/api/admin/obe/requirements/radar/report', `type`='URL', parent_id=2070, `sequence`=2, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=1
WHERE id=2076;
UPDATE sys_privilege
SET name='毕业要求达成情况详细报表', url='/api/admin/obe/requirements/detail/report', `type`='URL', parent_id=2070, `sequence`=3, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=1
WHERE id=2077;

DROP TABLE IF EXISTS `obe_course_requirement_report`;
CREATE TABLE `obe_course_requirement_report` (
                                                 `id` bigint NOT NULL COMMENT '主键',
                                                 `culture_program_id` bigint NOT NULL COMMENT '培养方案id',
                                                 `requirement_radar` mediumtext NOT NULL COMMENT '毕业要求雷达报表',
                                                 `requirement_detail` mediumtext NOT NULL COMMENT '毕业要求详情报表',
                                                 `requirement_degree` double NOT NULL COMMENT '毕业要求达成值',
                                                 PRIMARY KEY (`id`),
                                                 UNIQUE KEY `obe_course_requirement_report_unique` (`culture_program_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='课程毕业要求报表';

UPDATE sys_privilege
SET name='毕业要求达成度报表列表', url='/api/admin/obe/requirements/list', `type`='URL', parent_id=2070, `sequence`=1, property='AUTH', related=NULL, enable=1, default_auth=1, front_display=1
WHERE id=2075;