From 13d13a0f5e4b5e5b1f10361585c129df6ff9c517 Mon Sep 17 00:00:00 2001 From: zhi Date: Tue, 31 Mar 2026 16:46:10 +0000 Subject: [PATCH] BE-CAL-API-006: implement plan-edit and plan-cancel API endpoints - PATCH /calendar/plans/{plan_id}: edit a recurring schedule plan - Validates period-parameter hierarchy after merge - Rejects edits to inactive (cancelled) plans - Detaches future materialized slots so they keep old data - Past materialized slots remain untouched - POST /calendar/plans/{plan_id}/cancel: cancel (soft-delete) a plan - Sets is_active=False - Detaches future materialized slots (plan_id -> NULL) - Preserves past materialized slots, returns their IDs - Added SchedulePlanEdit and SchedulePlanCancelResponse schemas - Imported guard_plan_edit/cancel_no_past_retroaction from slot_immutability --- HarborForge.Backend | 2 +- plans/TASKLIST.md | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/HarborForge.Backend b/HarborForge.Backend index 43cf22b..78d836c 160000 --- a/HarborForge.Backend +++ b/HarborForge.Backend @@ -1 +1 @@ -Subproject commit 43cf22b654615b5a53b0efc670aeec160782e752 +Subproject commit 78d836c71ef0a4404718515abd6d6121ecda3487 diff --git a/plans/TASKLIST.md b/plans/TASKLIST.md index 58be0d9..37f9ba9 100644 --- a/plans/TASKLIST.md +++ b/plans/TASKLIST.md @@ -164,10 +164,10 @@ - [x] 列出计划 - [x] 返回计划规则字段 -- [ ] BE-CAL-API-006:实现 plan-edit / plan-cancel API(backend only) - - [ ] 编辑计划 - - [ ] 取消计划 - - [ ] 不追溯已物化过去数据 +- [x] BE-CAL-API-006:实现 plan-edit / plan-cancel API(backend only) + - [x] 编辑计划 + - [x] 取消计划 + - [x] 不追溯已物化过去数据 - [ ] BE-CAL-API-007:实现 date-list API(backend only) - [ ] 仅列出有已物化未来 slot 的日期