- ReceivingController: CRUD 및 목록 조회 API - ReceivingService: 입고 비즈니스 로직 - Receiving 모델: 다중 테넌트 지원 - FormRequest 검증 클래스 - Swagger 문서화 - receivings 테이블 마이그레이션 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
39 lines
1.3 KiB
PHP
39 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\V1\Receiving;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class UpdateReceivingRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'order_no' => ['nullable', 'string', 'max:30'],
|
|
'order_date' => ['nullable', 'date'],
|
|
'item_code' => ['sometimes', 'string', 'max:50'],
|
|
'item_name' => ['sometimes', 'string', 'max:200'],
|
|
'specification' => ['nullable', 'string', 'max:200'],
|
|
'supplier' => ['sometimes', 'string', 'max:100'],
|
|
'order_qty' => ['sometimes', 'numeric', 'min:0'],
|
|
'order_unit' => ['nullable', 'string', 'max:20'],
|
|
'due_date' => ['nullable', 'date'],
|
|
'status' => ['sometimes', 'string', 'in:order_completed,shipping,inspection_pending,receiving_pending'],
|
|
'remark' => ['nullable', 'string', 'max:1000'],
|
|
];
|
|
}
|
|
|
|
public function messages(): array
|
|
{
|
|
return [
|
|
'order_qty.numeric' => __('validation.numeric', ['attribute' => '발주수량']),
|
|
'order_qty.min' => __('validation.min.numeric', ['attribute' => '발주수량', 'min' => 0]),
|
|
];
|
|
}
|
|
}
|