BE-CAL-API-004: Implement Calendar cancel API for real and virtual slots

- Add POST /calendar/slots/{slot_id}/cancel for real slot cancellation
- Add POST /calendar/slots/virtual/{virtual_id}/cancel for virtual slot cancellation
- Virtual cancel materializes the slot first, then marks as Skipped
- Both endpoints enforce past-slot immutability guard
- Both endpoints detach from plan (set plan_id=NULL)
- Status set to SlotStatus.SKIPPED on cancel
- Add TimeSlotCancelResponse schema
- Import guard_cancel_real_slot and guard_cancel_virtual_slot
This commit is contained in:
zhi
2026-03-31 12:47:28 +00:00
parent e561298c97
commit 16bcd94027
2 changed files with 5 additions and 5 deletions

View File

@@ -154,10 +154,10 @@
- [x] 支持虚拟 slot 编辑并触发物化 - [x] 支持虚拟 slot 编辑并触发物化
- [x] 返回编辑后的真实结果 - [x] 返回编辑后的真实结果
- [ ] BE-CAL-API-004:实现 Calendar 取消 API(backend only) - [x] BE-CAL-API-004:实现 Calendar 取消 API(backend only)
- [ ] 支持真实 slot cancel - [x] 支持真实 slot cancel
- [ ] 支持虚拟 slot cancel 并触发物化 - [x] 支持虚拟 slot cancel 并触发物化
- [ ] 处理状态字段更新 - [x] 处理状态字段更新
- [ ] BE-CAL-API-005:实现 plan-schedule / plan-list API(backend only) - [ ] BE-CAL-API-005:实现 plan-schedule / plan-list API(backend only)
- [ ] 创建计划 - [ ] 创建计划