BBnepal-Accounts/bbnepal_bus_tracking.sql
Sampanna Rimal 9cd05ef3cb commitall
2024-07-10 18:28:19 +05:45

490 lines
16 KiB
SQL

-- phpMyAdmin SQL Dump
-- version 5.2.0
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jun 27, 2023 at 03:02 AM
-- Server version: 10.4.27-MariaDB
-- PHP Version: 8.1.12
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `bbnepal_bus_tracking`
--
-- --------------------------------------------------------
--
-- Table structure for table `bt_admin`
--
CREATE TABLE `bt_admin` (
`id` int(11) NOT NULL,
`admin_role_ids` varchar(255) NOT NULL,
`admin_name` varchar(50) NOT NULL,
`email` varchar(100) NOT NULL,
`password` varchar(100) NOT NULL,
`status` varchar(64) NOT NULL DEFAULT 'Active',
`can_delete` varchar(16) NOT NULL DEFAULT 'Yes',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_admin`
--
INSERT INTO `bt_admin` (`id`, `admin_role_ids`, `admin_name`, `email`, `password`, `status`, `can_delete`, `created`, `modified`) VALUES
(1, '1', 'Bus Admin', 'busadmin@anything.com', '0e7517141fb53f21ee439b355b5a1d0a', 'Active', 'No', '2021-11-10 04:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `bt_admin_menu`
--
CREATE TABLE `bt_admin_menu` (
`id` int(11) NOT NULL,
`menu_name` varchar(256) NOT NULL,
`parent_id` int(11) NOT NULL DEFAULT 0,
`order_number` int(11) NOT NULL,
`inactive_icon` varchar(256) NOT NULL,
`active_icon` varchar(256) NOT NULL,
`page_link` varchar(256) NOT NULL,
`status` varchar(64) NOT NULL DEFAULT 'Active',
`created_on` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `bt_admin_menu`
--
INSERT INTO `bt_admin_menu` (`id`, `menu_name`, `parent_id`, `order_number`, `inactive_icon`, `active_icon`, `page_link`, `status`, `created_on`) VALUES
(1, 'Dashboard', 0, 1, 'dashboard1.png', 'dashboard2.png', 'dashboard', 'Active', '2021-11-12 13:43:57'),
(2, 'Buses', 0, 2, 'buses1.png', 'buses2.png', 'buses', 'Active', '2021-11-12 00:00:16'),
(3, 'Drivers', 0, 3, 'driver1.png', 'driver2.png', 'drivers', 'Active', '2021-11-12 00:00:38'),
(4, 'Routes', 0, 4, 'route1.png', 'route2.png', 'routes', 'Active', '2021-11-12 07:00:00'),
(5, 'Students', 0, 5, 'student2.png', 'student1.png', 'students', 'Active', '2021-11-12 00:00:00'),
(6, 'Authorization', 0, 6, 'applications1.png', 'applications2.png', '#', 'Active', '2021-11-12 00:00:00'),
(7, 'Roles', 6, 1, '', '', 'roles', 'Active', '2021-11-12 00:17:00'),
(8, 'Users', 6, 2, '', '', 'users', 'Active', '2021-11-12 00:00:00'),
(9, 'Trip History', 0, 7, 'trip2.png', 'trip2.png', 'trips', 'Active', '2021-12-15 02:08:10');
-- --------------------------------------------------------
--
-- Table structure for table `bt_admin_roles`
--
CREATE TABLE `bt_admin_roles` (
`id` int(10) UNSIGNED NOT NULL,
`role_name` varchar(64) NOT NULL,
`role_desc` varchar(512) DEFAULT NULL,
`status` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
`can_delete` varchar(64) NOT NULL DEFAULT 'Yes',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `bt_admin_roles`
--
INSERT INTO `bt_admin_roles` (`id`, `role_name`, `role_desc`, `status`, `can_delete`, `created`, `modified`) VALUES
(1, 'Library Super Admin', '', 'Active', 'No', '2021-11-10 06:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `bt_admin_role_permissions`
--
CREATE TABLE `bt_admin_role_permissions` (
`id` int(10) UNSIGNED NOT NULL,
`admin_role_ids` int(11) NOT NULL,
`menu_ids` varchar(1024) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
--
-- Dumping data for table `bt_admin_role_permissions`
--
INSERT INTO `bt_admin_role_permissions` (`id`, `admin_role_ids`, `menu_ids`, `created`, `modified`) VALUES
(1, 1, '1,2,3,4,5,6,9', '2021-11-12 00:00:00', NULL);
-- --------------------------------------------------------
--
-- Table structure for table `bt_batch_routes`
--
CREATE TABLE `bt_batch_routes` (
`id` int(11) NOT NULL,
`batch_id` int(11) NOT NULL,
`route_ids` varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL,
`created` datetime NOT NULL,
`modified` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_batch_routes`
--
INSERT INTO `bt_batch_routes` (`id`, `batch_id`, `route_ids`, `created`, `modified`) VALUES
(3, 1, '1,2', '0000-00-00 00:00:00', '0000-00-00 00:00:00'),
(4, 6, '1,2', '0000-00-00 00:00:00', '0000-00-00 00:00:00');
-- --------------------------------------------------------
--
-- Table structure for table `bt_buses`
--
CREATE TABLE `bt_buses` (
`id` int(11) NOT NULL,
`reg_no` varchar(255) NOT NULL,
`bus_brand` varchar(255) NOT NULL,
`seats` int(11) NOT NULL,
`year` int(11) NOT NULL,
`image` varchar(255) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_buses`
--
INSERT INTO `bt_buses` (`id`, `reg_no`, `bus_brand`, `seats`, `year`, `image`, `created`, `modified`) VALUES
(1, 'BUS NO 90001', 'Tata', 40, 2022, 'assets-bustracking/images/bus_image/10312022080346.jpg', '2022-10-31 12:48:46', '2022-10-31 12:48:46');
-- --------------------------------------------------------
--
-- Table structure for table `bt_drivers`
--
CREATE TABLE `bt_drivers` (
`id` int(11) NOT NULL,
`driver_id` varchar(100) NOT NULL,
`name` varchar(255) NOT NULL,
`password` varchar(100) NOT NULL,
`contact_number` varchar(20) NOT NULL,
`licence` varchar(255) NOT NULL,
`dob` varchar(255) NOT NULL,
`address` longtext NOT NULL,
`image` varchar(255) NOT NULL,
`document1` varchar(255) NOT NULL,
`document2` varchar(255) NOT NULL,
`document3` varchar(255) NOT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`modified` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_drivers`
--
INSERT INTO `bt_drivers` (`id`, `driver_id`, `name`, `password`, `contact_number`, `licence`, `dob`, `address`, `image`, `document1`, `document2`, `document3`, `created`, `modified`) VALUES
(1, 'BTD20220001', 'Demo Driver', '0e7517141fb53f21ee439b355b5a1d0a', '9865748596', '8596748596', '01-05-2000', 'Dhangadhi', 'assets-bustracking/images/driver_images/10312022080606.png', 'assets-bustracking/images/driver_images/10312022080606000.pdf', 'assets-bustracking/images/driver_images/103120220806060001.pdf', 'assets-bustracking/images/driver_images/103120220806060002.pdf', '2022-10-31 07:06:06', '2022-10-31 07:06:06');
-- --------------------------------------------------------
--
-- Table structure for table `bt_routes`
--
CREATE TABLE `bt_routes` (
`id` int(11) NOT NULL,
`route_name` varchar(255) NOT NULL,
`stops` int(11) NOT NULL,
`bus_id` int(11) NOT NULL,
`driver_id` int(11) NOT NULL,
`working_id` varchar(255) NOT NULL,
`pickup_start` varchar(255) NOT NULL,
`drop_start` varchar(255) NOT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`modified` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_routes`
--
INSERT INTO `bt_routes` (`id`, `route_name`, `stops`, `bus_id`, `driver_id`, `working_id`, `pickup_start`, `drop_start`, `created`, `modified`) VALUES
(1, 'Alpha', 5, 1, 1, 'monday,tuesday,wednesday,thursday,friday,sunday', '08:00', '16:00', '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(2, 'Charlie', 4, 1, 1, 'monday,tuesday,wednesday,thursday,friday,sunday', '09:00', '17:00', '2022-10-31 02:31:01', '2022-10-31 07:16:01');
-- --------------------------------------------------------
--
-- Table structure for table `bt_routes_details`
--
CREATE TABLE `bt_routes_details` (
`id` int(11) NOT NULL,
`route_id` int(11) NOT NULL,
`latitude` varchar(255) NOT NULL,
`longitude` varchar(255) NOT NULL,
`place_name` varchar(255) NOT NULL,
`route_order` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT current_timestamp(),
`modified` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_routes_details`
--
INSERT INTO `bt_routes_details` (`id`, `route_id`, `latitude`, `longitude`, `place_name`, `route_order`, `created`, `modified`) VALUES
(1, 1, '28.699931', '80.572442', 'Baiyabehadi', 1, '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(2, 1, '28.703296', '80.572091', 'Hotel Rubus', 2, '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(3, 1, '28.704471', '80.572193', 'Main Road', 3, '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(4, 1, '28.704978', '80.566088', 'Chauraha', 4, '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(5, 1, '28.713358', '80.568679', 'Sahid Gate', 5, '2022-10-31 02:28:03', '2022-10-31 07:13:03'),
(6, 2, '28.699931', '80.572442', 'Baiyabehadi', 1, '2022-10-31 02:31:01', '2022-10-31 07:16:01'),
(7, 2, '28.702036', '80.573794', 'Sharda School', 2, '2022-10-31 02:31:01', '2022-10-31 07:16:01'),
(8, 2, '28.702287', '80.575750', 'SPA College', 3, '2022-10-31 02:31:01', '2022-10-31 07:16:01'),
(9, 2, '28.704613', '80.575123', 'Bus Park', 4, '2022-10-31 02:31:01', '2022-10-31 07:16:01');
-- --------------------------------------------------------
--
-- Table structure for table `bt_students_bus_route_details`
--
CREATE TABLE `bt_students_bus_route_details` (
`id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`route_id` int(11) NOT NULL COMMENT 'bt_route_id',
`pick_up_id` int(11) NOT NULL COMMENT 'bt_route_details_id',
`drop_id` int(11) NOT NULL COMMENT 'bt_route_details_id',
`batch_id` int(11) NOT NULL,
`one_way` varchar(3) NOT NULL DEFAULT 'no',
`data` longtext DEFAULT NULL,
`is_active` varchar(25) NOT NULL DEFAULT 'No',
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Dumping data for table `bt_students_bus_route_details`
--
INSERT INTO `bt_students_bus_route_details` (`id`, `student_id`, `route_id`, `pick_up_id`, `drop_id`, `batch_id`, `one_way`, `data`, `is_active`, `created`, `modified`) VALUES
(1, 80, 1, 4, 4, 1, 'no', NULL, 'No', '2022-10-31 13:18:59', '2022-10-31 13:18:59'),
(2, 58, 1, 3, 3, 1, 'no', NULL, 'No', '2022-10-31 13:31:11', '2022-10-31 13:31:11'),
(3, 55, 1, 1, 1, 1, 'yes', NULL, 'yes', '2022-10-31 13:31:35', '2022-10-31 13:31:35'),
(4, 60, 1, 1, 1, 1, 'yes', NULL, 'No', '2022-12-19 12:36:08', '2022-12-19 12:36:08'),
(5, 65, 2, 7, 7, 1, 'yes', NULL, 'No', '2022-12-19 12:37:12', '2022-12-19 12:37:12'),
(6, 93, 1, 5, 5, 1, 'yes', NULL, 'No', '2022-12-19 12:56:55', '2022-12-19 12:56:55'),
(7, 92, 2, 6, 6, 1, 'yes', NULL, 'No', '2022-12-19 13:13:42', '2022-12-19 13:13:42'),
(8, 91, 1, 1, 1, 1, 'yes', NULL, 'No', '2022-12-19 13:57:19', '2022-12-19 13:57:19'),
(9, 63, 2, 6, 6, 1, 'yes', NULL, 'No', '2022-12-19 14:06:59', '2022-12-19 14:06:59'),
(10, 59, 1, 1, 1, 1, 'yes', NULL, 'No', '2022-12-19 14:16:48', '2022-12-19 14:16:48'),
(12, 240, 2, 6, 6, 1, 'yes', NULL, 'yes', '2022-12-19 14:34:19', '2022-12-19 14:34:19'),
(13, 241, 2, 6, 6, 1, 'yes', NULL, 'yes', '2022-12-19 14:34:42', '2022-12-19 14:34:42'),
(14, 90, 1, 1, 1, 1, 'yes', NULL, 'yes', '2023-02-02 13:43:23', '2023-02-02 13:43:23');
-- --------------------------------------------------------
--
-- Table structure for table `bt_students_trip`
--
CREATE TABLE `bt_students_trip` (
`id` int(11) NOT NULL,
`trip_id` int(11) NOT NULL,
`student_id` int(11) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
-- --------------------------------------------------------
--
-- Table structure for table `bt_trips`
--
CREATE TABLE `bt_trips` (
`id` int(11) NOT NULL,
`route_id` int(11) NOT NULL,
`route_stop_id` int(11) NOT NULL,
`driver_id` int(11) NOT NULL,
`time` varchar(255) DEFAULT NULL,
`trip_type` varchar(255) NOT NULL,
`status` varchar(11) NOT NULL,
`created` datetime NOT NULL DEFAULT current_timestamp(),
`modified` datetime NOT NULL DEFAULT current_timestamp(),
`latitide` varchar(255) NOT NULL,
`longitude` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `bt_admin`
--
ALTER TABLE `bt_admin`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_admin_menu`
--
ALTER TABLE `bt_admin_menu`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_admin_roles`
--
ALTER TABLE `bt_admin_roles`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_admin_role_permissions`
--
ALTER TABLE `bt_admin_role_permissions`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_batch_routes`
--
ALTER TABLE `bt_batch_routes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_buses`
--
ALTER TABLE `bt_buses`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_drivers`
--
ALTER TABLE `bt_drivers`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_routes`
--
ALTER TABLE `bt_routes`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_routes_details`
--
ALTER TABLE `bt_routes_details`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_students_bus_route_details`
--
ALTER TABLE `bt_students_bus_route_details`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_students_trip`
--
ALTER TABLE `bt_students_trip`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `bt_trips`
--
ALTER TABLE `bt_trips`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `bt_admin`
--
ALTER TABLE `bt_admin`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `bt_admin_menu`
--
ALTER TABLE `bt_admin_menu`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `bt_admin_roles`
--
ALTER TABLE `bt_admin_roles`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `bt_admin_role_permissions`
--
ALTER TABLE `bt_admin_role_permissions`
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
--
-- AUTO_INCREMENT for table `bt_batch_routes`
--
ALTER TABLE `bt_batch_routes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `bt_buses`
--
ALTER TABLE `bt_buses`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bt_drivers`
--
ALTER TABLE `bt_drivers`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `bt_routes`
--
ALTER TABLE `bt_routes`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `bt_routes_details`
--
ALTER TABLE `bt_routes_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
--
-- AUTO_INCREMENT for table `bt_students_bus_route_details`
--
ALTER TABLE `bt_students_bus_route_details`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;
--
-- AUTO_INCREMENT for table `bt_students_trip`
--
ALTER TABLE `bt_students_trip`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `bt_trips`
--
ALTER TABLE `bt_trips`
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;