feat: Dashboard API 구현
- DashboardService: summary(), charts(), approvals() 메서드 구현 - DashboardController: 3개 엔드포인트 (summary, charts, approvals) - FormRequest: DashboardChartsRequest, DashboardApprovalsRequest - Swagger: DashboardApi.php 문서 작성 - i18n: dashboard 관련 메시지 키 추가 - 라우트: /api/v1/dashboard/* 엔드포인트 등록 Phase 2 대시보드(3.3) 완료
This commit is contained in:
@@ -40,19 +40,25 @@
|
||||
* @OA\Property(property="start_date", type="string", format="date", example="2024-12-17", description="시작일"),
|
||||
* @OA\Property(property="end_date", type="string", format="date", example="2025-01-15", description="종료일"),
|
||||
* @OA\Property(property="deposit_trend", type="array", description="입금 추이",
|
||||
*
|
||||
* @OA\Items(type="object",
|
||||
*
|
||||
* @OA\Property(property="date", type="string", format="date", example="2025-01-15"),
|
||||
* @OA\Property(property="amount", type="number", format="float", example=5000000)
|
||||
* )
|
||||
* ),
|
||||
* @OA\Property(property="withdrawal_trend", type="array", description="출금 추이",
|
||||
*
|
||||
* @OA\Items(type="object",
|
||||
*
|
||||
* @OA\Property(property="date", type="string", format="date", example="2025-01-15"),
|
||||
* @OA\Property(property="amount", type="number", format="float", example=3000000)
|
||||
* )
|
||||
* ),
|
||||
* @OA\Property(property="sales_by_client", type="array", description="거래처별 매출 (상위 10개)",
|
||||
*
|
||||
* @OA\Items(type="object",
|
||||
*
|
||||
* @OA\Property(property="client_id", type="integer", example=1),
|
||||
* @OA\Property(property="client_name", type="string", example="(주)테스트"),
|
||||
* @OA\Property(property="amount", type="number", format="float", example=15000000)
|
||||
@@ -66,7 +72,9 @@
|
||||
* description="대시보드 결재 현황",
|
||||
*
|
||||
* @OA\Property(property="pending_approvals", type="array", description="결재 대기 문서 (내가 결재할 문서)",
|
||||
*
|
||||
* @OA\Items(type="object",
|
||||
*
|
||||
* @OA\Property(property="id", type="integer", example=1, description="결재문서 ID"),
|
||||
* @OA\Property(property="title", type="string", example="출장 신청서", description="제목"),
|
||||
* @OA\Property(property="drafter_name", type="string", example="홍길동", description="기안자명"),
|
||||
@@ -75,7 +83,9 @@
|
||||
* )
|
||||
* ),
|
||||
* @OA\Property(property="my_drafts", type="array", description="내가 기안한 진행중인 문서",
|
||||
*
|
||||
* @OA\Items(type="object",
|
||||
*
|
||||
* @OA\Property(property="id", type="integer", example=2, description="결재문서 ID"),
|
||||
* @OA\Property(property="title", type="string", example="휴가 신청서", description="제목"),
|
||||
* @OA\Property(property="status", type="string", example="pending", description="상태"),
|
||||
@@ -101,6 +111,7 @@ class DashboardApi
|
||||
* description="성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="데이터를 조회했습니다."),
|
||||
* @OA\Property(property="data", ref="#/components/schemas/DashboardSummary")
|
||||
@@ -135,6 +146,7 @@ public function summary() {}
|
||||
* description="성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="데이터를 조회했습니다."),
|
||||
* @OA\Property(property="data", ref="#/components/schemas/DashboardCharts")
|
||||
@@ -170,6 +182,7 @@ public function charts() {}
|
||||
* description="성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="데이터를 조회했습니다."),
|
||||
* @OA\Property(property="data", ref="#/components/schemas/DashboardApprovals")
|
||||
@@ -181,4 +194,4 @@ public function charts() {}
|
||||
* )
|
||||
*/
|
||||
public function approvals() {}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user