feat: [items] 아이템 API 기능 개선
- ItemsController, ItemsBomController, ItemsFileController 수정 - ItemBatchDeleteRequest 추가 - ItemsService 개선 - ItemsApi Swagger 문서 업데이트
This commit is contained in:
33
app/Http/Requests/Item/ItemBatchDeleteRequest.php
Normal file
33
app/Http/Requests/Item/ItemBatchDeleteRequest.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Requests\Item;
|
||||
|
||||
use Illuminate\Foundation\Http\FormRequest;
|
||||
|
||||
class ItemBatchDeleteRequest extends FormRequest
|
||||
{
|
||||
public function authorize(): bool
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'ids' => 'required|array|min:1',
|
||||
'ids.*' => 'required|integer|min:1',
|
||||
];
|
||||
}
|
||||
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'ids.required' => '삭제할 품목 ID 목록은 필수입니다.',
|
||||
'ids.array' => '품목 ID 목록은 배열이어야 합니다.',
|
||||
'ids.min' => '삭제할 품목을 하나 이상 선택하세요.',
|
||||
'ids.*.required' => '품목 ID는 필수입니다.',
|
||||
'ids.*.integer' => '품목 ID는 정수여야 합니다.',
|
||||
'ids.*.min' => '품목 ID는 1 이상이어야 합니다.',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user