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:
2025-12-26 15:45:33 +09:00
parent 84cce6742e
commit 43ccd1e6e0
8 changed files with 1039 additions and 0 deletions

View File

@@ -0,0 +1,43 @@
<?php
namespace App\Http\Requests\V1\Receiving;
use Illuminate\Foundation\Http\FormRequest;
class StoreReceivingRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'order_no' => ['nullable', 'string', 'max:30'],
'order_date' => ['nullable', 'date'],
'item_id' => ['nullable', 'integer'],
'item_code' => ['required', 'string', 'max:50'],
'item_name' => ['required', 'string', 'max:200'],
'specification' => ['nullable', 'string', 'max:200'],
'supplier' => ['required', 'string', 'max:100'],
'order_qty' => ['required', 'numeric', 'min:0'],
'order_unit' => ['nullable', 'string', 'max:20'],
'due_date' => ['nullable', 'date'],
'status' => ['nullable', 'string', 'in:order_completed,shipping,inspection_pending,receiving_pending'],
'remark' => ['nullable', 'string', 'max:1000'],
];
}
public function messages(): array
{
return [
'item_code.required' => __('validation.required', ['attribute' => '품목코드']),
'item_name.required' => __('validation.required', ['attribute' => '품목명']),
'supplier.required' => __('validation.required', ['attribute' => '공급업체']),
'order_qty.required' => __('validation.required', ['attribute' => '발주수량']),
'order_qty.numeric' => __('validation.numeric', ['attribute' => '발주수량']),
'order_qty.min' => __('validation.min.numeric', ['attribute' => '발주수량', 'min' => 0]),
];
}
}