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
This commit is contained in:
@@ -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 的日期
|
||||
|
||||
Reference in New Issue
Block a user