<?php

namespace App\Swagger\v1;

/**
 * @OA\Tag(name="Approval Lines", description="결재선 템플릿 관리")
 *
 * @OA\Schema(
 *     schema="ApprovalLine",
 *     type="object",
 *     description="결재선 템플릿 정보",
 *
 *     @OA\Property(property="id", type="integer", example=1, description="결재선 ID"),
 *     @OA\Property(property="tenant_id", type="integer", example=1, description="테넌트 ID"),
 *     @OA\Property(property="name", type="string", example="기본 결재선", description="결재선명"),
 *     @OA\Property(property="steps", type="array", description="결재 단계", @OA\Items(type="object",
 *         @OA\Property(property="type", type="string", enum={"approval","agreement","reference"}, example="approval", description="단계 유형"),
 *         @OA\Property(property="user_id", type="integer", example=10, description="결재자 ID")
 *     )),
 *     @OA\Property(property="is_default", type="boolean", example=false, description="기본 결재선 여부"),
 *     @OA\Property(property="step_count", type="integer", example=3, description="단계 수"),
 *     @OA\Property(property="creator", type="object", nullable=true, description="생성자 정보",
 *         @OA\Property(property="id", type="integer", example=1),
 *         @OA\Property(property="name", type="string", example="관리자")
 *     ),
 *     @OA\Property(property="created_at", type="string", format="date-time", example="2024-01-01T09:00:00Z"),
 *     @OA\Property(property="updated_at", type="string", format="date-time", example="2024-01-01T09:00:00Z")
 * )
 *
 * @OA\Schema(
 *     schema="ApprovalLineCreateRequest",
 *     type="object",
 *     required={"name", "steps"},
 *     description="결재선 생성 요청",
 *
 *     @OA\Property(property="name", type="string", example="기본 결재선", description="결재선명"),
 *     @OA\Property(property="steps", type="array", description="결재 단계", @OA\Items(type="object",
 *         @OA\Property(property="type", type="string", enum={"approval","agreement","reference"}, example="approval", description="단계 유형"),
 *         @OA\Property(property="user_id", type="integer", example=10, description="결재자 ID")
 *     )),
 *     @OA\Property(property="is_default", type="boolean", example=false, description="기본 결재선 여부")
 * )
 *
 * @OA\Schema(
 *     schema="ApprovalLineUpdateRequest",
 *     type="object",
 *     description="결재선 수정 요청",
 *
 *     @OA\Property(property="name", type="string", example="기본 결재선", description="결재선명"),
 *     @OA\Property(property="steps", type="array", description="결재 단계", @OA\Items(type="object")),
 *     @OA\Property(property="is_default", type="boolean", description="기본 결재선 여부")
 * )
 */
class ApprovalLineApi
{
    /**
     * @OA\Get(
     *     path="/api/v1/approval-lines",
     *     tags={"Approval Lines"},
     *     summary="결재선 목록 조회",
     *     security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
     *
     *     @OA\Parameter(name="search", in="query", description="검색어 (이름)", @OA\Schema(type="string")),
     *     @OA\Parameter(name="sort_by", in="query", description="정렬 기준", @OA\Schema(type="string", enum={"created_at","name","is_default"}, default="created_at")),
     *     @OA\Parameter(name="sort_dir", in="query", description="정렬 방향", @OA\Schema(type="string", enum={"asc","desc"}, default="desc")),
     *     @OA\Parameter(ref="#/components/parameters/Page"),
     *     @OA\Parameter(ref="#/components/parameters/Size"),
     *
     *     @OA\Response(
     *         response=200,
     *         description="조회 성공",
     *
     *         @OA\JsonContent(
     *             allOf={
     *
     *                 @OA\Schema(ref="#/components/schemas/ApiResponse"),
     *                 @OA\Schema(
     *
     *                     @OA\Property(
     *                         property="data",
     *                         type="object",
     *                         @OA\Property(property="current_page", type="integer", example=1),
     *                         @OA\Property(property="data", type="array", @OA\Items(ref="#/components/schemas/ApprovalLine")),
     *                         @OA\Property(property="per_page", type="integer", example=20),
     *                         @OA\Property(property="total", type="integer", example=5)
     *                     )
     *                 )
     *             }
     *         )
     *     ),
     *
     *     @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
     * )
     */
    public function index() {}

    /**
     * @OA\Get(
     *     path="/api/v1/approval-lines/{id}",
     *     tags={"Approval Lines"},
     *     summary="결재선 상세 조회",
     *     security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
     *
     *     @OA\Parameter(name="id", in="path", required=true, description="결재선 ID", @OA\Schema(type="integer")),
     *
     *     @OA\Response(
     *         response=200,
     *         description="조회 성공",
     *
     *         @OA\JsonContent(
     *             allOf={
     *
     *                 @OA\Schema(ref="#/components/schemas/ApiResponse"),
     *                 @OA\Schema(@OA\Property(property="data", ref="#/components/schemas/ApprovalLine"))
     *             }
     *         )
     *     ),
     *
     *     @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=404, description="결재선을 찾을 수 없음", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
     * )
     */
    public function show() {}

    /**
     * @OA\Post(
     *     path="/api/v1/approval-lines",
     *     tags={"Approval Lines"},
     *     summary="결재선 생성",
     *     security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
     *
     *     @OA\RequestBody(
     *         required=true,
     *
     *         @OA\JsonContent(ref="#/components/schemas/ApprovalLineCreateRequest")
     *     ),
     *
     *     @OA\Response(
     *         response=201,
     *         description="생성 성공",
     *
     *         @OA\JsonContent(
     *             allOf={
     *
     *                 @OA\Schema(ref="#/components/schemas/ApiResponse"),
     *                 @OA\Schema(@OA\Property(property="data", ref="#/components/schemas/ApprovalLine"))
     *             }
     *         )
     *     ),
     *
     *     @OA\Response(response=400, description="잘못된 요청", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
     * )
     */
    public function store() {}

    /**
     * @OA\Patch(
     *     path="/api/v1/approval-lines/{id}",
     *     tags={"Approval Lines"},
     *     summary="결재선 수정",
     *     security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
     *
     *     @OA\Parameter(name="id", in="path", required=true, description="결재선 ID", @OA\Schema(type="integer")),
     *
     *     @OA\RequestBody(
     *         required=true,
     *
     *         @OA\JsonContent(ref="#/components/schemas/ApprovalLineUpdateRequest")
     *     ),
     *
     *     @OA\Response(
     *         response=200,
     *         description="수정 성공",
     *
     *         @OA\JsonContent(
     *             allOf={
     *
     *                 @OA\Schema(ref="#/components/schemas/ApiResponse"),
     *                 @OA\Schema(@OA\Property(property="data", ref="#/components/schemas/ApprovalLine"))
     *             }
     *         )
     *     ),
     *
     *     @OA\Response(response=400, description="잘못된 요청", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=404, description="결재선을 찾을 수 없음", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
     * )
     */
    public function update() {}

    /**
     * @OA\Delete(
     *     path="/api/v1/approval-lines/{id}",
     *     tags={"Approval Lines"},
     *     summary="결재선 삭제",
     *     security={{"ApiKeyAuth":{}},{"BearerAuth":{}}},
     *
     *     @OA\Parameter(name="id", in="path", required=true, description="결재선 ID", @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", example="삭제 완료"),
     *             @OA\Property(property="data", type="boolean", example=true)
     *         )
     *     ),
     *
     *     @OA\Response(response=401, description="인증 실패", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=404, description="결재선을 찾을 수 없음", @OA\JsonContent(ref="#/components/schemas/ErrorResponse")),
     *     @OA\Response(response=500, description="서버 에러", @OA\JsonContent(ref="#/components/schemas/ErrorResponse"))
     * )
     */
    public function destroy() {}
}
