INSERT INTO discounts (name, description, type, value, start_date, end_date, status, priority) VALUES
('Individual Monthly Insurance', 'Insurance discount for individual monthly plans', 'fixed', 10.00, '2025-01-01 00:00:00', '2025-12-31 23:59:59', 'active', 1),
('Family Monthly Insurance', 'Insurance discount for family monthly plans', 'fixed', 30.00, '2025-01-01 00:00:00', '2025-12-31 23:59:59', 'active', 1),
('Individual Annual Insurance', 'Insurance discount for individual annual plans', 'fixed', 50.00, '2025-01-01 00:00:00', '2025-12-31 23:59:59', 'active', 1),
('Family Annual Insurance', 'Insurance discount for family annual plans', 'fixed', 100.00, '2025-01-01 00:00:00', '2025-12-31 23:59:59', 'active', 1),
('Single Treatment Insurance', 'Insurance discount for single treatment plans', 'fixed', 30.00, '2025-01-01 00:00:00', '2025-12-31 23:59:59', 'active', 1);

INSERT INTO discount_subscription_plan (discount_id, subscription_plan_id)
SELECT d.id, sp.id 
FROM discounts d
JOIN subscription_plans sp
WHERE (
   (d.name = 'Individual Monthly Insurance' AND sp.name = 'Individual Monthly')
   OR (d.name = 'Family Monthly Insurance' AND sp.name = 'Family Monthly')
   OR (d.name = 'Individual Annual Insurance' AND sp.name = 'Individual Annual')
   OR (d.name = 'Family Annual Insurance' AND sp.name = 'Family Annual')
   OR (d.name = 'Single Treatment Insurance' AND sp.name = 'Single Treatment Plan')
);