feat: 계좌관리 추가
This commit is contained in:
42
app/Http/Requests/Product/ProductUpdateRequest.php
Normal file
42
app/Http/Requests/Product/ProductUpdateRequest.php
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Product;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ProductUpdateRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
// 기본 필드
|
||||
'code' => 'sometimes|string|max:30',
|
||||
'name' => 'sometimes|string|max:100',
|
||||
'unit' => 'nullable|string|max:10',
|
||||
'category_id' => 'sometimes|integer',
|
||||
'product_type' => 'sometimes|string|max:30',
|
||||
'description' => 'nullable|string|max:255',
|
||||
|
||||
// 상태 플래그
|
||||
'is_sellable' => 'nullable|boolean',
|
||||
'is_purchasable' => 'nullable|boolean',
|
||||
'is_producible' => 'nullable|boolean',
|
||||
|
||||
// 하이브리드 구조: 고정 필드
|
||||
'safety_stock' => 'nullable|integer|min:0',
|
||||
'lead_time' => 'nullable|integer|min:0',
|
||||
'is_variable_size' => 'nullable|boolean',
|
||||
'product_category' => 'nullable|string|max:20',
|
||||
'part_type' => 'nullable|string|max:20',
|
||||
|
||||
// 하이브리드 구조: 동적 필드
|
||||
'attributes' => 'nullable|array',
|
||||
'attributes_archive' => 'nullable|array',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user