-- Migration 059 — D-Link, Netgear, Check Point, Ruckus (CommScope) product images
--
-- D-Link: dlink.com/-/media/product-pages (official D-Link CMS static files).
--   All URLs return HTTP 200 image/png (2026-04-21).
--
-- Netgear: assets.netgear.com/transform/pdp-desktop (official Netgear CDN).
--   URLs served without extension via content negotiation (JPEG).
--   M4300-96X: cdn.blueally.com/netguardstore CDN (BlueAlly partner site).
--
-- Check Point: No standalone accessible product images on checkpoint.com CDN.
--   Quantum 6800: tecisoft.ca (Canadian reseller, Shopify CDN).
--   Quantum 28000: cdn.blueally.com/checkfirewalls (BlueAlly partner CDN).
--
-- Ruckus (CommScope): productresources.vistancenetworks.com (authorized Ruckus
--   distribution partner CDN). URLs contain stable hash IDs + cache-bust `rand=`
--   param; `rand=` is ignored server-side (cache-bust only). Verified HTTP 200 PNG.

-- ── D-Link ────────────────────────────────────────────────────────────────────

-- DGS-3130-30TS — 24×1G + 6×10G managed enterprise switch
UPDATE switches
SET image_url        = 'https://www.dlink.com/us/en/-/media/product-pages/dgs/3130/dgs_3130_30ts_front.png',
    product_page_url = COALESCE(product_page_url, 'https://www.dlink.com/us/en/products/dgs-3130-30ts-24-port-gigabit-smart-managed-switch'),
    assets_scraped_at = NOW()
WHERE model = 'DGS-3130-30TS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'd-link');

-- DXS-3610-54T — 48×10G + 6×40G/100G managed switch
UPDATE switches
SET image_url        = 'https://www.dlink.com/en/-/media/product-pages/dxs/3610/dxs_3610_54t_a1_front.png',
    product_page_url = COALESCE(product_page_url, 'https://www.dlink.com/en/products/dxs-3610-54t-48-port-10g-managed-switch'),
    assets_scraped_at = NOW()
WHERE model = 'DXS-3610-54T'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'd-link');

-- DMS-3130-30TS — 24×2.5G + 4×10G + 2×25G multi-gig managed switch
UPDATE switches
SET image_url        = 'https://www.dlink.com/us/en/-/media/product-pages/dms/3130-30ts/dms313030tsfront.png',
    product_page_url = COALESCE(product_page_url, 'https://www.dlink.com/us/en/products/dms-3130-30ts-24-port-multigigabit-smart-managed-switch'),
    assets_scraped_at = NOW()
WHERE model = 'DMS-3130-30TS'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'd-link');

-- ── Netgear ───────────────────────────────────────────────────────────────────

-- M4350-48G4XF — 48×1G PoE+ + 4×10G SFP+ smart managed pro switch
UPDATE switches
SET image_url        = 'https://assets.netgear.com/transform/pdp-desktop/a14b80df-13c7-44e9-89e5-c390c70d948c/GSM4352_M4350_G1_779x536',
    product_page_url = COALESCE(product_page_url, 'https://www.netgear.com/business/wired/switches/fully-managed/gsm4352/'),
    assets_scraped_at = NOW()
WHERE model = 'M4350-48G4XF'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'netgear');

-- M4500-32C — 32×100G QSFP28 data center switch
UPDATE switches
SET image_url        = 'https://assets.netgear.com/transform/pdp-desktop/5f30b917-f047-40b5-826c-aced4fb4f55a/M4500-32C_13Sept19_front-png',
    product_page_url = COALESCE(product_page_url, 'https://www.netgear.com/business/wired/switches/fully-managed/m4500-32c/'),
    assets_scraped_at = NOW()
WHERE model = 'M4500-32C'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'netgear');

-- M4300-96X — 96×10G modular managed switch
UPDATE switches
SET image_url        = 'https://cdn.blueally.com/netguardstore/images/switches/managed-switches/m4300/m4300-96x.png',
    product_page_url = COALESCE(product_page_url, 'https://www.netgear.com/business/wired/switches/fully-managed/m4300-96x/'),
    assets_scraped_at = NOW()
WHERE model = 'M4300-96X'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'netgear');

-- ── Check Point ───────────────────────────────────────────────────────────────

-- Quantum 6800 — enterprise next-gen firewall appliance
UPDATE switches
SET image_url        = 'https://www.tecisoft.ca/cdn/shop/files/Check-Point-6800-Security-Gateway-Cpap-Sg6800-Plus.jpg?v=1691035341&width=650',
    product_page_url = COALESCE(product_page_url, 'https://www.checkpoint.com/quantum/network-security-gateways/'),
    assets_scraped_at = NOW()
WHERE model = 'Quantum 6800'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'check-point');

-- Quantum 28000 — high-end datacenter security gateway
UPDATE switches
SET image_url        = 'https://cdn.blueally.com/checkfirewalls/images/appliances/quantum/26000-28000-appliance.png',
    product_page_url = COALESCE(product_page_url, 'https://www.checkpoint.com/quantum/network-security-gateways/'),
    assets_scraped_at = NOW()
WHERE model = 'Quantum 28000'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'check-point');

-- ── Ruckus (CommScope) ────────────────────────────────────────────────────────

-- ICX 7550-48ZP — 48×1G PoE+ + 8×10G/2×40G stackable switch
UPDATE switches
SET image_url        = 'https://productresources.vistancenetworks.com/admin/ImageServer.php?ID=37c208a0c327dfc8504eedc5ee7d7be0efae2c304c3b5e5f390b1fc4735d8925:74837@kbl572&class=Mamfile&rand=fa99e42ab2185343f893d6a1bfc90916&downloadname=ICX7550-48ZP_45R.png&preset=10',
    product_page_url = COALESCE(product_page_url, 'https://www.ruckusnetworks.com/products/switches/icx-series/icx-7550/'),
    assets_scraped_at = NOW()
WHERE model = 'ICX 7550-48ZP'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'ruckus-commscope');

-- ICX 7150-48PF — 48×1G PoE+ compact stackable switch
UPDATE switches
SET image_url        = 'https://productresources.vistancenetworks.com/admin/ImageServer.php?ID=4f1754dc3e113b4b4bff763bdabb7e0b2c1237cabda9b8edb7dbed5fbee186f7:80201@kbl572&class=Mamfile&rand=faaf2d21016a3bf03b933c43f134ed5a&downloadname=icx7150-48pf_right.png&preset=10',
    product_page_url = COALESCE(product_page_url, 'https://www.ruckusnetworks.com/products/switches/icx-series/icx-7150/'),
    assets_scraped_at = NOW()
WHERE model = 'ICX 7150-48PF'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'ruckus-commscope');
