feat: [quote] 견적 API Phase 2-3 완료 (Service + Controller Layer)

Phase 2 - Service Layer:
- QuoteService: 견적 CRUD + 상태관리 (확정/전환)
- QuoteNumberService: 견적번호 채번 (KD-{PREFIX}-YYMMDD-SEQ)
- FormulaEvaluatorService: 수식 평가 엔진 (SUM, IF, ROUND 등)
- QuoteCalculationService: 자동산출 (스크린/철재 제품)
- QuoteDocumentService: PDF 생성 및 이메일/카카오 발송

Phase 3 - Controller Layer:
- QuoteController: 16개 엔드포인트
- FormRequest 7개: Index, Store, Update, BulkDelete, Calculate, SendEmail, SendKakao
- QuoteApi.php: Swagger 문서 (12개 스키마, 16개 엔드포인트)
- routes/api.php: 16개 라우트 등록

i18n 키 추가:
- error.php: quote_not_found, formula_* 등
- message.php: quote.* 성공 메시지
This commit is contained in:
2025-12-04 22:03:40 +09:00
parent d164bb4c4a
commit 40ca8b8697
18 changed files with 3264 additions and 3 deletions

539
app/Swagger/v1/QuoteApi.php Normal file
View File

@@ -0,0 +1,539 @@
<?php
namespace App\Swagger\v1;
/**
* @OA\Tag(name="Quote", description="견적 관리")
*
* @OA\Schema(
* schema="Quote",
* type="object",
* required={"id","quote_number"},
* @OA\Property(property="id", type="integer", example=1),
* @OA\Property(property="tenant_id", type="integer", example=1),
* @OA\Property(property="quote_number", type="string", example="KD-SC-251204-01", description="견적번호"),
* @OA\Property(property="registration_date", type="string", format="date", example="2025-12-04", description="등록일"),
* @OA\Property(property="receipt_date", type="string", format="date", nullable=true, example="2025-12-05", description="접수일"),
* @OA\Property(property="author", type="string", nullable=true, example="홍길동", description="작성자"),
* @OA\Property(property="client_id", type="integer", nullable=true, example=1, description="거래처 ID"),
* @OA\Property(property="client_name", type="string", nullable=true, example="ABC건설", description="발주처명"),
* @OA\Property(property="manager", type="string", nullable=true, example="김담당", description="담당자"),
* @OA\Property(property="contact", type="string", nullable=true, example="010-1234-5678", description="연락처"),
* @OA\Property(property="site_id", type="integer", nullable=true, example=1, description="현장 ID"),
* @OA\Property(property="site_name", type="string", nullable=true, example="강남현장", description="현장명"),
* @OA\Property(property="site_code", type="string", nullable=true, example="SITE-001", description="현장코드"),
* @OA\Property(property="product_category", type="string", enum={"SCREEN","STEEL"}, example="SCREEN", description="제품 카테고리"),
* @OA\Property(property="product_id", type="integer", nullable=true, example=1, description="제품 ID"),
* @OA\Property(property="product_code", type="string", nullable=true, example="SCR-001", description="제품코드"),
* @OA\Property(property="product_name", type="string", nullable=true, example="전동스크린", description="제품명"),
* @OA\Property(property="open_size_width", type="number", format="float", nullable=true, example=3000, description="개구부 폭(mm)"),
* @OA\Property(property="open_size_height", type="number", format="float", nullable=true, example=2500, description="개구부 높이(mm)"),
* @OA\Property(property="quantity", type="integer", example=1, description="수량"),
* @OA\Property(property="unit_symbol", type="string", nullable=true, example="EA", description="단위"),
* @OA\Property(property="floors", type="string", nullable=true, example="1F~3F", description="층수"),
* @OA\Property(property="material_cost", type="number", format="float", example=500000, description="자재비"),
* @OA\Property(property="labor_cost", type="number", format="float", example=100000, description="인건비"),
* @OA\Property(property="install_cost", type="number", format="float", example=50000, description="설치비"),
* @OA\Property(property="subtotal", type="number", format="float", example=650000, description="소계"),
* @OA\Property(property="discount_rate", type="number", format="float", example=10, description="할인율(%)"),
* @OA\Property(property="discount_amount", type="number", format="float", example=65000, description="할인금액"),
* @OA\Property(property="total_amount", type="number", format="float", example=585000, description="합계금액"),
* @OA\Property(property="status", type="string", enum={"draft","sent","approved","rejected","finalized","converted"}, example="draft", description="상태"),
* @OA\Property(property="current_revision", type="integer", example=0, description="현재 리비전"),
* @OA\Property(property="is_final", type="boolean", example=false, description="확정 여부"),
* @OA\Property(property="finalized_at", type="string", format="date-time", nullable=true, description="확정일시"),
* @OA\Property(property="finalized_by", type="integer", nullable=true, description="확정자 ID"),
* @OA\Property(property="completion_date", type="string", format="date", nullable=true, description="완료예정일"),
* @OA\Property(property="remarks", type="string", nullable=true, description="비고"),
* @OA\Property(property="memo", type="string", nullable=true, description="메모"),
* @OA\Property(property="notes", type="string", nullable=true, description="참고사항"),
* @OA\Property(property="calculation_inputs", type="object", nullable=true, description="자동산출 입력값"),
* @OA\Property(property="created_at", type="string", format="date-time", example="2025-12-04 10:00:00"),
* @OA\Property(property="updated_at", type="string", format="date-time", example="2025-12-04 10:00:00"),
* @OA\Property(property="items", type="array", @OA\Items(ref="#/components/schemas/QuoteItem"), description="견적 품목")
* )
*
* @OA\Schema(
* schema="QuoteItem",
* type="object",
* @OA\Property(property="id", type="integer", example=1),
* @OA\Property(property="quote_id", type="integer", example=1),
* @OA\Property(property="item_id", type="integer", nullable=true, example=1, description="품목 ID"),
* @OA\Property(property="item_code", type="string", example="SCR-FABRIC-001", description="품목코드"),
* @OA\Property(property="item_name", type="string", example="스크린 원단", description="품목명"),
* @OA\Property(property="specification", type="string", nullable=true, example="3100 x 2650 mm", description="규격"),
* @OA\Property(property="unit", type="string", example="m²", description="단위"),
* @OA\Property(property="base_quantity", type="number", format="float", example=1, description="기본수량"),
* @OA\Property(property="calculated_quantity", type="number", format="float", example=8.215, description="산출수량"),
* @OA\Property(property="unit_price", type="number", format="float", example=25000, description="단가"),
* @OA\Property(property="total_price", type="number", format="float", example=205375, description="금액"),
* @OA\Property(property="formula", type="string", nullable=true, example="AREA * QTY", description="수량 수식"),
* @OA\Property(property="formula_result", type="string", nullable=true, description="수식 결과"),
* @OA\Property(property="formula_source", type="string", nullable=true, description="수식 출처"),
* @OA\Property(property="formula_category", type="string", nullable=true, example="material", description="비용 카테고리"),
* @OA\Property(property="note", type="string", nullable=true, description="비고"),
* @OA\Property(property="sort_order", type="integer", example=0, description="정렬순서")
* )
*
* @OA\Schema(
* schema="QuotePagination",
* type="object",
* @OA\Property(property="current_page", type="integer", example=1),
* @OA\Property(property="data", type="array", @OA\Items(ref="#/components/schemas/Quote")),
* @OA\Property(property="first_page_url", type="string", example="/api/v1/quotes?page=1"),
* @OA\Property(property="from", type="integer", example=1),
* @OA\Property(property="last_page", type="integer", example=3),
* @OA\Property(property="last_page_url", type="string", example="/api/v1/quotes?page=3"),
* @OA\Property(property="next_page_url", type="string", nullable=true, example="/api/v1/quotes?page=2"),
* @OA\Property(property="path", type="string", example="/api/v1/quotes"),
* @OA\Property(property="per_page", type="integer", example=20),
* @OA\Property(property="prev_page_url", type="string", nullable=true, example=null),
* @OA\Property(property="to", type="integer", example=20),
* @OA\Property(property="total", type="integer", example=50)
* )
*
* @OA\Schema(
* schema="QuoteCreateRequest",
* type="object",
* @OA\Property(property="quote_number", type="string", nullable=true, maxLength=50, description="견적번호(미입력시 자동생성)"),
* @OA\Property(property="registration_date", type="string", format="date", nullable=true, example="2025-12-04"),
* @OA\Property(property="receipt_date", type="string", format="date", nullable=true),
* @OA\Property(property="author", type="string", nullable=true, maxLength=50),
* @OA\Property(property="client_id", type="integer", nullable=true),
* @OA\Property(property="client_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="manager", type="string", nullable=true, maxLength=50),
* @OA\Property(property="contact", type="string", nullable=true, maxLength=50),
* @OA\Property(property="site_id", type="integer", nullable=true),
* @OA\Property(property="site_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="site_code", type="string", nullable=true, maxLength=50),
* @OA\Property(property="product_category", type="string", enum={"SCREEN","STEEL"}, nullable=true),
* @OA\Property(property="product_id", type="integer", nullable=true),
* @OA\Property(property="product_code", type="string", nullable=true, maxLength=50),
* @OA\Property(property="product_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="open_size_width", type="number", format="float", nullable=true),
* @OA\Property(property="open_size_height", type="number", format="float", nullable=true),
* @OA\Property(property="quantity", type="integer", nullable=true, minimum=1),
* @OA\Property(property="unit_symbol", type="string", nullable=true, maxLength=10),
* @OA\Property(property="floors", type="string", nullable=true, maxLength=50),
* @OA\Property(property="material_cost", type="number", format="float", nullable=true),
* @OA\Property(property="labor_cost", type="number", format="float", nullable=true),
* @OA\Property(property="install_cost", type="number", format="float", nullable=true),
* @OA\Property(property="discount_rate", type="number", format="float", nullable=true, minimum=0, maximum=100),
* @OA\Property(property="total_amount", type="number", format="float", nullable=true),
* @OA\Property(property="completion_date", type="string", format="date", nullable=true),
* @OA\Property(property="remarks", type="string", nullable=true, maxLength=500),
* @OA\Property(property="memo", type="string", nullable=true),
* @OA\Property(property="notes", type="string", nullable=true),
* @OA\Property(property="calculation_inputs", type="object", nullable=true),
* @OA\Property(property="items", type="array", nullable=true, @OA\Items(ref="#/components/schemas/QuoteItemRequest"))
* )
*
* @OA\Schema(
* schema="QuoteUpdateRequest",
* type="object",
* @OA\Property(property="receipt_date", type="string", format="date", nullable=true),
* @OA\Property(property="author", type="string", nullable=true, maxLength=50),
* @OA\Property(property="client_id", type="integer", nullable=true),
* @OA\Property(property="client_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="manager", type="string", nullable=true, maxLength=50),
* @OA\Property(property="contact", type="string", nullable=true, maxLength=50),
* @OA\Property(property="site_id", type="integer", nullable=true),
* @OA\Property(property="site_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="site_code", type="string", nullable=true, maxLength=50),
* @OA\Property(property="product_category", type="string", enum={"SCREEN","STEEL"}, nullable=true),
* @OA\Property(property="product_id", type="integer", nullable=true),
* @OA\Property(property="product_code", type="string", nullable=true, maxLength=50),
* @OA\Property(property="product_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="open_size_width", type="number", format="float", nullable=true),
* @OA\Property(property="open_size_height", type="number", format="float", nullable=true),
* @OA\Property(property="quantity", type="integer", nullable=true, minimum=1),
* @OA\Property(property="unit_symbol", type="string", nullable=true, maxLength=10),
* @OA\Property(property="floors", type="string", nullable=true, maxLength=50),
* @OA\Property(property="material_cost", type="number", format="float", nullable=true),
* @OA\Property(property="labor_cost", type="number", format="float", nullable=true),
* @OA\Property(property="install_cost", type="number", format="float", nullable=true),
* @OA\Property(property="discount_rate", type="number", format="float", nullable=true, minimum=0, maximum=100),
* @OA\Property(property="total_amount", type="number", format="float", nullable=true),
* @OA\Property(property="completion_date", type="string", format="date", nullable=true),
* @OA\Property(property="remarks", type="string", nullable=true, maxLength=500),
* @OA\Property(property="memo", type="string", nullable=true),
* @OA\Property(property="notes", type="string", nullable=true),
* @OA\Property(property="calculation_inputs", type="object", nullable=true),
* @OA\Property(property="items", type="array", nullable=true, @OA\Items(ref="#/components/schemas/QuoteItemRequest"))
* )
*
* @OA\Schema(
* schema="QuoteItemRequest",
* type="object",
* @OA\Property(property="item_id", type="integer", nullable=true),
* @OA\Property(property="item_code", type="string", nullable=true, maxLength=50),
* @OA\Property(property="item_name", type="string", nullable=true, maxLength=100),
* @OA\Property(property="specification", type="string", nullable=true, maxLength=200),
* @OA\Property(property="unit", type="string", nullable=true, maxLength=20),
* @OA\Property(property="base_quantity", type="number", format="float", nullable=true),
* @OA\Property(property="calculated_quantity", type="number", format="float", nullable=true),
* @OA\Property(property="unit_price", type="number", format="float", nullable=true),
* @OA\Property(property="total_price", type="number", format="float", nullable=true),
* @OA\Property(property="formula", type="string", nullable=true, maxLength=500),
* @OA\Property(property="formula_result", type="string", nullable=true),
* @OA\Property(property="formula_source", type="string", nullable=true),
* @OA\Property(property="formula_category", type="string", nullable=true, maxLength=50),
* @OA\Property(property="note", type="string", nullable=true, maxLength=500),
* @OA\Property(property="sort_order", type="integer", nullable=true)
* )
*
* @OA\Schema(
* schema="QuoteCalculateRequest",
* type="object",
* @OA\Property(property="product_category", type="string", enum={"SCREEN","STEEL"}, nullable=true, description="제품 카테고리"),
* @OA\Property(property="W0", type="number", format="float", example=3000, description="개구부 폭(mm)"),
* @OA\Property(property="H0", type="number", format="float", example=2500, description="개구부 높이(mm)"),
* @OA\Property(property="QTY", type="integer", example=1, description="수량"),
* @OA\Property(property="INSTALL_TYPE", type="string", enum={"wall","ceiling","floor"}, nullable=true, description="설치유형(스크린)"),
* @OA\Property(property="MOTOR_TYPE", type="string", enum={"standard","heavy"}, nullable=true, description="모터유형(스크린)"),
* @OA\Property(property="CONTROL_TYPE", type="string", enum={"switch","remote","smart"}, nullable=true, description="제어방식(스크린)"),
* @OA\Property(property="MATERIAL", type="string", enum={"ss304","ss316","galvanized"}, nullable=true, description="재질(철재)"),
* @OA\Property(property="THICKNESS", type="number", format="float", nullable=true, description="두께(철재)"),
* @OA\Property(property="FINISH", type="string", enum={"hairline","mirror","matte"}, nullable=true, description="표면처리(철재)"),
* @OA\Property(property="WELDING", type="string", enum={"tig","mig","spot"}, nullable=true, description="용접방식(철재)")
* )
*
* @OA\Schema(
* schema="QuoteCalculationResult",
* type="object",
* @OA\Property(property="inputs", type="object", description="입력 파라미터"),
* @OA\Property(property="outputs", type="object", description="산출값 (W1, H1, AREA, WEIGHT 등)"),
* @OA\Property(property="items", type="array", @OA\Items(ref="#/components/schemas/QuoteItem"), description="산출된 품목"),
* @OA\Property(property="costs", type="object",
* @OA\Property(property="material_cost", type="number", format="float"),
* @OA\Property(property="labor_cost", type="number", format="float"),
* @OA\Property(property="install_cost", type="number", format="float"),
* @OA\Property(property="subtotal", type="number", format="float")
* ),
* @OA\Property(property="errors", type="array", @OA\Items(type="string"))
* )
*
* @OA\Schema(
* schema="QuoteSendEmailRequest",
* type="object",
* @OA\Property(property="email", type="string", format="email", nullable=true, description="수신자 이메일"),
* @OA\Property(property="name", type="string", nullable=true, maxLength=100, description="수신자명"),
* @OA\Property(property="subject", type="string", nullable=true, maxLength=200, description="제목"),
* @OA\Property(property="message", type="string", nullable=true, maxLength=2000, description="본문"),
* @OA\Property(property="cc", type="array", @OA\Items(type="string", format="email"), nullable=true, description="참조"),
* @OA\Property(property="attach_pdf", type="boolean", example=true, description="PDF 첨부 여부")
* )
*
* @OA\Schema(
* schema="QuoteSendKakaoRequest",
* type="object",
* @OA\Property(property="phone", type="string", nullable=true, maxLength=20, description="수신자 전화번호"),
* @OA\Property(property="name", type="string", nullable=true, maxLength=100, description="수신자명"),
* @OA\Property(property="template_code", type="string", nullable=true, maxLength=50, description="템플릿 코드"),
* @OA\Property(property="view_url", type="string", format="uri", nullable=true, description="조회 URL")
* )
*
* @OA\Schema(
* schema="QuoteNumberPreview",
* type="object",
* @OA\Property(property="quote_number", type="string", example="KD-SC-251204-01"),
* @OA\Property(property="product_category", type="string", example="SCREEN"),
* @OA\Property(property="generated_at", type="string", format="date-time")
* )
*/
class QuoteApi
{
/**
* @OA\Get(
* path="/api/v1/quotes",
* tags={"Quote"},
* summary="견적 목록 조회",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="page", in="query", @OA\Schema(type="integer")),
* @OA\Parameter(name="size", in="query", @OA\Schema(type="integer")),
* @OA\Parameter(name="q", in="query", description="검색어", @OA\Schema(type="string")),
* @OA\Parameter(name="status", in="query", @OA\Schema(type="string", enum={"draft","sent","approved","rejected","finalized","converted"})),
* @OA\Parameter(name="product_category", in="query", @OA\Schema(type="string", enum={"SCREEN","STEEL"})),
* @OA\Parameter(name="client_id", in="query", @OA\Schema(type="integer")),
* @OA\Parameter(name="date_from", in="query", @OA\Schema(type="string", format="date")),
* @OA\Parameter(name="date_to", in="query", @OA\Schema(type="string", format="date")),
* @OA\Parameter(name="sort_by", in="query", @OA\Schema(type="string")),
* @OA\Parameter(name="sort_order", in="query", @OA\Schema(type="string", enum={"asc","desc"})),
* @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", ref="#/components/schemas/QuotePagination")
* ))
* )
*/
public function index() {}
/**
* @OA\Post(
* path="/api/v1/quotes",
* tags={"Quote"},
* summary="견적 생성",
* security={{"BearerAuth":{}}},
* @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteCreateRequest")),
* @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", ref="#/components/schemas/Quote")
* ))
* )
*/
public function store() {}
/**
* @OA\Get(
* path="/api/v1/quotes/{id}",
* tags={"Quote"},
* summary="견적 상세 조회",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", ref="#/components/schemas/Quote")
* )),
* @OA\Response(response=404, description="견적 없음")
* )
*/
public function show() {}
/**
* @OA\Put(
* path="/api/v1/quotes/{id}",
* tags={"Quote"},
* summary="견적 수정",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteUpdateRequest")),
* @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", ref="#/components/schemas/Quote")
* )),
* @OA\Response(response=400, description="수정 불가 상태"),
* @OA\Response(response=404, description="견적 없음")
* )
*/
public function update() {}
/**
* @OA\Delete(
* path="/api/v1/quotes/{id}",
* tags={"Quote"},
* summary="견적 삭제",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\Response(response=200, description="성공"),
* @OA\Response(response=400, description="삭제 불가 상태"),
* @OA\Response(response=404, description="견적 없음")
* )
*/
public function destroy() {}
/**
* @OA\Delete(
* path="/api/v1/quotes/bulk",
* tags={"Quote"},
* summary="견적 일괄 삭제",
* security={{"BearerAuth":{}}},
* @OA\RequestBody(required=true, @OA\JsonContent(
* @OA\Property(property="ids", type="array", @OA\Items(type="integer"), example={1,2,3})
* )),
* @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))
* ))
* )
*/
public function bulkDestroy() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/finalize",
* tags={"Quote"},
* summary="견적 확정",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", ref="#/components/schemas/Quote")
* )),
* @OA\Response(response=400, description="확정 불가 상태")
* )
*/
public function finalize() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/cancel-finalize",
* tags={"Quote"},
* summary="견적 확정 취소",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", ref="#/components/schemas/Quote")
* )),
* @OA\Response(response=400, description="취소 불가 상태")
* )
*/
public function cancelFinalize() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/convert",
* tags={"Quote"},
* summary="수주 전환",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", ref="#/components/schemas/Quote")
* )),
* @OA\Response(response=400, description="전환 불가 상태")
* )
*/
public function convertToOrder() {}
/**
* @OA\Get(
* path="/api/v1/quotes/number/preview",
* tags={"Quote"},
* summary="견적번호 미리보기",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="product_category", in="query", @OA\Schema(type="string", enum={"SCREEN","STEEL"})),
* @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", ref="#/components/schemas/QuoteNumberPreview")
* ))
* )
*/
public function previewNumber() {}
/**
* @OA\Get(
* path="/api/v1/quotes/calculation/schema",
* tags={"Quote"},
* summary="자동산출 입력 스키마 조회",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="product_category", in="query", @OA\Schema(type="string", enum={"SCREEN","STEEL"})),
* @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", description="제품별 입력 스키마")
* ))
* )
*/
public function calculationSchema() {}
/**
* @OA\Post(
* path="/api/v1/quotes/calculate",
* tags={"Quote"},
* summary="자동산출 실행",
* security={{"BearerAuth":{}}},
* @OA\RequestBody(required=true, @OA\JsonContent(ref="#/components/schemas/QuoteCalculateRequest")),
* @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", ref="#/components/schemas/QuoteCalculationResult")
* ))
* )
*/
public function calculate() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/pdf",
* tags={"Quote"},
* summary="견적서 PDF 생성",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", type="object",
* @OA\Property(property="quote_id", type="integer"),
* @OA\Property(property="quote_number", type="string"),
* @OA\Property(property="filename", type="string"),
* @OA\Property(property="path", type="string"),
* @OA\Property(property="generated_at", type="string")
* )
* ))
* )
*/
public function generatePdf() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/send/email",
* tags={"Quote"},
* summary="견적서 이메일 발송",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\RequestBody(required=false, @OA\JsonContent(ref="#/components/schemas/QuoteSendEmailRequest")),
* @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="success", type="boolean"),
* @OA\Property(property="send_log", type="object"),
* @OA\Property(property="quote_status", type="string")
* )
* )),
* @OA\Response(response=400, description="수신자 정보 없음")
* )
*/
public function sendEmail() {}
/**
* @OA\Post(
* path="/api/v1/quotes/{id}/send/kakao",
* tags={"Quote"},
* summary="견적서 카카오톡 발송",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @OA\Schema(type="integer")),
* @OA\RequestBody(required=false, @OA\JsonContent(ref="#/components/schemas/QuoteSendKakaoRequest")),
* @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="success", type="boolean"),
* @OA\Property(property="send_log", type="object"),
* @OA\Property(property="quote_status", type="string")
* )
* )),
* @OA\Response(response=400, description="수신자 정보 없음")
* )
*/
public function sendKakao() {}
/**
* @OA\Get(
* path="/api/v1/quotes/{id}/send/history",
* tags={"Quote"},
* summary="발송 이력 조회",
* security={{"BearerAuth":{}}},
* @OA\Parameter(name="id", in="path", required=true, @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"),
* @OA\Property(property="data", type="object",
* @OA\Property(property="quote_id", type="integer"),
* @OA\Property(property="quote_number", type="string"),
* @OA\Property(property="history", type="array", @OA\Items(type="object"))
* )
* ))
* )
*/
public function sendHistory() {}
}