feat: [items] 아이템 API 기능 개선
- ItemsController, ItemsBomController, ItemsFileController 수정 - ItemBatchDeleteRequest 추가 - ItemsService 개선 - ItemsApi Swagger 문서 업데이트
This commit is contained in:
@@ -88,6 +88,21 @@
|
||||
* description="동적 속성 (JSON)"
|
||||
* )
|
||||
* )
|
||||
*
|
||||
* @OA\Schema(
|
||||
* schema="ItemBatchDeleteRequest",
|
||||
* type="object",
|
||||
* required={"ids"},
|
||||
*
|
||||
* @OA\Property(
|
||||
* property="ids",
|
||||
* type="array",
|
||||
* description="삭제할 품목 ID 목록",
|
||||
*
|
||||
* @OA\Items(type="integer"),
|
||||
* example={1, 2, 3}
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
class ItemsApi
|
||||
{
|
||||
@@ -183,12 +198,12 @@ public function showByCode() {}
|
||||
|
||||
/**
|
||||
* @OA\Put(
|
||||
* path="/api/v1/items/{code}",
|
||||
* path="/api/v1/items/{id}",
|
||||
* tags={"Items"},
|
||||
* summary="품목 수정",
|
||||
* security={{"ApiKeyAuth": {}, "BearerAuth": {}}},
|
||||
*
|
||||
* @OA\Parameter(name="code", in="path", required=true, @OA\Schema(type="string"), example="P-001"),
|
||||
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer"), example=1, description="품목 ID"),
|
||||
*
|
||||
* @OA\RequestBody(
|
||||
* required=true,
|
||||
@@ -214,12 +229,12 @@ public function update() {}
|
||||
|
||||
/**
|
||||
* @OA\Delete(
|
||||
* path="/api/v1/items/{code}",
|
||||
* path="/api/v1/items/{id}",
|
||||
* tags={"Items"},
|
||||
* summary="품목 삭제",
|
||||
* security={{"ApiKeyAuth": {}, "BearerAuth": {}}},
|
||||
*
|
||||
* @OA\Parameter(name="code", in="path", required=true, @OA\Schema(type="string"), example="P-001"),
|
||||
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer"), example=1, description="품목 ID"),
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
@@ -236,4 +251,34 @@ public function update() {}
|
||||
* )
|
||||
*/
|
||||
public function destroy() {}
|
||||
|
||||
/**
|
||||
* @OA\Delete(
|
||||
* path="/api/v1/items/batch",
|
||||
* tags={"Items"},
|
||||
* summary="품목 일괄 삭제",
|
||||
* description="여러 품목을 한 번에 삭제합니다.",
|
||||
* security={{"ApiKeyAuth": {}, "BearerAuth": {}}},
|
||||
*
|
||||
* @OA\RequestBody(
|
||||
* required=true,
|
||||
*
|
||||
* @OA\JsonContent(ref="#/components/schemas/ItemBatchDeleteRequest")
|
||||
* ),
|
||||
*
|
||||
* @OA\Response(
|
||||
* response=200,
|
||||
* description="성공",
|
||||
*
|
||||
* @OA\JsonContent(
|
||||
* type="object",
|
||||
*
|
||||
* @OA\Property(property="success", type="boolean", example=true),
|
||||
* @OA\Property(property="message", type="string", example="품목이 일괄 삭제되었습니다."),
|
||||
* @OA\Property(property="data", type="string", example="success")
|
||||
* )
|
||||
* )
|
||||
* )
|
||||
*/
|
||||
public function batchDestroy() {}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user