Repository navigation
feat(O5): 車輛審核——填/改車輛需 admin 核准才能接單 - #40
Merged
Merged
Conversation
O3 gate(有填車種車牌)升級為 O5 gate(已審核)。司機填/改車輛後進 pending,admin 核准才能接單;退回附原因,司機可重填再送審。 - migration 000022:drivers 加 vehicle_review_status/note+CHECK; 祖父化:既有已填車輛的司機一律 approved,不因導入被鎖出(O5 導入決策) - constants VehicleReview*;model VehicleApproved()(gate 讀它) - gate 兩處(dispatchRound 派單側、AcceptRide 接單側)改用 VehicleApproved; 接單側分「沒填(NoVehicle)」與「待審核(NotApproved)」兩種錯誤,司機知道下一步 - UpdateVehicle 原子地把 review 重置 pending(改車一律重審); UpdateVehicleReview 供審核;SetVehicle 回傳物件同步 pending - admin POST /drivers/:id/vehicle-review(ops 角色)approve/reject; 只有 pending 可審、退回必附原因;admin drivers 列表帶審核欄位 - 司機 GET /driver/vehicle 回應加 review_status/review_note/can_accept - 測試:gate 改為「只派給已審核」+待審核 accept→NotApproved; SetVehicle→pending;admin 審核 approve/reject/需原因/僅pending可審/改車重審 go build/vet 通過;O5 相關整合測試綠;runtime 全鏈路驗過 (填→pending→gate 擋→核准→接單成功;退回+原因;退回無原因 400)。 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
拍板做 O5(2026-07-19):O3 gate(有填車種車牌)升級為 O5 gate(已審核)。司機填/改車輛後進 pending,admin 核准才能接單;退回附原因,司機可重填再送審。
改動
vehicle_review_status/vehicle_review_note+ CHECK;祖父化——既有已填車輛的司機一律approved,不因導入被鎖出(O5 導入決策,一句 SQL 可改)constants.VehicleReview*;model.VehicleApproved()(gate 讀它)VehicleApproved;接單側分「沒填(ErrDriverNoVehicle)」與「待審核(ErrDriverNotApproved)」,司機知道下一步UpdateVehicle原子地把 review 重置 pending(改車一律重審);UpdateVehicleReview供審核;SetVehicle回傳物件同步 pendingPOST /drivers/:id/vehicle-review(ops 角色)approve/reject;只有 pending 可審、退回必附原因;admin drivers 列表帶審核欄位GET /driver/vehicle回應加review_status/review_note/can_accept驗收
go build/go vet通過;O5 相關整合測試綠(gate 改「只派給已審核」+待審核 accept→NotApproved;SetVehicle→pending;admin approve/reject/需原因/僅 pending 可審/改車重審)導入決策(一句話可改)
既有已填車輛的司機祖父化為 approved(不鎖出現有司機);新填/改動才進 pending。若要全體重審,改 migration 的一行 UPDATE 即可。
🤖 Generated with Claude Code