- BendingItemController: CRUD + filters 엔드포인트 (pagination 메타 보존) - BendingItemService: items 테이블 item_category=BENDING 필터 기반 - BendingItemResource: options → 최상위 필드 노출 + 계산값(width_sum, bend_count) - FormRequest: Index/Store/Update 유효성 검증 (unique:items,code 포함) - BendingFillOptions: BD-* prefix/분류 속성 자동 보강 커맨드 - BendingImportLegacy: chandj 레거시 전개도(bendingData) 임포트 커맨드 (125/170건 매칭) - ensureContext: Bearer 토큰 없이 X-TENANT-ID 헤더로 컨텍스트 설정
47 lines
1.6 KiB
PHP
47 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace App\Http\Requests\Api\V1;
|
|
|
|
use Illuminate\Foundation\Http\FormRequest;
|
|
|
|
class BendingItemUpdateRequest extends FormRequest
|
|
{
|
|
public function authorize(): bool
|
|
{
|
|
return true;
|
|
}
|
|
|
|
public function rules(): array
|
|
{
|
|
return [
|
|
'code' => 'sometimes|string|max:100',
|
|
'name' => 'sometimes|string|max:200',
|
|
'item_name' => 'sometimes|string|max:50',
|
|
'item_sep' => 'sometimes|in:스크린,철재',
|
|
'item_bending' => 'sometimes|string|max:50',
|
|
'material' => 'sometimes|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',
|
|
];
|
|
}
|
|
}
|