#!/bin/bash

# Create training leads test data for staging

echo "Creating training leads test data..."

# SSH to staging server and run WP-CLI commands
ssh roodev@146.190.76.204 "cd /home/974670.cloudwaysapps.com/uberrxmprk/public_html && cat <<'SQL' | wp db query
INSERT INTO wp_hvac_contact_submissions (trainer_id, trainer_profile_id, first_name, last_name, email, phone, city, state_province, company, message, submission_date, status) VALUES
(1, 1, 'John', 'Smith', 'john.smith@email.com', '555-123-4567', 'Atlanta', 'Georgia', 'ABC Heating & Cooling', 'Looking for advanced HVAC training for my team of 5 technicians. Interested in measureQuick certification training.', '2025-01-15 10:30:00', 'new'),
(1, 1, 'Sarah', 'Johnson', 'sarah.j@company.com', '555-987-6543', 'Birmingham', 'Alabama', 'Johnson HVAC Services', 'We need training on the latest HVAC diagnostic tools. Can you help us with on-site training?', '2025-01-10 14:20:00', 'read'),
(1, 1, 'Mike', 'Davis', 'mike.davis@hvacpros.com', NULL, 'Nashville', 'Tennessee', 'Pro HVAC Solutions', 'Interested in group training for residential HVAC installation best practices.', '2025-01-08 09:15:00', 'new'),
(20, 20, 'Lisa', 'Williams', 'lisa.w@email.com', '555-555-1234', 'Louisville', 'Kentucky', 'Williams Mechanical', 'Looking for commercial HVAC training. We have 8 technicians who need certification.', '2025-01-12 16:45:00', 'replied'),
(20, 20, 'Tom', 'Brown', 'tom.brown@brownhvac.com', '555-444-7890', 'Knoxville', 'Tennessee', 'Brown HVAC & Electric', 'Need training on energy efficiency and heat pump systems for my crew.', '2025-01-05 11:30:00', 'new');
SQL"

echo "✅ Training leads test data created successfully!"
echo ""
echo "Test data includes:"
echo "- 3 leads for user ID 1 (test_trainer)"
echo "- 2 leads for user ID 20 (Joe Medosch)"
echo "- Various statuses: new, read, replied"
echo "- Realistic contact information and messages"