Files
sam-manage/app/Http/Requests/Rd/StoreAiQuotationRequest.php
김보곤 a605e62360 feat: [ai-quotation] 제조 견적서 자동 생성 기능 추가
- AI 2단계 분석: 고객 인터뷰 → 요구사항 추출 → 견적 산출
- 모델 확장: AiQuotation(모드/견적번호), AiQuotationItem(규격/단가/금액)
- AiQuotePriceTable 모델 신규 생성
- Create 페이지: 모듈/제조 모드 탭, 제품 카테고리, 고객 정보 입력
- Show 페이지: 제조 모드 분기 렌더링 (품목/금액/고객정보)
- Edit 페이지: 품목 인라인 편집, 할인/부가세/조건 입력
- Document: 한국 표준 제조업 견적서 양식 템플릿
- Controller/Route: update 엔드포인트, edit 라우트 추가
2026-03-03 15:57:31 +09:00

40 lines
1.2 KiB
PHP

<?php
namespace App\Http\Requests\Rd;
use Illuminate\Foundation\Http\FormRequest;
class StoreAiQuotationRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'title' => 'required|string|max:200',
'input_type' => 'required|in:text,voice,document',
'input_text' => 'required_if:input_type,text|nullable|string',
'ai_provider' => 'nullable|in:gemini,claude',
'quote_mode' => 'nullable|in:module,manufacture',
'product_category' => 'nullable|in:SCREEN,STEEL',
'client_company' => 'nullable|string|max:200',
'client_contact' => 'nullable|string|max:100',
'client_phone' => 'nullable|string|max:50',
'client_email' => 'nullable|email|max:200',
];
}
public function messages(): array
{
return [
'title.required' => '견적 제목을 입력하세요.',
'title.max' => '제목은 200자 이내로 입력하세요.',
'input_type.required' => '입력 유형을 선택하세요.',
'input_text.required_if' => '인터뷰 내용을 입력하세요.',
];
}
}