diff --git a/app/Models/Boards/Board.php b/app/Models/Boards/Board.php index 485e054..39a439e 100644 --- a/app/Models/Boards/Board.php +++ b/app/Models/Boards/Board.php @@ -2,7 +2,7 @@ namespace App\Models\Boards; -use App\Models\User; +use App\Models\Members\User; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; diff --git a/app/Services/GlobalMenuService.php b/app/Services/GlobalMenuService.php index 84bdb73..61d0a20 100644 --- a/app/Services/GlobalMenuService.php +++ b/app/Services/GlobalMenuService.php @@ -267,4 +267,4 @@ private function buildTree(Collection $menus, ?int $parentId = null): Collection }) ->values(); } -} \ No newline at end of file +} diff --git a/app/Services/MenuSyncService.php b/app/Services/MenuSyncService.php index ad034fa..411d6c5 100644 --- a/app/Services/MenuSyncService.php +++ b/app/Services/MenuSyncService.php @@ -421,4 +421,4 @@ private function updateFromGlobal(Menu $tenantMenu, Menu $globalMenu, int $userI return $tenantMenu->fresh(); } -} \ No newline at end of file +} diff --git a/app/Swagger/v1/QuoteApi.php b/app/Swagger/v1/QuoteApi.php index cce4a07..e2115b0 100644 --- a/app/Swagger/v1/QuoteApi.php +++ b/app/Swagger/v1/QuoteApi.php @@ -9,6 +9,7 @@ * schema="Quote", * type="object", * required={"id","quote_number"}, + * * @OA\Property(property="id", type="integer", example=1), * @OA\Property(property="tenant_id", type="integer", example=1), * @OA\Property(property="quote_number", type="string", example="KD-SC-251204-01", description="견적번호"), @@ -56,6 +57,7 @@ * @OA\Schema( * schema="QuoteItem", * type="object", + * * @OA\Property(property="id", type="integer", example=1), * @OA\Property(property="quote_id", type="integer", example=1), * @OA\Property(property="item_id", type="integer", nullable=true, example=1, description="품목 ID"), @@ -78,6 +80,7 @@ * @OA\Schema( * schema="QuotePagination", * type="object", + * * @OA\Property(property="current_page", type="integer", example=1), * @OA\Property(property="data", type="array", @OA\Items(ref="#/components/schemas/Quote")), * @OA\Property(property="first_page_url", type="string", example="/api/v1/quotes?page=1"), @@ -95,6 +98,7 @@ * @OA\Schema( * schema="QuoteCreateRequest", * type="object", + * * @OA\Property(property="quote_number", type="string", nullable=true, maxLength=50, description="견적번호(미입력시 자동생성)"), * @OA\Property(property="registration_date", type="string", format="date", nullable=true, example="2025-12-04"), * @OA\Property(property="receipt_date", type="string", format="date", nullable=true), @@ -131,6 +135,7 @@ * @OA\Schema( * schema="QuoteUpdateRequest", * type="object", + * * @OA\Property(property="receipt_date", type="string", format="date", nullable=true), * @OA\Property(property="author", type="string", nullable=true, maxLength=50), * @OA\Property(property="client_id", type="integer", nullable=true), @@ -165,6 +170,7 @@ * @OA\Schema( * schema="QuoteItemRequest", * type="object", + * * @OA\Property(property="item_id", type="integer", nullable=true), * @OA\Property(property="item_code", type="string", nullable=true, maxLength=50), * @OA\Property(property="item_name", type="string", nullable=true, maxLength=100), @@ -185,6 +191,7 @@ * @OA\Schema( * schema="QuoteCalculateRequest", * type="object", + * * @OA\Property(property="product_category", type="string", enum={"SCREEN","STEEL"}, nullable=true, description="제품 카테고리"), * @OA\Property(property="W0", type="number", format="float", example=3000, description="개구부 폭(mm)"), * @OA\Property(property="H0", type="number", format="float", example=2500, description="개구부 높이(mm)"), @@ -201,6 +208,7 @@ * @OA\Schema( * schema="QuoteCalculationResult", * type="object", + * * @OA\Property(property="inputs", type="object", description="입력 파라미터"), * @OA\Property(property="outputs", type="object", description="산출값 (W1, H1, AREA, WEIGHT 등)"), * @OA\Property(property="items", type="array", @OA\Items(ref="#/components/schemas/QuoteItem"), description="산출된 품목"), @@ -216,6 +224,7 @@ * @OA\Schema( * schema="QuoteSendEmailRequest", * type="object", + * * @OA\Property(property="email", type="string", format="email", nullable=true, description="수신자 이메일"), * @OA\Property(property="name", type="string", nullable=true, maxLength=100, description="수신자명"), * @OA\Property(property="subject", type="string", nullable=true, maxLength=200, description="제목"), @@ -227,6 +236,7 @@ * @OA\Schema( * schema="QuoteSendKakaoRequest", * type="object", + * * @OA\Property(property="phone", type="string", nullable=true, maxLength=20, description="수신자 전화번호"), * @OA\Property(property="name", type="string", nullable=true, maxLength=100, description="수신자명"), * @OA\Property(property="template_code", type="string", nullable=true, maxLength=50, description="템플릿 코드"), @@ -236,6 +246,7 @@ * @OA\Schema( * schema="QuoteNumberPreview", * type="object", + * * @OA\Property(property="quote_number", type="string", example="KD-SC-251204-01"), * @OA\Property(property="product_category", type="string", example="SCREEN"), * @OA\Property(property="generated_at", type="string", format="date-time") @@ -249,6 +260,7 @@ class QuoteApi * tags={"Quote"}, * summary="견적 목록 조회", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="page", in="query", @OA\Schema(type="integer")), * @OA\Parameter(name="size", in="query", @OA\Schema(type="integer")), * @OA\Parameter(name="q", in="query", description="검색어", @OA\Schema(type="string")), @@ -259,7 +271,9 @@ class QuoteApi * @OA\Parameter(name="date_to", in="query", @OA\Schema(type="string", format="date")), * @OA\Parameter(name="sort_by", in="query", @OA\Schema(type="string")), * @OA\Parameter(name="sort_order", in="query", @OA\Schema(type="string", enum={"asc","desc"})), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/QuotePagination") @@ -274,8 +288,11 @@ public function index() {} * tags={"Quote"}, * summary="견적 생성", * security={{"BearerAuth":{}}}, + * * @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteCreateRequest")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") @@ -290,12 +307,16 @@ public function store() {} * tags={"Quote"}, * summary="견적 상세 조회", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") * )), + * * @OA\Response(response=404, description="견적 없음") * ) */ @@ -307,13 +328,18 @@ public function show() {} * tags={"Quote"}, * summary="견적 수정", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteUpdateRequest")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") * )), + * * @OA\Response(response=400, description="수정 불가 상태"), * @OA\Response(response=404, description="견적 없음") * ) @@ -326,7 +352,9 @@ public function update() {} * tags={"Quote"}, * summary="견적 삭제", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공"), * @OA\Response(response=400, description="삭제 불가 상태"), * @OA\Response(response=404, description="견적 없음") @@ -340,10 +368,14 @@ public function destroy() {} * tags={"Quote"}, * summary="견적 일괄 삭제", * security={{"BearerAuth":{}}}, + * * @OA\RequestBody(required=true, @OA\JsonContent( + * * @OA\Property(property="ids", type="array", @OA\Items(type="integer"), example={1,2,3}) * )), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object", @OA\Property(property="deleted_count", type="integer", example=3)) @@ -358,12 +390,16 @@ public function bulkDestroy() {} * tags={"Quote"}, * summary="견적 확정", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") * )), + * * @OA\Response(response=400, description="확정 불가 상태") * ) */ @@ -375,12 +411,16 @@ public function finalize() {} * tags={"Quote"}, * summary="견적 확정 취소", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") * )), + * * @OA\Response(response=400, description="취소 불가 상태") * ) */ @@ -392,12 +432,16 @@ public function cancelFinalize() {} * tags={"Quote"}, * summary="수주 전환", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/Quote") * )), + * * @OA\Response(response=400, description="전환 불가 상태") * ) */ @@ -409,8 +453,11 @@ public function convertToOrder() {} * tags={"Quote"}, * summary="견적번호 미리보기", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="product_category", in="query", @OA\Schema(type="string", enum={"SCREEN","STEEL"})), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/QuoteNumberPreview") @@ -425,8 +472,11 @@ public function previewNumber() {} * tags={"Quote"}, * summary="자동산출 입력 스키마 조회", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="product_category", in="query", @OA\Schema(type="string", enum={"SCREEN","STEEL"})), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object", description="제품별 입력 스키마") @@ -441,8 +491,11 @@ public function calculationSchema() {} * tags={"Quote"}, * summary="자동산출 실행", * security={{"BearerAuth":{}}}, + * * @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteCalculateRequest")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", ref="#/components/schemas/QuoteCalculationResult") @@ -457,8 +510,11 @@ public function calculate() {} * tags={"Quote"}, * summary="견적서 PDF 생성", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object", @@ -479,9 +535,13 @@ public function generatePdf() {} * tags={"Quote"}, * summary="견적서 이메일 발송", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\RequestBody(required=false, @OA\JsonContent(ref="#/components/schemas/QuoteSendEmailRequest")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object", @@ -490,6 +550,7 @@ public function generatePdf() {} * @OA\Property(property="quote_status", type="string") * ) * )), + * * @OA\Response(response=400, description="수신자 정보 없음") * ) */ @@ -501,9 +562,13 @@ public function sendEmail() {} * tags={"Quote"}, * summary="견적서 카카오톡 발송", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\RequestBody(required=false, @OA\JsonContent(ref="#/components/schemas/QuoteSendKakaoRequest")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object", @@ -512,6 +577,7 @@ public function sendEmail() {} * @OA\Property(property="quote_status", type="string") * ) * )), + * * @OA\Response(response=400, description="수신자 정보 없음") * ) */ @@ -523,8 +589,11 @@ public function sendKakao() {} * tags={"Quote"}, * summary="발송 이력 조회", * security={{"BearerAuth":{}}}, + * * @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")), + * * @OA\Response(response=200, description="성공", @OA\JsonContent( + * * @OA\Property(property="success", type="boolean", example=true), * @OA\Property(property="message", type="string"), * @OA\Property(property="data", type="object",