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

START TRANSACTION;



--
-- Database: `judiciary_app`
--

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

--
-- Table structure for table `pc_appellant_position`
--

CREATE TABLE `pc_appellant_position` (
  `appellant_positionID` int(255) NOT NULL,
  `appellant_position` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_appellant_position`
--

INSERT INTO `pc_appellant_position` (`appellant_positionID`, `appellant_position`, `status`) VALUES
(1, 'Mdai', 1),
(2, 'Mlalamikaji', 1),
(4, 'Mwombaji wa mirathi', 1);

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

--
-- Table structure for table `pc_case_outcome`
--

CREATE TABLE `pc_case_outcome` (
  `outcomeID` int(255) NOT NULL,
  `outcome` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_case_outcome`
--

INSERT INTO `pc_case_outcome` (`outcomeID`, `outcome`, `status`) VALUES
(1, 'Shauri kusikilizwa hadi mwisho', 1),
(3, 'Shauri limefutwa', 1);

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

--
-- Table structure for table `pc_case_register`
--

CREATE TABLE `pc_case_register` (
  `caseID` int(255) NOT NULL,
  `user_uid` text NOT NULL,
  `courtID` int(255) DEFAULT NULL,
  `filing_date` text NOT NULL,
  `case_number` int(255) NOT NULL,
  `case_year` int(255) NOT NULL,
  `case_type` text NOT NULL,
  `case_appellant` text NOT NULL,
  `appellant_position` text NOT NULL,
  `appellant_age` int(255) NOT NULL,
  `appellant_phone` int(11) DEFAULT NULL,
  `appellant_gender` varchar(255) NOT NULL,
  `case_defendant` text NOT NULL,
  `defendant_position` text NOT NULL,
  `defendant_age` int(255) NOT NULL,
  `defendant_phone` int(11) DEFAULT NULL,
  `defendant_gender` varchar(255) NOT NULL,
  `case_claim` text NOT NULL,
  `decided_date` varchar(255) DEFAULT NULL,
  `mode_determination` text,
  `case_outcome` text,
  `decision_remarks` text,
  `assigned` varchar(11) NOT NULL,
  `assigned_to` text,
  `assigned_date` text NOT NULL,
  `status` int(255) DEFAULT NULL,
  `img` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_case_register`
--

INSERT INTO `pc_case_register` (`caseID`, `user_uid`, `courtID`, `filing_date`, `case_number`, `case_year`, `case_type`, `case_appellant`, `appellant_position`, `appellant_age`, `appellant_phone`, `appellant_gender`, `case_defendant`, `defendant_position`, `defendant_age`, `defendant_phone`, `defendant_gender`, `case_claim`, `decided_date`, `mode_determination`, `case_outcome`, `decision_remarks`, `assigned`, `assigned_to`, `assigned_date`, `status`, `img`) VALUES
(1, '5e3084a111a7b8.21953844', 2, '04-02-2020', 123, 2020, 'Divorce Case', 'Abdulatif.hussein', '', 23, NULL, '', 'Start', '', 36, NULL, '', 'Test', NULL, NULL, NULL, NULL, 'Yes', 'Hon. xxxxxxxx', '2020-02-13 18:46:31', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(2, '5e3084a111a7b8.21953844', 2, '04-02-2020', 123587, 2020, 'Criminal Case', 'Abdulatif', '', 27, NULL, 'Male', 'Jack', '', 38, NULL, 'Female', 'Test Type Abdulatif', '14-02-2020', 'Dispose by preliminaries', 'Settled Out of the Court', 'test', 'Yes', 'Hon. yyyyyyyy', '2020-02-13 18:41:16', 2, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(3, '5e3084a111a7b8.21953844', 2, '13-02-2020', 123, 2020, 'Civil Case', 'Mshote', '', 41, NULL, 'Male', 'Athumani', '', 40, NULL, 'Male', 'Test', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(4, '5e3084a111a7b8.21953844', 2, '29-02-2020', 28, 2020, 'Divorce Case', 'Adili', '', 28, NULL, 'Male', 'Winnie', '', 23, NULL, 'Female', 'Fight', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(5, '5e3084a111a7b8.21953844', 2, '08-02-2020', 6574, 2020, 'Divorce Case', 'Abdulatif', '', 27, NULL, 'Male', 'Joshua', '', 40, NULL, 'Male', 'Test fight', NULL, NULL, NULL, NULL, 'Yes', 'Hon. zzzzzzzz', '2020-02-13 18:51:01', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(6, '5e3084a111a7b8.21953844', 1, '10-02-2020', 1234567, 2020, 'Probate Case', 'abdulatif', '', 32, NULL, 'Male', 'Nanotech', '', 58, NULL, 'Female', 'what', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(7, '5e3084a111a7b8.21953844', 2, '14-02-2020', 5023, 2020, 'Jinai', 'Abdulatif', '', 30, NULL, 'Male', 'Mshote', '', 23, NULL, 'Male', 'Test', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(8, '5e3084a111a7b8.21953844', 2, '14-02-2020', 200, 2020, 'Mirathi', 'Mshote', '', 40, NULL, 'Male', 'Adili', '', 25, NULL, 'Male', 'Fight', '29-02-2020', 'Full trial', 'Allowed', 'test remarks', 'Yes', 'Hon. zzzzzzzz', '2020-02-14 12:04:19', 2, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(9, '5e3084a111a7b8.21953844', 2, '10-02-2020', 350, 2020, 'Talaka', 'Abdulatif', '', 27, NULL, 'Male', 'Madilu', '', 50, NULL, 'Male', 'Claim on this', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(10, '5e3084a111a7b8.21953844', 2, '17-02-2020', 2500, 2020, 'Jinai', 'Newuser', '', 25, 712123456, 'Female', 'Old user', '', 38, 752000111, 'Male', 'test phone', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(11, '5e3084a111a7b8.21953844', 2, '17-02-2020', 3000, 2020, 'Talaka', 'John Doe', '', 40, 712056574, 'Male', 'Jane Doe', '', 35, 712008855, 'Female', 'Ndoa', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(12, '5e3084a111a7b8.21953844', 2, '29-02-2020', 4500, 2020, 'Mirathi', 'Abdulatif', '', 35, 712556633, 'Male', 'Majaliwa', '', 36, 712005566, 'Male', 'Test', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(13, '5e3084a111a7b8.21953844', 2, '17-02-2020', 400, 2020, 'Talaka', 'Mshote', 'Mdai', 48, 713639563, 'Male', 'Zakia', 'Mdaiwa', 35, 712056328, 'Female', 'Ndoa', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png'),
(14, '5e3084a111a7b8.21953844', 2, '13-02-2020', 12330, 2020, 'Madai', 'justine', 'Mdai', 35, 712323232, 'Male', 'juatiikb', 'Mdaiwa', 32, 784565436, 'Female', 'what', NULL, NULL, NULL, NULL, 'No', NULL, '', 1, 'http://192.168.43.141/judiciary_api/img/cases.png');

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

--
-- Table structure for table `pc_case_type`
--

CREATE TABLE `pc_case_type` (
  `case_typeID` int(255) NOT NULL,
  `case_type_name` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_case_type`
--

INSERT INTO `pc_case_type` (`case_typeID`, `case_type_name`, `status`) VALUES
(1, 'Talaka', 1),
(2, 'Jinai', 1),
(3, 'Mirathi', 1),
(5, 'Madai', 1);

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

--
-- Table structure for table `pc_court`
--

CREATE TABLE `pc_court` (
  `id` int(255) NOT NULL,
  `courtID` int(255) NOT NULL,
  `court_name` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_court`
--

INSERT INTO `pc_court` (`id`, `courtID`, `court_name`) VALUES
(1, 8, 'MOROGORO PRIMARY COURT');

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

--
-- Table structure for table `pc_defendant_position`
--

CREATE TABLE `pc_defendant_position` (
  `defendant_positionID` int(255) NOT NULL,
  `defendant_position` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_defendant_position`
--

INSERT INTO `pc_defendant_position` (`defendant_positionID`, `defendant_position`, `status`) VALUES
(1, 'Mshtakiwa', 1),
(2, 'Mdaiwa', 1),
(4, 'Marehemu', 1);

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

--
-- Table structure for table `pc_designation`
--

CREATE TABLE `pc_designation` (
  `id` int(255) NOT NULL,
  `designation_id` int(255) NOT NULL,
  `designation` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_designation`
--

INSERT INTO `pc_designation` (`id`, `designation_id`, `designation`) VALUES
(1, 10, 'MAGISTRATE'),
(2, 11, 'MAGISTRATE INCHARGE ');

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

--
-- Table structure for table `pc_determination_mode`
--

CREATE TABLE `pc_determination_mode` (
  `modeID` int(255) NOT NULL,
  `mode` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_determination_mode`
--

INSERT INTO `pc_determination_mode` (`modeID`, `mode`, `status`) VALUES
(1, 'Dispose by preliminaries', 1),
(3, 'Full trial', 1);

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

--
-- Table structure for table `pc_magistrate_list`
--

CREATE TABLE `pc_magistrate_list` (
  `magistrateID` int(255) NOT NULL,
  `courtID` int(255) NOT NULL,
  `magistrate` text NOT NULL,
  `status` int(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pc_magistrate_list`
--

INSERT INTO `pc_magistrate_list` (`magistrateID`, `courtID`, `magistrate`, `status`) VALUES
(1, 2, 'Hon. xxxxxxxx', 1),
(2, 2, 'Hon. yyyyyyyy', 1),
(3, 2, 'Hon. zzzzzzzz', 1),
(4, 4, 'Hon. Abdulatif Issa', 1),
(5, 8, 'Hon. Zuber Thabit', 1),
(6, 8, 'Hon. Adili Kamendu', 1),
(7, 8, 'Hon. Mshote Samweli', 1),
(8, 8, 'Test Test', 1),
(9, 8, 'Test2 Test2', 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `pc_appellant_position`
--
ALTER TABLE `pc_appellant_position`
  ADD PRIMARY KEY (`appellant_positionID`);

--
-- Indexes for table `pc_case_outcome`
--
ALTER TABLE `pc_case_outcome`
  ADD PRIMARY KEY (`outcomeID`);

--
-- Indexes for table `pc_case_register`
--
ALTER TABLE `pc_case_register`
  ADD PRIMARY KEY (`caseID`);

--
-- Indexes for table `pc_case_type`
--
ALTER TABLE `pc_case_type`
  ADD PRIMARY KEY (`case_typeID`);

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

--
-- Indexes for table `pc_defendant_position`
--
ALTER TABLE `pc_defendant_position`
  ADD PRIMARY KEY (`defendant_positionID`);

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

--
-- Indexes for table `pc_determination_mode`
--
ALTER TABLE `pc_determination_mode`
  ADD PRIMARY KEY (`modeID`);

--
-- Indexes for table `pc_magistrate_list`
--
ALTER TABLE `pc_magistrate_list`
  ADD PRIMARY KEY (`magistrateID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `pc_appellant_position`
--
ALTER TABLE `pc_appellant_position`
  MODIFY `appellant_positionID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `pc_case_outcome`
--
ALTER TABLE `pc_case_outcome`
  MODIFY `outcomeID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pc_case_register`
--
ALTER TABLE `pc_case_register`
  MODIFY `caseID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `pc_case_type`
--
ALTER TABLE `pc_case_type`
  MODIFY `case_typeID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

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

--
-- AUTO_INCREMENT for table `pc_defendant_position`
--
ALTER TABLE `pc_defendant_position`
  MODIFY `defendant_positionID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

--
-- AUTO_INCREMENT for table `pc_determination_mode`
--
ALTER TABLE `pc_determination_mode`
  MODIFY `modeID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `pc_magistrate_list`
--
ALTER TABLE `pc_magistrate_list`
  MODIFY `magistrateID` int(255) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
COMMIT;

