feat: Items API item_type 기반 통합 조회/삭제 개선
- ItemTypeHelper를 활용한 item_type(FG/PT/SM/RM/CS) → source_table 매핑 - getItem: item_type 파라미터로 products/materials 테이블 자동 결정 - deleteItem: item_type 필수 파라미터 추가 - batchDeleteItems: item_type별 일괄 삭제 지원 - 목록 조회 시 attributes 플랫 전개 - Swagger 문서 업데이트
This commit is contained in:
@@ -14,6 +14,7 @@ public function authorize(): bool
|
||||
public function rules(): array
|
||||
{
|
||||
return [
|
||||
'item_type' => 'required|string|in:FG,PT,SM,RM,CS',
|
||||
'ids' => 'required|array|min:1',
|
||||
'ids.*' => 'required|integer|min:1',
|
||||
];
|
||||
@@ -22,6 +23,8 @@ public function rules(): array
|
||||
public function messages(): array
|
||||
{
|
||||
return [
|
||||
'item_type.required' => '품목 유형은 필수입니다.',
|
||||
'item_type.in' => '품목 유형은 FG, PT, SM, RM, CS 중 하나여야 합니다.',
|
||||
'ids.required' => '삭제할 품목 ID 목록은 필수입니다.',
|
||||
'ids.array' => '품목 ID 목록은 배열이어야 합니다.',
|
||||
'ids.min' => '삭제할 품목을 하나 이상 선택하세요.',
|
||||
|
||||
Reference in New Issue
Block a user