-- Migration 098: Cisco ASR 9903 + ASR 9900 line card image backfill
-- Models: A9903-8HG-PEC, A9903-8HG-PEC-FC, A9903-20HG-PEC-FC, A99-12X100GE-FC, A99-32HG-FC
-- Source: eBay CDN (i.ebayimg.com, s-l1600.jpg — confirmed product photos from eBay search results)
-- Coverage: +5 models (663 → 668 estimated, ~98.7%)
-- Notes:
--   A9903-8HG-PEC-FC uses same image as A9903-8HG-PEC (FC = Forward Compatible license; identical hardware)
--   A9903-20HG-PEC-FC uses A9903-20HG-PEC listing image (FC variant = same physical card)
--   RA-B6920-4S: no publicly accessible image found — ragile website unreachable, no eBay/reseller listings
--   8K-MPA-18Z1D: skipped — product too new, no accessible image (confirmed no CDN found)

-- A9903-8HG-PEC: eBay CDN (280KB JPEG, first result for "A9903-8HG-PEC cisco" search)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/74UAAOSw1hJoElDb/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 = 'A9903-8HG-PEC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9903-8HG-PEC-FC: eBay CDN (280KB JPEG, same hardware as A9903-8HG-PEC — FC = license only)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/74UAAOSw1hJoElDb/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 = 'A9903-8HG-PEC-FC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A9903-20HG-PEC-FC: eBay CDN (171KB JPEG, confirmed "CISCO A9903-20HG-PEC ASR 9903 2T Multi-rate Port Expansion Card" listing)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/RMkAAOSwGCFm3zHr/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 = 'A9903-20HG-PEC-FC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A99-12X100GE-FC: eBay CDN (261KB JPEG, consistent result for "A99-12X100GE-FC cisco" search)
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/3zMAAOSwXU9mBJt-/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 = 'A99-12X100GE-FC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');

-- A99-32HG-FC: eBay CDN (302KB JPEG, consistent result from sold listings for "A99-32HG-FC cisco line card")
UPDATE switches
SET image_url         = 'https://i.ebayimg.com/images/g/2iEAAOSwCy5oSvAU/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 = 'A99-32HG-FC'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'cisco');
