-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `driftly`
--

-- --------------------------------------------------------

--
-- Table structure for table `bookings`
--

CREATE TABLE IF NOT EXISTS `bookings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ride_id` int(11) NOT NULL,
  `passenger_id` int(11) NOT NULL,
  `driver_id` int(11) NOT NULL,
  `status` enum('pending','accepted','rejected','cancelled','completed') NOT NULL DEFAULT 'pending',
  `seats` int(11) NOT NULL DEFAULT '1',
  `total_price` decimal(10,2) NOT NULL DEFAULT '0.00',
  `message` text,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `fk_booking_ride` (`ride_id`),
  KEY `fk_booking_passenger` (`passenger_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

-- --------------------------------------------------------

--
-- Table structure for table `rides`
--

CREATE TABLE IF NOT EXISTS `rides` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `driver_id` int(11) NOT NULL,
  `from_location` varchar(255) NOT NULL,
  `to_location` varchar(255) NOT NULL,
  `departure_time` datetime NOT NULL,
  `available_seats` int(11) NOT NULL DEFAULT '1',
  `price` decimal(10,2) NOT NULL,
  `status` enum('active','completed','cancelled') DEFAULT 'active',
  `description` text,
  `vehicle_id` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_driver_id` (`driver_id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `rides`
--

INSERT INTO `rides` (`id`, `driver_id`, `from_location`, `to_location`, `departure_time`, `available_seats`, `price`, `status`, `description`, `vehicle_id`, `created_at`, `updated_at`) VALUES
(1, 3, 'New York', 'Boston', '2026-05-16 09:11:19', 3, '28.00', 'active', 'Comfortable ride with WiFi and luggage space.', NULL, '2026-05-13 07:11:19', '2026-05-15 07:34:15'),
(2, 5, 'Paris', 'Lyon', '2026-05-17 09:11:19', 2, '42.00', 'active', 'Evening ride with one short break.', NULL, '2026-05-11 07:11:19', '2026-05-15 07:34:15'),
(3, 7, 'Los Angeles', 'San Diego', '2026-05-16 09:11:19', 4, '35.00', 'active', 'SUV vehicle with air conditioning.', NULL, '2026-05-09 07:11:19', '2026-05-15 07:34:15'),
(4, 9, 'Berlin', 'Hamburg', '2026-05-18 09:11:19', 3, '31.00', 'completed', 'Fast highway trip with experienced driver.', NULL, '2026-05-06 07:11:19', '2026-05-15 07:34:15'),
(5, 11, 'London', 'Manchester', '2026-05-17 09:11:19', 2, '26.00', 'active', 'Morning departure from central London.', NULL, '2026-05-04 07:11:19', '2026-05-15 07:34:15'),
(6, 13, 'Milan', 'Rome', '2026-05-19 09:11:19', 3, '47.00', 'cancelled', 'Ride cancelled due to vehicle maintenance.', NULL, '2026-05-01 07:11:19', '2026-05-15 07:34:15'),
(7, 15, 'Amsterdam', 'Brussels', '2026-05-16 09:11:19', 3, '24.00', 'active', 'Pet friendly ride available.', NULL, '2026-04-29 07:11:19', '2026-05-15 07:34:15'),
(8, 17, 'Madrid', 'Barcelona', '2026-05-20 09:11:19', 2, '39.00', 'active', 'Comfort ride with charging ports.', NULL, '2026-04-26 07:11:19', '2026-05-15 07:34:15'),
(9, 19, 'Vienna', 'Prague', '2026-05-17 09:11:19', 4, '29.00', 'completed', 'Weekend shared trip.', NULL, '2026-04-24 07:11:19', '2026-05-15 07:34:15'),
(10, 21, 'Munich', 'Zurich', '2026-05-18 09:11:19', 2, '52.00', 'active', 'Premium business class ride.', NULL, '2026-04-21 07:11:19', '2026-05-15 07:34:15'),
(11, 23, 'Paris', 'Nice', '2026-05-21 09:11:19', 3, '65.00', 'active', 'Long distance trip with scenic stops.', NULL, '2026-04-11 07:11:19', '2026-05-15 07:34:15'),
(12, 25, 'New York', 'Washington', '2026-05-19 09:11:19', 2, '33.00', 'completed', 'Direct ride without additional passengers.', NULL, '2026-04-08 07:11:19', '2026-05-15 07:34:15'),
(13, 27, 'Rome', 'Florence', '2026-05-17 09:11:19', 3, '21.00', 'active', 'Affordable city-to-city transport.', NULL, '2026-04-04 07:11:19', '2026-05-15 07:34:15'),
(14, 29, 'Berlin', 'Cologne', '2026-05-18 09:11:19', 4, '27.00', 'active', 'Shared ride with flexible pickup.', NULL, '2026-04-01 07:11:19', '2026-05-15 07:34:15'),
(15, 31, 'London', 'Liverpool', '2026-05-17 09:11:19', 2, '25.00', 'cancelled', 'Trip cancelled by driver.', NULL, '2026-03-28 08:11:19', '2026-05-15 07:34:15'),
(16, 33, 'Barcelona', 'Valencia', '2026-05-20 09:11:19', 3, '32.00', 'active', 'Comfortable ride with music and AC.', NULL, '2026-03-25 08:11:19', '2026-05-15 07:34:15'),
(17, 35, 'Chicago', 'Detroit', '2026-05-17 09:11:19', 4, '41.00', 'completed', 'Night drive with experienced driver.', NULL, '2026-03-22 08:11:19', '2026-05-15 07:34:15'),
(18, 37, 'Miami', 'Orlando', '2026-05-16 09:11:19', 2, '36.00', 'active', 'Family friendly ride.', NULL, '2026-03-19 08:11:19', '2026-05-15 07:34:15');

-- --------------------------------------------------------

--
-- Table structure for table `settings`
--

CREATE TABLE IF NOT EXISTS `settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_key` varchar(50) NOT NULL,
  `setting_value` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `setting_key`, `setting_value`) VALUES
(1, 'site_name', 'Driftly'),
(2, 'footer_about', 'A modern ride sharing marketplace for riders, drivers and communities.'),
(3, 'footer_copyright', 'All rights reserved.'),
(4, 'support_email', 'support@driftly.com'),
(5, 'facebook_url', '#'),
(6, 'instagram_url', '#'),
(7, 'linkedin_url', '#'),
(8, 'site_font', 'Inter');

-- --------------------------------------------------------

--
-- Table structure for table `testimonials`
--

CREATE TABLE IF NOT EXISTS `testimonials` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT NULL,
  `name` varchar(120) NOT NULL,
  `role` varchar(120) DEFAULT NULL,
  `location` varchar(120) DEFAULT NULL,
  `rating` tinyint(4) NOT NULL DEFAULT '5',
  `comment` text NOT NULL,
  `avatar` varchar(255) DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `idx_user_id` (`user_id`),
  KEY `idx_status` (`status`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `testimonials`
--

INSERT INTO `testimonials` (`id`, `user_id`, `name`, `role`, `location`, `rating`, `comment`, `avatar`, `status`, `created_at`, `updated_at`) VALUES
(1, NULL, 'Emily Carter', 'Frequent traveler', 'New York, USA', 5, 'Driftly made my trip from New York to Boston simple, affordable and comfortable. The booking experience felt smooth from start to finish.', 'https://i.pravatar.cc/150?img=32', 'active', '2026-05-12 07:24:52', '2026-05-15 07:26:16'),
(2, NULL, 'Lucas Martin', 'Driver', 'Paris, France', 5, 'As a driver, I like how easy it is to publish a ride and manage available seats. The platform feels clean and professional.', 'https://i.pravatar.cc/150?img=12', 'active', '2026-05-09 07:24:52', '2026-05-15 07:26:16'),
(3, NULL, 'Sophie Williams', 'Student', 'London, UK', 5, 'I found a ride quickly and saved money compared to other transport options. The whole experience felt safe and reliable.', 'https://i.pravatar.cc/150?img=47', 'active', '2026-05-06 07:24:52', '2026-05-15 07:26:16'),
(4, NULL, 'Daniel Brooks', 'Business traveler', 'Chicago, USA', 4, 'The interface is modern and clear. I could compare rides, see details and book without confusion.', 'https://i.pravatar.cc/150?img=15', 'active', '2026-05-03 07:24:52', '2026-05-15 07:26:16'),
(5, NULL, 'Anna Müller', 'Passenger', 'Berlin, Germany', 5, 'Great experience. The driver was friendly, the ride was on time, and the price was very reasonable.', 'https://i.pravatar.cc/150?img=56', 'active', '2026-04-30 07:24:52', '2026-05-15 07:26:16'),
(6, NULL, 'Marco Rossi', 'Driver', 'Milan, Italy', 5, 'Driftly gives drivers a simple way to earn from empty seats. It is exactly what a modern ride sharing platform should be.', 'https://i.pravatar.cc/150?img=68', 'active', '2026-04-27 07:24:52', '2026-05-15 07:26:16');
COMMIT;

