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

START TRANSACTION;



--
-- Database: `24justice`
--

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

--
-- Table structure for table `assigned`
--

CREATE TABLE `assigned` (
  `assign_id` int(11) NOT NULL,
  `assign_chat` int(11) NOT NULL,
  `assign_advisor` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `assigned`
--

INSERT INTO `assigned` (`assign_id`, `assign_chat`, `assign_advisor`) VALUES
(14, 30, 'YWRtaW5AMjRqdXN0aWNlLmNvbQ'),
(17, 31, 'dGFsaGFhaG1hZDA2OEBnbWFpbC5jb20'),
(19, 32, 'YWRtaW5AMjRqdXN0aWNlLmNvbQ'),
(20, 32, 'eXl5QHl5LmNvbQ');

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

--
-- Table structure for table `chat`
--

CREATE TABLE `chat` (
  `chat_id` int(11) NOT NULL,
  `chat_user` varchar(255) NOT NULL,
  `chat_case` int(11) NOT NULL,
  `chat_groupchatid` varchar(750) NOT NULL,
  `chat_datetime` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat`
--

INSERT INTO `chat` (`chat_id`, `chat_user`, `chat_case`, `chat_groupchatid`, `chat_datetime`) VALUES
(30, 'bXVqdGFiYTI5N0BnbWFpbC5jb20', 15, '24j-15', '2020-12-29 16:17:53'),
(31, 'bXVqdGFiYTI5N0BnbWFpbC5jb20', 14, '24j-14', '2020-12-29 17:11:37'),
(32, 'Z2dnQGdnZy5jb20', 16, '24j-16', '2020-12-30 11:22:52');

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

--
-- Table structure for table `city`
--

CREATE TABLE `city` (
  `c_id` int(11) NOT NULL,
  `c_name` varchar(100) NOT NULL,
  `c_postal` varchar(10) NOT NULL,
  `p_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `city`
--

INSERT INTO `city` (`c_id`, `c_name`, `c_postal`, `p_id`) VALUES
(289, 'Awaran', 'AWR', 4),
(290, 'Barkhan', 'BKN', 4),
(291, 'Kachhi (Bolan)', 'KAH', 4),
(292, 'Chagai', 'CGI', 4),
(293, 'Dera Bugti', 'DBG', 4),
(294, 'Gwadar', 'GWD', 4),
(295, 'Harnai', 'HRN', 4),
(296, 'Jafarabad', 'JFB', 4),
(297, 'Jhal Magsi', 'JHM', 4),
(298, 'Kalat', 'KLT', 4),
(299, 'Kech (Turbat)', 'KEH', 4),
(300, 'Kharan', 'KHN', 4),
(301, 'Kohlu', 'KOH', 4),
(302, 'Khuzdar', 'KHU', 4),
(303, 'Killa Abdullah', 'KBD', 4),
(304, 'Killa Saifullah', 'KSU', 4),
(305, 'Lasbela', 'LSB', 4),
(306, 'Loralai', 'LRL', 4),
(307, 'Mastung', 'MTG', 4),
(308, 'Musakhel', 'MUS', 4),
(309, 'Nasirabad', 'NSB', 4),
(310, 'Nushki', 'NUK', 4),
(311, 'Panjgur', 'PJG', 4),
(312, 'Pishin', 'PSN', 4),
(313, 'Quetta', 'QET', 4),
(314, 'Sherani', 'SHR', 4),
(315, 'Sibi', 'SBI', 4),
(316, 'Washuk', 'WSK', 4),
(317, 'Zhob', 'ZHB', 4),
(318, 'Ziarat', 'ZRT', 4),
(319, 'Lehri', 'LRI', 4),
(320, 'Sohbatpur', 'SBP', 4),
(321, 'Abbottabad', 'AAW', 3),
(322, 'Bannu', 'BNU', 3),
(323, 'Battagram', 'BTG', 3),
(324, 'Buner', 'BNR', 3),
(325, 'Charsadda', 'CHS', 3),
(326, 'Chitral', 'CTR', 3),
(327, 'Dera Ismail Khan', 'DIK', 3),
(328, 'Hangu', 'HNG', 3),
(329, 'Haripur', 'HRP', 3),
(330, 'Karak', 'KRK', 3),
(331, 'Kohat', 'OHT', 3),
(332, 'Upper Kohistan', 'UKH', 3),
(333, 'Lakki Marwat', 'LKM', 3),
(334, 'Lower Dir', 'LWD', 3),
(335, 'Malakand Protected Area', 'MPA', 3),
(336, 'Mansehra', 'HRA', 3),
(337, 'Mardan', 'MDN', 3),
(338, 'Nowshera', 'NSH', 3),
(339, 'Peshawar', 'PEW', 3),
(340, 'Shangla', 'SNG', 3),
(341, 'Swabi', 'SWB', 3),
(342, 'Swat', 'SWT', 3),
(343, 'Tank', 'TNK', 3),
(344, 'Upper Dir', 'UPD', 3),
(345, 'Torghar', 'TRG', 3),
(346, 'Lower Kohistan', 'LWK', 3),
(347, 'Attock', 'ATG', 1),
(348, 'Bahawalnagar', 'BHN', 1),
(349, 'Bahawalpur', 'BHW', 1),
(350, 'Bhakkar', 'BHK', 1),
(351, 'Chakwal', 'CHK', 1),
(352, 'Chiniot', 'CHN', 1),
(353, 'Dera Ghazi Khan', 'DGK', 1),
(354, 'Faisalabad', 'FSD', 1),
(355, 'Gujranwala', 'GJW', 1),
(356, 'Gujrat', 'GJR', 1),
(357, 'Hafizabad', 'HFZ', 1),
(358, 'Jhang', 'JHN', 1),
(359, 'Jhelum', 'JHL', 1),
(360, 'Kasur', 'KSR', 1),
(361, 'Khanewal', 'KNW', 1),
(362, 'Khushab', 'KUS', 1),
(363, 'Lahore', 'LHE', 1),
(364, 'Layyah', 'LYH', 1),
(365, 'Lodhran', 'LOD', 1),
(366, 'Mandi Bahauddin', 'MDB', 1),
(367, 'Mianwali', 'MNW', 1),
(368, 'Multan', 'MUX', 1),
(369, 'Muzaffargarh', 'MZF', 1),
(370, 'Narowal', 'NRW', 1),
(371, 'Nankana Sahib', 'NKS', 1),
(372, 'Okara', 'OKR', 1),
(373, 'Pakpattan', 'PKP', 1),
(374, 'Rahim Yar Khan', 'RYK', 1),
(375, 'Rajanpur', 'RJP', 1),
(376, 'Rawalpindi', 'RWP', 1),
(377, 'Sahiwal', 'SHW', 1),
(378, 'Sargodha', 'SGD', 1),
(379, 'Sheikhupura', 'SKP', 1),
(380, 'Sialkot', 'SKT', 1),
(381, 'Toba Tek Singh', 'TTS', 1),
(382, 'Vehari', 'VHR', 1),
(383, 'Badin', 'BDN', 2),
(384, 'Dadu', 'DDU', 2),
(385, 'Ghotki', 'GHT', 2),
(386, 'Hyderabad', 'HYD', 2),
(387, 'Jacobabad', 'JCB', 2),
(388, 'Jamshoro	', 'JMS', 2),
(389, 'Karachi Central', 'KHI-C', 2),
(390, 'Kashmore', 'KSM', 2),
(391, 'Khairpur', 'KHP', 2),
(392, 'Larkana', 'LRK', 2),
(393, 'Matiari', 'MAT', 2),
(394, 'Mirpur Khas', 'MPK', 2),
(395, 'Naushahro Firoze', 'NHF', 2),
(396, 'Shaheed Benazir Abad', 'SBA', 2),
(397, 'Qambar Shahdadkot', 'QSK', 2),
(398, 'Sanghar', 'SGH', 2),
(399, 'Shikarpur', 'SHP', 2),
(400, 'Sukkur', 'SUK', 2),
(401, 'Tando Allahyar', 'TAY', 2),
(402, 'Tando Muhammad Khan', 'TMK', 2),
(403, 'Tharparkar', 'TPK', 2),
(404, 'Thatta', 'TTA', 2),
(405, 'Umerkot', 'UMK', 2),
(406, 'Sujawal', 'SJW', 2),
(407, 'Karachi East', 'KHI-E', 2),
(408, 'Karachi South', 'KHI-S', 2),
(409, 'Karachi West', 'KHI-W', 2),
(410, 'Korangi', 'KRN', 2),
(411, 'Malir', 'MLR', 2),
(412, 'Bajaur Agency', 'BJA', 7),
(413, 'Khyber Agency', 'KHA', 7),
(414, 'Kurram Agency', 'KUA', 7),
(415, 'Mohmand Agency', 'MHA', 7),
(416, 'North Waziristan Agency', 'NWA', 7),
(417, 'Orakzai Agency', 'ORA', 7),
(418, 'South Waziristan Agency', 'SWA', 7),
(419, 'FR Bannu', 'FRB', 7),
(420, 'FR Dera Ismail Khan', 'FRD', 7),
(421, 'FR Kohat', 'FRK', 7),
(422, 'FR Lakki Marwat', 'FRL', 7),
(423, 'FR Peshawar', 'FRP', 7),
(424, 'FR Tank', 'FRT', 7),
(425, 'Muzaffarabad', 'MZB', 5),
(426, 'Jhelum valley', 'JHV', 5),
(427, 'Neelum', 'NLM', 5),
(428, 'Mirpur', 'MRP', 5),
(429, 'Bhimber', 'BHM', 5),
(430, 'Kotli', 'KTL', 5),
(431, 'Poonch', 'PNH', 5),
(432, 'Bagh', 'BGH', 5),
(433, 'Haveli', 'HVL', 5),
(434, 'Sudhnati', 'SDN', 5),
(435, 'Islamabad', 'ISB', 6),
(437, 'Ghanche', 'GHC', 8),
(438, 'Skardu', 'KDU', 8),
(439, 'Astore', 'ATR', 8),
(440, 'Diamer', 'DMR', 8),
(441, 'Ghizer', 'GHZ', 8),
(442, 'Gilgit', 'GIL', 8),
(443, 'Hunza', 'HNZ', 8),
(444, 'Kharmang', 'KHM', 8),
(445, 'Shigar', 'SHG', 8),
(446, 'Nagar', 'NGR', 8),
(447, 'Kohistan', 'KHS', 3),
(448, 'Shaheed Benazir Abad ', 'SHB', 2),
(449, 'Shaheed Sikandarabad', 'SSB', 4);

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

--
-- Table structure for table `legal_case`
--

CREATE TABLE `legal_case` (
  `case_id` int(11) NOT NULL,
  `case_user` varchar(250) NOT NULL,
  `case_number` varchar(100) DEFAULT NULL,
  `case_name` varchar(250) DEFAULT NULL,
  `case_description` text NOT NULL,
  `your_name` varchar(150) DEFAULT NULL,
  `your_contact` varchar(50) DEFAULT NULL,
  `case_city` varchar(100) DEFAULT NULL,
  `your_city` varchar(100) DEFAULT NULL,
  `opposing_city` varchar(100) DEFAULT NULL,
  `opposing_name` varchar(150) DEFAULT NULL,
  `hearing_date` varchar(20) DEFAULT NULL,
  `judge_name` varchar(150) DEFAULT NULL,
  `book_type` varchar(50) NOT NULL,
  `case_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `case_status` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `legal_case`
--

INSERT INTO `legal_case` (`case_id`, `case_user`, `case_number`, `case_name`, `case_description`, `your_name`, `your_contact`, `case_city`, `your_city`, `opposing_city`, `opposing_name`, `hearing_date`, `judge_name`, `book_type`, `case_date`, `case_status`) VALUES
(14, 'bXVqdGFiYTI5N0BnbWFpbC5jb20', NULL, NULL, 'Chal pya oe', 'Mujtaba Zafar', '03325591970', NULL, 'Islamabad', NULL, NULL, NULL, NULL, 'Advice Seeking', '2020-12-28 08:55:06', 0),
(15, 'bXVqdGFiYTI5N0BnbWFpbC5jb20', NULL, NULL, 'Show Details', 'Mujtaba Zafar', '03325591970', NULL, 'City', NULL, NULL, NULL, NULL, 'Require Consultation', '2020-12-28 15:42:14', 0),
(16, 'Z2dnQGdnZy5jb20', NULL, NULL, 'FIR registration', 'ggggg', '0000000000', NULL, 'Lahore', NULL, NULL, NULL, NULL, 'Advice Seeking', '2020-12-30 11:21:56', 0);

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

--
-- Table structure for table `province`
--

CREATE TABLE `province` (
  `p_id` int(11) NOT NULL,
  `p_name` varchar(100) NOT NULL,
  `p_postal` varchar(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `province`
--

INSERT INTO `province` (`p_id`, `p_name`, `p_postal`) VALUES
(1, 'Punjab', 'PP'),
(2, 'Sindh', 'PS'),
(3, 'Khyber Pakhtunkhwa', 'PK'),
(4, 'Balochistan', 'PB'),
(5, 'Azad Kashmir', 'AJ&K'),
(6, 'Federal Capital', 'PC'),
(7, 'Federal Administered Tribal Areas ', 'Fata'),
(8, 'Gilgit Baltistan', 'GB');

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

--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `service_id` int(11) NOT NULL,
  `service_name` varchar(50) NOT NULL,
  `service_image` varchar(110) NOT NULL,
  `service_link` varchar(500) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `assigned`
--
ALTER TABLE `assigned`
  ADD PRIMARY KEY (`assign_id`);

--
-- Indexes for table `chat`
--
ALTER TABLE `chat`
  ADD PRIMARY KEY (`chat_id`);

--
-- Indexes for table `city`
--
ALTER TABLE `city`
  ADD PRIMARY KEY (`c_id`),
  ADD KEY `p_id` (`p_id`);

--
-- Indexes for table `legal_case`
--
ALTER TABLE `legal_case`
  ADD PRIMARY KEY (`case_id`);

--
-- Indexes for table `province`
--
ALTER TABLE `province`
  ADD PRIMARY KEY (`p_id`);

--
-- Indexes for table `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`service_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `assigned`
--
ALTER TABLE `assigned`
  MODIFY `assign_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `chat`
--
ALTER TABLE `chat`
  MODIFY `chat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT for table `city`
--
ALTER TABLE `city`
  MODIFY `c_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=450;

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

--
-- AUTO_INCREMENT for table `province`
--
ALTER TABLE `province`
  MODIFY `p_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `services`
--
ALTER TABLE `services`
  MODIFY `service_id` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

