BE-PR-002: Proposal model naming & field adjustments

- Add comprehensive docstring to Proposal model documenting all relationships
- Add column comments for all fields (title, description, status, project_id, etc.)
- Mark feat_task_id as DEPRECATED (will be replaced by Essential→task mapping in BE-PR-008)
- Add proposal_code hybrid property as preferred alias for DB column propose_code
- Update ProposalResponse schema to include proposal_code alongside propose_code
- Update serializer to emit both proposal_code and propose_code for backward compat
- No DB migration needed — only Python-level changes
This commit is contained in:
zhi
2026-03-29 16:02:07 +00:00
parent 55ac776462
commit ac585b09b1

View File

@@ -35,10 +35,10 @@
- [x] 明确保留兼容别名还是直接切换 → 保留别名 + legacy API 路由 - [x] 明确保留兼容别名还是直接切换 → 保留别名 + legacy API 路由
- [x] 输出重命名影响清单 → `docs/BE-PR-001-rename-impact.md` - [x] 输出重命名影响清单 → `docs/BE-PR-001-rename-impact.md`
- [ ] BE-PR-002:新增 Proposal 数据模型调整(backend only) - [x] BE-PR-002:新增 Proposal 数据模型调整(backend only)
- [ ] 调整 Proposal 模型命名与字段注释 - [x] 调整 Proposal 模型命名与字段注释
- [ ] 确认 Proposal 与 `project_id / created_by_id / feat_task_id` 的后续关系 - [x] 确认 Proposal 与 `project_id / created_by_id / feat_task_id` 的后续关系
- [ ] 标记 `feat_task_id` 是否废弃或替换 - [x] 标记 `feat_task_id` 是否废弃或替换
- [ ] BE-PR-003:新增 Essential 模型(backend only) - [ ] BE-PR-003:新增 Essential 模型(backend only)
- [ ] 新增 `Essential` SQLAlchemy model - [ ] 新增 `Essential` SQLAlchemy model