- CreateFromQuoteRequest 검증 규칙 추가 - Order 모델 견적 연동 관계 보강 - OrderService 변환 시 개소별 분리 로직
36 lines
951 B
PHP
36 lines
951 B
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Order;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class CreateFromQuoteRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'delivery_date' => 'nullable|date',
|
|
'memo' => 'nullable|string',
|
|
'delivery_method_code' => 'nullable|string',
|
|
'options' => 'nullable|array',
|
|
'options.receiver' => 'nullable|string',
|
|
'options.receiver_contact' => 'nullable|string',
|
|
'options.shipping_address' => 'nullable|string',
|
|
'options.shipping_address_detail' => 'nullable|string',
|
|
'options.shipping_cost_code' => 'nullable|string',
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'delivery_date.date' => __('validation.date', ['attribute' => '납품일']),
|
|
];
|
|
}
|
|
}
|