docs(WEB): 수주 Swagger 문서 추가 - bulkDestroy, revertProductionOrder

- OrderBulkDeleteRequest 스키마 추가 (ids, force)
- OrderRevertProductionRequest 스키마 추가 (force, reason)
- DELETE /api/v1/orders/bulk 엔드포인트 문서 추가
- POST /api/v1/orders/{id}/revert-production 엔드포인트 문서 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-21 08:56:50 +09:00
parent 37424b9cef
commit c637dd38eb
2 changed files with 323 additions and 0 deletions

View File

@@ -153,6 +153,23 @@
*
* @OA\Property(property="status", type="string", enum={"DRAFT", "CONFIRMED", "IN_PROGRESS", "COMPLETED", "CANCELLED"}, example="CONFIRMED")
* )
*
* @OA\Schema(
* schema="OrderBulkDeleteRequest",
* type="object",
* required={"ids"},
*
* @OA\Property(property="ids", type="array", @OA\Items(type="integer"), example={1, 2, 3}),
* @OA\Property(property="force", type="boolean", description="강제 삭제 여부 (진행중 수주 포함)", example=false)
* )
*
* @OA\Schema(
* schema="OrderRevertProductionRequest",
* type="object",
*
* @OA\Property(property="force", type="boolean", description="강제 되돌리기 (물리 삭제, 기본값 false)", example=false),
* @OA\Property(property="reason", type="string", description="되돌리기 사유 (운영 모드 시 필수)", example="고객 요청에 의한 생산지시 취소")
* )
*/
class OrderApi
{
@@ -364,4 +381,86 @@ public function destroy() {}
* )
*/
public function updateStatus() {}
/**
* @OA\Delete(
* path="/api/v1/orders/bulk",
* tags={"Order"},
* summary="수주 일괄 삭제",
* description="여러 수주를 일괄 삭제합니다 (Soft Delete). 진행중/완료 수주는 건너뜁니다.",
* security={{"ApiKeyAuth": {}}, {"BearerAuth": {}}},
*
* @OA\RequestBody(
* required=true,
*
* @OA\JsonContent(ref="#/components/schemas/OrderBulkDeleteRequest")
* ),
*
* @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),
* @OA\Property(property="skipped_count", type="integer", example=1),
* @OA\Property(property="skipped_ids", type="array", @OA\Items(type="integer"), example={5})
* )
* )
* ),
*
* @OA\Response(response=422, description="유효성 검증 실패")
* )
*/
public function bulkDestroy() {}
/**
* @OA\Post(
* path="/api/v1/orders/{id}/revert-production",
* tags={"Order"},
* summary="생산지시 되돌리기",
* description="생산지시를 되돌립니다. 기본 모드(force=false)에서는 작업지시를 취소 처리하며, 강제 모드(force=true)에서는 물리 삭제합니다.",
* security={{"ApiKeyAuth": {}}, {"BearerAuth": {}}},
*
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
*
* @OA\RequestBody(
* required=false,
*
* @OA\JsonContent(ref="#/components/schemas/OrderRevertProductionRequest")
* ),
*
* @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="order", ref="#/components/schemas/Order"),
* @OA\Property(property="deleted_counts", type="object",
* @OA\Property(property="work_results", type="integer", example=0),
* @OA\Property(property="work_order_items", type="integer", example=5),
* @OA\Property(property="work_orders", type="integer", example=2)
* ),
* @OA\Property(property="cancelled_counts", type="object", nullable=true,
* @OA\Property(property="work_orders", type="integer", example=2),
* @OA\Property(property="work_order_items", type="integer", example=5)
* ),
* @OA\Property(property="previous_status", type="string", example="IN_PROGRESS")
* )
* )
* ),
*
* @OA\Response(response=400, description="되돌리기 불가 상태 (수주확정/수주등록 상태)"),
* @OA\Response(response=404, description="수주를 찾을 수 없음"),
* @OA\Response(response=422, description="운영 모드에서 사유 미입력")
* )
*/
public function revertProductionOrder() {}
}