USE `nccm2026`;

-- Insert Initial Users / Delegates
INSERT INTO `users` (`id`, `name`, `pin`, `role`, `designation`, `organization`, `category`, `email`, `phone`) VALUES
('DEL-1001', 'Dr. Rajesh Sharma', '101001', 'delegate', 'Vice President - Engineering & Asset Reliability', 'Tata Steel Ltd, Jamshedpur', 'VIP Delegate', 'rajesh.sharma@tatasteel.com', '+91 98351 22341'),
('DEL-1002', 'Prof. Sunita Murthy', '101002', 'delegate', 'Dean of Research & Condition Monitoring Lab', 'IIT Kharagpur', 'Keynote Speaker', 'smurthy@mech.iitkgp.ac.in', '+91 94340 55621'),
('DEL-1003', 'Anand K. Verma', '101003', 'delegate', 'Chief General Manager - Mechanical Maintenance', 'SAIL Bokaro Steel Plant', 'Technical Author', 'averma.bokaro@sail.in', '+91 91234 88712'),
('DEL-1004', 'Dr. Marcus Vance', '101004', 'delegate', 'Director - AI Predictive Diagnostics', 'Siemens Energy Berlin', 'International Delegate', 'marcus.vance@siemens.com', '+49 170 9821345'),
('STAFF-2001', 'Vikramaditya Roy', '202002', 'staff', 'Lead Gate & Scanner Volunteer', 'CMSI Organizing Committee', 'Volunteer Staff', 'vroy.cmsi@nccm2026.co.in', '+91 98355 44102'),
('ADMIN-3001', 'Col. S. K. Mahapatra', '990099', 'admin', 'Chief Convenor & Organizing Secretary', 'NCCM 2026 Secretariat, Tata Steel', 'Organizing Secretary', 'secretary@nccm2026.co.in', '+91 94311 00299')
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`);

-- Insert Conference Agenda / Sessions
INSERT INTO `sessions` (`id`, `day`, `time`, `title`, `speaker`, `speaker_designation`, `track`, `hall`, `status`, `delay_minutes`) VALUES
('SESS-101', 'Day 1', '09:00 - 10:15', 'Inauguration & Presidential Address: Condition Monitoring in Industry 5.0', 'T. V. Narendran & Dr. V. Bhujanga Rao', 'CEO & MD Tata Steel / President CMSI', 'Plenary Keynote', 'Main Auditorium (Ground Floor)', 'completed', 0),
('SESS-102', 'Day 1', '10:30 - 11:45', 'Advanced Vibration Analysis & Acoustic Emission in Rolling Mills', 'Dr. Rajesh Sharma', 'Tata Steel Jamshedpur', 'Vibration Analysis', 'Technical Hall A (First Floor)', 'ongoing', 0),
('SESS-103', 'Day 1', '10:30 - 11:45', 'Machine Learning Models for Bearing Health Prognostics under Non-Stationary Loads', 'Prof. Sunita Murthy', 'IIT Kharagpur', 'AI/ML Predictive', 'Technical Hall B (First Floor)', 'delayed', 15),
('SESS-104', 'Day 1', '12:00 - 13:15', 'Tribology & Online Oil Debris Monitoring in Blast Furnace Gearboxes', 'Anand K. Verma', 'SAIL Bokaro', 'Lubrication & Tribology', 'Technical Hall A (First Floor)', 'upcoming', 0),
('SESS-105', 'Day 1', '14:30 - 16:00', 'Edge AI vs Cloud Architecture for Plant-wide Asset Fleet Monitoring', 'Dr. Marcus Vance', 'Siemens Energy Berlin', 'AI/ML Predictive', 'Main Auditorium (Ground Floor)', 'upcoming', 0),
('SESS-201', 'Day 2', '09:00 - 10:30', 'Thermographic Inspection & Drone-based Non-Destructive Testing in Steel Making', 'K. S. Narayanan', 'BHEL Hyderabad', 'Thermography & NDT', 'Technical Hall A (First Floor)', 'upcoming', 0),
('SESS-202', 'Day 2', '10:45 - 12:15', 'Industry 5.0 Roadmap: Autonomous Maintenance & Digital Twins in Process Plants', 'Panel: Tata Steel, SAIL, L&T, Siemens', 'Moderated by Dr. S. K. Mahapatra', 'Plenary Keynote', 'Main Auditorium (Ground Floor)', 'upcoming', 0)
ON DUPLICATE KEY UPDATE `title` = VALUES(`title`);

-- Insert Transit Shuttles
INSERT INTO `shuttles` (`id`, `route_name`, `from_location`, `to_location`, `next_departure`, `frequency`, `vehicle_no`, `driver_name`, `driver_phone`, `status`) VALUES
('SHUT-01', 'Station Express - Route 1', 'Tatanagar Railway Station', 'United Club Jamshedpur', '10:15 AM', 'Every 20 mins', 'JH-05-CK-1142', 'Ramesh Yadav', '+91 94311 88201', 'On Schedule'),
('SHUT-02', 'Airport Shuttle - Route 2', 'Sonari Airport Terminal', 'United Club Jamshedpur', '11:00 AM', 'Every 45 mins', 'JH-05-BZ-9021', 'Manoj Kumar', '+91 98352 11094', 'On Schedule'),
('SHUT-03', 'Hotel Circuit - Route 3', 'Ginger Hotel / The Sonnet', 'United Club Jamshedpur', '10:30 AM', 'Every 30 mins', 'JH-05-AE-4412', 'Bikash Mahato', '+91 91223 77301', '5 Min Delay'),
('SHUT-04', 'Evening Return Circuit', 'United Club Jamshedpur', 'All Partner Hotels & Station', '05:30 PM', 'Every 15 mins', 'JH-05-CK-8819', 'Sunil Singh', '+91 97714 66290', 'Scheduled')
ON DUPLICATE KEY UPDATE `route_name` = VALUES(`route_name`);

-- Insert Hospitality Meals
INSERT INTO `meals` (`id`, `title`, `meal_type`, `venue`, `time_window`, `menu`, `status`) VALUES
('MEAL-01', 'Welcome High Tea & Registration Breakfast', 'Breakfast', 'Lawn Pavilion & Dining Hall B', '08:00 - 09:15 AM', 'Fresh South Indian Idli-Vada, Masala Poha, Seasonal Fruits, Tata Tea & French Roast Coffee', 'concluded'),
('MEAL-02', 'Grand Networking Buffet Lunch', 'Lunch', 'United Club Banquet Lawn', '01:15 - 02:30 PM', 'Royal Awadhi Biryani, Paneer Lababdar, Dal Makhani, Tandoori Breads, Fresh Salads, Gulab Jamun & Jalebi Rabri', 'now_serving'),
('MEAL-03', 'Evening High Tea & Technical Discussion Break', 'Snacks', 'Dining Hall A & B Terrace', '04:15 - 05:00 PM', 'Assorted Samosa, Paneer Tikka Skewers, Cookies, Green Tea & Darjeeling Masala Chai', 'upcoming'),
('MEAL-04', 'Conference Gala Dinner & Cultural Evening', 'Dinner', 'United Club Main Ballroom', '07:30 - 10:00 PM', 'Continental & Indian Fusion Gala Spread, Live Pasta & Chaat Counter, Chef Special Desserts', 'upcoming')
ON DUPLICATE KEY UPDATE `title` = VALUES(`title`);

-- Insert Campus Wayfinding Venues
INSERT INTO `venues` (`id`, `name`, `floor`, `zone`, `capacity`, `av_facilities`, `description`) VALUES
('VEN-01', 'Main Auditorium (Tata Hall)', 'Ground Floor', 'Zone A - East Wing', 600, '4K Laser Projectors, Surround Line Array Sound, Dual Translation Booths', 'Primary venue for Inaugural ceremonies, Presidential Keynotes, and Plenary sessions.'),
('VEN-02', 'Technical Hall A', 'First Floor', 'Zone B - West Wing', 180, 'Dual LED Displays, Wireless Lapel Audio, Interactive Q&A Podium', 'Dedicated to Vibration Analysis, Acoustics, and Mechanical Tribology technical tracks.'),
('VEN-03', 'Technical Hall B', 'First Floor', 'Zone C - North Wing', 150, 'Smart Interactive Touch Screen, Digital Streaming Hub, Recording Rig', 'Specialized room for AI/ML Predictive Analytics, Condition Monitoring software demos.'),
('VEN-04', 'Exhibition & Sponsor Pavilion', 'Ground Floor', 'Zone D - Center Court', 400, '65 Custom Booths with 3-Phase Power, High-Speed Gigabit WiFi', 'Industry exhibition showcasing real-time sensors, vibration analyzers, and IoT gateways.'),
('VEN-05', 'Delegate Helpdesk & Kit Distribution', 'Ground Floor', 'Main Entrance Foyer', 50, 'Barcode / QR Scanners, Instant Badge Printing Stations', 'On-arrival verification desk, badge collection, transport coordination, and cloakroom.'),
('VEN-06', 'Executive Boardroom', 'First Floor', 'Executive Suite', 35, 'Polycom Video Conference Bar, Executive Leather Seating', 'CMSI National Executive Committee Meeting and VIP speaker lounge.')
ON DUPLICATE KEY UPDATE `name` = VALUES(`name`);

-- Insert Sample Check-in Record for Demo
INSERT INTO `checkins` (`delegate_id`, `scanned_by_staff_id`, `gate`, `kit_collected`) VALUES
('DEL-1001', 'STAFF-2001', 'Main Gate - North', 1);

-- Insert Sample Broadcasts
INSERT INTO `broadcasts` (`title`, `message`, `category`, `priority`, `audience`) VALUES
('Welcome to NCCM 2026', 'Welcome to the National Conference on Condition Monitoring at United Club Jamshedpur. Please keep your Digital Pass handy at all entry gates.', 'announcement', 'normal', 'All Attendees'),
('Technical Session 103 Schedule Update', 'Machine Learning Models for Bearing Prognostics in Hall B is delayed by +15 minutes due to extended Q&A in the opening keynote.', 'schedule', 'high', 'Technical Track Delegates'),
('Buffet Lunch is Now Serving', 'Grand Networking Buffet Lunch is now open at United Club Banquet Lawn until 02:30 PM.', 'announcement', 'normal', 'All Attendees');
