

-- Insérer une compagnie de transport de test
INSERT INTO transport_companies (user_id, name, registration_number, phone, email, address, city, country, status, verified_at) VALUES
(3, 'Express Trans Bénin', 'ETB-2024-001', '+229 11 22 33 44', 'contact@expresstrans.bj', 'Avenue Clozel, Cotonou', 'Cotonou', 'Benin', 'active', datetime('now'));

-- Insérer des véhicules de test
INSERT INTO vehicles (company_id, type, brand, model, registration_plate, capacity, year, status, features) VALUES
(1, 'bus', 'Mercedes', 'Sprinter', 'AB-123-CD', 18, 2022, 'active', '["Climatisation", "WiFi", "Prises USB", "Sièges inclinables"]'),
(1, 'minibus', 'Toyota', 'Hiace', 'EF-456-GH', 12, 2021, 'active', '["Climatisation", "Musique"]'),
(1, 'bus', 'Iveco', 'Daily', 'IJ-789-KL', 25, 2023, 'active', '["Climatisation", "WiFi", "Prises USB", "Toilettes", "Télévision"]');

-- Insérer des trajets/routes de test
INSERT INTO routes (company_id, departure_city, arrival_city, distance_km, duration_minutes, base_price, status) VALUES
(1, 'Cotonou', 'Lomé', 150, 150, 15000, 'active'),
(1, 'Cotonou', 'Parakou', 420, 360, 25000, 'active'),
(1, 'Cotonou', 'Abomey', 90, 120, 12000, 'active'),
(1, 'Lomé', 'Accra', 165, 180, 20000, 'active'),
(1, 'Porto-Novo', 'Cotonou', 30, 45, 5000, 'active');

-- Insérer des voyages programmés pour les prochains jours
INSERT INTO trips (route_id, vehicle_id, departure_datetime, arrival_datetime, price, available_seats, status) VALUES
-- Cotonou -> Lomé (aujourd'hui et demain)
(1, 1, datetime('now', '+2 hours'), datetime('now', '+4 hours 30 minutes'), 15000, 16, 'scheduled'),
(1, 2, datetime('now', '+6 hours'), datetime('now', '+8 hours 30 minutes'), 15000, 10, 'scheduled'),
(1, 1, datetime('now', '+1 day', '+8 hours'), datetime('now', '+1 day', '+10 hours 30 minutes'), 15000, 18, 'scheduled'),
(1, 3, datetime('now', '+1 day', '+14 hours'), datetime('now', '+1 day', '+16 hours 30 minutes'), 15000, 25, 'scheduled'),

-- Cotonou -> Parakou
(2, 3, datetime('now', '+4 hours'), datetime('now', '+10 hours'), 25000, 23, 'scheduled'),
(2, 1, datetime('now', '+1 day', '+6 hours'), datetime('now', '+1 day', '+12 hours'), 25000, 16, 'scheduled'),

-- Cotonou -> Abomey
(3, 2, datetime('now', '+1 hours'), datetime('now', '+3 hours'), 12000, 11, 'scheduled'),
(3, 1, datetime('now', '+1 day', '+10 hours'), datetime('now', '+1 day', '+12 hours'), 12000, 18, 'scheduled'),

-- Lomé -> Accra
(4, 1, datetime('now', '+3 hours'), datetime('now', '+6 hours'), 20000, 16, 'scheduled'),
(4, 2, datetime('now', '+1 day', '+12 hours'), datetime('now', '+1 day', '+15 hours'), 20000, 10, 'scheduled'),

-- Porto-Novo -> Cotonou
(5, 2, datetime('now', '+30 minutes'), datetime('now', '+1 hour 15 minutes'), 5000, 12, 'scheduled'),
(5, 1, datetime('now', '+2 hours'), datetime('now', '+2 hours 45 minutes'), 5000, 18, 'scheduled');

-- Insérer quelques réservations de test
INSERT INTO bookings (user_id, trip_id, booking_code, seats_count, total_price, passenger_details, status, payment_status) VALUES
(1, 1, 'GT240101', 2, 30000, '[{"first_name":"Jean","last_name":"Kouassi","phone":"+229 12 34 56 78","age":"adult"},{"first_name":"Marie","last_name":"Kouassi","phone":"+229 12 34 56 78","age":"adult"}]', 'confirmed', 'paid'),
(2, 3, 'GT240102', 1, 15000, '[{"first_name":"Marie","last_name":"Agbodjan","phone":"+229 87 65 43 21","age":"adult"}]', 'pending', 'pending');

-- Insérer des paiements de test
INSERT INTO payments (booking_id, payment_method, amount, currency, transaction_id, status, processed_at) VALUES
(1, 'momo', 30000, 'XOF', 'MTN240101001', 'success', datetime('now', '-1 hour')),
(2, 'momo', 15000, 'XOF', 'MTN240101002', 'pending', NULL);