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

START TRANSACTION;



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

--
-- Table structure for table `booking_histories`
--

CREATE TABLE `booking_histories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `sub_route_id` bigint(20) UNSIGNED DEFAULT NULL,
  `booking_id` bigint(20) UNSIGNED DEFAULT NULL,
  `agent_id` bigint(20) UNSIGNED DEFAULT NULL,
  `schedule_id` bigint(20) UNSIGNED DEFAULT NULL,
  `seat_id` bigint(20) UNSIGNED DEFAULT NULL,
  `booking_date` date DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `passenger_id` bigint(20) UNSIGNED DEFAULT NULL,
  `fare` decimal(10,2) DEFAULT NULL,
  `fullname` varchar(255) DEFAULT NULL,
  `msisdn` varchar(255) DEFAULT NULL,
  `gender` varchar(255) DEFAULT NULL,
  `gender_id` bigint(20) UNSIGNED DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `txn_ref` varchar(255) DEFAULT NULL,
  `reschedule_id` bigint(20) UNSIGNED DEFAULT NULL,
  `boarding_point_id` bigint(20) UNSIGNED DEFAULT NULL,
  `dropping_point_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reservation_request_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ID_no` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `device_id` varchar(255) DEFAULT NULL,
  `validity` varchar(255) DEFAULT NULL,
  `booking_validity` varchar(255) DEFAULT NULL,
  `board` varchar(255) DEFAULT NULL,
  `drop` varchar(255) DEFAULT NULL,
  `agent_company_configuration_id` bigint(20) UNSIGNED DEFAULT NULL,
  `sub_route_price_commission_configuration_id` bigint(20) UNSIGNED DEFAULT NULL,
  `company` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_histories`
--

INSERT INTO `booking_histories` (`id`, `sub_route_id`, `booking_id`, `agent_id`, `schedule_id`, `seat_id`, `booking_date`, `status`, `user_id`, `passenger_id`, `fare`, `fullname`, `msisdn`, `gender`, `gender_id`, `age`, `reference`, `txn_ref`, `reschedule_id`, `boarding_point_id`, `dropping_point_id`, `reservation_request_id`, `ID_no`, `email`, `device_id`, `validity`, `booking_validity`, `board`, `drop`, `agent_company_configuration_id`, `sub_route_price_commission_configuration_id`, `company`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 1, 1, '2025-06-01', 'confirmed', 1, 1, 15000.00, 'Michael Johnson', '255754321098', 'male', 1, 35, 'REF001', 'TXN123456', NULL, 1, 2, NULL, '123456789', 'michael@example.com', 'DEVICE001', NULL, '2025-06-01', 'Dar Bus Terminal', 'Arusha Bus Terminal', 1, 1, 'Dar Express', '2025-05-30 17:00:00', '2025-05-30 17:00:00'),
(2, 2, 2, 2, 2, 24, '2025-06-02', 'amended', 2, 2, 4800.00, 'Sarah Williams', '255788765432', 'female', 2, 28, 'REF002', 'TXN654321', 57, 3, 4, NULL, '987654321', 'sarah@example.com', 'DEVICE002', NULL, '2025-06-02', 'Moshi Bus Stand', 'Nairobi Terminal', 2, 2, 'Kilimanjaro Express', '2025-05-29 21:30:00', '2025-06-02 15:28:14'),
(3, 2, 3, NULL, 2, 4, '2025-06-01', 'amended', NULL, NULL, NULL, 'Sarah Williams', '255788765432', NULL, NULL, NULL, 'ABRNVIMTBZ', NULL, 14, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, NULL, '2025-06-01 21:16:26', '2025-06-01 21:21:32'),
(4, 2, 4, NULL, 2, 7, '2025-06-01', 'confirmed', NULL, NULL, NULL, 'Sarah Williams', '255788765432', NULL, NULL, NULL, 'ABRULZS9GK', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, NULL, '2025-06-01 21:18:57', '2025-06-01 21:18:57'),
(5, 2, 5, NULL, 2, 8, '2025-06-01', 'confirmed', NULL, NULL, NULL, 'Sarah Williams', '255788765432', NULL, NULL, NULL, 'ABRZTKG7LH', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 2, 2, NULL, '2025-06-01 21:21:32', '2025-06-01 21:21:32');

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

--
-- Table structure for table `booking_history_amendments`
--

CREATE TABLE `booking_history_amendments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(255) NOT NULL,
  `date` date NOT NULL,
  `narrations` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_history_amendments`
--

INSERT INTO `booking_history_amendments` (`id`, `user_id`, `type`, `date`, `narrations`, `created_at`, `updated_at`) VALUES
(1, 1, 'reschedule', '2025-05-30', 'Changed travel date due to passenger request', '2025-05-30 18:00:00', '2025-05-30 18:00:00'),
(2, 2, 'cancel', '2025-05-29', 'Passenger requested cancellation', '2025-05-29 22:00:00', '2025-05-29 22:00:00'),
(10, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 21:16:26', '2025-06-01 21:16:26'),
(12, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 21:18:57', '2025-06-01 21:18:57'),
(14, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 21:21:32', '2025-06-01 21:21:32'),
(28, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:01:18', '2025-06-01 22:01:18'),
(30, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:01:54', '2025-06-01 22:01:54'),
(31, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:04:17', '2025-06-01 22:04:17'),
(45, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:42:34', '2025-06-01 22:42:34'),
(47, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:43:03', '2025-06-01 22:43:03'),
(49, 1, 'RESCHEDULE', '2025-06-01', 'Admin', '2025-06-01 22:43:31', '2025-06-01 22:43:31'),
(50, 1, 'RESCHEDULE', '2025-06-02', 'Admin', '2025-06-02 13:25:44', '2025-06-02 13:25:44'),
(57, 1, 'RESCHEDULE', '2025-06-02', 'reason', '2025-06-02 15:28:13', '2025-06-02 15:28:13');

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

--
-- Table structure for table `booking_history_amendment_items`
--

CREATE TABLE `booking_history_amendment_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `booking_history_amendment_id` bigint(20) UNSIGNED NOT NULL,
  `booking_history_id` bigint(20) UNSIGNED NOT NULL,
  `new_booking_history_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_history_amendment_items`
--

INSERT INTO `booking_history_amendment_items` (`id`, `booking_history_amendment_id`, `booking_history_id`, `new_booking_history_id`, `type`, `created_at`, `updated_at`) VALUES
(8, 10, 2, 3, 'NO_REFUND', '2025-06-01 21:16:26', '2025-06-01 21:16:26'),
(10, 12, 2, 4, 'NO_REFUND', '2025-06-01 21:18:57', '2025-06-01 21:18:57'),
(12, 14, 3, 5, 'NO_REFUND', '2025-06-01 21:21:32', '2025-06-01 21:21:32'),
(26, 28, 2, NULL, 'NO_REFUND', '2025-06-01 22:01:18', '2025-06-01 22:01:18'),
(28, 30, 2, NULL, 'NO_REFUND', '2025-06-01 22:01:54', '2025-06-01 22:01:54'),
(29, 31, 2, NULL, 'NO_REFUND', '2025-06-01 22:04:17', '2025-06-01 22:04:17'),
(43, 45, 2, NULL, 'NO_REFUND', '2025-06-01 22:42:34', '2025-06-01 22:42:34'),
(45, 47, 2, NULL, 'NO_REFUND', '2025-06-01 22:43:03', '2025-06-01 22:43:03'),
(47, 49, 2, NULL, 'NO_REFUND', '2025-06-01 22:43:31', '2025-06-01 22:43:31'),
(48, 50, 2, NULL, 'NO_REFUND', '2025-06-02 13:25:46', '2025-06-02 13:25:46'),
(55, 57, 2, NULL, 'NO_REFUND', '2025-06-02 15:28:14', '2025-06-02 15:28:14');

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

--
-- Table structure for table `buses`
--

CREATE TABLE `buses` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company` varchar(255) NOT NULL,
  `bus_reg_no` varchar(255) NOT NULL,
  `bank_account` varchar(255) DEFAULT NULL,
  `class` varchar(255) DEFAULT NULL,
  `capacity` int(11) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `manufacturer` varchar(255) DEFAULT NULL,
  `seat_order` varchar(255) DEFAULT NULL,
  `seat_naming` varchar(255) DEFAULT NULL,
  `seat_numbering` varchar(255) DEFAULT NULL,
  `image_url` varchar(255) DEFAULT NULL,
  `image_base64` text DEFAULT NULL,
  `make` varchar(255) DEFAULT NULL,
  `model` varchar(255) DEFAULT NULL,
  `model_number` varchar(255) DEFAULT NULL,
  `body_type` varchar(255) DEFAULT NULL,
  `color` varchar(255) DEFAULT NULL,
  `year_manufacture` year(4) DEFAULT NULL,
  `chasis_number` varchar(255) DEFAULT NULL,
  `engine_number` varchar(255) DEFAULT NULL,
  `engine_capacity` varchar(255) DEFAULT NULL,
  `fuel` varchar(255) DEFAULT NULL,
  `axles_number` int(11) DEFAULT NULL,
  `tear_weight` int(11) DEFAULT NULL,
  `gross_weight` int(11) DEFAULT NULL,
  `imported_from` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `buses`
--

INSERT INTO `buses` (`id`, `company`, `bus_reg_no`, `bank_account`, `class`, `capacity`, `status`, `manufacturer`, `seat_order`, `seat_naming`, `seat_numbering`, `image_url`, `image_base64`, `make`, `model`, `model_number`, `body_type`, `color`, `year_manufacture`, `chasis_number`, `engine_number`, `engine_capacity`, `fuel`, `axles_number`, `tear_weight`, `gross_weight`, `imported_from`, `created_at`, `updated_at`) VALUES
(1, 'Dar Express', 'T123ABC', '1234567890', 'Executive', 45, 'active', 'Scania', 'left-right', 'alphabetical', 'sequential', 'https://example.com/bus1.jpg', NULL, 'Scania', 'K320', 'K320IB4x2NB', 'Coach', 'Blue', '2022', 'CHS123456', 'ENG789012', '12.7L', 'Diesel', 2, 18000, 26000, 'Sweden', '2025-01-15 08:00:00', '2025-01-15 08:00:00'),
(2, 'Kilimanjaro Express', 'T456DEF', '0987654321', 'Luxury', 35, 'active', 'Volvo', 'left-right', 'alphabetical', 'sequential', 'https://example.com/bus2.jpg', NULL, 'Volvo', 'B12B', 'B12BLE', 'Coach', 'Red', '2023', 'CHS654321', 'ENG210987', '12.1L', 'Diesel', 2, 17000, 25000, 'Sweden', '2025-02-20 08:00:00', '2025-02-20 08:00:00');

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

--
-- Table structure for table `bus_seats`
--

CREATE TABLE `bus_seats` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `bus` bigint(20) UNSIGNED NOT NULL,
  `seat` varchar(255) NOT NULL,
  `naming` varchar(255) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'available',
  `position` varchar(255) DEFAULT NULL,
  `X` int(11) DEFAULT NULL,
  `Y` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bus_seats`
--

INSERT INTO `bus_seats` (`id`, `bus`, `seat`, `naming`, `status`, `position`, `X`, `Y`, `created_at`, `updated_at`) VALUES
(1, 1, '1', 'A1', 'available', 'left', 10, 20, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(2, 1, '2', 'A2', 'available', 'right', 30, 20, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(3, 1, '3', 'B1', 'available', 'left', 10, 40, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(4, 1, '4', 'B2', 'available', 'right', 30, 40, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(5, 1, '5', 'C1', 'available', 'left', 10, 60, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(6, 1, '6', 'C2', 'available', 'right', 30, 60, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(7, 1, '7', 'D1', 'available', 'left', 10, 80, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(8, 1, '8', 'D2', 'available', 'right', 30, 80, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(9, 1, '9', 'E1', 'available', 'left', 10, 100, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(10, 1, '10', 'E2', 'available', 'right', 30, 100, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(11, 1, '11', 'F1', 'available', 'left', 10, 120, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(12, 1, '12', 'F2', 'available', 'right', 30, 120, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(13, 1, '13', 'G1', 'available', 'left', 10, 140, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(14, 1, '14', 'G2', 'available', 'right', 30, 140, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(15, 1, '15', 'H1', 'available', 'left', 10, 160, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(16, 1, '16', 'H2', 'available', 'right', 30, 160, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(17, 1, '17', 'I1', 'available', 'left', 10, 180, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(18, 1, '18', 'I2', 'available', 'right', 30, 180, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(19, 1, '19', 'J1', 'available', 'left', 10, 200, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(20, 1, '20', 'J2', 'available', 'right', 30, 200, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(21, 1, '21', 'K1', 'available', 'left', 10, 220, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(22, 1, '22', 'K2', 'available', 'right', 30, 220, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(23, 1, '23', 'L1', 'available', 'left', 10, 240, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(24, 1, '24', 'L2', 'available', 'right', 30, 240, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(25, 1, '25', 'M1', 'available', 'left', 10, 260, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(26, 1, '26', 'M2', 'available', 'right', 30, 260, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(27, 1, '27', 'N1', 'available', 'left', 10, 280, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(28, 1, '28', 'N2', 'available', 'right', 30, 280, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(29, 1, '29', 'O1', 'available', 'left', 10, 300, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(30, 1, '30', 'O2', 'available', 'right', 30, 300, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(31, 1, '31', 'P1', 'available', 'left', 10, 320, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(32, 1, '32', 'P2', 'available', 'right', 30, 320, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(33, 1, '33', 'Q1', 'available', 'left', 10, 340, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(34, 1, '34', 'Q2', 'available', 'right', 30, 340, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(35, 1, '35', 'R1', 'available', 'left', 10, 360, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(36, 1, '36', 'R2', 'available', 'right', 30, 360, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(37, 1, '37', 'S1', 'available', 'left', 10, 380, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(38, 1, '38', 'S2', 'available', 'right', 30, 380, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(39, 1, '39', 'T1', 'available', 'left', 10, 400, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(40, 1, '40', 'T2', 'available', 'right', 30, 400, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(41, 1, '41', 'U1', 'available', 'left', 10, 420, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(42, 1, '42', 'U2', 'available', 'right', 30, 420, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(43, 1, '43', 'V1', 'available', 'left', 10, 440, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(44, 1, '44', 'V2', 'available', 'right', 30, 440, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(45, 1, '45', 'W1', 'available', 'left', 10, 460, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(46, 2, '1', 'A1', 'available', 'left', 10, 20, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(47, 2, '2', 'A2', 'available', 'right', 30, 20, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(48, 2, '3', 'B1', 'available', 'left', 10, 40, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(49, 2, '4', 'B2', 'booked', 'right', 30, 40, '2025-06-01 13:23:19', '2025-06-01 21:16:26'),
(50, 2, '5', 'C1', 'booked', 'left', 10, 60, '2025-06-01 13:23:19', '2025-06-01 22:01:19'),
(51, 2, '6', 'C2', 'available', 'right', 30, 60, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(52, 2, '7', 'D1', 'booked', 'left', 10, 80, '2025-06-01 13:23:19', '2025-06-01 21:18:57'),
(53, 2, '8', 'D2', 'booked', 'right', 30, 80, '2025-06-01 13:23:19', '2025-06-01 21:21:32'),
(54, 2, '9', 'E1', 'booked', 'left', 10, 100, '2025-06-01 13:23:19', '2025-06-01 22:43:31'),
(55, 2, '10', 'E2', 'booked', 'right', 30, 100, '2025-06-01 13:23:19', '2025-06-02 13:25:46'),
(56, 2, '11', 'F1', 'available', 'left', 10, 120, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(57, 2, '12', 'F2', 'booked', 'right', 30, 120, '2025-06-01 13:23:19', '2025-06-01 22:01:54'),
(58, 2, '13', 'G1', 'booked', 'left', 10, 140, '2025-06-01 13:23:19', '2025-06-01 22:04:17'),
(59, 2, '14', 'G2', 'booked', 'right', 30, 140, '2025-06-01 13:23:19', '2025-06-01 22:42:34'),
(60, 2, '15', 'H1', 'available', 'left', 10, 160, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(61, 2, '16', 'H2', 'available', 'right', 30, 160, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(62, 2, '17', 'I1', 'available', 'left', 10, 180, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(63, 2, '18', 'I2', 'available', 'right', 30, 180, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(64, 2, '19', 'J1', 'booked', 'left', 10, 200, '2025-06-01 13:23:19', '2025-06-01 22:43:03'),
(65, 2, '20', 'J2', 'available', 'right', 30, 200, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(66, 2, '21', 'K1', 'available', 'left', 10, 220, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(67, 2, '22', 'K2', 'available', 'right', 30, 220, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(68, 2, '23', 'L1', 'available', 'left', 10, 240, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(69, 2, '24', 'L2', 'booked', 'right', 30, 240, '2025-06-01 13:23:19', '2025-06-02 15:28:14'),
(70, 2, '25', 'M1', 'available', 'left', 10, 260, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(71, 2, '26', 'M2', 'available', 'right', 30, 260, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(72, 2, '27', 'N1', 'available', 'left', 10, 280, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(73, 2, '28', 'N2', 'available', 'right', 30, 280, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(74, 2, '29', 'O1', 'available', 'left', 10, 300, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(75, 2, '30', 'O2', 'available', 'right', 30, 300, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(76, 2, '31', 'P1', 'available', 'left', 10, 320, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(77, 2, '32', 'P2', 'available', 'right', 30, 320, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(78, 2, '33', 'Q1', 'available', 'left', 10, 340, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(79, 2, '34', 'Q2', 'available', 'right', 30, 340, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(80, 2, '35', 'R1', 'available', 'left', 10, 360, '2025-06-01 13:23:19', '2025-06-01 13:23:19');

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

--
-- Table structure for table `cities`
--

CREATE TABLE `cities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `city` varchar(255) NOT NULL,
  `region` varchar(255) DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `cities`
--

INSERT INTO `cities` (`id`, `city`, `region`, `status`, `created_at`, `updated_at`) VALUES
(1, 'dar es salaam', 'dar es salaam', 'active', '2025-05-22 11:05:16', '2025-05-28 11:05:16'),
(2, 'moro', 'moro', 'active', '2025-05-15 11:05:16', '2025-05-15 11:05:16'),
(3, 'arush', 'arusha', 'active', '2025-05-22 11:05:16', '2025-05-28 11:05:16'),
(4, 'dodoma', 'dodoma', 'active', '2025-05-15 11:05:16', '2025-05-15 11:05:16');

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

--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `abbreviation` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `domain` text DEFAULT NULL,
  `database_name` text DEFAULT NULL,
  `logo` text DEFAULT NULL,
  `uuid` char(36) NOT NULL,
  `company_id` bigint(20) UNSIGNED DEFAULT NULL,
  `is_group` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `companies`
--

INSERT INTO `companies` (`id`, `user_id`, `name`, `abbreviation`, `type`, `description`, `domain`, `database_name`, `logo`, `uuid`, `company_id`, `is_group`, `created_at`, `updated_at`) VALUES
(1, 1, 'Dar Express', 'DE', 'transport', 'Premium bus service in Tanzania', 'darexpress.com', 'dar_express_db', 'https://example.com/logo1.png', '89dd624e-55d3-4859-ba14-8cc0476dd212', NULL, 0, '2025-01-01 08:00:00', '2025-01-01 08:00:00'),
(2, 2, 'Kilimanjaro Express', 'KE', 'transport', 'Luxury bus service in East Africa', 'kilimanjaroexpress.com', 'kilimanjaro_express_db', 'https://example.com/logo2.png', '16c78879-12d5-43e6-9b06-1a16376c8900', NULL, 0, '2025-01-05 08:00:00', '2025-01-05 08:00:00');

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

--
-- Table structure for table `company_entities`
--

CREATE TABLE `company_entities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company_id` bigint(20) UNSIGNED NOT NULL,
  `entity_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `company_entities`
--

INSERT INTO `company_entities` (`id`, `company_id`, `entity_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '2025-01-01 08:00:00', '2025-01-01 08:00:00'),
(2, 2, 2, '2025-01-05 08:00:00', '2025-01-05 08:00:00');

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

--
-- Table structure for table `countries`
--

CREATE TABLE `countries` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `abbreviation` varchar(3) NOT NULL,
  `phone_code` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `countries`
--

INSERT INTO `countries` (`id`, `name`, `abbreviation`, `phone_code`, `created_at`, `updated_at`) VALUES
(1, 'Tanzania', 'TZ', '255', '2025-01-01 08:00:00', '2025-01-01 08:00:00'),
(2, 'Kenya', 'KE', '254', '2025-01-01 08:00:00', '2025-01-01 08:00:00');

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

--
-- Table structure for table `currencies`
--

CREATE TABLE `currencies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `abbreviation` varchar(3) NOT NULL,
  `symbol` varchar(255) DEFAULT NULL,
  `country_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `currencies`
--

INSERT INTO `currencies` (`id`, `name`, `abbreviation`, `symbol`, `country_id`, `created_at`, `updated_at`) VALUES
(1, 'Tanzanian Shilling', 'TZS', 'TSh', 1, '2025-01-01 08:00:00', '2025-01-01 08:00:00'),
(2, 'Kenyan Shilling', 'KES', 'KSh', 2, '2025-01-01 08:00:00', '2025-01-01 08:00:00');

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2025_05_27_095410_create_companies_table', 1),
(5, '2025_05_27_095535_create_services_table', 1),
(6, '2025_05_27_095616_create_company_entities_table', 1),
(7, '2025_05_27_095726_create_service_permissions_table', 1),
(8, '2025_05_27_095749_create_user_service_permissions_table', 1),
(9, '2025_05_27_095832_create_countries_table', 1),
(10, '2025_05_27_095859_create_currencies_table', 1),
(11, '2025_05_27_095944_create_entities_table', 1),
(12, '2025_05_27_100104_create_entity_categories_table', 1),
(13, '2025_05_27_113235_create_service_roles_table', 1),
(14, '2025_05_27_113500_newaboodv1', 1),
(15, '2025_05_30_132057_create_booking_histories_table', 2),
(16, '2025_05_30_132241_create_booking_history_amendments_table', 2),
(17, '2025_05_30_132254_create_bookings_table', 2),
(18, '2025_05_30_132346_create_schedules_table', 2),
(19, '2025_05_30_132618_create_booking_history_amendment_items_table', 2),
(20, '2025_05_30_132646_create_sub_routes_table', 2),
(21, '2025_05_30_132658_create_routes_table', 2),
(22, '2025_05_30_132731_create_online_payment_booking_histories_table', 2),
(23, '2025_05_30_165443_create_seats_table', 2),
(24, '2025_05_30_165452_create_agents_table', 2),
(25, '2025_05_31_065055_create_buses_table', 2),
(26, '2025_05_31_065151_create_bus_seats_table', 2),
(27, '2025_05_31_065151_create_bus_seats_table ', 3),
(28, '2025_05_31_105659_create_cities_table', 3);

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

--
-- Table structure for table `online_payment_booking_histories`
--

CREATE TABLE `online_payment_booking_histories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `online_payment_id` bigint(20) UNSIGNED NOT NULL,
  `booking_history_id` bigint(20) UNSIGNED NOT NULL,
  `control_number` varchar(255) DEFAULT NULL,
  `reference_number` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `routes`
--

CREATE TABLE `routes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company` varchar(255) NOT NULL,
  `class` varchar(255) NOT NULL,
  `start_point` varchar(255) NOT NULL,
  `end_point` varchar(255) NOT NULL,
  `via` varchar(255) DEFAULT NULL,
  `distance` double DEFAULT NULL,
  `approximate_hours` double DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `code` varchar(255) NOT NULL,
  `route_code` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `routes`
--

INSERT INTO `routes` (`id`, `company`, `class`, `start_point`, `end_point`, `via`, `distance`, `approximate_hours`, `status`, `code`, `route_code`, `created_at`, `updated_at`) VALUES
(1, 'Dar Express', 'Executive', 'Dar es Salaam', 'Arusha', 'Morogoro, Dodoma', 600, 8, 'active', 'DAR-ARU', 'DARARU001', '2025-01-15 08:00:00', '2025-01-15 08:00:00'),
(2, 'Kilimanjaro Express', 'Luxury', 'Moshi', 'Nairobi', 'Arusha, Namanga', 350, 6, 'active', 'MOS-NRB', 'MOSNRB001', '2025-02-20 08:00:00', '2025-02-20 08:00:00');

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

--
-- Table structure for table `schedules`
--

CREATE TABLE `schedules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `route_id` bigint(20) UNSIGNED NOT NULL,
  `bus_id` bigint(20) UNSIGNED NOT NULL,
  `driver_id` bigint(20) UNSIGNED NOT NULL,
  `conductor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `original_bus_terminal_id` bigint(20) UNSIGNED NOT NULL,
  `destination_bus_terminal_id` bigint(20) UNSIGNED NOT NULL,
  `trip_date` date NOT NULL,
  `departure` time NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'scheduled',
  `capacity` int(11) DEFAULT NULL,
  `validity` tinyint(1) NOT NULL DEFAULT 1,
  `offline` tinyint(1) NOT NULL DEFAULT 0,
  `who_offline` bigint(20) UNSIGNED DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `company` varchar(255) DEFAULT NULL,
  `real_bus` bigint(20) UNSIGNED DEFAULT NULL,
  `label` varchar(255) DEFAULT NULL,
  `reportingTime` time DEFAULT NULL,
  `arrival` time DEFAULT NULL,
  `booked_seats` int(11) NOT NULL DEFAULT 0,
  `boarding_status` varchar(255) DEFAULT NULL,
  `collection` decimal(10,2) NOT NULL DEFAULT 0.00,
  `percentage` decimal(5,2) DEFAULT NULL,
  `trip_code` varchar(255) DEFAULT NULL,
  `loading_place` varchar(255) DEFAULT NULL,
  `offloading_place` varchar(255) DEFAULT NULL,
  `distance` decimal(8,2) DEFAULT NULL,
  `customer_name` varchar(255) DEFAULT NULL,
  `customer_phone` varchar(255) DEFAULT NULL,
  `customer_address` varchar(255) DEFAULT NULL,
  `customer_email` varchar(255) DEFAULT NULL,
  `prepared_by` varchar(255) DEFAULT NULL,
  `remarks` text DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `rate` decimal(8,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `schedules`
--

INSERT INTO `schedules` (`id`, `route_id`, `bus_id`, `driver_id`, `conductor_id`, `original_bus_terminal_id`, `destination_bus_terminal_id`, `trip_date`, `departure`, `status`, `capacity`, `validity`, `offline`, `who_offline`, `created_by`, `company`, `real_bus`, `label`, `reportingTime`, `arrival`, `booked_seats`, `boarding_status`, `collection`, `percentage`, `trip_code`, `loading_place`, `offloading_place`, `distance`, `customer_name`, `customer_phone`, `customer_address`, `customer_email`, `prepared_by`, `remarks`, `type`, `rate`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 1, 1, 2, '2025-06-01', '08:00:00', 'scheduled', 45, 1, 0, NULL, 1, 'Dar Express', 1, 'Morning Express', '07:00:00', '16:00:00', 1, 'boarding', 15000.00, 100.00, 'TRIP001', 'Dar Main Terminal', 'Arusha Terminal', 600.00, NULL, NULL, NULL, NULL, 'John Doe', 'Regular schedule', 'regular', NULL, '2025-05-30 07:00:00', '2025-05-30 07:00:00'),
(2, 2, 2, 2, 2, 3, 4, '2025-06-24', '09:00:00', 'scheduled', 35, 1, 0, NULL, 2, 'Kilimanjaro Express', 2, 'Luxury Service', '08:00:00', '15:00:00', 1, 'boarding', 12000.00, 100.00, 'TRIP002', 'Moshi Stand', 'Nairobi Terminal', 350.00, NULL, NULL, NULL, NULL, 'Jane Smith', 'International trip', 'international', NULL, '2025-05-29 07:00:00', '2025-06-01 22:43:31');

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

--
-- Table structure for table `seats`
--

CREATE TABLE `seats` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `seats`
--

INSERT INTO `seats` (`id`, `created_at`, `updated_at`) VALUES
(1, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(2, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(3, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(4, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(5, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(6, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(7, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(8, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(9, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(10, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(11, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(12, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(13, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(14, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(15, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(16, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(17, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(18, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(19, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(20, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(21, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(22, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(23, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(24, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(25, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(26, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(27, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(28, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(29, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(30, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(31, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(32, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(33, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(34, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(35, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(36, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(37, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(38, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(39, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(40, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(41, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(42, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(43, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(44, '2025-06-01 13:23:19', '2025-06-01 13:23:19'),
(45, '2025-06-01 13:23:19', '2025-06-01 13:23:19');

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

--
-- Table structure for table `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('34joyzmVnJ6d4KXDLl5igxWeANI2egWrhndMgzs6', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiaklKWHFvWlpkd25mRWlyT0l4YWcyVUN0ejY5aFVpbTI2eldSaFFUTSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1748347547),
('7Dw9HH8KLr56R4PWU3Aelvw0UxE5mdMbtHi7WcZj', NULL, '127.0.0.1', 'PostmanRuntime/7.39.1', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiWWdVTHU0QzFSU3FlTmMwUXl2V01KVmx4REQxM0lDc2tjRTBxdVRKUCI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1748348693),
('y8x0SvcgHrEQzKMidxt6lxEFcPlWyOQiBa3IOeTI', NULL, '127.0.0.1', 'PostmanRuntime/7.39.1', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoibnZncUs5QmhjRkY3MWMzWjh4am5GUnpFZ2ZqNTJSR0VZdTFEelJoRSI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1748358679);

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

--
-- Table structure for table `sub_routes`
--

CREATE TABLE `sub_routes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `company` varchar(255) NOT NULL,
  `timeout` int(11) NOT NULL,
  `fixedCommission` decimal(8,2) NOT NULL,
  `class` varchar(255) NOT NULL,
  `route` varchar(255) NOT NULL,
  `pointA` varchar(255) NOT NULL,
  `pointB` varchar(255) NOT NULL,
  `distance` double NOT NULL,
  `duration` int(11) NOT NULL,
  `code` varchar(255) NOT NULL,
  `price` decimal(8,2) NOT NULL,
  `commission` decimal(8,2) NOT NULL,
  `fare` decimal(8,2) NOT NULL,
  `seat_limit` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `sub_routes`
--

INSERT INTO `sub_routes` (`id`, `company`, `timeout`, `fixedCommission`, `class`, `route`, `pointA`, `pointB`, `distance`, `duration`, `code`, `price`, `commission`, `fare`, `seat_limit`, `created_at`, `updated_at`) VALUES
(1, 'Dar Express', 30, 2000.00, 'Executive', 'Dar-Arusha', 'Dar es Salaam', 'Morogoro', 200, 3, 'DAR-MOR', 5000.00, 1000.00, 6000.00, 45, '2025-01-15 08:00:00', '2025-01-15 08:00:00'),
(2, 'Kilimanjaro Express', 30, 1500.00, 'Luxury', 'Moshi-Nairobi', 'Moshi', 'Arusha', 100, 2, 'MOS-ARU', 4000.00, 800.00, 4800.00, 35, '2025-02-20 08:00:00', '2025-02-20 08:00:00');

--
-- Indexes for table `booking_histories`
--
ALTER TABLE `booking_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `booking_history_amendments`
--
ALTER TABLE `booking_history_amendments`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `booking_history_amendment_items`
--
ALTER TABLE `booking_history_amendment_items`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `buses`
--
ALTER TABLE `buses`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `buses_bus_reg_no_unique` (`bus_reg_no`);

--
-- Indexes for table `bus_seats`
--
ALTER TABLE `bus_seats`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `cities`
--
ALTER TABLE `cities`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `companies`
--
ALTER TABLE `companies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `companies_uuid_unique` (`uuid`);

--
-- Indexes for table `company_entities`
--
ALTER TABLE `company_entities`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `countries`
--
ALTER TABLE `countries`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `countries_name_unique` (`name`),
  ADD UNIQUE KEY `countries_abbreviation_unique` (`abbreviation`);

--
-- Indexes for table `currencies`
--
ALTER TABLE `currencies`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `currencies_name_unique` (`name`),
  ADD UNIQUE KEY `currencies_abbreviation_unique` (`abbreviation`);

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Indexes for table `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `online_payment_booking_histories`
--
ALTER TABLE `online_payment_booking_histories`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `routes`
--
ALTER TABLE `routes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `routes_code_unique` (`code`),
  ADD UNIQUE KEY `routes_route_code_unique` (`route_code`);

--
-- Indexes for table `schedules`
--
ALTER TABLE `schedules`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `seats`
--
ALTER TABLE `seats`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indexes for table `sub_routes`
--
ALTER TABLE `sub_routes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `sub_routes_code_unique` (`code`);

--
-- AUTO_INCREMENT for table `booking_histories`
--
ALTER TABLE `booking_histories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `booking_history_amendments`
--
ALTER TABLE `booking_history_amendments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=58;

--
-- AUTO_INCREMENT for table `booking_history_amendment_items`
--
ALTER TABLE `booking_history_amendment_items`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `buses`
--
ALTER TABLE `buses`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `bus_seats`
--
ALTER TABLE `bus_seats`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=81;

--
-- AUTO_INCREMENT for table `cities`
--
ALTER TABLE `cities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `companies`
--
ALTER TABLE `companies`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `company_entities`
--
ALTER TABLE `company_entities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `countries`
--
ALTER TABLE `countries`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `currencies`
--
ALTER TABLE `currencies`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=29;

--
-- AUTO_INCREMENT for table `online_payment_booking_histories`
--
ALTER TABLE `online_payment_booking_histories`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `routes`
--
ALTER TABLE `routes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `schedules`
--
ALTER TABLE `schedules`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `seats`
--
ALTER TABLE `seats`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=46;

--
-- AUTO_INCREMENT for table `sub_routes`
--
ALTER TABLE `sub_routes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;

