fix: [approval] 영구삭제 시 첨부파일/하위문서 정리 및 에러 로깅 추가

- 첨부파일(files 테이블) soft delete 처리
- 하위 문서(parent_doc_id) 참조 해제
- DB 트랜잭션으로 원자성 보장
- catch 블록에 report() 추가로 에러 로깅
This commit is contained in:
김보곤
2026-03-05 16:51:00 +09:00
parent 86fce5e67f
commit b0f821423d
2 changed files with 24 additions and 8 deletions

View File

@@ -200,9 +200,12 @@ public function forceDestroy(int $id): JsonResponse
'message' => '결재 문서가 영구삭제되었습니다.',
]);
} catch (\Throwable $e) {
report($e);
return response()->json([
'success' => false,
'message' => '영구삭제에 실패했습니다.',
'error' => config('app.debug') ? $e->getMessage() : null,
], 500);
}
}