fix: ItemService newQuery()에 item_type 필터 추가

- 동적 테이블 라우팅에서 item_type 필터 누락 버그 수정
- 모든 item_type이 동일한 결과를 반환하던 문제 해결
- CRUD 테스트 완료 (index/show/store/update/destroy)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-13 23:41:47 +09:00
parent d1afa6e05e
commit 9cc7cd1428

View File

@@ -74,7 +74,9 @@ private function newQuery(string $itemType)
$info = $this->getModelInfoByItemType($itemType);
$modelClass = $info['model'];
return $modelClass::query()->where('tenant_id', $this->tenantId());
return $modelClass::query()
->where('tenant_id', $this->tenantId())
->where('item_type', strtoupper($itemType));
}
/**