feat: 견적 시스템 API
- 5130의 71개 하드코딩 컬럼을 동적 카테고리 필드 시스템으로 전환 - 모터 브라켓 계산 등 핵심 비즈니스 로직 FormulaParser에 통합 - 파라미터 기반 동적 견적 폼 시스템 구축 - 견적 상태 워크플로 (DRAFT → SENT → APPROVED/REJECTED/EXPIRED) - 모델셋 관리 API: 카테고리+제품+BOM 통합 관리 - 견적 관리 API: 생성/수정/복제/상태변경/미리보기 기능 주요 구현 사항: - EstimateController/EstimateService: 견적 비즈니스 로직 - ModelSetController/ModelSetService: 모델셋 관리 로직 - Estimate/EstimateItem 모델: 견적 데이터 구조 - 동적 견적 필드 마이그레이션: 스크린/철재 제품 구조 - API 라우트 17개 엔드포인트 추가 - 다국어 메시지 지원 (성공/에러 메시지) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
36
app/Http/Requests/Estimate/UpdateEstimateRequest.php
Normal file
36
app/Http/Requests/Estimate/UpdateEstimateRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Estimate;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class UpdateEstimateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'estimate_name' => 'sometimes|required|string|max:255',
|
||||
'customer_name' => 'nullable|string|max:255',
|
||||
'project_name' => 'nullable|string|max:255',
|
||||
'parameters' => 'sometimes|required|array',
|
||||
'parameters.*' => 'required',
|
||||
'notes' => 'nullable|string|max:2000',
|
||||
'status' => 'sometimes|in:DRAFT,SENT,APPROVED,REJECTED,EXPIRED',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'estimate_name.required' => __('validation.required', ['attribute' => '견적명']),
|
||||
'parameters.required' => __('validation.required', ['attribute' => '견적 파라미터']),
|
||||
'parameters.array' => __('validation.array', ['attribute' => '견적 파라미터']),
|
||||
'status.in' => __('validation.in', ['attribute' => '상태']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user