-- Migration 091: Arista + Juniper SONiC HCL models image backfill
-- Models from SONiC HCL device list (sonic-hcl.ts scraper)
-- Images sourced from NetworkTigers CDN (Shopify, full-res, 40–120KB)
-- Coverage: +7 models (616 → 623 estimated)

-- ============================================================
-- Arista (vendor_id via slug='arista')
-- ============================================================

-- 7060CX-32S: DCS-7060CX-32S-F, NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/products/arista-DCS-7060CX-32S-F.jpg?v=1678387755',
  product_page_url  = COALESCE(product_page_url, 'https://www.arista.com/en/products/7060-series'),
  assets_scraped_at = NOW()
WHERE model = '7060CX-32S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7050QX-32: DCS-7050QX-32-F, NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/arista-DCS-7050QX-32-F.jpg?v=1686070653',
  product_page_url  = COALESCE(product_page_url, 'https://www.arista.com/en/products/7050-series'),
  assets_scraped_at = NOW()
WHERE model = '7050QX-32'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7050QX-32S: DCS-7050QX-32S-F, NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/arista-DCS-7050QX-32S-F.jpg?v=1686070753',
  product_page_url  = COALESCE(product_page_url, 'https://www.arista.com/en/products/7050-series'),
  assets_scraped_at = NOW()
WHERE model = '7050QX-32S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7170-32CD: DCS-7170-32C-F (same chassis as 7170-32CD), NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/arista-DCS-7170-32C-F-new.jpg?v=1753975123',
  product_page_url  = COALESCE(product_page_url, 'https://www.arista.com/en/products/7170-series'),
  assets_scraped_at = NOW()
WHERE model = '7170-32CD'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- 7280CR3-32D4: DCS-7280CR3K-32D4-F (CR3K = same chassis line), NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/arista-DCS-7280CR3K-32D4-F.jpg?v=1755607029',
  product_page_url  = COALESCE(product_page_url, 'https://www.arista.com/en/products/7280r3-series'),
  assets_scraped_at = NOW()
WHERE model = '7280CR3-32D4'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'arista');

-- ============================================================
-- Juniper (vendor_id via slug='juniper')
-- ============================================================

-- QFX5200-32C-S: QFX5200-32C-AFO, NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/juniper-QFX5200-32C-AFO_large.jpg?v=1698348787',
  product_page_url  = COALESCE(product_page_url, 'https://www.juniper.net/us/en/products/switches/qfx-series/qfx5200-ethernet-switch.html'),
  assets_scraped_at = NOW()
WHERE model = 'QFX5200-32C-S'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'juniper');

-- QFX5210-64C: QFX5210-64C-AFO, NetworkTigers CDN
UPDATE switches
SET
  image_url         = 'https://www.networktigers.com/cdn/shop/files/juniper-QFX5210-64C-AFO_f5ae863e-351d-483f-8993-b935e81bf630_large.jpg?v=1737648203',
  product_page_url  = COALESCE(product_page_url, 'https://www.juniper.net/us/en/products/switches/qfx-series/qfx5210-ethernet-switch.html'),
  assets_scraped_at = NOW()
WHERE model = 'QFX5210-64C'
  AND vendor_id = (SELECT id FROM vendors WHERE slug = 'juniper');
