INSERT INTO campaigns (title, description, image_url, price_per_number, total_numbers, prize_numbers, status)
VALUES (
  'Pix Premiado Especial',
  'Campanha demonstrativa com reserva em tempo real, Pix e painel administrativo.',
  'https://images.unsplash.com/photo-1513151233558-d860c5398176?auto=format&fit=crop&w=900&q=80',
  1.99,
  300,
  '7,77,177',
  'active'
);

SET @campaign_id = LAST_INSERT_ID();

INSERT INTO campaign_numbers (campaign_id, number, status)
SELECT @campaign_id, seq.n, 'available'
FROM (
  SELECT a.N + b.N * 10 + c.N * 100 + 1 n
  FROM (SELECT 0 N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) a
  CROSS JOIN (SELECT 0 N UNION ALL SELECT 1 UNION ALL SELECT 2 UNION ALL SELECT 3 UNION ALL SELECT 4 UNION ALL SELECT 5 UNION ALL SELECT 6 UNION ALL SELECT 7 UNION ALL SELECT 8 UNION ALL SELECT 9) b
  CROSS JOIN (SELECT 0 N UNION ALL SELECT 1 UNION ALL SELECT 2) c
) seq
WHERE seq.n <= 300;
