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

START TRANSACTION;



--
-- Database: `logistics`
--

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

--
-- Table structure for table `collection_centers`
--

CREATE TABLE `collection_centers` (
  `id` int(10) NOT NULL,
  `locationLat` decimal(9,6) NOT NULL,
  `locationLong` decimal(9,6) NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `dateCreated` datetime NOT NULL,
  `staff_inchargeID` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `collection_centers`
--

INSERT INTO `collection_centers` (`id`, `locationLat`, `locationLong`, `description`, `dateCreated`, `staff_inchargeID`) VALUES
(1, '-1.067906', '37.050593', 'Witeithie Collection Center.', '2021-01-06 12:27:21', 1),
(2, '-1.105904', '37.017282', 'Juja Collection Centre', '2021-01-06 10:33:30', 2);

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

--
-- Table structure for table `order_a`
--

CREATE TABLE `order_a` (
  `userId` int(15) NOT NULL,
  `locationFromLat` decimal(9,6) NOT NULL,
  `locationFromLong` decimal(9,6) NOT NULL,
  `locationFrom` text COLLATE utf8_unicode_ci NOT NULL,
  `locationTo` text COLLATE utf8_unicode_ci NOT NULL,
  `distanceCovered` double(7,2) NOT NULL,
  `recepientName` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `goodsDescription` text COLLATE utf8_unicode_ci NOT NULL,
  `recipientPhone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
  `recipientLocationLat` decimal(9,6) NOT NULL,
  `recipientLocationLong` decimal(9,6) NOT NULL,
  `pickUpCentreLocationLat` decimal(9,6) NOT NULL,
  `pickUpCentreLocationLong` decimal(9,6) NOT NULL,
  `deliveryCentreLocationLat` decimal(9,6) NOT NULL,
  `deliveryCentreLocationLong` decimal(9,6) NOT NULL,
  `locationFromToPickUpCentreStaffID` int(15) NOT NULL,
  `deliveryCentreToLocationToStaffID` int(15) NOT NULL,
  `locationFromToPickUpCentreCost` decimal(15,2) NOT NULL,
  `deliveryCentreToLocationToCost` decimal(15,2) NOT NULL,
  `statusAId` int(5) NOT NULL,
  `pickUpCentreAgentStaffID` int(15) NOT NULL,
  `deliveryCentreAgentStaffID` int(15) NOT NULL,
  `dateCreated` datetime NOT NULL,
  `id` int(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `order_a`
--

INSERT INTO `order_a` (`userId`, `locationFromLat`, `locationFromLong`, `locationFrom`, `locationTo`, `distanceCovered`, `recepientName`, `goodsDescription`, `recipientPhone`, `recipientLocationLat`, `recipientLocationLong`, `pickUpCentreLocationLat`, `pickUpCentreLocationLong`, `deliveryCentreLocationLat`, `deliveryCentreLocationLong`, `locationFromToPickUpCentreStaffID`, `deliveryCentreToLocationToStaffID`, `locationFromToPickUpCentreCost`, `deliveryCentreToLocationToCost`, `statusAId`, `pickUpCentreAgentStaffID`, `deliveryCentreAgentStaffID`, `dateCreated`, `id`) VALUES
(1, '-1.118525', '37.007898', 'Unnamed Road, Kalimoni, , Kenya', 'Thika', 15.76, '', '', '', '-1.038757', '37.083375', '-1.105904', '37.017282', '-1.067906', '37.050593', 0, 0, '0.00', '0.00', 0, 2, 1, '2021-01-09 16:30:03', 5),
(1, '-1.095103', '37.028810', 'Highpoint juja', 'Thika', 12.98, '', '', '', '-1.038757', '37.083375', '-1.067906', '37.050593', '-1.067906', '37.050593', 0, 0, '0.00', '0.00', 0, 1, 1, '2021-01-09 16:44:41', 6);

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

--
-- Table structure for table `order_status_a`
--

CREATE TABLE `order_status_a` (
  `id` int(10) NOT NULL,
  `statusName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `order_status_a`
--

INSERT INTO `order_status_a` (`id`, `statusName`, `description`) VALUES
(1, 'Submitted Request.', 'Customer submitted request.'),
(2, 'Customer To Pick Up Center', 'Goods form Customer To Pick Up Center. Custodian is Boda agent.'),
(3, 'Received at Pick Up Center.', 'Goods received at Pick Up Center. Custodian is Pick Up Center agent.'),
(4, 'Pick Up Center To Delivery Center.', 'Goods moving from Pick Up Center to Delivery Center. Custodian is shuttle agent.'),
(5, 'Received at Delivery Center.', 'Goods received at Delivery Center. Custodian is Delivery Center agent.'),
(6, 'Delivery Center To Recipient.', 'Goods form Delivery Center To Recipient. Custodian is Boda agent.'),
(7, 'Recipient received goods.', 'Goods received by recipient.');

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

--
-- Table structure for table `order_status_b`
--

CREATE TABLE `order_status_b` (
  `int` int(10) NOT NULL,
  `statusName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `order_status_c`
--

CREATE TABLE `order_status_c` (
  `id` int(10) NOT NULL,
  `statusName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `order_status_d`
--

CREATE TABLE `order_status_d` (
  `id` int(10) NOT NULL,
  `statusName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `staffcategories`
--

CREATE TABLE `staffcategories` (
  `id` int(5) NOT NULL,
  `staffCategoryName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` text COLLATE utf8_unicode_ci NOT NULL,
  `dateCreated` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `staffcategories`
--

INSERT INTO `staffcategories` (`id`, `staffCategoryName`, `description`, `dateCreated`) VALUES
(1, 'Collection Center Staff.', 'This Staff Category consists of All Staff attached to a collection center.', '2021-01-06 10:38:33'),
(2, 'Boda boda Category.', 'This Staff Category consists of Collection And Delivery Agents.', '2021-01-06 10:40:33'),
(3, 'Shuttle Agent Staff.', 'Shuttle Agent Staff', '2021-01-10 03:32:39'),
(4, 'Admin staff.', 'Admin staff.', '2021-01-11 02:27:27');

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

--
-- Table structure for table `transaction_type`
--

CREATE TABLE `transaction_type` (
  `id` int(2) NOT NULL,
  `txTypeName` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(200) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `transaction_type`
--

INSERT INTO `transaction_type` (`id`, `txTypeName`, `description`) VALUES
(1, 'Send Goods/Items To Someone.', 'Sending Goods/Items To Someone. As the initiator of this request, you will pay for all the charges involved.'),
(2, 'Request For Goods/Items From Someone.', 'Requesting For Goods/Items From Someone.As the initiator of this request, you will pay for all the charges involved.'),
(3, 'Pick Up Goods/Items ', 'Pick Up Goods/Items'),
(4, 'Buy Goods/Items', 'Buy Goods/Items');

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

--
-- Table structure for table `usercategories`
--

CREATE TABLE `usercategories` (
  `id` int(5) NOT NULL,
  `userCategoryName` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
  `dateCreated` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `usercategories`
--

INSERT INTO `usercategories` (`id`, `userCategoryName`, `description`, `dateCreated`) VALUES
(1, 'Subscribed Users.', 'Subscribed Users.', '2021-01-11 03:33:35'),
(2, 'Unsubscribed Users.', 'Unsubscribed Users.', '2021-01-11 03:39:32');

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

--
-- Table structure for table `userlocations`
--

CREATE TABLE `userlocations` (
  `id` int(10) NOT NULL,
  `userId` int(20) NOT NULL,
  `locationLat` decimal(9,6) NOT NULL,
  `locationLong` decimal(9,6) NOT NULL,
  `description` int(11) NOT NULL,
  `dateCreated` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Indexes for dumped tables
--

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

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

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

--
-- Indexes for table `order_status_b`
--
ALTER TABLE `order_status_b`
  ADD PRIMARY KEY (`int`);

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `collection_centers`
--
ALTER TABLE `collection_centers`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `order_a`
--
ALTER TABLE `order_a`
  MODIFY `id` int(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `order_status_a`
--
ALTER TABLE `order_status_a`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `order_status_b`
--
ALTER TABLE `order_status_b`
  MODIFY `int` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `order_status_c`
--
ALTER TABLE `order_status_c`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `order_status_d`
--
ALTER TABLE `order_status_d`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `staffcategories`
--
ALTER TABLE `staffcategories`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `transaction_type`
--
ALTER TABLE `transaction_type`
  MODIFY `id` int(2) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `usercategories`
--
ALTER TABLE `usercategories`
  MODIFY `id` int(5) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `userlocations`
--
ALTER TABLE `userlocations`
  MODIFY `id` int(10) NOT NULL AUTO_INCREMENT;
COMMIT;

