-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Feb 14, 2022 at 05:37 AM
-- Server version: 10.4.22-MariaDB
-- PHP Version: 8.1.2

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: `traffic_police_tapi`
--

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

--
-- Table structure for table `tbl_attendance`
--

CREATE TABLE `tbl_attendance` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `location_name` varchar(100) NOT NULL,
  `img_path` varchar(200) NOT NULL,
  `latitute` float NOT NULL,
  `longitutte` float NOT NULL,
  `in_datetime` datetime NOT NULL,
  `out_datetime` datetime NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `tbl_police_registration`
--

CREATE TABLE `tbl_police_registration` (
  `id` int(11) NOT NULL,
  `name` text NOT NULL,
  `police_station_id` int(11) NOT NULL,
  `address` text NOT NULL,
  `mobile_no` varchar(12) NOT NULL,
  `email` varchar(100) NOT NULL,
  `designation` text NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varchar(50) NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `tbl_police_station`
--

CREATE TABLE `tbl_police_station` (
  `id` int(11) NOT NULL,
  `station_name` text NOT NULL,
  `address` text NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tbl_police_station`
--

INSERT INTO `tbl_police_station` (`id`, `station_name`, `address`, `created_date`, `flag`) VALUES
(1, 'Police Station Vyara', 'jilla seva sadan, Vyara', '2022-02-09 15:35:41', 1);

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

--
-- Table structure for table `tbl_user_activity`
--

CREATE TABLE `tbl_user_activity` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `activity` int(11) NOT NULL,
  `activity_datetime` int(11) NOT NULL,
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `tbl_vehicle_challan`
--

CREATE TABLE `tbl_vehicle_challan` (
  `id` int(11) NOT NULL,
  `vehicle_no` varchar(20) NOT NULL,
  `vehicle_owner` varchar(100) NOT NULL,
  `vehicle_type` varchar(50) NOT NULL,
  `img1_path` varchar(200) NOT NULL,
  `img2_path` varchar(200) NOT NULL,
  `img3_path` varchar(200) NOT NULL,
  `img4_path` varchar(200) NOT NULL,
  `violation_id` varchar(50) NOT NULL,
  `total_fine` int(11) NOT NULL,
  `payment_type` varchar(20) NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `tbl_violation`
--

CREATE TABLE `tbl_violation` (
  `id` int(11) NOT NULL,
  `violation_type` text NOT NULL,
  `description` text NOT NULL,
  `fine_rate` int(11) NOT NULL,
  `created_date` datetime NOT NULL DEFAULT current_timestamp(),
  `flag` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `tbl_violation`
--

INSERT INTO `tbl_violation` (`id`, `violation_type`, `description`, `fine_rate`, `created_date`, `flag`) VALUES
(1, 'Helmet issue', 'Helmet issue', 500, '0000-00-00 00:00:00', 1),
(2, 'મોપેડ વિમા વિના મુસાફરી', 'મોપેડ વિમા વિના મુસાફરી', 1200, '0000-00-00 00:00:00', 1);

--
-- Indexes for dumped tables
--

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

--
-- AUTO_INCREMENT for table `tbl_violation`
--
ALTER TABLE `tbl_violation`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
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 */;
