- bending_items 전용 테이블 생성 (items.options → 정규 컬럼 승격) - bending_models 전용 테이블 생성 (가이드레일/케이스/하단마감재 통합) - bending_data JSON 통합 (별도 테이블 → bending_items.bending_data 컬럼) - bending_item_mappings 테이블 DROP (bending_items.code에 흡수) - BendingItemService/BendingCodeService → BendingItem 모델 전환 - GuiderailModelService component 이미지 자동 복사 - ItemsFileController bending_items/bending_models 폴백 지원 - Swagger 스키마 업데이트
49 lines
1.8 KiB
PHP
49 lines
1.8 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class BendingItemStoreRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'code' => [
|
|
'required', 'string', 'max:50',
|
|
\Illuminate\Validation\Rule::unique('bending_items', 'code')->where('tenant_id', request()->header('X-TENANT-ID', app()->bound('tenant_id') ? app('tenant_id') : 1)),
|
|
],
|
|
'item_name' => 'required|string|max:50',
|
|
'item_sep' => 'required|in:스크린,철재',
|
|
'item_bending' => 'required|string|max:50',
|
|
'material' => 'required|string|max:50',
|
|
'model_UA' => 'nullable|in:인정,비인정',
|
|
'item_spec' => 'nullable|string|max:50',
|
|
'model_name' => 'nullable|string|max:30',
|
|
'search_keyword' => 'nullable|string|max:100',
|
|
'rail_width' => 'nullable|integer',
|
|
'memo' => 'nullable|string|max:500',
|
|
'author' => 'nullable|string|max:50',
|
|
'registration_date' => 'nullable|date',
|
|
// 케이스 전용
|
|
'exit_direction' => 'nullable|string|max:30',
|
|
'front_bottom_width' => 'nullable|integer',
|
|
'box_width' => 'nullable|integer',
|
|
'box_height' => 'nullable|integer',
|
|
// 전개도
|
|
'bendingData' => 'nullable|array',
|
|
'bendingData.*.no' => 'required|integer',
|
|
'bendingData.*.input' => 'required|numeric',
|
|
'bendingData.*.rate' => 'nullable|string',
|
|
'bendingData.*.sum' => 'required|numeric',
|
|
'bendingData.*.color' => 'required|boolean',
|
|
'bendingData.*.aAngle' => 'required|boolean',
|
|
];
|
|
}
|
|
}
|