Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
2026-01-20 21:01:25 +09:00
32 changed files with 5847 additions and 62 deletions

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Requests\Material;
use Illuminate\Foundation\Http\FormRequest;
class MaterialStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'category_id' => 'nullable|integer',
'name' => 'required|string|max:100',
'unit' => 'required|string|max:20',
'is_inspection' => 'nullable|in:Y,N',
'search_tag' => 'nullable|string|max:255',
'remarks' => 'nullable|string|max:500',
'attributes' => 'nullable|array',
'attributes.*.label' => 'required|string|max:50',
'attributes.*.value' => 'required|string|max:100',
'attributes.*.unit' => 'nullable|string|max:20',
'options' => 'nullable|array',
'material_code' => 'nullable|string|max:30',
'specification' => 'nullable|string|max:255',
];
}
}

View File

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Requests\Material;
use Illuminate\Foundation\Http\FormRequest;
class MaterialUpdateRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
'category_id' => 'nullable|integer',
'name' => 'sometimes|string|max:100',
'unit' => 'sometimes|string|max:20',
'is_inspection' => 'nullable|in:Y,N',
'search_tag' => 'nullable|string|max:255',
'remarks' => 'nullable|string|max:500',
'attributes' => 'nullable|array',
'attributes.*.label' => 'required|string|max:50',
'attributes.*.value' => 'required|string|max:100',
'attributes.*.unit' => 'nullable|string|max:20',
'options' => 'nullable|array',
'material_code' => 'nullable|string|max:30',
'specification' => 'nullable|string|max:255',
];
}
}

View File

@@ -0,0 +1,42 @@
<?php
namespace App\Http\Requests\Product;
use Illuminate\Foundation\Http\FormRequest;
class ProductStoreRequest extends FormRequest
{
public function authorize(): bool
{
return true;
}
public function rules(): array
{
return [
// 기본 필드
'code' => 'required|string|max:30',
'name' => 'required|string|max:100',
'unit' => 'nullable|string|max:10',
'category_id' => 'required|integer',
'product_type' => 'required|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',
];
}
}

View 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',
];
}
}