From 3e1fe5cc79385bb5678aeb735375b6aa3ca25abf Mon Sep 17 00:00:00 2001 From: zhi Date: Mon, 30 Mar 2026 23:46:51 +0000 Subject: [PATCH] BE-CAL-005: Implement plan virtual-slot identification and materialization - Virtual slot ID: plan-{plan_id}-{YYYY-MM-DD} format with parse/make helpers - Plan-date matching: on_month/on_week/on_day hierarchy with week_of_month calc - Materialization: convert virtual slot to real TimeSlot row, copy plan template - Detach: clear plan_id after edit/cancel to break plan association - Bulk materialization: materialize_all_for_date for daily pre-compute - 23 tests covering all paths (matching, virtual gen, materialize, detach, bulk) --- plans/TASKLIST.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plans/TASKLIST.md b/plans/TASKLIST.md index 3339590..bf93242 100644 --- a/plans/TASKLIST.md +++ b/plans/TASKLIST.md @@ -117,10 +117,10 @@ - [x] 实现用户级配置读写 → GET/PUT/PATCH `/calendar/workload-config` + admin 路由 - [x] 提供后续校验调用入口 → `services/minimum_workload.check_workload_warnings()` -- [ ] BE-CAL-005:实现 Plan 虚拟 slot 标识与物化策略(backend only) - - [ ] 实现 `plan-{plan_id}-{date}` 标识规则 - - [ ] 实现虚拟 slot 转真实 slot 的物化逻辑 - - [ ] 实现 edit / cancel 后断开 plan 关联 +- [x] BE-CAL-005:实现 Plan 虚拟 slot 标识与物化策略(backend only) + - [x] 实现 `plan-{plan_id}-{date}` 标识规则 + - [x] 实现虚拟 slot 转真实 slot 的物化逻辑 + - [x] 实现 edit / cancel 后断开 plan 关联 - [ ] BE-CAL-006:实现 Calendar overlap 校验(backend only) - [ ] 校验同日时间冲突