feat: H-1 입고 관리 API 구현
- 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>
This commit is contained in:
36
app/Http/Requests/V1/Receiving/ProcessReceivingRequest.php
Normal file
36
app/Http/Requests/V1/Receiving/ProcessReceivingRequest.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\V1\Receiving;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProcessReceivingRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'receiving_qty' => ['required', 'numeric', 'min:0'],
|
||||
'receiving_date' => ['nullable', 'date'],
|
||||
'lot_no' => ['nullable', 'string', 'max:50'],
|
||||
'supplier_lot' => ['nullable', 'string', 'max:50'],
|
||||
'receiving_location' => ['required', 'string', 'max:100'],
|
||||
'receiving_manager' => ['nullable', 'string', 'max:50'],
|
||||
'remark' => ['nullable', 'string', 'max:1000'],
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'receiving_qty.required' => __('validation.required', ['attribute' => '입고수량']),
|
||||
'receiving_qty.numeric' => __('validation.numeric', ['attribute' => '입고수량']),
|
||||
'receiving_qty.min' => __('validation.min.numeric', ['attribute' => '입고수량', 'min' => 0]),
|
||||
'receiving_location.required' => __('validation.required', ['attribute' => '입고위치']),
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user