-- Örnek başlangıç verileri
USE transfer_rezervasyon;

-- Şifre: admin123 (bcrypt)
INSERT INTO drivers (full_name, phone, license_no) VALUES
('Mehmet Yılmaz', '0532 111 2233', 'B-123456'),
('Ali Demir', '0533 444 5566', 'B-789012'),
('Hasan Kaya', '0534 777 8899', 'B-345678');

INSERT INTO vehicles (plate, brand_model, capacity) VALUES
('34 ABC 123', 'Mercedes Vito', 8),
('34 XYZ 456', 'Volkswagen Caravelle', 7),
('06 DEF 789', 'BMW 5 Serisi', 4);

-- Varsayılan alan izinleri (şoförler için telefon gizli başlasın)
INSERT INTO field_permissions (target_role, field_key, is_visible) VALUES
('driver', 'passenger_phone', 0),
('driver', 'passenger_first_name', 1),
('driver', 'passenger_last_name', 1),
('driver', 'from_location', 1),
('driver', 'to_location', 1),
('driver', 'arrival_datetime', 1),
('driver', 'flight_code', 1),
('driver', 'notes', 1),
('driver', 'vehicle_id', 1),
('admin', 'passenger_phone', 1),
('admin', 'passenger_first_name', 1),
('admin', 'passenger_last_name', 1),
('admin', 'from_location', 1),
('admin', 'to_location', 1),
('admin', 'arrival_datetime', 1),
('admin', 'flight_code', 1),
('admin', 'notes', 1),
('admin', 'driver_id', 1),
('admin', 'vehicle_id', 1);

-- Örnek rezervasyonlar (bugün ve yarın)
INSERT INTO reservations (
    reservation_date, arrival_datetime,
    passenger_first_name, passenger_last_name, passenger_phone,
    from_location, to_location, flight_code, passenger_count,
    driver_id, vehicle_id, notes, status, created_by
) VALUES
(CURDATE(), CONCAT(CURDATE(), ' 08:30:00'), 'John', 'Smith', '+44 7700 900123', 'İstanbul Havalimanı', 'Taksim Otel', 'TK1980', 2, 1, 1, 'VIP karşılama', 'confirmed', 1),
(CURDATE(), CONCAT(CURDATE(), ' 14:15:00'), 'Ayşe', 'Kara', '0535 222 3344', 'Sabiha Gökçen', 'Kadıköy', 'PC1234', 1, NULL, NULL, 'Şoför atanmadı', 'pending', 1),
(CURDATE(), CONCAT(CURDATE(), ' 22:00:00'), 'Hans', 'Müller', '+49 170 1234567', 'İstanbul Havalimanı', 'Sultanahmet', 'LH1300', 3, 2, 2, '', 'confirmed', 1),
(DATE_ADD(CURDATE(), INTERVAL 1 DAY), CONCAT(DATE_ADD(CURDATE(), INTERVAL 1 DAY), ' 10:00:00'), 'Maria', 'Garcia', '+34 600 111222', 'İstanbul Havalimanı', 'Beşiktaş', 'IB2401', 1, 1, 3, '', 'pending', 1);
