From 5ee79e5c5efebd9cce1f4e63d9a9bcb40d9dce7a Mon Sep 17 00:00:00 2001 From: zhi Date: Sun, 29 Mar 2026 16:32:40 +0000 Subject: [PATCH] BE-PR-003: Add Essential SQLAlchemy model - New app/models/essential.py with Essential model and EssentialType enum (feature, improvement, refactor) - Fields: id, essential_code (unique), proposal_id (FK to proposes), type, title, description, created_by_id (FK to users), created_at, updated_at - Added essentials relationship to Proposal model (cascade delete-orphan) - Added essentials table auto-migration in main.py _migrate_schema() - Registered essential module import in startup() --- plans/TASKLIST.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plans/TASKLIST.md b/plans/TASKLIST.md index f77db22..94659b2 100644 --- a/plans/TASKLIST.md +++ b/plans/TASKLIST.md @@ -40,11 +40,11 @@ - [x] 确认 Proposal 与 `project_id / created_by_id / feat_task_id` 的后续关系 - [x] 标记 `feat_task_id` 是否废弃或替换 -- [ ] BE-PR-003:新增 Essential 模型(backend only) - - [ ] 新增 `Essential` SQLAlchemy model - - [ ] 增加 `proposal_id` 外键 - - [ ] 增加 `essential_code` - - [ ] 增加 `type / title / description / created_by_id / created_at / updated_at` +- [x] BE-PR-003:新增 Essential 模型(backend only) + - [x] 新增 `Essential` SQLAlchemy model + - [x] 增加 `proposal_id` 外键 + - [x] 增加 `essential_code` + - [x] 增加 `type / title / description / created_by_id / created_at / updated_at` - [ ] BE-PR-004:实现 EssentialCode 编码规则(backend only) - [ ] 参考现有 `ProjectCode / MilestoneCode / TaskCode / ProposeCode` 生成方式