-- Migration 094: Cisco 8K-MPA series + A9K-8HG-FLEX + misc image backfill
-- Models: 8K-MPA-4D, 8K-MPA-16H, 8K-MPA-16Z2D, A9K-8HG-FLEX-FC, A9K-8HG-FLEX-SE,
--         A9K-8HG-FLEX-TR, A9K-400G-DWDM-TR, N9348Y12C-SE1, NC55-36X100G-A-SE,
--         ASR-9000V-24-A, ASR-9000V-DC-E, ASR-9922-RP-TR
-- Sources: manuals.plus (Cisco 8700 HIG figures), networkgenetics.net (BigCommerce),
--          teksavers.com, cisco.com/c/dam, inteleca.com (BigCommerce),
--          stack-systems.com (Magento CDN), it-market.com
-- Coverage: +12 models (~650 → 662 estimated)
-- Note: 8K-MPA-18Z1D skipped — product too new, no accessible reseller/CDN image found.
--       ASR-9000V-24-A uses ASR-9000V-AC image (bundle SKU, identical chassis).
--       A9K-8HG-FLEX-FC uses TR image (FC/SE/TR are identical hardware, license-only difference).
--       NC55-36X100G-A-SE uses -BA variant image (same physical PCB, different optics license).

-- 8K-MPA-4D: manuals.plus Cisco 8700 HIG Figure 4 (88KB PNG, unique PCB photo)
UPDATE switches
SET image_url         = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-4-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = '8K-MPA-4D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- 8K-MPA-16H: manuals.plus Cisco 8700 HIG Figure 7 (91KB PNG, unique PCB photo)
UPDATE switches
SET image_url         = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-7-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = '8K-MPA-16H'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- 8K-MPA-16Z2D: manuals.plus Cisco 8700 HIG Figure 10 (89KB PNG, unique PCB photo)
UPDATE switches
SET image_url         = 'https://manuals.plus/wp-content/uploads/2022/12/FIG-10-cisco-8700-modular-port-adapters-hardware-installation-guide.png',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/8000-series-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = '8K-MPA-16Z2D'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9K-8HG-FLEX-FC: networkgenetics.net BigCommerce CDN (321KB PNG, product-specific front photo)
-- FC/SE/TR are identical hardware units; only the software license differs
UPDATE switches
SET image_url         = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-FC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9K-8HG-FLEX-SE: networkgenetics.net BigCommerce CDN (321KB PNG, same hardware as FC/TR)
UPDATE switches
SET image_url         = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-SE'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9K-8HG-FLEX-TR: networkgenetics.net BigCommerce CDN (321KB PNG, product-specific front photo)
UPDATE switches
SET image_url         = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9599/13077/Screen%5FShot%5F2024-05-16%5Fat%5F12.10.29%5FPM%5F%5F78724.1715879628.png?c=2',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'A9K-8HG-FLEX-TR'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9K-400G-DWDM-TR: eBay CDN (listing 235362894554, confirmed product photo)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/-ZQAAOSwlnhk1e1s/s-l1600.jpg',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'A9K-400G-DWDM-TR'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- N9348Y12C-SE1: eBay CDN (confirmed search "N9348y12c-Se1 for sale", product photo)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/-AwAAeSwJQ1pw~nS/s-l1600.jpg',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/switches/nexus-9000-series-switches/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'N9348Y12C-SE1'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- NC55-36X100G-A-SE: NetworkTigers Shopify CDN (-BA variant, same PCB, confirmed accessible)
UPDATE switches
SET image_url         = 'https://www.networktigers.com/cdn/shop/products/cisco-NC55-36X100G-BA_b1d03df1-d4aa-4f3c-ac8b-699d6d393983.jpg?v=1680584296',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/network-convergence-system-5500-series/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'NC55-36X100G-A-SE'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ASR-9000V-24-A: stack-systems.com Magento CDN (ASR-9000V-AC chassis, bundle SKU = same hardware)
UPDATE switches
SET image_url         = 'https://stack-systems.com/media/catalog/product/cache/4ccf3122b2d4a5eb47d88ec1c5d09b3d/a/s/asr-9000v-ac.jpg',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'ASR-9000V-24-A'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ASR-9000V-DC-E: eBay CDN (search confirmed "Asr-9000v-DC-E Cisco for sale", product photo)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/2IIAAOSwJspii5yf/s-l1600.jpg',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'ASR-9000V-DC-E'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- ASR-9922-RP-TR: networkgenetics.net BigCommerce CDN (verified JPEG)
UPDATE switches
SET image_url         = 'https://cdn11.bigcommerce.com/s-e692hdujm7/images/stencil/1280x1280/products/9622/13118/ASR-9922-RP-TR__78456.1715880012.jpg?c=2',
    product_page_url  = COALESCE(product_page_url, 'https://www.cisco.com/c/en/us/products/routers/asr-9000-series-aggregation-services-routers/index.html'),
    assets_scraped_at = NOW()
WHERE model = 'ASR-9922-RP-TR'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
