Files
sam-api/app/Swagger/v1/GuiderailModelApi.php
강영보 7083057d59 feat: [bending] 절곡품 관리 API 완성 + 데이터 마이그레이션
- GuiderailModelController/Service/Resource: 가이드레일/케이스/하단마감재 통합 CRUD
- item_category 필터 (GUIDERAIL_MODEL/SHUTTERBOX_MODEL/BOTTOMBAR_MODEL)
- BendingItemResource: legacy_bending_num 노출 추가
- ApiKeyMiddleware: guiderail-models, files 화이트리스트 추가
- Swagger: BendingItemApi, GuiderailModelApi 문서 (케이스/하단마감재 필드 포함)
- 마이그레이션 커맨드 5개: GuiderailImportLegacy, BendingProductImportLegacy, BendingImportImages, BendingModelImportImages, BendingModelImportAssemblyImages
- 데이터: GR 20건 + SB 30건 + BB 10건 + 이미지 473건 R2 업로드
2026-03-17 12:50:26 +09:00

126 lines
6.2 KiB
PHP

<?php
namespace App\Swagger\v1;
/**
* @OA\Tag(name="GuiderailModel", description="절곡품 모델 관리 (가이드레일/케이스/하단마감재)")
*
* @OA\Schema(
* schema="GuiderailModel",
* @OA\Property(property="id", type="integer"),
* @OA\Property(property="code", type="string", example="GR-KSS01-벽면형-SUS"),
* @OA\Property(property="name", type="string", example="KSS01 벽면형 SUS마감"),
* @OA\Property(property="item_category", type="string", enum={"GUIDERAIL_MODEL","SHUTTERBOX_MODEL","BOTTOMBAR_MODEL"}),
* @OA\Property(property="model_name", type="string", nullable=true, example="KSS01"),
* @OA\Property(property="check_type", type="string", nullable=true, enum={"벽면형","측면형"}),
* @OA\Property(property="rail_width", type="integer", nullable=true, example=70),
* @OA\Property(property="rail_length", type="integer", nullable=true, example=120),
* @OA\Property(property="finishing_type", type="string", nullable=true, enum={"SUS마감","EGI마감"}),
* @OA\Property(property="item_sep", type="string", nullable=true, enum={"스크린","철재"}),
* @OA\Property(property="model_UA", type="string", nullable=true, enum={"인정","비인정"}),
* @OA\Property(property="exit_direction", type="string", nullable=true, description="케이스 점검구 방향"),
* @OA\Property(property="front_bottom_width", type="integer", nullable=true, description="케이스 전면밑"),
* @OA\Property(property="box_width", type="integer", nullable=true, description="케이스 너비"),
* @OA\Property(property="box_height", type="integer", nullable=true, description="케이스 높이"),
* @OA\Property(property="bar_width", type="integer", nullable=true, description="하단마감재 폭"),
* @OA\Property(property="bar_height", type="integer", nullable=true, description="하단마감재 높이"),
* @OA\Property(property="components", type="array", @OA\Items(
* @OA\Property(property="orderNumber", type="integer"),
* @OA\Property(property="itemName", type="string"),
* @OA\Property(property="material", type="string"),
* @OA\Property(property="quantity", type="integer"),
* @OA\Property(property="width_sum", type="number"),
* @OA\Property(property="image_file_id", type="integer", nullable=true, description="부품 이미지 → /api/v1/files/{id}/view"),
* @OA\Property(property="bendingData", type="array", @OA\Items(type="object"))
* )),
* @OA\Property(property="material_summary", type="object", example={"SUS 1.2T": 406, "EGI 1.55T": 398}),
* @OA\Property(property="component_count", type="integer", example=4)
* )
*/
class GuiderailModelApi
{
/**
* @OA\Get(
* path="/api/v1/guiderail-models",
* tags={"GuiderailModel"},
* summary="절곡품 모델 목록 (가이드레일/케이스/하단마감재 통합)",
* @OA\Parameter(name="item_category", in="query", required=true, description="필수: 카테고리 구분 (없으면 60건 전부 반환)", @OA\Schema(type="string", enum={"GUIDERAIL_MODEL","SHUTTERBOX_MODEL","BOTTOMBAR_MODEL"})),
* @OA\Parameter(name="item_sep", in="query", required=false, @OA\Schema(type="string")),
* @OA\Parameter(name="model_UA", in="query", required=false, @OA\Schema(type="string")),
* @OA\Parameter(name="check_type", in="query", required=false, @OA\Schema(type="string")),
* @OA\Parameter(name="model_name", in="query", required=false, @OA\Schema(type="string")),
* @OA\Parameter(name="search", in="query", required=false, @OA\Schema(type="string")),
* @OA\Parameter(name="page", in="query", required=false, @OA\Schema(type="integer")),
* @OA\Parameter(name="size", in="query", required=false, @OA\Schema(type="integer", default=50)),
* @OA\Response(response=200, description="성공")
* )
*/
public function index() {}
/**
* @OA\Get(
* path="/api/v1/guiderail-models/filters",
* tags={"GuiderailModel"},
* summary="절곡품 모델 필터 옵션",
* @OA\Response(response=200, description="성공")
* )
*/
public function filters() {}
/**
* @OA\Get(
* path="/api/v1/guiderail-models/{id}",
* tags={"GuiderailModel"},
* summary="절곡품 모델 상세 (부품 조합 포함)",
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\Response(response=200, description="성공")
* )
*/
public function show() {}
/**
* @OA\Post(
* path="/api/v1/guiderail-models",
* tags={"GuiderailModel"},
* summary="절곡품 모델 등록",
* @OA\RequestBody(@OA\JsonContent(
* required={"code","name"},
* @OA\Property(property="code", type="string"),
* @OA\Property(property="name", type="string"),
* @OA\Property(property="model_name", type="string"),
* @OA\Property(property="check_type", type="string"),
* @OA\Property(property="components", type="array", @OA\Items(type="object"))
* )),
* @OA\Response(response=200, description="성공")
* )
*/
public function store() {}
/**
* @OA\Put(
* path="/api/v1/guiderail-models/{id}",
* tags={"GuiderailModel"},
* summary="절곡품 모델 수정",
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\RequestBody(@OA\JsonContent(
* @OA\Property(property="model_name", type="string"),
* @OA\Property(property="components", type="array", @OA\Items(type="object")),
* @OA\Property(property="material_summary", type="object")
* )),
* @OA\Response(response=200, description="성공")
* )
*/
public function update() {}
/**
* @OA\Delete(
* path="/api/v1/guiderail-models/{id}",
* tags={"GuiderailModel"},
* summary="절곡품 모델 삭제",
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\Response(response=200, description="성공")
* )
*/
public function destroy() {}
}