From ebd59f220f6a8aa4b9b0629d9e5b621b6d4c00de Mon Sep 17 00:00:00 2001 From: hskwon Date: Thu, 27 Nov 2025 17:33:23 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20init=20API=20=EC=9D=91=EB=8B=B5?= =?UTF-8?q?=EC=97=90=20fields=20=EB=AA=A9=EB=A1=9D=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ItemMasterService: 모든 독립 필드 목록 반환 추가 - Swagger: ItemMasterInitResponse 스키마에 fields 속성 추가 --- app/Services/ItemMaster/ItemMasterService.php | 7 +++++++ app/Swagger/v1/ItemMasterApi.php | 8 ++++++++ 2 files changed, 15 insertions(+) diff --git a/app/Services/ItemMaster/ItemMasterService.php b/app/Services/ItemMaster/ItemMasterService.php index b70394f..fbd61c5 100644 --- a/app/Services/ItemMaster/ItemMasterService.php +++ b/app/Services/ItemMaster/ItemMasterService.php @@ -18,6 +18,7 @@ class ItemMasterService extends Service * * - pages (linkedSections 기반 중첩) * - sections (모든 독립 섹션) + * - fields (모든 독립 필드) * - customTabs (columnSetting 포함) * - unitOptions */ @@ -67,9 +68,15 @@ public function init(): array // 5. 단위 옵션 $unitOptions = UnitOption::where('tenant_id', $tenantId)->get(); + // 6. 모든 필드 목록 (재사용 가능 목록) + $fields = ItemField::where('tenant_id', $tenantId) + ->orderBy('created_at', 'desc') + ->get(); + return [ 'pages' => $pagesWithSections, 'sections' => $sections, + 'fields' => $fields, 'customTabs' => $customTabs, 'unitOptions' => $unitOptions, ]; diff --git a/app/Swagger/v1/ItemMasterApi.php b/app/Swagger/v1/ItemMasterApi.php index 3b7c71f..1cb1d73 100644 --- a/app/Swagger/v1/ItemMasterApi.php +++ b/app/Swagger/v1/ItemMasterApi.php @@ -412,6 +412,14 @@ * ), * * @OA\Property( + * property="fields", + * type="array", + * description="모든 독립 필드 목록 (재사용 가능)", + * + * @OA\Items(ref="#/components/schemas/ItemField") + * ), + * + * @OA\Property( * property="customTabs", * type="array", *