-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 20, 2025 at 09:34 AM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.2.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: `bim`
--

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

--
-- Table structure for table `action`
--

CREATE TABLE `action` (
  `id` int(11) NOT NULL,
  `reviewedby` varchar(50) NOT NULL,
  `actiontaken` longtext NOT NULL,
  `review` longtext NOT NULL,
  `reviewdate` datetime NOT NULL,
  `status` varchar(30) NOT NULL,
  `incidentid` varchar(50) NOT NULL,
  `recorddate` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `action`
--

INSERT INTO `action` (`id`, `reviewedby`, `actiontaken`, `review`, `reviewdate`, `status`, `incidentid`, `recorddate`) VALUES
(1, 'US1', '', 'ReviewReviewReviewReview', '2025-05-19 12:38:00', 'active', '2', '2025-05-19 12:33:23'),
(2, 'US1', '', '23', '2025-05-19 12:41:00', 'active', '1', '2025-05-19 12:36:25'),
(3, 'US1', '', 'wrew', '2025-05-19 12:55:00', 'active', '2', '2025-05-19 12:55:29'),
(4, 'US14', '', 'Test Test review', '2025-05-19 15:39:00', 'active', '4', '2025-05-19 15:39:58'),
(5, 'US11', '', 'Yuda iskari', '2025-05-19 15:45:00', 'active', '4', '2025-05-19 15:45:40'),
(6, 'US10', '', 'we', '2025-05-19 15:46:00', 'active', '4', '2025-05-19 15:46:39'),
(7, 'US10', '', 'Testt', '2025-05-19 15:41:00', 'active', '4', '2025-05-19 17:42:10'),
(8, 'US10', '', 'm;lm', '2025-05-19 15:35:00', 'active', '4', '2025-05-19 17:46:39'),
(9, 'US11', 'reject', 'jkgjkv jkgvjkvjkvkj', '2025-05-18 07:49:00', 'active', '6', '2025-05-20 07:50:30'),
(10, 'US14', 'approved', 'ukgkj', '2025-05-18 08:03:00', 'active', '6', '2025-05-20 08:04:05'),
(11, 'US11', 'approved', 'ukgjkv', '2025-05-18 08:06:00', 'active', '6', '2025-05-20 08:06:34'),
(12, 'US1', 'reject', 'ilhil', '2025-05-18 08:27:00', 'active', '2', '2025-05-20 08:27:25');

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

--
-- Table structure for table `employee`
--

CREATE TABLE `employee` (
  `empid` int(50) NOT NULL,
  `employer` varchar(50) NOT NULL,
  `location` varchar(100) NOT NULL,
  `firstname` varchar(100) NOT NULL,
  `lastname` varchar(100) NOT NULL,
  `department` varchar(100) NOT NULL,
  `job` varchar(100) NOT NULL,
  `position` varchar(100) NOT NULL,
  `section` varchar(100) NOT NULL,
  `status` varchar(10) NOT NULL,
  `email` varchar(200) NOT NULL,
  `recorddate` datetime NOT NULL,
  `postedby` varchar(50) NOT NULL,
  `recid` int(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `employee`
--

INSERT INTO `employee` (`empid`, `employer`, `location`, `firstname`, `lastname`, `department`, `job`, `position`, `section`, `status`, `email`, `recorddate`, `postedby`, `recid`) VALUES
(77, '19', '20', 'ally', 'juma', '15', 'job', '10', '17', 'active', 'rr', '2025-05-19 06:02:40', 'US1', 1),
(234, '18', '21', 'facenet', 'Pharmacy', '15', 'accountant', '8', '17', 'active', 'eliasangito1997@gmail.com', '2025-05-19 09:30:58', 'US1', 2),
(65, '18', '21', 'Minja', 'MINJA', '15', 'accountant', '22', '16', 'active', 'eliasangito1997@gmail.com', '2025-05-19 15:29:05', 'US11', 3);

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

--
-- Table structure for table `incident`
--

CREATE TABLE `incident` (
  `id` int(11) NOT NULL,
  `incidentdate` datetime NOT NULL,
  `type` varchar(100) NOT NULL,
  `incidentdescription` longtext NOT NULL,
  `policy` longtext NOT NULL,
  `empid` int(100) NOT NULL,
  `reportedby` varchar(20) NOT NULL,
  `status` varchar(50) NOT NULL,
  `actiontaken` longtext NOT NULL,
  `postedby` varchar(100) NOT NULL,
  `recorddate` datetime NOT NULL,
  `actiondate` datetime NOT NULL,
  `level` int(11) NOT NULL DEFAULT 0,
  `rejected` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `incident`
--

INSERT INTO `incident` (`id`, `incidentdate`, `type`, `incidentdescription`, `policy`, `empid`, `reportedby`, `status`, `actiontaken`, `postedby`, `recorddate`, `actiondate`, `level`, `rejected`) VALUES
(1, '2025-05-19 11:02:00', 'positive', 'form_rincidentform_rincidentform_rincidentform_rincidentform_rincident', 'Policy Affected', 2, 'Reported By', 'underreview', 'Action Taken:\r\nAction Taken:\r\nAction Taken:\r\nAction Taken:\r\nAction Taken:\r\n', 'US1', '2025-05-19 11:02:38', '2025-05-19 05:02:00', 1, NULL),
(2, '2025-05-19 11:13:00', 'positive', 'sds', 'Policy Affected', 2, 'Reported By', 'underreview', 'sdfsd', 'US1', '2025-05-19 11:13:33', '2025-05-19 05:13:00', 2, 'yes'),
(3, '2025-05-19 15:29:00', 'positive', 'Incident Description:Incident DescriptionIncident DescriptionIncident DescriptionIncident DescriptionIncident DescriptionIncident Description', 'Policy Affected', 3, 'Reported By', 'underreview', 'Incident Description:\r\nAction TakenAction TakenAction TakenAction TakenAction TakenAction TakenAction Taken', 'US13', '2025-05-19 15:30:46', '2025-05-19 15:30:00', 0, NULL),
(4, '2025-05-19 15:37:00', 'positive', 'yybkjkkjjkjk', 'Policy Affected', 3, 'Reported By', 'close', 'klnkln', 'US13', '2025-05-19 15:37:22', '2025-05-19 15:37:00', 5, NULL),
(5, '2025-05-19 15:40:00', 'positive', 'sdfsdfdsfsd', 'Policy Affected', 1, 'Reported By', 'underreview', 'dsfs', 'US14', '2025-05-19 15:40:45', '2025-05-19 15:40:00', 0, NULL),
(6, '2025-05-19 16:35:00', 'positive', 'jk', 'Policy Affected', 1, 'Reported By', 'close', 'jjj', 'US10', '2025-05-19 16:36:15', '2025-05-19 04:36:00', 2, ''),
(7, '2025-05-19 17:14:00', 'positive', 'sdv', 'Policy Affected', 1, 'Reported By', 'underreview', 'ds', 'US10', '2025-05-19 17:13:21', '2025-05-19 17:09:00', 0, NULL),
(8, '2025-05-19 17:20:00', 'positive', ' jklkllkn', 'Policy Affected', 1, 'Reported By', 'underreview', 'klnkn', 'US10', '2025-05-19 17:28:37', '2025-05-19 17:26:00', 0, NULL),
(9, '2025-05-19 18:05:00', 'negative', 'dsvsdsfsa', 'dss', 2, 'Reported By', 'underreview', 'dsfsd', 'US10', '2025-05-19 18:06:07', '2025-05-19 18:06:00', 0, NULL);

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

--
-- Table structure for table `masters`
--

CREATE TABLE `masters` (
  `recid` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `status` varchar(30) NOT NULL,
  `_type` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `masters`
--

INSERT INTO `masters` (`recid`, `name`, `status`, `_type`) VALUES
(8, 'Admistrator', 'active', 'title'),
(9, 'Supervisor', 'active', 'title'),
(10, 'HOD', 'active', 'title'),
(11, 'HRM', 'active', 'title'),
(12, 'MD', 'active', 'title'),
(13, 'Sales', 'inactive', 'title'),
(14, 'Sales', 'active', 'department'),
(15, 'Account', 'active', 'department'),
(16, 'Sect 1', 'active', 'section'),
(17, 'Sect 2', 'active', 'section'),
(18, 'BBL', 'active', 'employer'),
(19, 'MSL', 'active', 'employer'),
(20, 'Deport', 'active', 'location'),
(21, 'Bonite', 'active', 'location'),
(22, 'Normal', 'active', 'title');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` varchar(50) NOT NULL,
  `fullname` varchar(100) NOT NULL,
  `password` varchar(100) NOT NULL,
  `status` varchar(50) NOT NULL,
  `username` varchar(100) NOT NULL,
  `mobile` varchar(50) NOT NULL,
  `department` varchar(50) NOT NULL,
  `signature` varchar(100) NOT NULL,
  `section` varchar(50) NOT NULL,
  `title` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `fullname`, `password`, `status`, `username`, `mobile`, `department`, `signature`, `section`, `title`) VALUES
('US1', 'Default User', '1234', 'active', 'admin', '00', '15', 'maelekezo.PNG', '16', '8'),
('US10', 'Kulwa Marco', '123', 'active', 'kulwa', '06', '15', 'kulwa marco.png', '16', '12'),
('US11', 'Regina Mayala', '123', 'active', 'regina', '062', '15', 'regina ngusa.png', '16', '11'),
('US13', 'Godlisten Shirima', '123', 'active', 'godlisten', '05', '15', '', '16', '9'),
('US14', 'Juma', '123', 'active', 'juma', '054', '15', '', '16', '10');

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `employee`
--
ALTER TABLE `employee`
  ADD PRIMARY KEY (`recid`);

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

--
-- Indexes for table `masters`
--
ALTER TABLE `masters`
  ADD PRIMARY KEY (`recid`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- AUTO_INCREMENT for table `employee`
--
ALTER TABLE `employee`
  MODIFY `recid` int(50) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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