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.* 성공 메시지
24 lines
492 B
PHP
24 lines
492 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Quote;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class QuoteSendKakaoRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'phone' => 'nullable|string|max:20',
|
|
'name' => 'nullable|string|max:100',
|
|
'template_code' => 'nullable|string|max:50',
|
|
'view_url' => 'nullable|url|max:500',
|
|
];
|
|
}
|
|
}
|