feat(api): ApprovalRequestResponse 新增 metadata 欄位
讓前端/API 可見 incident_id,用於除錯和關聯追蹤 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -212,6 +212,8 @@ class ApprovalRequestResponse(BaseModel):
|
||||
fingerprint: str | None = None
|
||||
hit_count: int = 1
|
||||
last_seen_at: datetime | None = None
|
||||
# Phase 6.5: Incident 關聯 (用於簽核後更新 Incident 狀態)
|
||||
metadata: dict | None = None
|
||||
|
||||
@classmethod
|
||||
def from_approval(cls, approval: ApprovalRequest) -> "ApprovalRequestResponse":
|
||||
@@ -235,6 +237,8 @@ class ApprovalRequestResponse(BaseModel):
|
||||
fingerprint=approval.fingerprint,
|
||||
hit_count=approval.hit_count,
|
||||
last_seen_at=approval.last_seen_at,
|
||||
# Phase 6.5
|
||||
metadata=approval.metadata,
|
||||
)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user