fix: correct service methods and add inventory schema model

Services:
- admin_service: Add source_url to import job response, fix vendor_name
  to use vendor.name relationship instead of vendor_name field
- marketplace_product_service: Include reserved_quantity and
  available_quantity in InventoryLocationResponse
- vendor_service: Fix _get_product_by_id_or_raise to use database ID
  (int) instead of marketplace_product_id (str)

Schema:
- Add InventorySummaryResponse model for marketplace product service

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-12-05 21:41:33 +01:00
parent 1bbbd5d4d7
commit 50cb4b0985
4 changed files with 18 additions and 6 deletions

View File

@@ -845,9 +845,10 @@ class AdminService:
job_id=job.id,
status=job.status,
marketplace=job.marketplace,
source_url=job.source_url,
vendor_id=job.vendor.id if job.vendor else None,
vendor_code=job.vendor.vendor_code if job.vendor else None,
vendor_name=job.vendor_name,
vendor_name=job.vendor.name if job.vendor else None,
imported=job.imported_count or 0,
updated=job.updated_count or 0,
total_processed=job.total_processed or 0,