feat:신용평가 조회회수 집계 기능 추가

- CreditUsageController: 조회회수 집계 컨트롤러 신규 생성
- credit/usage/index.blade.php: 집계 화면 (월별/연간/기간별)
- 과금 정책: 월 5건 무료, 추가건당 2,000원
- 본사(tenant_id=1)는 전체 테넌트 조회 가능
- CreditInquiry 모델에 tenant_id 필드 추가
- 신용평가 조회 시 tenant_id 저장하도록 수정

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
pro
2026-01-28 16:49:13 +09:00
parent 45aa0f9c72
commit 55d04537fc
5 changed files with 527 additions and 3 deletions

View File

@@ -95,12 +95,13 @@ public function search(Request $request): JsonResponse
$ntsService = new NtsBusinessService();
$ntsResult = $ntsService->getBusinessStatus($companyKey);
// DB에 저장
// DB에 저장 (tenant_id는 세션에서 가져옴)
$inquiry = CreditInquiry::createFromApiResponse(
$companyKey,
$apiResult,
$ntsResult,
auth()->id()
auth()->id(),
session('selected_tenant_id')
);
return response()->json([