Files
sam-api/app/Http/Requests/Quality/QualityDocumentStoreRequest.php
권혁성 f9cd219f67 feat: [품질관리] 품질관리서/실적신고/검사 API
- QualityDocument CRUD + 수주 연결 + 개소별 데이터 저장
- PerformanceReport 실적신고 확인/메모 API
- Inspection 검사 설정 + product_code 전파 수정
- 수주선택 API에 client_name 필드 추가
- 절곡 검사 프로파일 분리 (S1/S2/S3)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-07 02:57:48 +09:00

46 lines
1.6 KiB
PHP

<?php
namespace App\Http\Requests\Quality;
use Illuminate\Foundation\Http\FormRequest;
class QualityDocumentStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'site_name' => ['required', 'string', 'max:200'],
'client_id' => ['nullable', 'integer', 'exists:clients,id'],
'inspector_id' => ['nullable', 'integer', 'exists:users,id'],
'received_date' => ['nullable', 'date'],
'options' => ['nullable', 'array'],
'options.manager' => ['nullable', 'array'],
'options.manager.name' => ['nullable', 'string', 'max:50'],
'options.manager.phone' => ['nullable', 'string', 'max:30'],
'options.inspection' => ['nullable', 'array'],
'options.inspection.request_date' => ['nullable', 'date'],
'options.inspection.start_date' => ['nullable', 'date'],
'options.inspection.end_date' => ['nullable', 'date'],
'options.site_address' => ['nullable', 'array'],
'options.construction_site' => ['nullable', 'array'],
'options.material_distributor' => ['nullable', 'array'],
'options.contractor' => ['nullable', 'array'],
'options.supervisor' => ['nullable', 'array'],
'order_ids' => ['nullable', 'array'],
'order_ids.*' => ['integer', 'exists:orders,id'],
];
}
public function messages(): array
{
return [
'site_name.required' => __('validation.required', ['attribute' => '현장명']),
];
}
}