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

START TRANSACTION;



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

--
-- Table structure for table `admin_transactions`
--

CREATE TABLE `admin_transactions` (
  `id` int(11) NOT NULL,
  `stripeTransactionId` varchar(255) NOT NULL,
  `amount` float NOT NULL,
  `status` varchar(255) NOT NULL,
  `transactionType` varchar(255) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` int(11) NOT NULL,
  `messages` varchar(255) DEFAULT NULL,
  `senderId` int(11) DEFAULT NULL,
  `receiverId` int(11) DEFAULT NULL,
  `jobId` int(55) DEFAULT NULL,
  `userType` int(55) NOT NULL,
  `isReading` int(55) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `chatRoomId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `chat_messages`
--

INSERT INTO `chat_messages` (`id`, `messages`, `senderId`, `receiverId`, `jobId`, `userType`, `isReading`, `createdAt`, `updatedAt`, `chatRoomId`) VALUES
(16, 'Kese ho bhaI ', 7, 8, 13, 2, 1, '2023-05-09 07:43:33', '2023-05-10 05:05:11', 9),
(33, 'HEEELO', 7, 8, 13, 2, 1, '2023-05-09 08:11:01', '2023-05-10 05:05:11', 9),
(34, 'kese hai bhai batana', 7, 8, 13, 2, 0, '2023-05-09 08:11:21', '2023-05-10 05:05:11', 9),
(35, 'kese hai bhai batana', 7, 8, 13, 2, 0, '2023-05-09 08:12:27', '2023-05-10 05:05:11', 9),
(36, 'kese hai bhai batana', 7, 9, 13, 2, 0, '2023-05-09 10:45:56', '2023-05-09 10:45:56', 10),
(37, 'kese hai bhai batana', 7, 10, 13, 2, 0, '2023-05-09 10:46:05', '2023-05-09 10:46:05', 11),
(38, 'kese hai bhai batana', 7, 10, 13, 2, 0, '2023-05-09 12:28:40', '2023-05-09 12:28:40', 11),
(39, 'kese hai bhai batana', 7, 10, 13, 2, 0, '2023-05-09 12:29:00', '2023-05-09 12:29:00', 11),
(40, 'kese hai bhai batana', 7, 8, 13, 1, 1, '2023-05-09 12:29:15', '2023-05-10 05:05:11', 9),
(41, 'hiii', 3, 8, 21, 2, 0, '2023-05-09 12:43:12', '2023-05-09 12:52:21', 16);

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

--
-- Table structure for table `chat_rooms`
--

CREATE TABLE `chat_rooms` (
  `id` int(11) NOT NULL,
  `roomId` int(11) DEFAULT NULL,
  `roomType` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `chat_rooms`
--

INSERT INTO `chat_rooms` (`id`, `roomId`, `roomType`, `createdAt`, `updatedAt`) VALUES
(9, 2992705, 1, '2023-05-09 07:43:33', '2023-05-09 07:43:33'),
(10, 3919782, 1, '2023-05-09 10:45:55', '2023-05-09 10:45:55'),
(11, 3410267, 1, '2023-05-09 10:46:05', '2023-05-09 10:46:05'),
(12, 7464566, 1, '2023-05-09 12:02:25', '2023-05-09 12:02:25'),
(13, 8813952, 1, '2023-05-09 12:08:51', '2023-05-09 12:08:51'),
(14, 2204802, 1, '2023-05-09 12:22:46', '2023-05-09 12:22:46'),
(15, 2045341, 1, '2023-05-09 12:31:04', '2023-05-09 12:31:04'),
(16, 4406167, 1, '2023-05-09 12:39:39', '2023-05-09 12:39:39');

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

--
-- Table structure for table `chat_room_members`
--

CREATE TABLE `chat_room_members` (
  `id` int(11) NOT NULL,
  `senderId` int(55) NOT NULL,
  `receiverId` int(55) NOT NULL,
  `jobId` int(55) NOT NULL,
  `userType` int(55) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `chatRoomId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `chat_room_members`
--

INSERT INTO `chat_room_members` (`id`, `senderId`, `receiverId`, `jobId`, `userType`, `createdAt`, `updatedAt`, `chatRoomId`) VALUES
(6, 7, 8, 13, 2, '2023-05-09 07:43:33', '2023-05-09 07:43:33', 9),
(7, 7, 9, 13, 2, '2023-05-09 10:45:56', '2023-05-09 10:45:56', 10),
(8, 7, 10, 13, 2, '2023-05-09 10:46:05', '2023-05-09 10:46:05', 11),
(9, 10, 9, 13, 1, '2023-05-09 12:02:25', '2023-05-09 12:02:25', 12),
(10, 10, 8, 13, 1, '2023-05-09 12:08:51', '2023-05-09 12:08:51', 13),
(11, 11, 9, 13, 1, '2023-05-09 12:22:46', '2023-05-09 12:22:46', 14),
(12, 3, 7, 20, 2, '2023-05-09 12:31:04', '2023-05-09 12:31:04', 15),
(13, 3, 8, 21, 2, '2023-05-09 12:39:39', '2023-05-09 12:39:39', 16);

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

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` int(11) NOT NULL,
  `comment` varchar(255) DEFAULT NULL,
  `rating` float DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `jobId` int(11) DEFAULT NULL,
  `userId` int(11) DEFAULT NULL,
  `senderId` int(11) DEFAULT NULL,
  `driverId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `jobfinds`
--

CREATE TABLE `jobfinds` (
  `id` int(11) NOT NULL,
  `current_location` varchar(255) NOT NULL,
  `current_location_longitude` float NOT NULL,
  `current_location_latitude` float NOT NULL,
  `destination_location` varchar(255) NOT NULL,
  `destination_location_longitude` float NOT NULL,
  `destination_location_latitude` float NOT NULL,
  `pickUpDate` date NOT NULL,
  `isDeleted` int(11) DEFAULT 0,
  `vehicleType` varchar(255) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

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

CREATE TABLE `jobs` (
  `id` int(11) NOT NULL,
  `job_uid` varchar(255) NOT NULL,
  `jobTitle` varchar(255) NOT NULL,
  `pickup_city` varchar(255) NOT NULL,
  `pickUpAddress` varchar(255) NOT NULL,
  `pickUp_latitude` float NOT NULL,
  `pickUp_longitude` float NOT NULL,
  `delivery_city` varchar(255) NOT NULL,
  `deliveryAddress` varchar(255) NOT NULL,
  `delivery_latitude` float NOT NULL,
  `delivery_longitude` float NOT NULL,
  `name` varchar(255) NOT NULL,
  `pickUpDate` date NOT NULL,
  `deliveryDate` date NOT NULL,
  `vehicleType` varchar(255) NOT NULL,
  `parcelImages` varchar(255) DEFAULT NULL,
  `specialNote` varchar(255) NOT NULL,
  `isDeleted` int(11) DEFAULT 0,
  `status` int(11) DEFAULT 0,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `jobs`
--

INSERT INTO `jobs` (`id`, `job_uid`, `jobTitle`, `pickup_city`, `pickUpAddress`, `pickUp_latitude`, `pickUp_longitude`, `delivery_city`, `deliveryAddress`, `delivery_latitude`, `delivery_longitude`, `name`, `pickUpDate`, `deliveryDate`, `vehicleType`, `parcelImages`, `specialNote`, `isDeleted`, `status`, `createdAt`, `updatedAt`, `userId`) VALUES
(1, '810998', 'dummy', 'Surat', 'Mota Varachha, Surat, Gujarat, India', 21.2408, 21.2408, 'Surat', 'Katargam, Surat, Gujarat, India', 21.2266, 21.2266, 'urvi nandvana', '2023-05-05', '2023-05-15', 'car', NULL, 'please carefuly', 0, 4, '2023-05-05 04:59:29', '2023-05-05 06:23:31', 7),
(2, '208686', 'Telescope ', 'Surat', 'Mota Varachha, Surat, Gujarat, India', 21.2408, 21.2408, 'Surat', 'Katargam, Surat, Gujarat, India', 21.2266, 21.2266, 'hemal', '2023-05-10', '2023-05-11', 'car', NULL, 'carefully ', 0, 4, '2023-05-05 06:41:43', '2023-05-05 06:50:23', 7),
(3, '218799', 'Television', 'Surat', 'Katargam, Surat, Gujarat, India', 21.2266, 21.2266, 'Kamrej', 'Kamrej, Gujarat, India', 21.2695, 21.2695, 'testData', '2023-05-15', '2023-05-16', 'car', NULL, 'plaese carefully', 0, 4, '2023-05-08 03:47:09', '2023-05-08 06:01:30', 8),
(4, '973174', 'Doggy', 'Ahmedabad', 'Ahmedabad, Gujarat, India', 23.0225, 23.0225, 'Adhewada', 'Bhavnagar, Gujarat, India', 21.7645, 21.7645, 'test', '2023-05-24', '2023-05-25', 'car', NULL, 'Plaese Carefully', 0, 4, '2023-05-08 06:51:24', '2023-05-08 06:54:57', 8),
(5, '563229', 'dummy ', 'Surat', 'Mota Varachha, Surat, Gujarat, India', 21.2408, 21.2408, 'Surat', 'Vesu, Surat, Gujarat, India', 21.1418, 21.1418, 'priya dhorajiya', '2023-05-08', '2023-05-10', 'car', NULL, 'please carefully 🙏', 0, 1, '2023-05-08 07:31:44', '2023-05-08 07:32:38', 8),
(6, '937036', 'Telescope ', 'Surat', 'Katargam, Surat, Gujarat, India', 21.2266, 21.2266, 'Kamrej', 'Kamrej, Gujarat, India', 21.2695, 21.2695, 'test', '2023-05-08', '2023-05-09', 'car', NULL, 'carefully ', 0, 1, '2023-05-08 07:37:19', '2023-05-08 07:38:43', 8),
(7, '667475', 'Ven', 'Ahmedabad', 'Ahmedabad, Gujarat, India', 23.0225, 23.0225, 'Amreli', 'Amreli, Gujarat, India', 21.6015, 21.6015, 'TestData', '2023-05-10', '2023-05-11', 'car', NULL, 'Carefully', 0, 4, '2023-05-08 07:40:38', '2023-05-08 09:16:27', 8),
(8, '326866', 'Computer', 'Ahmedabad', 'Ahmedabad, Gujarat, India', 23.0225, 23.0225, 'Surat', 'Surat, Gujarat, India', 21.1702, 21.1702, 'Test data', '2023-05-10', '2023-05-11', 'car', NULL, 'Carefully', 0, 4, '2023-05-08 09:35:05', '2023-05-08 09:36:12', 8),
(9, '677473', 'Auto', 'Rishikesh', 'Rishikesh, Uttarakhand, India', 30.0869, 30.0869, 'Rajkot', 'Rajkot, Gujarat, India', 22.3039, 22.3039, 'Urviiiii', '2023-05-10', '2023-05-11', 'car', NULL, 'Carefully', 0, 4, '2023-05-08 10:17:53', '2023-05-08 10:19:09', 8),
(10, '364476', 'dummy', 'Surat', 'Katargam, Surat, Gujarat, India', 21.2266, 21.2266, 'Kamrej', 'Kamrej, Gujarat, India', 21.2695, 21.2695, 'prv dev', '2023-05-08', '2023-05-10', 'car', NULL, 'carefully ', 0, 4, '2023-05-08 10:27:09', '2023-05-08 10:28:23', 8),
(11, '101827', 'dummy', 'Surat', 'Vesu, Surat, Gujarat, India', 21.1418, 21.1418, 'Rajkot', 'Rajkot, Gujarat, India', 22.3039, 22.3039, 'prv dev', '2023-05-08', '2023-05-10', 'car', NULL, 'carefully ', 0, 4, '2023-05-08 10:52:37', '2023-05-08 10:53:29', 8),
(12, '771402', 'prv', 'Mumbai', 'Mumbai, Maharashtra, India', 19.076, 19.076, 'Rajkot', 'Rajkot, Gujarat, India', 22.3039, 22.3039, 'prv dev', '2023-05-08', '2023-05-10', 'car', NULL, 'carefully ', 0, 4, '2023-05-08 11:12:45', '2023-05-08 11:13:51', 8),
(13, '772682', 'prv', 'Kullu', 'Himachal Pradesh, India', 32.1024, 32.1024, 'Rajkot', 'Rajkot, Gujarat, India', 22.3039, 22.3039, 'prv dev', '2023-05-08', '2023-05-09', 'car', NULL, 'carefully ', 0, 4, '2023-05-08 11:16:27', '2023-05-08 11:17:15', 8),
(14, '656860', 'job title', 'Mumbai', 'Mumbai, Maharashtra, India', 19.076, 19.076, 'Suratgarh', 'Suratgarh, Rajasthan, India', 29.3219, 29.3219, 'sh dev', '2023-05-08', '2023-05-10', 'car', NULL, 'carefully ', 0, 4, '2023-05-08 11:35:42', '2023-05-08 11:36:45', 8),
(15, '559976', 'TV', 'Vijayawada', 'Vijayawada, Andhra Pradesh, India', 16.5062, 16.5062, 'Varanasi', 'Varanasi, Uttar Pradesh, India', 25.3176, 25.3176, 'prvsh', '2023-05-10', '2023-05-11', 'car', NULL, 'Carefully', 0, 4, '2023-05-08 11:59:01', '2023-05-08 12:03:29', 7),
(16, '644849', 'Phone', 'mumbai', 'mumbai', 21.2367, 72.8792, 'surat', 'surat', 19.0787, 72.85, 'sayog', '2023-08-03', '2023-08-04', 'car', NULL, 'tack care of tv', 0, 0, '2023-05-09 07:33:31', '2023-05-09 07:33:31', 1),
(17, '198666', 'Television ', 'Kolkata', 'Kolkata, West Bengal, India', 22.5726, 22.5726, 'Ayyampuzha', 'Kerala, India', 10.1632, 10.1632, 'prvsh', '2023-05-10', '2023-05-11', 'car', NULL, 'carefully ', 0, 2, '2023-05-09 07:40:17', '2023-05-09 07:42:16', 7),
(18, '634309', 'TV', 'Mumbai', 'Mumbai, Maharashtra, India', 19.076, 19.076, 'Akola', 'Maharashtra, India', 19.7515, 19.7515, 'urvi', '2023-05-10', '2023-05-11', 'car', NULL, 'asd', 0, 4, '2023-05-09 09:25:51', '2023-05-09 09:31:12', 3),
(19, '890292', 'Content', 'Akola', 'Maharashtra, India', 19.7515, 19.7515, 'Manali', 'Manali, Himachal Pradesh, India', 32.2432, 32.2432, 'hml', '2023-05-10', '2023-05-11', 'car', NULL, 'credit', 0, 1, '2023-05-09 09:38:52', '2023-05-09 09:59:31', 3),
(20, '421546', 'Ven', 'Kolkata', 'Kolkata, West Bengal, India', 22.5726, 22.5726, 'Ayyampuzha', 'Kerala, India', 10.1632, 10.1632, 'Pravesh', '2023-05-10', '2023-05-10', 'car', NULL, 'Carefully ', 0, 1, '2023-05-09 10:01:11', '2023-05-09 10:02:19', 7),
(21, '975020', 'Ven', 'Belsar', 'Bihar, India', 25.9644, 25.9644, 'Bengaluru', 'Bengaluru, Karnataka, India', 12.9716, 12.9716, 'Test', '2023-05-15', '2023-05-16', 'car', NULL, 'Carefully', 0, 1, '2023-05-09 12:37:11', '2023-05-09 12:39:33', 8),
(22, '261605', 'Helicopter ', 'Ahmedabad', 'Ahmedabad, Gujarat, India', 23.0225, 23.0225, 'Agra', 'Agra, Uttar Pradesh, India', 27.1767, 27.1767, 'Test', '2023-05-10', '2023-05-10', 'car', NULL, 'Carefully ', 0, 2, '2023-05-10 04:10:57', '2023-05-10 04:13:32', 8);

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

--
-- Table structure for table `job_images`
--

CREATE TABLE `job_images` (
  `id` int(11) NOT NULL,
  `image_name` varchar(255) DEFAULT '0',
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `jobId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `job_images`
--

INSERT INTO `job_images` (`id`, `image_name`, `createdAt`, `updatedAt`, `jobId`) VALUES
(1, 'uploads\\1683262769294_scaled_mailchimp-Hv9CS6KZayQ-unsplash.jpg', '2023-05-05 04:59:29', '2023-05-05 04:59:29', 1),
(2, 'uploads\\1683268903426_scaled_Screenshot_2023-04-26-12-02-09-85_b81a5e84a5dd283bcf78f795df1eec0f.jpg', '2023-05-05 06:41:43', '2023-05-05 06:41:43', 2),
(3, 'uploads\\1683517629680_scaled_images (4).jpg', '2023-05-08 03:47:09', '2023-05-08 03:47:09', 3),
(4, 'uploads\\1683528684473_scaled_images (3).jpg', '2023-05-08 06:51:24', '2023-05-08 06:51:24', 4),
(5, 'uploads\\1683531104016_scaled_Screenshot_2023-04-27-17-53-49-17_b783bf344239542886fee7b48fa4b892.jpg', '2023-05-08 07:31:44', '2023-05-08 07:31:44', 5),
(6, 'uploads\\1683531439127_scaled_Screenshot_2023-04-27-17-53-49-17_b783bf344239542886fee7b48fa4b892.jpg', '2023-05-08 07:37:19', '2023-05-08 07:37:19', 6),
(7, 'uploads\\1683531638843_scaled_images (4).jpg', '2023-05-08 07:40:38', '2023-05-08 07:40:38', 7),
(8, 'uploads\\1683538505802_scaled_images (4).jpg', '2023-05-08 09:35:05', '2023-05-08 09:35:05', 8),
(9, 'uploads\\1683538505808_scaled_images (2).jpg', '2023-05-08 09:35:05', '2023-05-08 09:35:05', 8),
(10, 'uploads\\1683538505833_scaled_images (3).jpg', '2023-05-08 09:35:05', '2023-05-08 09:35:05', 8),
(11, 'uploads\\1683541073624_scaled_images (4).jpg', '2023-05-08 10:17:53', '2023-05-08 10:17:53', 9),
(12, 'uploads\\1683541073630_scaled_images (3).jpg', '2023-05-08 10:17:53', '2023-05-08 10:17:53', 9),
(13, 'uploads\\1683541629141_scaled_IMG_20230507_112532.jpg', '2023-05-08 10:27:09', '2023-05-08 10:27:09', 10),
(14, 'uploads\\1683541629206_scaled_IMG_20230507_113036.jpg', '2023-05-08 10:27:09', '2023-05-08 10:27:09', 10),
(15, 'uploads\\1683543157141_scaled_IMG_20230507_112532.jpg', '2023-05-08 10:52:37', '2023-05-08 10:52:37', 11),
(16, 'uploads\\1683544365096_scaled_IMG_20230507_112532.jpg', '2023-05-08 11:12:45', '2023-05-08 11:12:45', 12),
(17, 'uploads\\1683544587551_scaled_IMG_20230507_113036.jpg', '2023-05-08 11:16:27', '2023-05-08 11:16:27', 13),
(18, 'uploads\\1683545741946_scaled_IMG_20230504_095700.jpg', '2023-05-08 11:35:42', '2023-05-08 11:35:42', 14),
(19, 'uploads\\1683547141028_scaled_images (4).jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(20, 'uploads\\1683547141037_scaled_images (3).jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(21, 'uploads\\1683547141063_scaled_images (2).jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(22, 'uploads\\1683547141074_scaled_images (1).jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(23, 'uploads\\1683547141098_scaled_images.jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(24, 'uploads\\1683547141139_scaled_download.jpg', '2023-05-08 11:59:01', '2023-05-08 11:59:01', 15),
(25, 'uploads\\1683618017617_scaled_Screenshot_2023-04-27-17-53-49-17_b783bf344239542886fee7b48fa4b892.jpg', '2023-05-09 07:40:17', '2023-05-09 07:40:17', 17),
(26, 'uploads\\1683618017684_scaled_Screenshot_2023-04-26-19-19-18-67_9700d251d2eb525b9b0f8dc01c669157.jpg', '2023-05-09 07:40:17', '2023-05-09 07:40:17', 17),
(27, 'uploads\\1683624351435_scaled_images.jpg', '2023-05-09 09:25:51', '2023-05-09 09:25:51', 18),
(28, 'uploads\\1683625132451_scaled_images (3).jpg', '2023-05-09 09:38:52', '2023-05-09 09:38:52', 19),
(29, 'uploads\\1683626471045_scaled_Screenshot_2023-04-26-12-02-09-85_b81a5e84a5dd283bcf78f795df1eec0f.jpg', '2023-05-09 10:01:11', '2023-05-09 10:01:11', 20),
(30, 'uploads\\1683635831542_scaled_Shot_on_camera_2023-05-09T15_46_18_486436.jpg', '2023-05-09 12:37:11', '2023-05-09 12:37:11', 21),
(31, 'uploads\\1683691856502_scaled_Shot_on_camera_2023-05-09T15_46_18_486436.jpg', '2023-05-10 04:10:57', '2023-05-10 04:10:57', 22);

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

--
-- Table structure for table `job_offers`
--

CREATE TABLE `job_offers` (
  `id` int(11) NOT NULL,
  `ammount` float DEFAULT NULL,
  `commissionAmount` float DEFAULT NULL,
  `totalAmount` float DEFAULT NULL,
  `status` int(11) DEFAULT 0,
  `isDeleted` int(11) DEFAULT 0,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `driverId` int(11) DEFAULT NULL,
  `senderId` int(11) DEFAULT NULL,
  `jobId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `job_offers`
--

INSERT INTO `job_offers` (`id`, `ammount`, `commissionAmount`, `totalAmount`, `status`, `isDeleted`, `createdAt`, `updatedAt`, `driverId`, `senderId`, `jobId`) VALUES
(1, 786.6, 87.4, 874, 1, 0, '2023-05-05 06:21:42', '2023-05-05 06:21:43', 7, 7, 1),
(2, 786.6, 87.4, 874, 1, 0, '2023-05-05 06:49:59', '2023-05-05 06:50:00', 7, 7, 2),
(3, 1350, 150, 1500, 1, 0, '2023-05-08 03:49:55', '2023-05-08 03:49:55', 7, 8, 3),
(4, 2272.5, 252.5, 2525, 1, 0, '2023-05-08 06:53:11', '2023-05-08 06:53:12', 7, 8, 4),
(7, 2290.5, 254.5, 2545, 1, 0, '2023-05-08 07:42:52', '2023-05-08 07:42:53', 7, 8, 7),
(8, 786.6, 87.4, 874, 1, 0, '2023-05-08 09:35:59', '2023-05-08 09:35:59', 7, 8, 8),
(9, 786.6, 87.4, 874, 1, 0, '2023-05-08 10:18:49', '2023-05-08 10:18:50', 7, 8, 9),
(10, 786.6, 87.4, 874, 1, 0, '2023-05-08 10:28:08', '2023-05-08 10:28:09', 7, 8, 10),
(11, 786.6, 87.4, 874, 1, 0, '2023-05-08 10:53:16', '2023-05-08 10:53:16', 7, 8, 11),
(12, 7868.7, 874.3, 8743, 1, 0, '2023-05-08 11:13:35', '2023-05-08 11:13:35', 7, 8, 12),
(13, 110.7, 12.3, 123, 1, 0, '2023-05-08 11:17:05', '2023-05-08 11:17:06', 7, 8, 13),
(14, 3328.2, 369.8, 3698, 1, 0, '2023-05-08 11:36:27', '2023-05-08 11:36:27', 8, 8, 14),
(15, 11110.5, 1234.5, 12345, 1, 0, '2023-05-08 12:03:03', '2023-05-08 12:03:03', 8, 7, 15),
(16, 8060.4, 895.6, 8956, 1, 0, '2023-05-09 07:42:01', '2023-05-09 07:42:01', 3, 7, 17),
(17, 11209.5, 1245.5, 12455, 1, 0, '2023-05-09 09:29:54', '2023-05-09 09:29:54', 8, 3, 18),
(18, 2295, 255, 2550, 1, 0, '2023-05-09 09:59:31', '2023-05-09 09:59:32', 7, 3, 19),
(19, 2304, 256, 2560, 1, 0, '2023-05-09 10:02:19', '2023-05-09 10:02:19', 3, 7, 20),
(20, 2250, 250, 2500, 1, 0, '2023-05-09 12:39:33', '2023-05-09 12:39:33', 3, 8, 21),
(21, 2250, 250, 2500, 1, 0, '2023-05-10 04:12:11', '2023-05-10 04:12:11', 3, 8, 22);

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL,
  `fromUserId` int(11) DEFAULT NULL,
  `toUserId` int(11) DEFAULT NULL,
  `content` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `places`
--

CREATE TABLE `places` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `latitude` float NOT NULL,
  `longitude` float NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `track_parcels`
--

CREATE TABLE `track_parcels` (
  `id` int(11) NOT NULL,
  `status` varchar(255) DEFAULT NULL,
  `longitude` float DEFAULT NULL,
  `latitude` float DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `isDeleted` int(11) DEFAULT 0,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `senderId` int(11) DEFAULT NULL,
  `driverId` int(11) DEFAULT NULL,
  `jobId` int(11) DEFAULT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `track_parcels`
--

INSERT INTO `track_parcels` (`id`, `status`, `longitude`, `latitude`, `address`, `isDeleted`, `createdAt`, `updatedAt`, `senderId`, `driverId`, `jobId`, `userId`) VALUES
(1, '0', NULL, NULL, NULL, 0, '2023-05-05 06:21:43', '2023-05-05 06:21:43', 7, 7, 1, NULL),
(2, '1', -122.084, 37.422, ',Unnamed Road,Mountain View, United States', 0, '2023-05-05 06:28:24', '2023-05-05 06:28:24', 7, 7, 1, NULL),
(3, '1', -122.084, 37.422, ',Unnamed Road,Mountain View, United States', 0, '2023-05-05 06:28:29', '2023-05-05 06:28:29', 7, 7, 1, NULL),
(4, '1', -122.084, 37.422, ',Unnamed Road,Mountain View, United States', 0, '2023-05-05 06:28:37', '2023-05-05 06:28:37', 7, 7, 1, NULL),
(5, '4', 72.7113, 21.0892, ',Dumas Village Road,Surat, India', 0, '2023-05-05 06:31:03', '2023-05-05 06:31:03', 7, 7, 1, NULL),
(6, '5', 72.7113, 21.0892, ',Dumas Village Road,Surat, India', 0, '2023-05-05 06:33:45', '2023-05-05 06:33:45', 7, 7, 1, NULL),
(7, '0', NULL, NULL, NULL, 0, '2023-05-05 06:50:00', '2023-05-05 06:50:00', 7, 7, 2, NULL),
(8, '0', NULL, NULL, NULL, 0, '2023-05-08 03:49:55', '2023-05-08 03:49:55', 8, 7, 3, NULL),
(9, '1', 72.8724, 21.1509, 'Dindoli,,Surat, India', 0, '2023-05-08 06:02:16', '2023-05-08 06:02:16', 8, 7, 3, NULL),
(10, '2', 72.8759, 21.1666, 'Godadara,Choryasi Road,Surat, India', 0, '2023-05-08 06:02:42', '2023-05-08 06:02:42', 8, 7, 3, NULL),
(11, '3', 72.8745, 21.1927, 'Magob,,Surat, India', 0, '2023-05-08 06:03:02', '2023-05-08 06:03:02', 8, 7, 3, NULL),
(12, '4', 72.906, 21.2134, ',,Surat, India', 0, '2023-05-08 06:03:33', '2023-05-08 06:03:33', 8, 7, 3, NULL),
(13, '5', 72.8801, 21.2416, 'Mota Varachha,S.G Road,Surat, India', 0, '2023-05-08 06:03:46', '2023-05-08 06:03:46', 8, 7, 3, NULL),
(14, '1', NULL, NULL, NULL, 0, '2023-05-08 06:24:46', '2023-05-08 06:24:46', 1, 2, 1, NULL),
(16, '0', 0, 0, '', 0, '2023-05-08 06:26:13', '2023-05-08 06:26:13', 7, 8, 3, NULL),
(17, '0', NULL, NULL, NULL, 0, '2023-05-08 06:53:12', '2023-05-08 06:53:12', 8, 7, 4, NULL),
(18, '1', 72.8801, 21.2416, 'Mota Varachha,S.G Road,Surat, India', 0, '2023-05-08 06:58:00', '2023-05-08 06:58:00', 8, 7, 4, NULL),
(19, '0', NULL, NULL, NULL, 0, '2023-05-08 07:42:53', '2023-05-08 07:42:53', 8, 7, 7, NULL),
(20, '1', NULL, NULL, NULL, 0, '2023-05-08 09:21:41', '2023-05-08 09:21:41', 7, 8, 3, NULL),
(21, '0', 0, 0, '', 0, '2023-05-08 09:22:25', '2023-05-08 09:22:25', 7, 8, 3, NULL),
(22, '0', 0, 0, '', 0, '2023-05-08 09:22:32', '2023-05-08 09:22:32', 7, 8, 3, NULL),
(23, '0', 0, 0, '', 0, '2023-05-08 09:22:34', '2023-05-08 09:22:34', 7, 8, 3, NULL),
(24, '1', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:23:58', '2023-05-08 09:23:58', 8, 7, 7, NULL),
(25, '2', 72.8712, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:28:37', '2023-05-08 09:28:37', 8, 7, 7, NULL),
(26, '3', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:30:10', '2023-05-08 09:30:10', 8, 7, 7, NULL),
(27, '3', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:30:23', '2023-05-08 09:30:23', 8, 7, 7, NULL),
(28, '3', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:30:24', '2023-05-08 09:30:24', 8, 7, 7, NULL),
(29, '2', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:30:32', '2023-05-08 09:30:32', 8, 7, 4, NULL),
(30, '3', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:32:06', '2023-05-08 09:32:06', 8, 7, 4, NULL),
(31, '4', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:32:07', '2023-05-08 09:32:07', 8, 7, 4, NULL),
(32, '5', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:32:15', '2023-05-08 09:32:15', 8, 7, 4, NULL),
(33, '0', NULL, NULL, NULL, 0, '2023-05-08 09:35:59', '2023-05-08 09:35:59', 8, 7, 8, NULL),
(34, '1', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 09:38:51', '2023-05-08 09:38:51', 8, 7, 8, NULL),
(35, '2', 72.871, 21.2387, '', 0, '2023-05-08 10:13:34', '2023-05-08 10:13:34', 8, 7, 8, NULL),
(36, '3', 72.871, 21.2387, '', 0, '2023-05-08 10:13:37', '2023-05-08 10:13:37', 8, 7, 8, NULL),
(37, '4', 72.871, 21.2387, '', 0, '2023-05-08 10:13:37', '2023-05-08 10:13:37', 8, 7, 8, NULL),
(38, '5', 72.871, 21.2387, '', 0, '2023-05-08 10:13:38', '2023-05-08 10:13:38', 8, 7, 8, NULL),
(39, '0', NULL, NULL, NULL, 0, '2023-05-08 10:18:50', '2023-05-08 10:18:50', 8, 7, 9, NULL),
(40, '1', 72.871, 21.2387, '', 0, '2023-05-08 10:22:39', '2023-05-08 10:22:39', 8, 7, 9, NULL),
(41, '2', 72.871, 21.2387, '', 0, '2023-05-08 10:23:13', '2023-05-08 10:23:13', 8, 7, 9, NULL),
(42, '3', 72.871, 21.2387, '', 0, '2023-05-08 10:23:14', '2023-05-08 10:23:14', 8, 7, 9, NULL),
(43, '4', 72.871, 21.2387, '', 0, '2023-05-08 10:23:15', '2023-05-08 10:23:15', 8, 7, 9, NULL),
(44, '5', 72.871, 21.2387, '', 0, '2023-05-08 10:23:16', '2023-05-08 10:23:16', 8, 7, 9, NULL),
(45, '0', NULL, NULL, NULL, 0, '2023-05-08 10:28:09', '2023-05-08 10:28:09', 8, 7, 10, NULL),
(46, '1', 72.871, 21.2387, '', 0, '2023-05-08 10:28:32', '2023-05-08 10:28:32', 8, 7, 10, NULL),
(47, '2', 72.871, 21.2387, '', 0, '2023-05-08 10:30:51', '2023-05-08 10:30:51', 8, 7, 10, NULL),
(48, '3', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 10:31:36', '2023-05-08 10:31:36', 8, 7, 10, NULL),
(49, '4', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 10:34:51', '2023-05-08 10:34:51', 8, 7, 10, NULL),
(50, '5', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 10:34:53', '2023-05-08 10:34:53', 8, 7, 10, NULL),
(51, '0', NULL, NULL, NULL, 0, '2023-05-08 10:53:16', '2023-05-08 10:53:16', 8, 7, 11, NULL),
(52, '1', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 10:58:36', '2023-05-08 10:58:36', 8, 7, 11, NULL),
(53, '1', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-08 10:58:36', '2023-05-08 10:58:36', 8, 7, 11, NULL),
(54, '3', 78.3325, 21.8793, 'Amla,,Betul, India', 0, '2023-05-08 11:10:54', '2023-05-08 11:10:54', 8, 7, 11, NULL),
(55, '4', 78.3325, 21.8793, 'Amla,,Betul, India', 0, '2023-05-08 11:11:15', '2023-05-08 11:11:15', 8, 7, 11, NULL),
(56, '5', 78.3325, 21.8793, 'Bilhari,,Jabalpur, India', 0, '2023-05-08 11:11:43', '2023-05-08 11:11:43', 8, 7, 11, NULL),
(57, '0', NULL, NULL, NULL, 0, '2023-05-08 11:13:35', '2023-05-08 11:13:35', 8, 7, 12, NULL),
(58, '1', 79.9523, 23.1331, 'Bilhari,,Jabalpur, India', 0, '2023-05-08 11:14:07', '2023-05-08 11:14:07', 8, 7, 12, NULL),
(59, '2', 79.9523, 23.1331, ',,Pakka Bhadwa, India', 0, '2023-05-08 11:14:17', '2023-05-08 11:14:17', 8, 7, 12, NULL),
(60, '3', 79.9523, 23.1331, ',,, Uzbekistan', 0, '2023-05-08 11:14:28', '2023-05-08 11:14:28', 8, 7, 12, NULL),
(61, '4', 79.9523, 23.1331, ',,, Kazakhstan', 0, '2023-05-08 11:14:41', '2023-05-08 11:14:41', 8, 7, 12, NULL),
(62, '5', 79.9523, 23.1331, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:15:03', '2023-05-08 11:15:03', 8, 7, 12, NULL),
(63, '0', NULL, NULL, NULL, 0, '2023-05-08 11:17:06', '2023-05-08 11:17:06', 8, 7, 13, NULL),
(64, '1', 103.527, 1.48203, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:18:42', '2023-05-08 11:18:42', 8, 7, 13, NULL),
(65, '2', 103.527, 1.48203, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:18:49', '2023-05-08 11:18:49', 8, 7, 13, NULL),
(66, '3', 103.527, 1.48203, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:20:02', '2023-05-08 11:20:02', 8, 7, 13, NULL),
(67, '4', 103.527, 1.48203, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:20:27', '2023-05-08 11:20:27', 8, 7, 13, NULL),
(68, '5', 72.871, 21.2386, '', 0, '2023-05-08 11:24:56', '2023-05-08 11:24:56', 8, 7, 13, NULL),
(69, '5', 72.871, 21.2386, '', 0, '2023-05-08 11:24:58', '2023-05-08 11:24:58', 8, 7, 13, NULL),
(70, '0', NULL, NULL, NULL, 0, '2023-05-08 11:36:27', '2023-05-08 11:36:27', 8, 8, 14, NULL),
(71, '1', 103.527, 1.48202, ',,Pekan Nanas, Malaysia', 0, '2023-05-08 11:36:49', '2023-05-08 11:36:49', 8, 8, 14, NULL),
(72, '2', 103.527, 1.48202, 'Tirumakudalnarsipur,,Mysuru, India', 0, '2023-05-08 11:37:40', '2023-05-08 11:37:40', 8, 8, 14, NULL),
(73, '3', 103.527, 1.48202, ',,Gopalpur Narwal, India', 0, '2023-05-08 11:38:16', '2023-05-08 11:38:16', 8, 8, 14, NULL),
(74, '4', 103.527, 1.48202, ',,Chiniot, Pakistan', 0, '2023-05-08 11:38:30', '2023-05-08 11:38:30', 8, 8, 14, NULL),
(75, '5', 103.527, 1.48202, ',,Panagar, India', 0, '2023-05-08 11:38:45', '2023-05-08 11:38:45', 8, 8, 14, NULL),
(76, '0', NULL, NULL, NULL, 0, '2023-05-08 12:03:03', '2023-05-08 12:03:03', 7, 8, 15, NULL),
(77, '1', 72.871, 21.2386, ',,Panagar, India', 0, '2023-05-08 12:03:40', '2023-05-08 12:03:40', 7, 8, 15, NULL),
(78, '2', 72.871, 21.2386, ',,Panagar, India', 0, '2023-05-08 12:03:43', '2023-05-08 12:03:43', 7, 8, 15, NULL),
(79, '3', 72.871, 21.2386, ',,Pipra, India', 0, '2023-05-08 12:03:56', '2023-05-08 12:03:56', 7, 8, 15, NULL),
(80, '4', 72.871, 21.2386, 'Lakhnadon,,Seoni, India', 0, '2023-05-08 12:04:17', '2023-05-08 12:04:17', 7, 8, 15, NULL),
(81, '5', 72.871, 21.2386, ',,Kahani, India', 0, '2023-05-08 12:04:30', '2023-05-08 12:04:30', 7, 8, 15, NULL),
(82, '0', NULL, NULL, NULL, 0, '2023-05-09 07:42:01', '2023-05-09 07:42:01', 7, 3, 17, NULL),
(83, '0', NULL, NULL, NULL, 0, '2023-05-09 09:29:54', '2023-05-09 09:29:54', 3, 8, 18, NULL),
(84, '1', 72.871, 21.2386, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-09 09:33:47', '2023-05-09 09:33:47', 3, 8, 18, NULL),
(85, '2', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-09 09:33:49', '2023-05-09 09:33:49', 3, 8, 18, NULL),
(86, '3', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-09 09:34:32', '2023-05-09 09:34:32', 3, 8, 18, NULL),
(87, '4', 72.871, 21.2387, 'Mota Varachha,Golden City Road,Surat, India', 0, '2023-05-09 09:34:34', '2023-05-09 09:34:34', 3, 8, 18, NULL),
(88, '0', NULL, NULL, NULL, 0, '2023-05-09 09:59:32', '2023-05-09 09:59:32', 3, 7, 19, NULL),
(89, '0', NULL, NULL, NULL, 0, '2023-05-09 10:02:19', '2023-05-09 10:02:19', 7, 3, 20, NULL),
(90, '0', NULL, NULL, NULL, 0, '2023-05-09 12:39:33', '2023-05-09 12:39:33', 8, 3, 21, NULL),
(91, '0', NULL, NULL, NULL, 0, '2023-05-10 04:12:11', '2023-05-10 04:12:11', 8, 3, 22, NULL);

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

--
-- Table structure for table `transactions`
--

CREATE TABLE `transactions` (
  `id` int(11) NOT NULL,
  `transactionType` varchar(255) NOT NULL,
  `amount` float NOT NULL,
  `detail` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `senderId` int(11) DEFAULT NULL,
  `receiverId` int(11) DEFAULT NULL,
  `jobId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `userstatuses`
--

CREATE TABLE `userstatuses` (
  `id` int(11) NOT NULL,
  `status` int(11) DEFAULT 0,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `user_vehicles`
--

CREATE TABLE `user_vehicles` (
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) NOT NULL,
  `vehicleId` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `vehicles`
--

CREATE TABLE `vehicles` (
  `id` int(11) NOT NULL,
  `vehicleType` varchar(255) DEFAULT NULL,
  `vehicleImage` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `wallets`
--

CREATE TABLE `wallets` (
  `id` int(11) NOT NULL,
  `balance` float DEFAULT 0,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `userId` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for table `admin_transactions`
--
ALTER TABLE `admin_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userId` (`userId`);

--
-- Indexes for table `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `receiverId` (`receiverId`),
  ADD KEY `jobId` (`jobId`),
  ADD KEY `chat_messages_ibfk_1` (`chatRoomId`);

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

--
-- Indexes for table `chat_room_members`
--
ALTER TABLE `chat_room_members`
  ADD PRIMARY KEY (`id`),
  ADD KEY `chatRoomId` (`chatRoomId`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `receiverId` (`receiverId`),
  ADD KEY `jobId` (`jobId`);

--
-- Indexes for table `comments`
--
ALTER TABLE `comments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobId` (`jobId`),
  ADD KEY `userId` (`userId`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `driverId` (`driverId`);

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

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

--
-- Indexes for table `job_images`
--
ALTER TABLE `job_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobId` (`jobId`);

--
-- Indexes for table `job_offers`
--
ALTER TABLE `job_offers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `driverId` (`driverId`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `jobId` (`jobId`);

--
-- Indexes for table `messages`
--
ALTER TABLE `messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userId` (`userId`);

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

--
-- Indexes for table `track_parcels`
--
ALTER TABLE `track_parcels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `driverId` (`driverId`),
  ADD KEY `jobId` (`jobId`),
  ADD KEY `userId` (`userId`);

--
-- Indexes for table `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `senderId` (`senderId`),
  ADD KEY `receiverId` (`receiverId`),
  ADD KEY `jobId` (`jobId`);

--
-- Indexes for table `userstatuses`
--
ALTER TABLE `userstatuses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userId` (`userId`);

--
-- Indexes for table `user_vehicles`
--
ALTER TABLE `user_vehicles`
  ADD PRIMARY KEY (`userId`,`vehicleId`),
  ADD KEY `vehicleId` (`vehicleId`);

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

--
-- Indexes for table `wallets`
--
ALTER TABLE `wallets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `userId` (`userId`);

--
-- AUTO_INCREMENT for table `admin_transactions`
--
ALTER TABLE `admin_transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `chat_messages`
--
ALTER TABLE `chat_messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- AUTO_INCREMENT for table `chat_rooms`
--
ALTER TABLE `chat_rooms`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT for table `chat_room_members`
--
ALTER TABLE `chat_room_members`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobfinds`
--
ALTER TABLE `jobfinds`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `job_images`
--
ALTER TABLE `job_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT for table `job_offers`
--
ALTER TABLE `job_offers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `places`
--
ALTER TABLE `places`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `track_parcels`
--
ALTER TABLE `track_parcels`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=92;

--
-- AUTO_INCREMENT for table `transactions`
--
ALTER TABLE `transactions`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `userstatuses`
--
ALTER TABLE `userstatuses`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `vehicles`
--
ALTER TABLE `vehicles`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `wallets`
--
ALTER TABLE `wallets`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `admin_transactions`
--
ALTER TABLE `admin_transactions`
  ADD CONSTRAINT `admin_transactions_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `chat_messages`
--
ALTER TABLE `chat_messages`
  ADD CONSTRAINT `chat_messages_ibfk_1` FOREIGN KEY (`chatRoomId`) REFERENCES `chat_rooms` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `chat_messages_ibfk_2` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `chat_messages_ibfk_3` FOREIGN KEY (`receiverId`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `chat_messages_ibfk_4` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`);

--
-- Constraints for table `chat_room_members`
--
ALTER TABLE `chat_room_members`
  ADD CONSTRAINT `chat_room_members_ibfk_1` FOREIGN KEY (`chatRoomId`) REFERENCES `chat_rooms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `chat_room_members_ibfk_2` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `chat_room_members_ibfk_3` FOREIGN KEY (`receiverId`) REFERENCES `users` (`id`),
  ADD CONSTRAINT `chat_room_members_ibfk_4` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`);

--
-- Constraints for table `comments`
--
ALTER TABLE `comments`
  ADD CONSTRAINT `comments_ibfk_1` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `comments_ibfk_2` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `comments_ibfk_3` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `comments_ibfk_4` FOREIGN KEY (`driverId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `jobs`
--
ALTER TABLE `jobs`
  ADD CONSTRAINT `jobs_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `job_images`
--
ALTER TABLE `job_images`
  ADD CONSTRAINT `job_images_ibfk_1` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `job_offers`
--
ALTER TABLE `job_offers`
  ADD CONSTRAINT `job_offers_ibfk_1` FOREIGN KEY (`driverId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `job_offers_ibfk_2` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `job_offers_ibfk_3` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `messages`
--
ALTER TABLE `messages`
  ADD CONSTRAINT `messages_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `track_parcels`
--
ALTER TABLE `track_parcels`
  ADD CONSTRAINT `track_parcels_ibfk_1` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `track_parcels_ibfk_2` FOREIGN KEY (`driverId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `track_parcels_ibfk_3` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `track_parcels_ibfk_4` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `transactions_ibfk_1` FOREIGN KEY (`senderId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `transactions_ibfk_2` FOREIGN KEY (`receiverId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `transactions_ibfk_3` FOREIGN KEY (`jobId`) REFERENCES `jobs` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `userstatuses`
--
ALTER TABLE `userstatuses`
  ADD CONSTRAINT `userstatuses_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `user_vehicles`
--
ALTER TABLE `user_vehicles`
  ADD CONSTRAINT `user_vehicles_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `user_vehicles_ibfk_2` FOREIGN KEY (`vehicleId`) REFERENCES `vehicles` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `wallets`
--
ALTER TABLE `wallets`
  ADD CONSTRAINT `wallets_ibfk_1` FOREIGN KEY (`userId`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;
COMMIT;

