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.* 성공 메시지
27 lines
624 B
PHP
27 lines
624 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Quote;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class QuoteSendEmailRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'email' => 'nullable|email|max:100',
|
|
'name' => 'nullable|string|max:100',
|
|
'subject' => 'nullable|string|max:200',
|
|
'message' => 'nullable|string|max:2000',
|
|
'cc' => 'nullable|array',
|
|
'cc.*' => 'nullable|email|max:100',
|
|
'attach_pdf' => 'nullable|boolean',
|
|
];
|
|
}
|
|
}
|