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

START TRANSACTION;



--
-- Database: `task_management_db`
--

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

--
-- Table structure for table `notifications`
--

CREATE TABLE `notifications` (
  `id` int(11) NOT NULL,
  `message` text NOT NULL,
  `recipient` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  `date` date NOT NULL DEFAULT current_timestamp(),
  `is_read` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `notifications`
--

INSERT INTO `notifications` (`id`, `message`, `recipient`, `type`, `date`, `is_read`) VALUES
(17, '\'Test\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-08-13', 1),
(18, '\'Klaims Management System\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(19, '\'Visitor Management System\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(20, '\'Kalimark Employee Beneficiary\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(21, '\'IT - Asset Management System\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(22, '\'Documents Management System\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(23, '\'QC Management System\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(24, '\'New Customer Master / Vendor\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(25, '\'Reminder Management\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(26, '\'HR Payroll Management\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(27, '\'Sales Reports\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(28, '\'MIS Reports\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0),
(29, '\'Plant Flash Reports\' has been assigned to you. Please review and start working on it', 10, 'New Task Assigned', '2025-09-27', 0);

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

--
-- Table structure for table `tasks`
--

CREATE TABLE `tasks` (
  `id` int(11) NOT NULL,
  `title` varchar(100) NOT NULL,
  `description` text DEFAULT NULL,
  `assigned_to` int(11) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `status` enum('pending','in_progress','completed') DEFAULT 'pending',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tasks`
--

INSERT INTO `tasks` (`id`, `title`, `description`, `assigned_to`, `due_date`, `status`, `created_at`) VALUES
(29, 'Klaims Management System', 'Need to added MD Claim amount summary in dashboard,Submit button verified and', 10, '2025-10-06', 'pending', '2025-09-27 05:04:21'),
(30, 'Visitor Management System', 'Approval Pending', 10, '2025-10-10', 'completed', '2025-09-27 05:05:06'),
(31, 'Kalimark Employee Beneficiary', 'Developed inward ,employee master,gst, photo capture,scheme,', 10, '2025-10-15', 'pending', '2025-09-27 05:05:35'),
(32, 'IT - Asset Management System', 'Separate Colum to add asset details as on maintain the excel sheet title', 10, '2025-10-25', 'completed', '2025-09-27 05:06:13'),
(33, 'Documents Management System', 'Development', 10, '2025-10-31', 'in_progress', '2025-09-27 05:06:59'),
(34, 'QC Management System', 'Development', 10, '2025-11-05', 'pending', '2025-09-27 05:07:46'),
(35, 'New Customer Master / Vendor', 'Development', 10, '2025-11-15', 'completed', '2025-09-27 05:08:08'),
(36, 'Reminder Management', 'Development', 10, '2025-11-25', 'completed', '2025-09-27 05:19:57'),
(37, 'HR Payroll Management', 'Development', 10, '2025-12-31', 'pending', '2025-09-27 05:20:41'),
(38, 'Sales Reports', 'Development', 10, '2026-01-15', 'pending', '2025-09-27 05:21:10'),
(39, 'MIS Reports', 'Development', 10, '2026-02-28', 'pending', '2025-09-27 05:21:33'),
(40, 'Plant Flash Reports', 'Development', 10, '2026-03-31', 'pending', '2025-09-27 05:22:05');

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

--
-- Table structure for table `work_reports`
--

CREATE TABLE `work_reports` (
  `id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `report_date` date DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `tasks`
--
ALTER TABLE `tasks`
  ADD PRIMARY KEY (`id`),
  ADD KEY `assigned_to` (`assigned_to`);

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

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `tasks`
--
ALTER TABLE `tasks`
  ADD CONSTRAINT `tasks_ibfk_1` FOREIGN KEY (`assigned_to`) REFERENCES `users` (`id`);
COMMIT;

