# T570 — contact-detail-notes-followup-flag-api > Status: `done` > Milestone: `M4` > Kind: `feat` > Est. change: `~170 lines` ## Goal 完成後系統應:Contact 詳情(含時間軸)、階段推進、備註、待追蹤標記四個端點可用。 ## Depends on - T566、T568 ## Inputs - Spec:`../spec.md` §4.6.4、§4.6.5、§5.2、§9.4(CR-03~CR-05) ## Outputs ### 程式變更(預期路徑) | 路徑 | 動作 | 說明 | |------|------|------| | `apps/backend/generate/api/crm.api` | edit | detail/stage/notes/follow-up type | | `apps/backend/internal/logic/crm/getContactLogic.go` | edit | 詳情+時間軸(分頁)+關聯商機摘要 | | `apps/backend/internal/logic/crm/updateContactStageLogic.go` | edit | 呼叫 T568 Transition | | `apps/backend/internal/logic/crm/createContactNoteLogic.go` | edit | 備註寫 touch | | `apps/backend/internal/logic/crm/setContactFollowUpLogic.go` | edit | 設定/解除 `needs_follow_up` 與天數 | ### 行為變更 - `owner_uid` 隔離;非本人資源回越權錯誤。 - 待追蹤端點可同時設定 `follow_up_days`(預設 3);設為 true 時由 T585 建立 FollowUp(M5 前僅存旗標)。 - 非法 `stage` 值回明確錯誤。 ## Out of scope - merge(T571)、成交(T572) - FollowUp 排程(M5) ## Acceptance - [x] 詳情含時間軸並可分頁 - [x] 標記待追蹤後階段不變(CR-05) - [x] 指令: ```bash cd apps/backend && make gen-api && go test ./internal/logic/crm/... -count=1 ```