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

START TRANSACTION;



--
-- Database: `schools`
--

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

--
-- Table structure for table `academic_sessions`
--

CREATE TABLE `academic_sessions` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `session_name` varchar(20) NOT NULL,
  `status` enum('Active','Inactive') NOT NULL DEFAULT 'Inactive',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `academic_sessions`
--

INSERT INTO `academic_sessions` (`id`, `school_id`, `session_name`, `status`, `created_at`) VALUES
(1, 1, '2000-01', 'Inactive', '2026-05-14 04:25:31'),
(2, 1, '2001-02', 'Inactive', '2026-05-14 04:25:31'),
(3, 1, '2002-03', 'Inactive', '2026-05-14 04:25:31'),
(4, 1, '2003-04', 'Inactive', '2026-05-14 04:25:31'),
(5, 1, '2004-05', 'Inactive', '2026-05-14 04:25:31'),
(6, 1, '2005-06', 'Inactive', '2026-05-14 04:25:31'),
(7, 1, '2006-07', 'Inactive', '2026-05-14 04:25:31'),
(8, 1, '2007-08', 'Inactive', '2026-05-14 04:25:31'),
(9, 1, '2008-09', 'Inactive', '2026-05-14 04:25:31'),
(10, 1, '2009-10', 'Inactive', '2026-05-14 04:25:31'),
(11, 1, '2010-11', 'Inactive', '2026-05-14 04:25:31'),
(12, 1, '2011-12', 'Inactive', '2026-05-14 04:25:31'),
(13, 1, '2012-13', 'Inactive', '2026-05-14 04:25:31'),
(14, 1, '2013-14', 'Inactive', '2026-05-14 04:25:31'),
(15, 1, '2014-15', 'Inactive', '2026-05-14 04:25:31'),
(16, 1, '2015-16', 'Inactive', '2026-05-14 04:25:31'),
(17, 1, '2016-17', 'Inactive', '2026-05-14 04:25:31'),
(18, 1, '2017-18', 'Inactive', '2026-05-14 04:25:31'),
(19, 1, '2018-19', 'Inactive', '2026-05-14 04:25:31'),
(20, 1, '2019-20', 'Inactive', '2026-05-14 04:25:31'),
(21, 1, '2020-21', 'Inactive', '2026-05-14 04:25:31'),
(22, 1, '2021-22', 'Inactive', '2026-05-14 04:25:31'),
(23, 1, '2022-23', 'Inactive', '2026-05-14 04:25:31'),
(24, 1, '2023-24', 'Inactive', '2026-05-14 04:25:31'),
(25, 1, '2024-25', 'Inactive', '2026-05-14 04:25:31'),
(26, 1, '2025-26', 'Inactive', '2026-05-14 04:25:31'),
(27, 1, '2026-27', 'Inactive', '2026-05-14 04:25:31'),
(28, 1, '2027-28', 'Active', '2026-05-14 04:25:31'),
(29, 1, '2028-29', 'Inactive', '2026-05-14 04:25:31'),
(30, 1, '2029-30', 'Inactive', '2026-05-14 04:25:32'),
(31, 1, '2030-31', 'Inactive', '2026-05-14 04:25:32'),
(32, 1, '2031-32', 'Inactive', '2026-05-14 04:25:32'),
(33, 1, '2032-33', 'Inactive', '2026-05-14 04:25:32'),
(34, 1, '2033-34', 'Inactive', '2026-05-14 04:25:32'),
(35, 1, '2034-35', 'Inactive', '2026-05-14 04:25:32'),
(36, 1, '2035-36', 'Inactive', '2026-05-14 04:25:32'),
(37, 1, '2036-37', 'Inactive', '2026-05-14 04:25:32'),
(38, 1, '2037-38', 'Inactive', '2026-05-14 04:25:32'),
(39, 1, '2038-39', 'Inactive', '2026-05-14 04:25:32'),
(40, 1, '2039-40', 'Inactive', '2026-05-14 04:25:32'),
(41, 1, '2040-41', 'Inactive', '2026-05-14 04:25:32'),
(42, 1, '2041-42', 'Inactive', '2026-05-14 04:25:32'),
(43, 1, '2042-43', 'Inactive', '2026-05-14 04:25:32'),
(44, 1, '2043-44', 'Inactive', '2026-05-14 04:25:32'),
(45, 1, '2044-45', 'Inactive', '2026-05-14 04:25:32'),
(46, 1, '2045-46', 'Inactive', '2026-05-14 04:25:32'),
(47, 1, '2046-47', 'Inactive', '2026-05-14 04:25:32'),
(48, 1, '2047-48', 'Inactive', '2026-05-14 04:25:32'),
(49, 1, '2048-49', 'Inactive', '2026-05-14 04:25:32'),
(50, 1, '2049-50', 'Inactive', '2026-05-14 04:25:32'),
(51, 1, '2050-51', 'Inactive', '2026-05-14 04:25:32');

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

--
-- Table structure for table `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `school_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `module` varchar(100) NOT NULL,
  `action` varchar(50) NOT NULL,
  `record_id` bigint(20) UNSIGNED DEFAULT NULL,
  `message` text DEFAULT NULL,
  `old_data` longtext DEFAULT NULL,
  `new_data` longtext DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `audit_logs`
--

INSERT INTO `audit_logs` (`id`, `school_id`, `user_id`, `module`, `action`, `record_id`, `message`, `old_data`, `new_data`, `ip_address`, `user_agent`, `created_at`) VALUES
(46, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-10 14:07:53\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 08:37:53'),
(47, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 14:07:57\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 08:37:57'),
(48, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-10 14:14:40\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 08:44:40'),
(49, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 15:19:23\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 09:49:23'),
(50, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 16:07:27\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 10:37:27'),
(51, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-10 22:36:16\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:06:16'),
(52, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 22:36:20\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:06:20'),
(53, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 22:44:47\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:14:47'),
(54, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-10 22:57:37\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:27:37'),
(55, 1, 4, 'Authentication', 'LOGIN', 4, 'User logged in: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"role\":\"teacher\",\"name\":\"Teacher\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 22:57:43\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:27:43'),
(56, 1, 4, 'Authentication', 'LOGOUT', 4, 'User logged out: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"name\":\"Teacher\",\"role\":\"teacher\",\"logout_time\":\"2026-05-10 23:00:35\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:30:35'),
(57, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 23:00:38\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:30:38'),
(58, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-10 23:02:46\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:32:46'),
(59, 1, 4, 'Authentication', 'LOGIN', 4, 'User logged in: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"role\":\"teacher\",\"name\":\"Teacher\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 23:02:50\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:32:50'),
(60, 1, 4, 'Authentication', 'LOGOUT', 4, 'User logged out: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"name\":\"Teacher\",\"role\":\"teacher\",\"logout_time\":\"2026-05-10 23:11:24\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:41:24'),
(61, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 23:11:28\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 17:41:28'),
(62, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-11 21:57:22\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 16:27:22'),
(63, 1, 2, 'Salary', 'DELETE', 5, 'Salary deleted for Teacher ID 4 (Receipt: SAL-1778518943)', '{\"id\":5,\"school_id\":1,\"teacher_id\":4,\"amount\":\"0.00\",\"payment_date\":\"2026-05-11\",\"month_year\":\"May-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-1778518943\",\"created_at\":\"2026-05-11 22:32:23\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:02:34'),
(64, 1, 2, 'Salary', 'DELETE', 4, 'Salary deleted for Teacher ID 4 (Receipt: SAL-1778518848)', '{\"id\":4,\"school_id\":1,\"teacher_id\":4,\"amount\":\"0.00\",\"payment_date\":\"2026-05-11\",\"month_year\":\"May-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-1778518848\",\"created_at\":\"2026-05-11 22:30:48\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:02:36'),
(65, 1, 2, 'Salary', 'DELETE', 3, 'Salary deleted for Teacher ID 4 (Receipt: SAL-20260510134326430)', '{\"id\":3,\"school_id\":1,\"teacher_id\":4,\"amount\":\"5000.00\",\"payment_date\":\"2026-05-10\",\"month_year\":\"April-2026\",\"remarks\":null,\"receipt_no\":\"SAL-20260510134326430\",\"created_at\":\"2026-05-10 13:43:26\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:02:38'),
(66, 1, 2, 'Teachers', 'UPDATE', 4, 'Teacher updated', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"6000\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:04:10'),
(67, 1, 2, 'Salary', 'DELETE', 6, 'Salary deleted for Teacher ID 4 (Receipt: SAL-1778519024)', '{\"id\":6,\"school_id\":1,\"teacher_id\":4,\"amount\":\"0.00\",\"payment_date\":\"2026-05-11\",\"month_year\":\"April-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-1778519024\",\"created_at\":\"2026-05-11 22:33:44\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:04:17'),
(68, 1, 2, 'Teachers', 'DELETE', 4, 'Teacher deleted', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"6000.00\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:04:35'),
(69, 1, 2, 'Teachers', 'CREATE', 5, 'New teacher added', NULL, '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"Bed\",\"salary\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:06:13'),
(70, 1, 2, 'Teachers', 'UPDATE', 5, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"Bed\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"Bed\",\"salary\":\"9000\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-11 17:06:20'),
(71, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-12 08:06:46\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 02:36:46'),
(72, 1, 2, 'Salary', 'DELETE', 11, 'Salary deleted for Teacher ID 5 (Receipt: SAL-736628CF)', '{\"id\":11,\"school_id\":1,\"teacher_id\":5,\"amount\":\"8419.35\",\"payment_date\":\"2026-05-11\",\"month_year\":\"May-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-736628CF\",\"created_at\":\"2026-05-11 22:53:37\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 02:38:20'),
(73, 1, 2, 'Salary', 'DELETE', 12, 'Salary deleted for Teacher ID 5 (Receipt: SAL-15E08EC5)', '{\"id\":12,\"school_id\":1,\"teacher_id\":5,\"amount\":\"9000.00\",\"payment_date\":\"2026-05-12\",\"month_year\":\"April-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-15E08EC5\",\"created_at\":\"2026-05-12 08:12:05\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 02:56:27'),
(74, 1, 2, 'Salary', 'DELETE', 14, 'Salary deleted for Teacher ID 5 (Receipt: SAL-12D706A4)', '{\"id\":14,\"school_id\":1,\"teacher_id\":5,\"amount\":\"300.00\",\"payment_date\":\"2026-05-12\",\"month_year\":\"May-2026\",\"remarks\":\"\",\"receipt_no\":\"SAL-12D706A4\",\"created_at\":\"2026-05-12 08:29:09\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:15:59'),
(75, 1, 2, 'Salary', 'CREATE', 16, 'Salary paid to Teacher 1 for May-2026 (₹500)', NULL, '{\"teacher_id\":5,\"teacher_name\":\"Teacher 1\",\"amount\":500,\"payment_date\":\"2026-05-12\",\"month_year\":\"May-2026\",\"receipt_no\":\"SAL-20260512084611730\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:16:11'),
(76, 1, 2, 'Salary', 'DELETE', 16, 'Salary deleted for Teacher ID 5 (Receipt: SAL-20260512084611730)', '{\"id\":16,\"school_id\":1,\"teacher_id\":5,\"amount\":\"500.00\",\"payment_date\":\"2026-05-12\",\"month_year\":\"May-2026\",\"remarks\":null,\"receipt_no\":\"SAL-20260512084611730\",\"created_at\":\"2026-05-12 08:46:11\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:16:17'),
(77, 1, 2, 'Students', 'CREATE', 9, 'New student added', NULL, '{\"name\":\"dasdasd sada\",\"roll_no\":\"12\",\"class_id\":\"2\",\"section\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:23:02'),
(78, 1, 2, 'Students', 'CREATE', 10, 'New student added', NULL, '{\"name\":\"aaaa aaaaa\",\"roll_no\":\"10\",\"class_id\":\"2\",\"section\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:28:18'),
(79, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 07:29:49\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 01:59:49'),
(80, 1, 2, 'Exam Schedule', 'CREATE', 5, 'Exam schedule saved for Class 2, Session 2026-27', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"session_year\":\"2026-27\",\"subjects_count\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:01:28'),
(81, 1, 2, 'Exam Schedule', 'CREATE', 6, 'Exam schedule saved for Class 2, Session 2026-27', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"session_year\":\"2026-27\",\"subjects_count\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:01:44'),
(82, 1, 2, 'Exam Schedule', 'CREATE', 7, 'Exam schedule saved for Class 2, Session 2026-27', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"session_year\":\"2026-27\",\"subjects_count\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:07'),
(83, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 5', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:22'),
(84, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:37'),
(85, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:43'),
(86, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:48'),
(87, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 4', NULL, '{\"exam_type_id\":4,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:02:57'),
(88, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:03:08'),
(89, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:03:14'),
(90, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:03:20'),
(91, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 5', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:12:42'),
(92, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 5', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:37:44'),
(93, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 5', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:37:50'),
(94, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 5', NULL, '{\"exam_type_id\":5,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:37:56'),
(95, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:06'),
(96, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:12'),
(97, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 6', NULL, '{\"exam_type_id\":6,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:17'),
(98, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 4', NULL, '{\"exam_type_id\":4,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:37'),
(99, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 4', NULL, '{\"exam_type_id\":4,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:43'),
(100, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 4', NULL, '{\"exam_type_id\":4,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:48'),
(101, 1, 2, 'Exam Marks', 'CREATE', 5, 'Exam marks entered for Student ID 5, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":5,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:38:57'),
(102, 1, 2, 'Exam Marks', 'CREATE', 10, 'Exam marks entered for Student ID 10, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":10,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:39:03'),
(103, 1, 2, 'Exam Marks', 'CREATE', 9, 'Exam marks entered for Student ID 9, Exam Type 7', NULL, '{\"exam_type_id\":7,\"class_id\":2,\"student_id\":9,\"session_year\":\"2026-27\",\"subjects_count\":1,\"subjects\":[6]}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 02:39:07'),
(104, 1, 2, 'School Settings', 'UPDATE', 1, 'School profile updated: Hello Kids', '{\"school_name\":\"Hello Kids\",\"school_address\":\"Neemuch\",\"school_phone\":\"1234567890\",\"school_email\":\"Hello@admin.com\",\"school_website\":\"\",\"school_reg_no\":\"12364\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\",\"language\":\"en\",\"currency\":\"INR\",\"result_pattern\":\"\",\"school_logo\":\"\"}', '{\"school_name\":\"Hello Kids\",\"school_address\":\"Neemuch\",\"school_phone\":\"1234567890\",\"school_email\":\"Hello@admin.com\",\"school_website\":\"\",\"school_reg_no\":\"12364\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\",\"language\":\"en\",\"currency\":\"INR\",\"result_pattern\":\"\",\"school_logo\":\"1778729305_242274e6c85414ae.png\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:28:25'),
(105, 1, 2, 'Income', 'CREATE', 6, 'Income added: sadsa', NULL, '{\"category_id\":\"2\",\"description\":\"sadsa\",\"amount\":5500,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"INC-1778730978\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:56:18'),
(106, 1, 2, 'Expenses', 'CREATE', 9, 'Expense added: sdas (₹8700)', NULL, '{\"category_id\":4,\"description\":\"sdas\",\"amount\":8700,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"EXP-20260514092629689\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:56:29'),
(107, 1, 2, 'Income', 'CREATE', 7, 'Income added: ASDASD', NULL, '{\"category_id\":\"2\",\"description\":\"ASDASD\",\"amount\":2500,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-04-14\",\"receipt_no\":\"INC-1778731065\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:57:45'),
(108, 1, 2, 'Expenses', 'CREATE', 10, 'Expense added: DASD (₹500)', NULL, '{\"category_id\":5,\"description\":\"DASD\",\"amount\":500,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-04-30\",\"receipt_no\":\"EXP-20260514092808403\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:58:08'),
(109, 1, 2, 'Fees', 'PAYMENT', 26, 'Fee payment created. Receipt: Hello-001', NULL, '{\"student_id\":10,\"receipt_no\":\"Hello-001\",\"paid_amount\":8500,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:58:34'),
(110, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-14 09:29:03\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:59:03'),
(111, 1, 4, 'Authentication', 'LOGIN', 4, 'User logged in: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"role\":\"teacher\",\"name\":\"Teacher\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 09:29:11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:59:11'),
(112, 1, 4, 'Authentication', 'LOGOUT', 4, 'User logged out: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"name\":\"Teacher\",\"role\":\"teacher\",\"logout_time\":\"2026-05-14 09:29:22\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:59:22'),
(113, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 09:29:26\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 03:59:26'),
(114, 1, 2, 'Authentication', 'LOGOUT', 2, 'User logged out: admin (admin)', NULL, '{\"username\":\"admin\",\"name\":\"Hello Kids\",\"role\":\"admin\",\"logout_time\":\"2026-05-14 09:30:49\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 04:00:49'),
(115, 1, 4, 'Authentication', 'LOGIN', 4, 'User logged in: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"role\":\"teacher\",\"name\":\"Teacher\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 09:30:54\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 04:00:54'),
(116, 1, 4, 'Authentication', 'LOGOUT', 4, 'User logged out: teacher (teacher)', NULL, '{\"username\":\"teacher\",\"name\":\"Teacher\",\"role\":\"teacher\",\"logout_time\":\"2026-05-14 09:33:14\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 04:03:14'),
(117, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 09:33:17\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 04:03:17'),
(118, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 12:08:06\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 06:38:06'),
(119, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 13:03:22\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 07:33:22'),
(120, 1, 2, 'Fees', 'PAYMENT', 27, 'Fee payment created. Receipt: Hello-002', NULL, '{\"student_id\":5,\"receipt_no\":\"Hello-002\",\"paid_amount\":500,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 07:59:26'),
(121, 1, 2, 'Fees', 'UPDATE', 27, 'Fee receipt updated for student sadasd', '{\"paid_amount\":\"500.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\"}', '{\"paid_amount\":600,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 08:03:02'),
(122, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 15:10:52\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 09:40:52'),
(123, 1, 2, 'Exam Schedule', 'CREATE', 5, 'Exam schedule saved for Class 11, Session 2025-26', NULL, '{\"exam_type_id\":5,\"class_id\":11,\"session_year\":\"2025-26\",\"subjects_count\":1}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 09:54:48'),
(124, 1, 2, 'Expenses', 'CREATE', 11, 'Expense added: sadas (₹5050)', NULL, '{\"category_id\":5,\"description\":\"sadas\",\"amount\":5050,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"EXP-20260514153336558\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 10:03:36'),
(125, 1, 2, 'Income', 'CREATE', 8, 'Income added: sadas', NULL, '{\"category_id\":\"2\",\"description\":\"sadas\",\"amount\":500,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"INC-1778753974\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 10:19:34'),
(126, 1, 2, 'Income', 'UPDATE', 8, 'Income updated: sadas', '{\"id\":8,\"school_id\":1,\"session_id\":26,\"category_id\":2,\"description\":\"sadas\",\"amount\":\"500.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"INC-1778753974\",\"created_at\":\"2026-05-14 15:49:34\"}', '{\"category_id\":\"2\",\"description\":\"sadas\",\"amount\":600,\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 10:23:13'),
(127, 1, 2, 'TC Certificates', 'CREATE', 5, 'TC generated for student sadasd', NULL, '{\"student_id\":5,\"tc_no\":\"TC-2026\\/001\",\"issue_date\":\"2026-05-14\",\"reason\":\"School Transfer\",\"status\":\"issued\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 10:33:42'),
(128, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-14 21:44:08\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 16:14:08'),
(129, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-14\",\"session_id\":27,\"total_students\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 16:48:34'),
(130, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-14\",\"session_id\":27,\"total_students\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 16:50:16'),
(131, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-13\",\"session_id\":27,\"total_students\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 16:50:48'),
(132, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-13\",\"session_id\":27,\"total_students\":3}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 16:53:28'),
(133, 1, 2, 'Salary', 'CREATE', 19, 'Salary paid to Teacher 1 for 2026-05', NULL, '{\"teacher_id\":5,\"teacher_name\":\"Teacher 1\",\"amount\":300,\"payment_date\":\"2026-05-14\",\"month_year\":\"2026-05\",\"receipt_no\":\"SAL-72101EF758\",\"session_id\":27}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:27:04'),
(134, 1, 2, 'Salary', 'DELETE', 19, 'Salary deleted (Receipt: SAL-72101EF758)', '{\"id\":19,\"school_id\":1,\"session_id\":27,\"teacher_id\":5,\"amount\":\"300.00\",\"payment_date\":\"2026-05-14\",\"month_year\":\"2026-05\",\"remarks\":null,\"receipt_no\":\"SAL-72101EF758\",\"created_at\":\"2026-05-14 22:57:04\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:27:14'),
(135, 1, 2, 'Fees', 'CREATE', 6, 'Class fees added', NULL, '{\"class_id\":11,\"total_fees\":6000}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:34:12'),
(136, 1, 2, 'Fees', 'PAYMENT', 28, 'Fee payment created. Receipt: Hello-003', NULL, '{\"student_id\":5,\"receipt_no\":\"Hello-003\",\"paid_amount\":5000,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:34:49'),
(137, 1, 2, 'Fees', 'PAYMENT', 29, 'Fee payment created. Receipt: Hello-004', NULL, '{\"student_id\":10,\"receipt_no\":\"Hello-004\",\"paid_amount\":5000,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:35:02'),
(138, 1, 2, 'Fees', 'PAYMENT', 30, 'Fee payment created. Receipt: Hello-005', NULL, '{\"student_id\":5,\"receipt_no\":\"Hello-005\",\"paid_amount\":5000,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:35:09'),
(139, 1, 2, 'Fees', 'PAYMENT', 31, 'Fee payment created. Receipt: Hello-006', NULL, '{\"student_id\":9,\"receipt_no\":\"Hello-006\",\"paid_amount\":5000,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:35:25'),
(140, 1, 2, 'Fees', 'PAYMENT', 32, 'Fee payment created. Receipt: Hello-007', NULL, '{\"student_id\":7,\"receipt_no\":\"Hello-007\",\"paid_amount\":6000,\"payment_mode\":\"Cash\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-14 17:38:20'),
(141, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-17 20:26:46\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-17 14:56:46'),
(142, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-18 07:30:42\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:00:42'),
(143, 1, 2, 'Students', 'UPDATE', 5, 'Student updated', '{\"name\":\"sadasd \",\"roll_no\":\"TEMP-5\",\"class_id\":2}', '{\"name\":\"sadasd \",\"roll_no\":\"TEMP-5\",\"class_id\":\"2\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:53:28'),
(144, 1, 2, 'Students', 'UPDATE', 27, 'Student updated', '{\"name\":\"bbb sukta\",\"roll_no\":\"213\",\"class_id\":2}', '{\"name\":\"bbb sukta\",\"roll_no\":\"213\",\"class_id\":\"2\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:53:35'),
(145, 1, 2, 'Students', 'DELETE', 5, 'Student deleted', '{\"name\":\"sadasd \",\"roll_no\":\"TEMP-5\",\"class_id\":2}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:54:02'),
(146, 1, 2, 'Students', 'DELETE', 27, 'Student deleted', '{\"name\":\"bbb sukta\",\"roll_no\":\"213\",\"class_id\":2}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:54:07'),
(147, 1, 2, 'Students', 'DELETE', 26, 'Student deleted', '{\"name\":\"vvv gupta\",\"roll_no\":\"212\",\"class_id\":2}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 02:54:14'),
(148, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-18 11:50:10\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-18 06:20:10'),
(149, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-20 08:20:04\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-20 02:50:04'),
(150, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-21 09:18:40\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:48:40'),
(151, 1, 2, 'Expenses', 'DELETE', 11, 'Expense deleted: Receipt #EXP-20260514153336558', '{\"id\":11,\"school_id\":1,\"session_id\":26,\"category_id\":5,\"description\":\"sadas\",\"amount\":\"5050.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"EXP-20260514153336558\",\"created_at\":\"2026-05-14 15:33:36\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:57:44'),
(152, 1, 2, 'Expenses', 'DELETE', 9, 'Expense deleted: Receipt #EXP-20260514092629689', '{\"id\":9,\"school_id\":1,\"session_id\":26,\"category_id\":4,\"description\":\"sdas\",\"amount\":\"8700.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-14\",\"receipt_no\":\"EXP-20260514092629689\",\"created_at\":\"2026-05-14 09:26:29\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:57:46'),
(153, 1, 2, 'Expenses', 'DELETE', 5, 'Expense deleted: Receipt #EXP-20260510122040192', '{\"id\":5,\"school_id\":1,\"session_id\":26,\"category_id\":5,\"description\":\"light bill\",\"amount\":\"500.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-05-10\",\"receipt_no\":\"EXP-20260510122040192\",\"created_at\":\"2026-05-10 12:20:40\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:57:49'),
(154, 1, 2, 'Expenses', 'DELETE', 4, 'Expense deleted: Receipt #SAL-20260509141540548', '{\"id\":4,\"school_id\":1,\"session_id\":26,\"category_id\":7,\"description\":\"Salary Paid to fsdf for April-2026\",\"amount\":\"5000.00\",\"payment_mode\":\"Bank Transfer\",\"payment_date\":\"2026-05-09\",\"receipt_no\":\"SAL-20260509141540548\",\"created_at\":\"2026-05-09 14:15:40\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:57:51'),
(155, 1, 2, 'Expenses', 'DELETE', 10, 'Expense deleted: Receipt #EXP-20260514092808403', '{\"id\":10,\"school_id\":1,\"session_id\":26,\"category_id\":5,\"description\":\"DASD\",\"amount\":\"500.00\",\"payment_mode\":\"Cash\",\"payment_date\":\"2026-04-30\",\"receipt_no\":\"EXP-20260514092808403\",\"created_at\":\"2026-05-14 09:28:08\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:57:53'),
(156, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-21\",\"session_id\":28,\"total_students\":10}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:00:11'),
(157, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-20\",\"session_id\":28,\"total_students\":10}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:00:32'),
(158, 12, 15, 'Authentication', 'LOGOUT', 15, 'User logged out: sdhkasj (admin)', NULL, '{\"username\":\"sdhkasj\",\"name\":\"sdkasjh\",\"role\":\"admin\",\"logout_time\":\"2026-05-21 09:47:46\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"session_duration\":null}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:17:46'),
(159, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-22 09:30:23\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 04:00:23'),
(160, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-22 11:24:09\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 05:54:09'),
(161, 1, 2, 'Students', 'CREATE', 38, 'New student added', NULL, '{\"name\":\"Student 1 demo 1\",\"roll_no\":\"201\",\"class_id\":\"2\",\"section\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 05:55:44'),
(162, 1, 2, 'Students', 'CREATE', 40, 'New student added', NULL, '{\"name\":\"dasd dasdasd\",\"roll_no\":\"\",\"class_id\":\"11\",\"section\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 06:00:29'),
(163, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-22 12:13:15\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 06:43:15');
INSERT INTO `audit_logs` (`id`, `school_id`, `user_id`, `module`, `action`, `record_id`, `message`, `old_data`, `new_data`, `ip_address`, `user_agent`, `created_at`) VALUES
(164, 1, 2, 'Students', 'CREATE', 41, 'Student added', NULL, '{\"name\":\"aaa ssss\",\"roll_no\":\"333\",\"class_id\":\"2\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:01:17'),
(165, 1, 2, 'Students', 'CREATE', 43, 'Student added', NULL, '{\"name\":\"zzz aaa\",\"roll_no\":\"555\",\"class_id\":\"11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:05:23'),
(166, 1, 2, 'Students', 'CREATE', 46, 'Student added', NULL, '{\"name\":\"aaa sas\",\"roll_no\":\"33\",\"class_id\":\"11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:33:05'),
(167, 1, 2, 'Students', 'CREATE', 49, 'Student added', NULL, '{\"name\":\"asasasasasasasasas\",\"roll_no\":\"3333\",\"class_id\":\"11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:34:36'),
(168, 1, 2, 'Students', 'CREATE', 51, 'Student added', NULL, '{\"name\":\"sasd\",\"roll_no\":\"99\",\"class_id\":\"11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:35:19'),
(169, 1, 2, 'Students', 'UPDATE', 30, 'Student updated', '{\"name\":\"Priya Yadav\",\"roll_no\":\"103\",\"class_id\":2}', '{\"name\":\"Priya Yadav\",\"roll_no\":\"103\",\"class_id\":\"2\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 07:58:16'),
(170, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-22 20:36:58\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 15:06:58'),
(171, 1, 2, 'Attendance', 'SAVE', 11, 'Attendance saved', NULL, '{\"class_id\":11,\"attendance_date\":\"2026-05-22\",\"session_id\":28,\"total_students\":15}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 15:51:06'),
(172, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-22\",\"session_id\":28,\"total_students\":12}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:09:04'),
(173, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-22\",\"session_id\":28,\"total_students\":12}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:09:05'),
(174, 1, 2, 'Attendance', 'SAVE', 2, 'Attendance saved', NULL, '{\"class_id\":2,\"attendance_date\":\"2026-05-22\",\"session_id\":28,\"total_students\":12}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:27:31'),
(175, 1, 2, 'Teachers', 'CREATE', 6, 'New teacher added', NULL, '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:38:08'),
(176, 1, 2, 'Teachers', 'DELETE', 6, 'Teacher deleted', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:38:35'),
(177, 1, 2, 'Teachers', 'DELETE', 5, 'Teacher deleted', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"Bed\",\"salary\":\"9000.00\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:40:46'),
(178, 1, 2, 'Teachers', 'CREATE', 7, 'New teacher added', NULL, '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:41:54'),
(179, 1, 2, 'Teachers', 'UPDATE', 7, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:42:06'),
(180, 1, 2, 'Teachers', 'UPDATE', 7, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"6000\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:42:14'),
(181, 1, 2, 'Teachers', 'UPDATE', 7, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"1234567890\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:42:24'),
(182, 1, 2, 'Teachers', 'UPDATE', 7, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"1234567890\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"1234567890\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 16:52:25'),
(183, 1, 2, 'Teachers', 'UPDATE', 7, 'Teacher updated', '{\"name\":\"Teacher 1\",\"mobile_no\":\"1234567890\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '{\"name\":\"Teacher 1\",\"mobile_no\":\"1234567890\",\"qualification\":\"\",\"salary\":\"6000.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:05:06'),
(184, 1, 2, 'Teachers', 'CREATE', 8, 'New teacher added', NULL, '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:13:34'),
(185, 1, 2, 'Teachers', 'UPDATE', 8, 'Teacher updated', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:13:44'),
(186, 1, 2, 'Teachers', 'UPDATE', 8, 'Teacher updated', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:14:31'),
(187, 1, 2, 'Teachers', 'UPDATE', 8, 'Teacher updated', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"0.00\"}', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"5000\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:16:10'),
(188, 1, 2, 'Teachers', 'UPDATE', 8, 'Teacher updated', '{\"name\":\"Teacher 2\",\"mobile_no\":\"\",\"qualification\":\"\",\"salary\":\"5000.00\"}', '{\"name\":\"Teacher 2\",\"mobile_no\":\"1122334455\",\"qualification\":\"\",\"salary\":\"5000.00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-22 17:17:40'),
(189, 1, 2, 'Authentication', 'LOGIN', 2, 'User logged in: admin (admin)', NULL, '{\"username\":\"admin\",\"role\":\"admin\",\"name\":\"Hello Kids\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-23 12:25:18\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-23 06:55:18');

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

--
-- Table structure for table `books`
--

CREATE TABLE `books` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `book_title` varchar(255) NOT NULL,
  `book_no` varchar(100) DEFAULT NULL,
  `isbn_no` varchar(100) DEFAULT NULL,
  `publish` varchar(255) DEFAULT NULL,
  `author` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `rack_no` varchar(50) DEFAULT NULL,
  `qty` int(11) DEFAULT 0,
  `perunitcost` decimal(10,2) DEFAULT 0.00,
  `postdate` date DEFAULT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `books`
--

INSERT INTO `books` (`id`, `school_id`, `book_title`, `book_no`, `isbn_no`, `publish`, `author`, `subject`, `rack_no`, `qty`, `perunitcost`, `postdate`, `description`, `created_at`) VALUES
(1, 2, 'dsaa', 'dsada', 'dsaasd', 'dsad1', 'sa3d1a', '1dsa32d', '1ds32d1', 320, 0.00, '2026-01-31', 'sdasdasd12a', '2026-05-06 17:33:05'),
(3, 7, 'jflkdsj', 'jfflkjs`', 'jslkj`lfjlskfj`ljalskj`', 'jsdlksjf', 'ljsalkj', 'lkjdslkj', 'lklkjasl', 50, 500.00, '2026-05-08', 'asdjhad', '2026-05-08 07:41:02'),
(4, 1, 'sdjfsdlfj', 'jdfj', 'lkdj', 'jslkdj', 'lkjlkj', 'qlkslkdj', 'lkjslkjsaj', 50, 500.00, '2026-05-10', 'sd', '2026-05-10 05:05:57');

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

--
-- Table structure for table `classes`
--

CREATE TABLE `classes` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `class_name` varchar(100) NOT NULL,
  `section` varchar(50) DEFAULT NULL,
  `house` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `sort_order` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `classes`
--

INSERT INTO `classes` (`id`, `school_id`, `class_name`, `section`, `house`, `created_at`, `updated_at`, `sort_order`) VALUES
(2, 1, 'LKG', 'A', NULL, '2026-05-05 18:04:21', '2026-05-05 18:04:21', 0),
(4, 2, '1st', 'A', NULL, '2026-05-05 18:06:43', '2026-05-05 18:06:43', 0),
(5, 2, '2nd', 'A', NULL, '2026-05-06 06:59:02', '2026-05-06 06:59:02', 0),
(6, 2, 'LKG', 'A', NULL, '2026-05-06 06:59:12', '2026-05-06 06:59:12', 0),
(7, 5, '9th', 'A', NULL, '2026-05-08 05:31:51', '2026-05-08 05:31:51', 0),
(8, 3, '10', 'A', NULL, '2026-05-08 05:32:11', '2026-05-08 05:32:11', 0),
(9, 7, '12th', NULL, NULL, '2026-05-08 07:38:01', '2026-05-08 07:38:01', 0),
(11, 1, 'UKG', 'A', NULL, '2026-05-08 07:42:57', '2026-05-08 07:42:57', 0),
(12, 1, '10', 'A', NULL, '2026-05-17 16:09:19', '2026-05-17 16:09:19', 0),
(13, 1, '11', 'A', NULL, '2026-05-17 16:09:24', '2026-05-17 16:09:24', 0);

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

--
-- Table structure for table `class_fees`
--

CREATE TABLE `class_fees` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `class_id` int(10) UNSIGNED NOT NULL,
  `total_fees` decimal(10,2) DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `class_fees`
--

INSERT INTO `class_fees` (`id`, `school_id`, `class_id`, `total_fees`, `created_at`) VALUES
(2, 2, 4, 16000.00, '2026-05-06 08:08:38'),
(3, 2, 5, 18000.00, '2026-05-06 08:08:47'),
(4, 2, 6, 12000.00, '2026-05-06 08:08:52'),
(5, 1, 2, 5000.00, '2026-05-09 17:02:58'),
(6, 1, 11, 6000.00, '2026-05-14 17:34:12');

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

--
-- Table structure for table `class_subject_teachers`
--

CREATE TABLE `class_subject_teachers` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `class_id` int(10) UNSIGNED NOT NULL,
  `subject_id` int(10) UNSIGNED NOT NULL,
  `teacher_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `drivers`
--

CREATE TABLE `drivers` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(150) DEFAULT NULL,
  `license_no` varchar(50) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `drivers`
--

INSERT INTO `drivers` (`id`, `school_id`, `name`, `license_no`, `phone`, `status`) VALUES
(1, 2, 'Driver 1', 'Dl-12-ddas54', '9876543210', 'Active');

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

--
-- Table structure for table `exam_results`
--

CREATE TABLE `exam_results` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `school_id` bigint(20) UNSIGNED NOT NULL,
  `exam_type_id` bigint(20) UNSIGNED NOT NULL,
  `class_id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `session_year` varchar(20) NOT NULL,
  `total_subjects` int(11) NOT NULL DEFAULT 0,
  `total_marks` decimal(8,2) NOT NULL DEFAULT 0.00,
  `obtained_marks` decimal(8,2) NOT NULL DEFAULT 0.00,
  `percentage` decimal(6,2) NOT NULL DEFAULT 0.00,
  `overall_grade` varchar(20) DEFAULT NULL,
  `rank_position` int(11) DEFAULT NULL,
  `result_status` enum('Pass','Fail') DEFAULT 'Pass',
  `remarks` text DEFAULT NULL,
  `is_published` tinyint(1) NOT NULL DEFAULT 0,
  `generated_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `exam_results`
--

INSERT INTO `exam_results` (`id`, `school_id`, `exam_type_id`, `class_id`, `student_id`, `session_year`, `total_subjects`, `total_marks`, `obtained_marks`, `percentage`, `overall_grade`, `rank_position`, `result_status`, `remarks`, `is_published`, `generated_at`, `updated_at`) VALUES
(11, 1, 5, 2, 5, '2026-27', 1, 20.00, 12.00, 60.00, 'B', 3, 'Pass', NULL, 1, '2026-05-14 02:40:41', '2026-05-14 02:42:09'),
(12, 1, 5, 2, 10, '2026-27', 1, 20.00, 14.00, 70.00, 'B+', 2, 'Pass', NULL, 1, '2026-05-14 02:40:41', '2026-05-14 02:42:09'),
(13, 1, 5, 2, 9, '2026-27', 1, 20.00, 16.00, 80.00, 'A', 1, 'Pass', NULL, 1, '2026-05-14 02:40:41', '2026-05-14 02:42:09'),
(14, 1, 6, 2, 5, '2026-27', 1, 20.00, 16.00, 80.00, 'A', 3, 'Pass', NULL, 1, '2026-05-14 02:41:18', '2026-05-14 02:42:14'),
(15, 1, 6, 2, 10, '2026-27', 1, 20.00, 17.00, 85.00, 'A', 1, 'Pass', NULL, 1, '2026-05-14 02:41:18', '2026-05-14 02:42:14'),
(16, 1, 6, 2, 9, '2026-27', 1, 20.00, 17.00, 85.00, 'A', 2, 'Pass', NULL, 1, '2026-05-14 02:41:18', '2026-05-14 02:42:14'),
(17, 1, 4, 2, 5, '2026-27', 1, 100.00, 68.00, 68.00, 'B', 3, 'Pass', NULL, 1, '2026-05-14 02:41:40', '2026-05-14 02:42:18'),
(18, 1, 4, 2, 10, '2026-27', 1, 100.00, 80.00, 80.00, 'A', 2, 'Pass', NULL, 1, '2026-05-14 02:41:40', '2026-05-14 02:42:18'),
(19, 1, 4, 2, 9, '2026-27', 1, 100.00, 85.00, 85.00, 'A', 1, 'Pass', NULL, 1, '2026-05-14 02:41:40', '2026-05-14 02:42:18'),
(20, 1, 7, 2, 5, '2026-27', 1, 100.00, 80.00, 80.00, 'A', 3, 'Pass', NULL, 1, '2026-05-14 02:41:55', '2026-05-14 02:42:22'),
(21, 1, 7, 2, 10, '2026-27', 1, 100.00, 85.00, 85.00, 'A', 2, 'Pass', NULL, 1, '2026-05-14 02:41:55', '2026-05-14 02:42:22'),
(22, 1, 7, 2, 9, '2026-27', 1, 100.00, 88.00, 88.00, 'A', 1, 'Pass', NULL, 1, '2026-05-14 02:41:55', '2026-05-14 02:42:22');

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

--
-- Table structure for table `exam_result_details`
--

CREATE TABLE `exam_result_details` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `school_id` bigint(20) UNSIGNED NOT NULL,
  `result_id` bigint(20) UNSIGNED NOT NULL,
  `exam_type_id` bigint(20) UNSIGNED NOT NULL,
  `class_id` bigint(20) UNSIGNED NOT NULL,
  `student_id` bigint(20) UNSIGNED NOT NULL,
  `subject_id` bigint(20) UNSIGNED NOT NULL,
  `schedule_id` bigint(20) UNSIGNED DEFAULT NULL,
  `total_marks` decimal(5,2) NOT NULL DEFAULT 0.00,
  `obtained_marks` decimal(5,2) NOT NULL DEFAULT 0.00,
  `subject_grade` varchar(20) DEFAULT NULL,
  `attendance_status` enum('Present','Absent') DEFAULT 'Present',
  `result_status` enum('Pass','Fail') DEFAULT 'Pass',
  `remarks` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `exam_result_details`
--

INSERT INTO `exam_result_details` (`id`, `school_id`, `result_id`, `exam_type_id`, `class_id`, `student_id`, `subject_id`, `schedule_id`, `total_marks`, `obtained_marks`, `subject_grade`, `attendance_status`, `result_status`, `remarks`, `created_at`, `updated_at`) VALUES
(11, 1, 11, 5, 2, 5, 6, 4, 20.00, 12.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:40:41', '2026-05-14 02:40:41'),
(12, 1, 12, 5, 2, 10, 6, 4, 20.00, 14.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:40:41', '2026-05-14 02:40:41'),
(13, 1, 13, 5, 2, 9, 6, 4, 20.00, 16.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:40:41', '2026-05-14 02:40:41'),
(14, 1, 14, 6, 2, 5, 6, 5, 20.00, 16.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:18', '2026-05-14 02:41:18'),
(15, 1, 15, 6, 2, 10, 6, 5, 20.00, 17.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:18', '2026-05-14 02:41:18'),
(16, 1, 16, 6, 2, 9, 6, 5, 20.00, 17.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:18', '2026-05-14 02:41:18'),
(17, 1, 17, 4, 2, 5, 6, 3, 100.00, 68.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:40', '2026-05-14 02:41:40'),
(18, 1, 18, 4, 2, 10, 6, 3, 100.00, 80.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:40', '2026-05-14 02:41:40'),
(19, 1, 19, 4, 2, 9, 6, 3, 100.00, 85.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:40', '2026-05-14 02:41:40'),
(20, 1, 20, 7, 2, 5, 6, 6, 100.00, 80.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:55', '2026-05-14 02:41:55'),
(21, 1, 21, 7, 2, 10, 6, 6, 100.00, 85.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:55', '2026-05-14 02:41:55'),
(22, 1, 22, 7, 2, 9, 6, 6, 100.00, 88.00, NULL, 'Present', 'Pass', NULL, '2026-05-14 02:41:55', '2026-05-14 02:41:55');

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

--
-- Table structure for table `exam_schedule`
--

CREATE TABLE `exam_schedule` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `exam_type_id` int(10) UNSIGNED NOT NULL,
  `class_id` int(10) UNSIGNED NOT NULL,
  `subject_id` int(10) UNSIGNED NOT NULL,
  `exam_date` date DEFAULT NULL,
  `max_marks` decimal(5,2) DEFAULT NULL,
  `no_exam` tinyint(1) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `session_year` varchar(10) DEFAULT '2026-27'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `exam_schedule`
--

INSERT INTO `exam_schedule` (`id`, `school_id`, `exam_type_id`, `class_id`, `subject_id`, `exam_date`, `max_marks`, `no_exam`, `created_at`, `session_year`) VALUES
(1, 2, 2, 4, 3, '2026-05-07', 80.00, 0, '2026-05-07 17:39:30', '2026-27'),
(2, 2, 2, 4, 2, '2026-05-08', 80.00, 0, '2026-05-07 17:39:30', '2026-27'),
(3, 1, 4, 2, 6, '2026-05-01', 100.00, 0, '2026-05-10 08:00:32', '2026-27'),
(4, 1, 5, 2, 6, '2026-04-14', 20.00, 0, '2026-05-14 02:01:28', '2026-27'),
(5, 1, 6, 2, 6, '2026-05-16', 20.00, 0, '2026-05-14 02:01:44', '2026-27'),
(6, 1, 7, 2, 6, '2026-04-26', 100.00, 0, '2026-05-14 02:02:07', '2026-27'),
(7, 1, 5, 11, 6, '2026-05-14', 20.00, 0, '2026-05-14 09:54:48', '2025-26');

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

--
-- Table structure for table `exam_types`
--

CREATE TABLE `exam_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `exam_name` varchar(100) NOT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `display_order` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `exam_types`
--

INSERT INTO `exam_types` (`id`, `school_id`, `exam_name`, `status`, `created_at`, `updated_at`, `display_order`) VALUES
(1, 2, 'Unit Test', 'Active', '2026-05-07 17:26:53', '2026-05-07 17:26:53', 0),
(2, 2, 'Half Yearly', 'Active', '2026-05-07 17:26:59', '2026-05-14 02:58:34', 3),
(3, 2, 'Final Result', 'Active', '2026-05-08 04:17:52', '2026-05-08 04:17:52', 0),
(4, 1, 'Half Yearly', 'Active', '2026-05-10 07:35:37', '2026-05-14 02:58:34', 3),
(5, 1, 'SA1', 'Active', '2026-05-14 02:00:25', '2026-05-14 02:58:12', 1),
(6, 1, 'SA2', 'Active', '2026-05-14 02:00:29', '2026-05-14 02:58:20', 2),
(7, 1, 'Annual', 'Active', '2026-05-14 02:00:33', '2026-05-14 02:58:42', 4);

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

--
-- Table structure for table `expense_categories`
--

CREATE TABLE `expense_categories` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `expense_categories`
--

INSERT INTO `expense_categories` (`id`, `school_id`, `name`, `created_at`) VALUES
(1, 2, 'Electricity Bill', '2026-05-06 17:07:57'),
(2, 2, 'Water bill', '2026-05-06 17:15:30'),
(3, 2, 'Salary', '2026-05-06 17:20:33'),
(4, 1, 'bills', '2026-05-08 07:47:44'),
(5, 1, 'bill', '2026-05-08 07:48:59'),
(6, 1, 'electric', '2026-05-08 07:52:35'),
(7, 1, 'Salary', '2026-05-09 08:45:40'),
(8, 7, 'Bills', '2026-05-10 07:15:07');

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

--
-- Table structure for table `homework`
--

CREATE TABLE `homework` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(10) UNSIGNED NOT NULL,
  `class_id` int(10) UNSIGNED NOT NULL,
  `section` varchar(20) DEFAULT NULL,
  `subject_id` int(10) UNSIGNED DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `homework_date` date NOT NULL,
  `submission_date` date DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active',
  `created_by` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `homework`
--

INSERT INTO `homework` (`id`, `school_id`, `class_id`, `section`, `subject_id`, `title`, `description`, `homework_date`, `submission_date`, `attachment`, `status`, `created_by`, `created_at`, `updated_at`) VALUES
(2, 1, 2, '', 6, 'sda', 'dsasd', '2026-05-22', '2026-05-23', NULL, 'Active', 2, '2026-05-22 04:05:09', '2026-05-22 04:05:09');

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

--
-- Table structure for table `income_categories`
--

CREATE TABLE `income_categories` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `income_categories`
--

INSERT INTO `income_categories` (`id`, `school_id`, `name`, `created_at`) VALUES
(1, 2, 'Bhangar', '2026-05-06 16:18:27'),
(2, 1, 'Bhangar', '2026-05-10 07:04:20'),
(3, 7, 'Bhangar', '2026-05-10 07:14:28'),
(4, 7, 'Science Fair', '2026-05-10 07:24:17');

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

--
-- Table structure for table `inventory_items`
--

CREATE TABLE `inventory_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `category` varchar(50) DEFAULT NULL,
  `unit` varchar(20) DEFAULT 'pcs',
  `min_stock_level` int(11) DEFAULT 2,
  `current_stock` int(11) DEFAULT 0,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory_items`
--

INSERT INTO `inventory_items` (`id`, `school_id`, `name`, `category`, `unit`, `min_stock_level`, `current_stock`, `updated_at`) VALUES
(1, 2, 'Scissors', 'Stationary', 'pcs', 2, 4, '2026-05-06 17:25:32'),
(3, 1, 'lkfhdskjfh', 'hdskj', 'pcs', 2, 3, '2026-05-10 07:31:14');

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

--
-- Table structure for table `library_members`
--

CREATE TABLE `library_members` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `user_type` enum('Student','Teacher') NOT NULL,
  `reference_id` int(11) NOT NULL,
  `library_card_no` varchar(50) DEFAULT NULL,
  `card_no` varchar(50) NOT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `library_members`
--

INSERT INTO `library_members` (`id`, `school_id`, `user_type`, `reference_id`, `library_card_no`, `card_no`, `status`) VALUES
(2, 2, 'Student', 2, NULL, '121', 'Active'),
(3, 1, 'Student', 7, NULL, 'asdad', 'Active');

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

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

CREATE TABLE `notifications` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `for_role` enum('all','student','teacher','parent','admin') DEFAULT 'all',
  `class_id` int(10) UNSIGNED DEFAULT NULL,
  `is_active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `notifications` (`id`, `school_id`, `title`, `message`, `for_role`, `class_id`, `is_active`, `created_at`) VALUES
(3, 1, 'dasd', 'sadsada', 'all', NULL, 1, '2026-05-10 08:07:12');

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

--
-- Table structure for table `period_settings`
--

CREATE TABLE `period_settings` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `total_periods` int(11) NOT NULL DEFAULT 8,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `period_settings`
--

INSERT INTO `period_settings` (`id`, `school_id`, `total_periods`, `created_at`, `updated_at`) VALUES
(1, 2, 7, '2026-05-06 06:51:09', '2026-05-06 07:14:14');

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

--
-- Table structure for table `receipt_settings`
--

CREATE TABLE `receipt_settings` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `prefix` varchar(10) DEFAULT 'REC',
  `next_number` int(11) DEFAULT 1,
  `padding` int(11) DEFAULT 6,
  `school_name` varchar(100) DEFAULT 'Your School',
  `default_mode` varchar(20) DEFAULT 'Cash',
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `receipt_settings`
--

INSERT INTO `receipt_settings` (`id`, `school_id`, `prefix`, `next_number`, `padding`, `school_name`, `default_mode`, `updated_at`) VALUES
(1, 7, 'REC', 1, 3, 'priyanka', 'Cash', '2026-05-10 04:36:39'),
(2, 1, 'Hello', 8, 3, 'Hello Kids', 'Cash', '2026-05-14 17:38:20'),
(3, 2, 'hel', 7, 4, 'helloo kids', 'Cash', '2026-05-10 04:44:42');

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

--
-- Table structure for table `routes`
--

CREATE TABLE `routes` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `route_title` varchar(150) DEFAULT NULL,
  `fare` decimal(10,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `routes`
--

INSERT INTO `routes` (`id`, `school_id`, `route_title`, `fare`) VALUES
(1, 2, 'Indore', 1500.00);

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

--
-- Table structure for table `school_settings`
--

CREATE TABLE `school_settings` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `school_name` varchar(255) NOT NULL,
  `school_address` text DEFAULT NULL,
  `school_phone` varchar(50) DEFAULT NULL,
  `school_email` varchar(100) DEFAULT NULL,
  `school_website` varchar(100) DEFAULT NULL,
  `school_reg_no` varchar(100) DEFAULT NULL,
  `dise_code` varchar(100) DEFAULT NULL,
  `current_session` varchar(50) DEFAULT NULL,
  `language` varchar(50) DEFAULT 'en',
  `currency` varchar(10) DEFAULT 'INR',
  `timezone` varchar(100) DEFAULT 'Asia/Kolkata',
  `date_format` varchar(30) DEFAULT 'd-m-Y',
  `result_pattern` varchar(50) DEFAULT NULL,
  `school_logo` varchar(255) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `school_settings`
--

INSERT INTO `school_settings` (`id`, `school_id`, `school_name`, `school_address`, `school_phone`, `school_email`, `school_website`, `school_reg_no`, `dise_code`, `current_session`, `language`, `currency`, `timezone`, `date_format`, `result_pattern`, `school_logo`, `updated_at`) VALUES
(1, 2, 'Hello Kids School', 'Neemuch, Madhya Pradesh - 458441', '9876543210', 'info@hellokidsschool.com', 'www.hellokidsschool.com', 'CPS2026MP', '23345678901', '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', 'CBSE', '1778172531_1389.png', '2026-05-07 16:48:51'),
(2, 1, 'Hello Kids', 'Neemuch', '', '', '', '12364', '134654', '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', '', '1778729305_242274e6c85414ae.png', '2026-05-21 04:31:29'),
(3, 4, 'chaalis chor', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-08 05:19:24'),
(4, 5, 'fools academy', '', '', '', '', NULL, '', '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-08 05:38:13'),
(5, 6, 'tools school', '', '', '', '', NULL, '', '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-08 07:02:29'),
(6, 7, 'priyanka', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-08 07:08:37'),
(7, 8, 'ravi', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-10 08:33:57'),
(8, 9, 'ravi123', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-10 08:34:57'),
(9, 10, 'qwerty', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-10 08:36:53'),
(10, 11, 'asdfgh', '', '', '', '', NULL, '', '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-10 10:15:01'),
(11, 12, 'plmkoij', NULL, NULL, NULL, NULL, NULL, NULL, '2026-27', 'en', 'INR', 'Asia/Kolkata', 'd-m-Y', NULL, NULL, '2026-05-10 10:15:36');

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

--
-- Table structure for table `students`
--

CREATE TABLE `students` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `roll_no` varchar(50) NOT NULL,
  `name` varchar(150) NOT NULL,
  `class_id` int(10) UNSIGNED NOT NULL,
  `section` varchar(20) DEFAULT NULL,
  `admission_date` date DEFAULT NULL,
  `father_name` varchar(150) DEFAULT NULL,
  `mother_name` varchar(150) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `dob` date DEFAULT NULL,
  `apaar_id` varchar(50) DEFAULT NULL,
  `pen_no` varchar(50) DEFAULT NULL,
  `admission_no` varchar(50) DEFAULT NULL,
  `enrollment_no` varchar(50) DEFAULT NULL,
  `first_name` varchar(100) DEFAULT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `gender` enum('Male','Female','Other') DEFAULT NULL,
  `blood_group` varchar(5) DEFAULT NULL,
  `prev_school_name` varchar(200) DEFAULT NULL,
  `prev_class_studied` varchar(50) DEFAULT NULL,
  `appeared_prev_exam` varchar(100) DEFAULT NULL,
  `prev_exam_result` varchar(50) DEFAULT NULL,
  `marks_percentage` decimal(5,2) DEFAULT NULL,
  `class_rank` varchar(20) DEFAULT NULL,
  `attendance_prev_year` varchar(20) DEFAULT NULL,
  `aadhaar_no` varchar(20) DEFAULT NULL,
  `name_as_per_aadhaar` varchar(150) DEFAULT NULL,
  `samagra_id` varchar(20) DEFAULT NULL,
  `family_sssmid` varchar(20) DEFAULT NULL,
  `category` varchar(20) DEFAULT NULL,
  `caste` varchar(50) DEFAULT NULL,
  `religion` varchar(50) DEFAULT NULL,
  `minority_group` varchar(50) DEFAULT NULL,
  `mother_tongue` varchar(50) DEFAULT NULL,
  `digital_caste_cert_no` varchar(50) DEFAULT NULL,
  `is_bpl` tinyint(1) DEFAULT 0,
  `is_rte` tinyint(1) DEFAULT 0,
  `is_ews` tinyint(1) DEFAULT 0,
  `ladli_laxmi_no` varchar(50) DEFAULT NULL,
  `annual_income` decimal(12,2) DEFAULT NULL,
  `bank_acc_no` varchar(30) DEFAULT NULL,
  `bank_name` varchar(100) DEFAULT NULL,
  `ifsc_code` varchar(20) DEFAULT NULL,
  `opening_balance` decimal(12,2) DEFAULT NULL,
  `father_phone` varchar(20) DEFAULT NULL,
  `father_occupation` varchar(100) DEFAULT NULL,
  `father_dob` date DEFAULT NULL,
  `mother_phone` varchar(20) DEFAULT NULL,
  `mother_occupation` varchar(100) DEFAULT NULL,
  `mother_dob` date DEFAULT NULL,
  `guardian_name` varchar(150) DEFAULT NULL,
  `guardian_relation` varchar(50) DEFAULT NULL,
  `guardian_phone` varchar(20) DEFAULT NULL,
  `guardian_occupation` varchar(100) DEFAULT NULL,
  `guardian_address` text DEFAULT NULL,
  `sibling_details` text DEFAULT NULL,
  `permanent_address` text DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `city` varchar(50) DEFAULT NULL,
  `village` varchar(50) DEFAULT NULL,
  `pincode` varchar(10) DEFAULT NULL,
  `alt_mobile` varchar(20) DEFAULT NULL,
  `is_out_of_school` tinyint(1) DEFAULT 0,
  `mainstreamed_status` varchar(50) DEFAULT NULL,
  `transport_route` varchar(100) DEFAULT NULL,
  `transport_fees` decimal(10,2) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `students`
--

INSERT INTO `students` (`id`, `school_id`, `roll_no`, `name`, `class_id`, `section`, `admission_date`, `father_name`, `mother_name`, `address`, `phone`, `email`, `photo`, `status`, `created_at`, `updated_at`, `dob`, `apaar_id`, `pen_no`, `admission_no`, `enrollment_no`, `first_name`, `last_name`, `gender`, `blood_group`, `prev_school_name`, `prev_class_studied`, `appeared_prev_exam`, `prev_exam_result`, `marks_percentage`, `class_rank`, `attendance_prev_year`, `aadhaar_no`, `name_as_per_aadhaar`, `samagra_id`, `family_sssmid`, `category`, `caste`, `religion`, `minority_group`, `mother_tongue`, `digital_caste_cert_no`, `is_bpl`, `is_rte`, `is_ews`, `ladli_laxmi_no`, `annual_income`, `bank_acc_no`, `bank_name`, `ifsc_code`, `opening_balance`, `father_phone`, `father_occupation`, `father_dob`, `mother_phone`, `mother_occupation`, `mother_dob`, `guardian_name`, `guardian_relation`, `guardian_phone`, `guardian_occupation`, `guardian_address`, `sibling_details`, `permanent_address`, `state`, `city`, `village`, `pincode`, `alt_mobile`, `is_out_of_school`, `mainstreamed_status`, `transport_route`, `transport_fees`) VALUES
(28, 1, '101', 'Rahul Verma', 2, 'A', NULL, 'Ramesh Verma', NULL, NULL, '9876543210', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-05-10', NULL, NULL, 'ADM101', NULL, 'Rahul', 'Verma', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(29, 1, '102', 'Aman Sharma', 2, 'A', NULL, 'Suresh Sharma', NULL, NULL, '9876543211', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-08-15', NULL, NULL, 'ADM102', NULL, 'Aman', 'Sharma', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(30, 1, '103', 'Priya Yadav', 2, 'A', '0000-00-00', 'Mahesh Yadav', '', '', '9876543212', NULL, 'student_6a100c985813b3.65170856.jpg', 'Active', '2026-05-18 03:02:40', '2026-05-22 07:58:16', '2019-03-22', '', '', 'ADM103', NULL, 'Priya', 'Yadav', 'Female', '', '', '', '', '', 0.00, '', '', '', '', '', '', 'General', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(31, 1, '104', 'Neha Sahu', 2, 'A', NULL, 'Rajesh Sahu', NULL, NULL, '9876543213', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-11-01', NULL, NULL, 'ADM104', NULL, 'Neha', 'Sahu', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(32, 1, '105', 'Ravi Patel', 2, 'A', NULL, 'Dinesh Patel', NULL, NULL, '9876543214', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-01-18', NULL, NULL, 'ADM105', NULL, 'Ravi', 'Patel', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(33, 1, '106', 'Anjali Singh', 2, 'B', NULL, 'Rajendra Singh', NULL, NULL, '9876543215', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-07-09', NULL, NULL, 'ADM106', NULL, 'Anjali', 'Singh', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(34, 1, '107', 'Karan Thakur', 2, 'B', NULL, 'Vijay Thakur', NULL, NULL, '9876543216', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-04-14', NULL, NULL, 'ADM107', NULL, 'Karan', 'Thakur', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(35, 1, '108', 'Pooja Nayak', 2, 'B', NULL, 'Ram Nayak', NULL, NULL, '9876543217', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-12-30', NULL, NULL, 'ADM108', NULL, 'Pooja', 'Nayak', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(36, 1, '109', 'Sahil Gupta', 2, 'B', NULL, 'Manoj Gupta', NULL, NULL, '9876543218', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-02-25', NULL, NULL, 'ADM109', NULL, 'Sahil', 'Gupta', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(37, 1, '110', 'Komal Soni', 2, 'B', NULL, 'Naresh Soni', NULL, NULL, '9876543219', NULL, NULL, 'Active', '2026-05-18 03:02:40', '2026-05-18 03:02:40', '2019-09-19', NULL, NULL, 'ADM110', NULL, 'Komal', 'Soni', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(38, 1, '201', 'Student 1 demo 1', 2, '', '2026-05-22', '64654qw64w6', 'w54', '64', NULL, NULL, '', 'Active', '2026-05-22 05:55:44', '2026-05-22 05:55:44', '2015-05-22', 'dasd', '5s4ad646d44', NULL, NULL, 'Student 1', 'demo 1', 'Female', 'A+', 'dadas', 'Nursery', 'yes', 'pass', 80.00, '10', '85%', '1123456789', 'sdad', '64sa5d4sa64', '64as6dqw44qw6d5', 'General', 'sa5sa', '6', 'ad5', '6', '4d65', 0, 0, 0, NULL, 65.00, 'W65', 'W65', '6D', NULL, '4664', '64d6q', NULL, '64', '6', NULL, '64', '654', '6', NULL, NULL, NULL, '64', '6D', '65D4', '65', '654', NULL, 0, 'No', '6416', 0.00),
(40, 1, '', 'dasd dasdasd', 11, '', '0000-00-00', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 06:00:29', '2026-05-22 06:00:29', '2015-05-22', '', '', NULL, NULL, 'dasd', 'dasdasd', 'Male', 'B-', '', '', '', '', 0.00, '', '', '', '', '', '', 'SC', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(41, 1, '333', 'aaa ssss', 2, '', '2026-05-22', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 07:01:17', '2026-05-22 07:01:17', '0000-00-00', '', '', NULL, NULL, 'aaa', 'ssss', 'Female', 'A+', 'saa', 'saa', 'sass', '', 65.00, '', '', '', '', '', '', 'General', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(43, 1, '555', 'zzz aaa', 11, '', '0000-00-00', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 07:05:23', '2026-05-22 07:05:23', '0000-00-00', '', '', NULL, NULL, 'zzz', 'aaa', 'Male', '', '', '', '', '', 0.00, '', '', '', '', '', '', 'General', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(46, 1, '33', 'aaa sas', 11, 'A', '2026-05-22', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 07:33:05', '2026-05-22 07:33:05', '0000-00-00', '', '', NULL, NULL, 'aaa', 'sas', 'Male', '', '', '', '', '', 0.00, '', '', '', '', '', '', 'General', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(49, 1, '3333', 'asasasasasasasasas', 11, 'A', '0000-00-00', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 07:34:36', '2026-05-22 07:34:36', '0000-00-00', '', '', NULL, NULL, 'asasasasasasasasas', '', 'Male', '', '', '', '', '', 0.00, '', '', '', '', '', '', 'General', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(51, 1, '99', 'sasd', 11, 'A', '0000-00-00', '', '', '', NULL, NULL, '', 'Active', '2026-05-22 07:35:19', '2026-05-22 07:35:19', '0000-00-00', '', '', NULL, NULL, 'sasd', '', 'Male', '', '', '', '', '', 0.00, '', '', '', '', '', '', 'ST', '', '', '', '', '', 0, 0, 0, NULL, 0.00, '', '', '', NULL, '', '', NULL, '', '', NULL, '', '', '', NULL, NULL, NULL, '', '', '', '', '', NULL, 0, 'No', '', 0.00),
(52, 1, '51', 'riya Verma', 11, 'A', NULL, 'Ramesh Verma', NULL, NULL, '9876543210', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-05-10', NULL, NULL, 'ADM51', NULL, 'riya', 'Verma', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(53, 1, '52', 'shiya Sharma', 11, 'A', NULL, 'Suresh Sharma', NULL, NULL, '9876543211', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-08-15', NULL, NULL, 'ADM52', NULL, 'shiya', 'Sharma', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(54, 1, '53', 'kiya Yadav', 11, 'A', NULL, 'Mahesh Yadav', NULL, NULL, '9876543212', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-03-22', NULL, NULL, 'ADM53', NULL, 'kiya', 'Yadav', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(55, 1, '54', 'miya Sahu', 11, 'A', NULL, 'Rajesh Sahu', NULL, NULL, '9876543213', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-11-01', NULL, NULL, 'ADM54', NULL, 'miya', 'Sahu', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(56, 1, '55', 'liya Patel', 11, 'A', NULL, 'Dinesh Patel', NULL, NULL, '9876543214', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-01-18', NULL, NULL, 'ADM55', NULL, 'liya', 'Patel', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(57, 1, '56', 'diya Singh', 11, 'B', NULL, 'Rajendra Singh', NULL, NULL, '9876543215', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-07-09', NULL, NULL, 'ADM56', NULL, 'diya', 'Singh', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(58, 1, '57', 'tiya Thakur', 11, 'B', NULL, 'Vijay Thakur', NULL, NULL, '9876543216', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-04-14', NULL, NULL, 'ADM57', NULL, 'tiya', 'Thakur', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(59, 1, '58', 'ifiya Nayak', 11, 'B', NULL, 'Ram Nayak', NULL, NULL, '9876543217', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-12-30', NULL, NULL, 'ADM58', NULL, 'ifiya', 'Nayak', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(60, 1, '59', 'hiya Gupta', 11, 'B', NULL, 'Manoj Gupta', NULL, NULL, '9876543218', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-02-25', NULL, NULL, 'ADM59', NULL, 'hiya', 'Gupta', 'Male', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL),
(61, 1, '60', 'piya Soni', 11, 'B', NULL, 'Naresh Soni', NULL, NULL, '9876543219', NULL, NULL, 'Active', '2026-05-22 15:47:28', '2026-05-22 15:47:28', '2019-09-19', NULL, NULL, 'ADM60', NULL, 'piya', 'Soni', 'Female', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 0, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, NULL);

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

--
-- Table structure for table `subjects`
--

CREATE TABLE `subjects` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `subject_code` varchar(50) NOT NULL,
  `type` enum('Theory','Practical') DEFAULT 'Theory',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `subjects`
--

INSERT INTO `subjects` (`id`, `school_id`, `name`, `subject_code`, `type`, `created_at`) VALUES
(2, 2, 'Hindi', 'Hin 01', 'Theory', '2026-05-06 06:26:40'),
(3, 2, 'English ', 'Eng02', 'Theory', '2026-05-07 17:35:45'),
(6, 1, 'Hindi', 'Hin01', 'Theory', '2026-05-10 07:50:21');

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

--
-- Table structure for table `super_admin_activity_summary`
--

CREATE TABLE `super_admin_activity_summary` (
  `id` bigint(20) NOT NULL,
  `school_id` int(11) NOT NULL,
  `total_students` int(11) DEFAULT 0,
  `total_teachers` int(11) DEFAULT 0,
  `total_fee_collection` decimal(12,2) DEFAULT 0.00,
  `total_active_users` int(11) DEFAULT 0,
  `last_login` datetime DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `super_admin_audit_logs`
--

CREATE TABLE `super_admin_audit_logs` (
  `id` int(10) UNSIGNED NOT NULL,
  `super_admin_id` int(10) UNSIGNED DEFAULT NULL,
  `super_admin_email` varchar(150) DEFAULT NULL,
  `super_admin_name` varchar(100) DEFAULT NULL,
  `module` varchar(100) NOT NULL,
  `action` varchar(50) NOT NULL,
  `record_id` int(10) UNSIGNED DEFAULT NULL,
  `message` text NOT NULL,
  `old_data` longtext DEFAULT NULL,
  `new_data` longtext DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_audit_logs`
--

INSERT INTO `super_admin_audit_logs` (`id`, `super_admin_id`, `super_admin_email`, `super_admin_name`, `module`, `action`, `record_id`, `message`, `old_data`, `new_data`, `ip_address`, `user_agent`, `created_at`) VALUES
(9, 2, 'ravi@admin.com', 'ravi', 'Super Admin Authentication', 'LOGOUT', 2, 'Super Admin logged out: ravi', NULL, '{\"email\":\"ravi@admin.com\",\"admin_name\":\"ravi\",\"role\":\"Super Admin\",\"logout_time\":\"2026-05-10 16:03:01\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 10:33:01'),
(10, 2, 'ravi@admin.com', 'ravi', 'Super Admin Authentication', 'LOGIN', 2, 'Super Admin logged in: ravi', NULL, '{\"email\":\"ravi@admin.com\",\"admin_name\":\"ravi\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-10 16:03:10\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 10:33:10'),
(11, 2, 'ravi@admin.com', 'ravi', 'Super Admin Authentication', 'LOGOUT', 2, 'Super Admin logged out: ravi', NULL, '{\"email\":\"ravi@admin.com\",\"admin_name\":\"ravi\",\"role\":\"Super Admin\",\"logout_time\":\"2026-05-10 16:03:38\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-10 10:33:38'),
(12, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/147.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-12 09:01:02\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:31:02'),
(13, 1, 'raavan@admin.com', 'Raavan', 'Invoice Management', 'CREATE', 1, 'Invoice created: INV-D1236FA4', NULL, '{\"invoice_id\":\"1\",\"invoice_no\":\"INV-D1236FA4\",\"school_id\":3,\"plan_name\":\"sda\",\"amount\":5500,\"billing_cycle\":\"Yearly\",\"payment_status\":\"Paid\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:38:45'),
(14, 1, 'raavan@admin.com', 'Raavan', 'Invoice Management', 'UPDATE', 1, 'Invoice updated: INV-D1236FA4', '{\"id\":1,\"school_id\":3,\"invoice_no\":\"INV-D1236FA4\",\"plan_name\":\"sda\",\"amount\":\"5500.00\",\"billing_cycle\":\"Yearly\",\"start_date\":\"2026-05-12\",\"end_date\":\"2027-05-11\",\"payment_status\":\"Paid\",\"payment_method\":\"cash\",\"remarks\":\"\",\"created_at\":\"2026-05-12 09:08:45\",\"updated_at\":\"2026-05-12 09:08:45\"}', '{\"school_id\":3,\"plan_name\":\"sda\",\"amount\":5600,\"billing_cycle\":\"Yearly\",\"payment_status\":\"Paid\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:41:26'),
(15, 1, 'raavan@admin.com', 'Raavan', 'Invoice Management', 'DELETE', 1, 'Invoice deleted: INV-D1236FA4', '{\"id\":1,\"school_id\":3,\"invoice_no\":\"INV-D1236FA4\",\"plan_name\":\"sda\",\"amount\":\"5600.00\",\"billing_cycle\":\"Yearly\",\"start_date\":\"2026-05-12\",\"end_date\":\"2027-05-11\",\"payment_status\":\"Paid\",\"payment_method\":\"cash\",\"remarks\":\"\",\"created_at\":\"2026-05-12 09:08:45\",\"updated_at\":\"2026-05-12 09:11:26\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:42:17'),
(16, 1, 'raavan@admin.com', 'Raavan', 'Invoice Management', 'CREATE', 2, 'Invoice created: INV-334FE5F4', NULL, '{\"invoice_id\":\"2\",\"invoice_no\":\"INV-334FE5F4\",\"school_id\":3,\"plan_name\":\"sdasd\",\"amount\":5000,\"billing_cycle\":\"Yearly\",\"payment_status\":\"Paid\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-05-12 03:42:49'),
(17, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-20 09:28:23\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-20 03:58:23'),
(18, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN_FAILED', 1, 'Wrong password for admin: Raavan (Attempt 1/5)', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"reason\":\"Invalid password\",\"attempts\":1,\"account_locked\":0,\"ip_address\":\"::1\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-20 04:16:55'),
(19, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-20 09:47:10\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-20 04:17:10'),
(20, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-21 09:19:00\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 03:49:00'),
(21, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-21 09:40:08\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:10:08'),
(22, 1, 'raavan@admin.com', 'Raavan', 'Super Admin Authentication', 'LOGIN', 1, 'Super Admin logged in: Raavan', NULL, '{\"email\":\"raavan@admin.com\",\"admin_name\":\"Raavan\",\"role\":\"Super Admin\",\"ip_address\":\"::1\",\"user_agent\":\"Mozilla\\/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit\\/537.36 (KHTML, like Gecko) Chrome\\/148.0.0.0 Safari\\/537.36\",\"login_time\":\"2026-05-21 10:01:11\"}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:31:11'),
(23, 1, 'raavan@admin.com', 'Raavan', 'School Management', 'UPDATE', 1, 'School updated: Hello Kids', '{\"school\":{\"name\":\"Hello Kids\",\"phone\":null,\"email\":null,\"status\":\"active\",\"subscription_status\":\"Trial\",\"subscription_start\":null,\"subscription_end\":null},\"settings\":{\"school_name\":\"Hello Kids\",\"school_phone\":\"1234567890\",\"school_email\":\"Hello@admin.com\",\"school_address\":\"Neemuch\",\"school_website\":\"\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\"}}', '{\"school\":{\"name\":\"Hello Kids\",\"phone\":\"\",\"email\":\"\",\"status\":\"active\",\"subscription_status\":\"Trial\",\"subscription_start\":\"2025-05-21\",\"subscription_end\":\"2026-05-20\"},\"settings\":{\"school_name\":\"Hello Kids\",\"school_phone\":\"\",\"school_email\":\"\",\"school_address\":\"Neemuch\",\"school_website\":\"\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\"}}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:31:29'),
(24, 1, 'raavan@admin.com', 'Raavan', 'School Management', 'UPDATE', 1, 'School updated: Hello Kids (Status: inactive → active, Subscription: Expired → Trial)', '{\"school\":{\"name\":\"Hello Kids\",\"phone\":\"\",\"email\":\"\",\"status\":\"inactive\",\"subscription_status\":\"Expired\",\"subscription_start\":\"2025-05-21\",\"subscription_end\":\"2026-05-20\"},\"settings\":{\"school_name\":\"Hello Kids\",\"school_phone\":\"\",\"school_email\":\"\",\"school_address\":\"Neemuch\",\"school_website\":\"\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\"}}', '{\"school\":{\"name\":\"Hello Kids\",\"phone\":\"\",\"email\":\"\",\"status\":\"active\",\"subscription_status\":\"Trial\",\"subscription_start\":\"2025-05-21\",\"subscription_end\":\"2027-05-20\"},\"settings\":{\"school_name\":\"Hello Kids\",\"school_phone\":\"\",\"school_email\":\"\",\"school_address\":\"Neemuch\",\"school_website\":\"\",\"dise_code\":\"134654\",\"current_session\":\"2026-27\"}}', '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/148.0.0.0 Safari/537.36', '2026-05-21 04:33:29');

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

--
-- Table structure for table `super_admin_feature_permissions`
--

CREATE TABLE `super_admin_feature_permissions` (
  `id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `feature_key` varchar(100) NOT NULL,
  `is_enabled` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_feature_permissions`
--

INSERT INTO `super_admin_feature_permissions` (`id`, `plan_id`, `feature_key`, `is_enabled`, `created_at`) VALUES
(1, 1, 'student_management', 1, '2026-05-20 04:54:21'),
(2, 1, 'attendance', 1, '2026-05-20 04:54:21'),
(3, 1, 'fees_management', 1, '2026-05-20 04:54:21'),
(4, 1, 'salary_management', 0, '2026-05-20 04:54:21'),
(5, 1, 'id_cards', 0, '2026-05-20 04:54:21'),
(6, 1, 'advanced_reports', 1, '2026-05-20 04:54:21'),
(7, 1, 'global_search', 0, '2026-05-20 04:54:21'),
(8, 1, 'transport_reports', 0, '2026-05-20 04:54:21'),
(9, 1, 'inventory_management', 0, '2026-05-20 04:54:21'),
(10, 1, 'library_management', 0, '2026-05-20 04:54:21'),
(11, 1, 'website', 0, '2026-05-20 04:54:21'),
(12, 1, 'priority_support', 0, '2026-05-20 04:54:21'),
(13, 1, 'data_entry_support', 0, '2026-05-20 04:54:21');

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

--
-- Table structure for table `super_admin_notifications`
--

CREATE TABLE `super_admin_notifications` (
  `id` bigint(20) NOT NULL,
  `school_id` int(11) DEFAULT NULL,
  `title` varchar(255) NOT NULL,
  `message` text NOT NULL,
  `type` enum('Info','Warning','Success','Danger') DEFAULT 'Info',
  `is_read` tinyint(1) DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_notifications`
--

INSERT INTO `super_admin_notifications` (`id`, `school_id`, `title`, `message`, `type`, `is_read`, `created_at`) VALUES
(1, 1, 'Subscription Expiring Soon', 'ABC Public School subscription will expire in 3 days.', 'Warning', 1, '2026-05-21 07:14:21'),
(2, 2, 'New School Registered', 'Bright Future School has been created successfully.', 'Success', 0, '2026-05-21 07:14:21'),
(3, 3, 'Payment Pending', 'XYZ Academy has pending subscription payment.', 'Danger', 0, '2026-05-21 07:14:21'),
(4, 4, 'Trial Plan Ending', 'Demo School trial will end tomorrow.', 'Info', 1, '2026-05-21 07:14:21');

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

--
-- Table structure for table `super_admin_school_logins`
--

CREATE TABLE `super_admin_school_logins` (
  `id` bigint(20) NOT NULL,
  `school_id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `user_role` varchar(50) DEFAULT NULL,
  `login_time` datetime NOT NULL,
  `logout_time` datetime DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `super_admin_school_subscriptions`
--

CREATE TABLE `super_admin_school_subscriptions` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `start_date` date NOT NULL,
  `expiry_date` date NOT NULL,
  `status` enum('Trial','Active','Expired','Suspended') DEFAULT 'Trial',
  `payment_status` enum('Pending','Paid','Partial') DEFAULT 'Pending',
  `amount` decimal(10,2) DEFAULT 0.00,
  `notes` text DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_school_subscriptions`
--

INSERT INTO `super_admin_school_subscriptions` (`id`, `school_id`, `plan_id`, `start_date`, `expiry_date`, `status`, `payment_status`, `amount`, `notes`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 3, 1, '2026-05-20', '2028-05-19', 'Active', 'Paid', 0.00, '', NULL, '2026-05-20 04:57:25', '2026-05-20 04:58:46');

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

--
-- Table structure for table `super_admin_settings`
--

CREATE TABLE `super_admin_settings` (
  `id` int(10) UNSIGNED NOT NULL,
  `setting_key` varchar(150) NOT NULL,
  `setting_value` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_settings`
--

INSERT INTO `super_admin_settings` (`id`, `setting_key`, `setting_value`, `created_at`, `updated_at`) VALUES
(1, 'subscription_expiry_alert', '1', '2026-05-21 07:07:00', '2026-05-21 07:07:00'),
(2, 'trial_expiry_alert', '1', '2026-05-21 07:07:00', '2026-05-21 07:07:00'),
(3, 'new_school_alert', '1', '2026-05-21 07:07:00', '2026-05-21 07:07:00'),
(4, 'renewal_alert', '1', '2026-05-21 07:07:00', '2026-05-21 07:07:00'),
(5, 'payment_alert', '1', '2026-05-21 07:07:00', '2026-05-21 07:07:00');

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

--
-- Table structure for table `super_admin_subscription_plans`
--

CREATE TABLE `super_admin_subscription_plans` (
  `id` int(11) NOT NULL,
  `plan_name` varchar(100) NOT NULL,
  `price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `duration_months` int(11) NOT NULL DEFAULT 12,
  `max_students` int(11) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `super_admin_subscription_plans`
--

INSERT INTO `super_admin_subscription_plans` (`id`, `plan_name`, `price`, `duration_months`, `max_students`, `description`, `status`, `created_at`) VALUES
(1, 'Starter', 6500.00, 12, 250, '', 'Active', '2026-05-20 04:51:20');

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

--
-- Table structure for table `teachers`
--

CREATE TABLE `teachers` (
  `id` int(10) UNSIGNED NOT NULL,
  `school_id` int(11) NOT NULL,
  `name` varchar(150) NOT NULL,
  `father_name` varchar(150) DEFAULT NULL,
  `mother_name` varchar(150) DEFAULT NULL,
  `qualification` varchar(150) DEFAULT NULL,
  `tenth_year` varchar(10) DEFAULT NULL,
  `tenth_percentage` varchar(10) DEFAULT NULL,
  `twelfth_year` varchar(10) DEFAULT NULL,
  `twelfth_percentage` varchar(10) DEFAULT NULL,
  `grad_year` varchar(10) DEFAULT NULL,
  `grad_percentage` varchar(10) DEFAULT NULL,
  `pg_year` varchar(10) DEFAULT NULL,
  `pg_percentage` varchar(10) DEFAULT NULL,
  `marital_status` enum('Single','Married') DEFAULT 'Single',
  `salary` decimal(10,2) DEFAULT 0.00,
  `mobile_no` varchar(20) DEFAULT NULL,
  `adhar_no` varchar(20) DEFAULT NULL,
  `address` text DEFAULT NULL,
  `date_of_birth` date DEFAULT NULL,
  `date_of_joining` date DEFAULT NULL,
  `date_of_leaving` date DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `resume` varchar(255) DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `teachers`
--

INSERT INTO `teachers` (`id`, `school_id`, `name`, `father_name`, `mother_name`, `qualification`, `tenth_year`, `tenth_percentage`, `twelfth_year`, `twelfth_percentage`, `grad_year`, `grad_percentage`, `pg_year`, `pg_percentage`, `marital_status`, `salary`, `mobile_no`, `adhar_no`, `address`, `date_of_birth`, `date_of_joining`, `date_of_leaving`, `photo`, `resume`, `status`, `created_at`, `updated_at`) VALUES
(7, 1, 'Teacher 1', 'asd', 'sda', '', '', '', '', '', '', '', '', '', 'Single', 6000.00, '1234567890', '', '', '2000-05-26', '2026-05-22', NULL, 'teacher_6a108cc2a7f114.69782379_1779469506.jpg', '', 'Active', '2026-05-22 16:41:54', '2026-05-22 17:05:06'),
(8, 1, 'Teacher 2', 'ajdh', 'dskdha', '', '', '', '', '', '', '', '', '', 'Single', 5000.00, '1122334455', '', '', '1990-10-26', '0000-00-00', NULL, 'teacher_6a108ec863c7a7.72346078_1779470024.jpg', '', 'Active', '2026-05-22 17:13:34', '2026-05-22 17:17:40');

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

--
-- Table structure for table `vehicles`
--

CREATE TABLE `vehicles` (
  `id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `vehicle_no` varchar(50) NOT NULL,
  `vehicle_model` varchar(100) DEFAULT NULL,
  `status` enum('Active','Inactive') DEFAULT 'Active'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `vehicles`
--

INSERT INTO `vehicles` (`id`, `school_id`, `vehicle_no`, `vehicle_model`, `status`) VALUES
(1, 2, 'MP09-dc-1234', 'Tata', 'Active');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `academic_sessions`
--
ALTER TABLE `academic_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `school_id` (`school_id`);

--
-- Indexes for table `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_school_id` (`school_id`),
  ADD KEY `idx_user_id` (`user_id`),
  ADD KEY `idx_module` (`module`),
  ADD KEY `idx_action` (`action`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- Indexes for table `books`
--
ALTER TABLE `books`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_books_school` (`school_id`);

--
-- Indexes for table `classes`
--
ALTER TABLE `classes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_classes_school` (`school_id`);

--
-- Indexes for table `class_fees`
--
ALTER TABLE `class_fees`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_class_fee` (`school_id`,`class_id`),
  ADD KEY `fk_classfees_school` (`school_id`),
  ADD KEY `fk_classfees_class` (`class_id`);

--
-- Indexes for table `class_subject_teachers`
--
ALTER TABLE `class_subject_teachers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cst_school` (`school_id`),
  ADD KEY `class_id` (`class_id`),
  ADD KEY `subject_id` (`subject_id`),
  ADD KEY `teacher_id` (`teacher_id`);

--
-- Indexes for table `drivers`
--
ALTER TABLE `drivers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_drivers_school` (`school_id`);

--
-- Indexes for table `exam_results`
--
ALTER TABLE `exam_results`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_student_result` (`school_id`,`exam_type_id`,`class_id`,`student_id`,`session_year`),
  ADD UNIQUE KEY `unique_exam_result` (`school_id`,`exam_type_id`,`class_id`,`student_id`,`session_year`),
  ADD KEY `idx_school` (`school_id`),
  ADD KEY `idx_exam` (`exam_type_id`),
  ADD KEY `idx_class` (`class_id`),
  ADD KEY `idx_student` (`student_id`),
  ADD KEY `idx_session` (`session_year`),
  ADD KEY `idx_rank` (`rank_position`);

--
-- Indexes for table `exam_result_details`
--
ALTER TABLE `exam_result_details`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_subject_result` (`school_id`,`result_id`,`subject_id`),
  ADD KEY `idx_school` (`school_id`),
  ADD KEY `idx_result` (`result_id`),
  ADD KEY `idx_exam` (`exam_type_id`),
  ADD KEY `idx_class` (`class_id`),
  ADD KEY `idx_student` (`student_id`),
  ADD KEY `idx_subject` (`subject_id`);

--
-- Indexes for table `exam_schedule`
--
ALTER TABLE `exam_schedule`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_schedule` (`school_id`,`exam_type_id`,`class_id`,`subject_id`),
  ADD UNIQUE KEY `unique_exam_schedule` (`school_id`,`exam_type_id`,`class_id`,`subject_id`,`session_year`),
  ADD KEY `fk_examschedule_school` (`school_id`),
  ADD KEY `fk_examschedule_class` (`class_id`),
  ADD KEY `fk_examschedule_subject` (`subject_id`);

--
-- Indexes for table `exam_types`
--
ALTER TABLE `exam_types`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_examtypes_school` (`school_id`);

--
-- Indexes for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_expcat_school` (`school_id`);

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

--
-- Indexes for table `income_categories`
--
ALTER TABLE `income_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inccat_school` (`school_id`);

--
-- Indexes for table `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_inventory_school` (`school_id`);

--
-- Indexes for table `library_members`
--
ALTER TABLE `library_members`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_school_card` (`school_id`,`card_no`),
  ADD UNIQUE KEY `unique_school_library_card` (`school_id`,`library_card_no`),
  ADD KEY `fk_library_school` (`school_id`);

--
-- Indexes for table `notifications`
--
ALTER TABLE `notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_class` (`class_id`),
  ADD KEY `idx_active` (`is_active`),
  ADD KEY `fk_notifications_school` (`school_id`);

--
-- Indexes for table `period_settings`
--
ALTER TABLE `period_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_school_period` (`school_id`),
  ADD KEY `fk_period_school` (`school_id`);

--
-- Indexes for table `receipt_settings`
--
ALTER TABLE `receipt_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_school` (`school_id`),
  ADD KEY `fk_receipt_school` (`school_id`);

--
-- Indexes for table `routes`
--
ALTER TABLE `routes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_routes_school` (`school_id`);

--
-- Indexes for table `school_settings`
--
ALTER TABLE `school_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_school_settings` (`school_id`),
  ADD KEY `fk_schoolsettings_school` (`school_id`);

--
-- Indexes for table `students`
--
ALTER TABLE `students`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_roll` (`school_id`,`class_id`,`roll_no`),
  ADD UNIQUE KEY `unique_roll_school` (`school_id`,`roll_no`),
  ADD UNIQUE KEY `unique_admission_school` (`school_id`,`admission_no`),
  ADD KEY `fk_students_class` (`class_id`),
  ADD KEY `fk_students_school` (`school_id`),
  ADD KEY `idx_school_session` (`school_id`);

--
-- Indexes for table `subjects`
--
ALTER TABLE `subjects`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_subject_code` (`school_id`,`subject_code`),
  ADD KEY `fk_subjects_school` (`school_id`);

--
-- Indexes for table `super_admin_activity_summary`
--
ALTER TABLE `super_admin_activity_summary`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_school` (`school_id`);

--
-- Indexes for table `super_admin_audit_logs`
--
ALTER TABLE `super_admin_audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_super_admin_id` (`super_admin_id`),
  ADD KEY `idx_email` (`super_admin_email`),
  ADD KEY `idx_module` (`module`),
  ADD KEY `idx_action` (`action`),
  ADD KEY `idx_created_at` (`created_at`);

--
-- Indexes for table `super_admin_feature_permissions`
--
ALTER TABLE `super_admin_feature_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_plan` (`plan_id`);

--
-- Indexes for table `super_admin_notifications`
--
ALTER TABLE `super_admin_notifications`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_school` (`school_id`),
  ADD KEY `idx_read` (`is_read`);

--
-- Indexes for table `super_admin_school_logins`
--
ALTER TABLE `super_admin_school_logins`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_school` (`school_id`),
  ADD KEY `idx_user` (`user_id`);

--
-- Indexes for table `super_admin_school_subscriptions`
--
ALTER TABLE `super_admin_school_subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_school` (`school_id`),
  ADD KEY `idx_plan` (`plan_id`);

--
-- Indexes for table `super_admin_settings`
--
ALTER TABLE `super_admin_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_setting_key` (`setting_key`);

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

--
-- Indexes for table `teachers`
--
ALTER TABLE `teachers`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_teachers_school` (`school_id`);

--
-- Indexes for table `vehicles`
--
ALTER TABLE `vehicles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_vehicles_school` (`school_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

--
-- AUTO_INCREMENT for table `audit_logs`
--
ALTER TABLE `audit_logs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=190;

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

--
-- AUTO_INCREMENT for table `classes`
--
ALTER TABLE `classes`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

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

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

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

--
-- AUTO_INCREMENT for table `exam_results`
--
ALTER TABLE `exam_results`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `exam_result_details`
--
ALTER TABLE `exam_result_details`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- AUTO_INCREMENT for table `exam_schedule`
--
ALTER TABLE `exam_schedule`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `exam_types`
--
ALTER TABLE `exam_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

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

--
-- AUTO_INCREMENT for table `homework`
--
ALTER TABLE `homework`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

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

--
-- AUTO_INCREMENT for table `inventory_items`
--
ALTER TABLE `inventory_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `students`
--
ALTER TABLE `students`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=62;

--
-- AUTO_INCREMENT for table `subjects`
--
ALTER TABLE `subjects`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `super_admin_activity_summary`
--
ALTER TABLE `super_admin_activity_summary`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `super_admin_audit_logs`
--
ALTER TABLE `super_admin_audit_logs`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

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

--
-- AUTO_INCREMENT for table `super_admin_notifications`
--
ALTER TABLE `super_admin_notifications`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `super_admin_school_logins`
--
ALTER TABLE `super_admin_school_logins`
  MODIFY `id` bigint(20) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `super_admin_settings`
--
ALTER TABLE `super_admin_settings`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

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

--
-- AUTO_INCREMENT for table `teachers`
--
ALTER TABLE `teachers`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `academic_sessions`
--
ALTER TABLE `academic_sessions`
  ADD CONSTRAINT `academic_sessions_ibfk_1` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `books`
--
ALTER TABLE `books`
  ADD CONSTRAINT `fk_books_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `classes`
--
ALTER TABLE `classes`
  ADD CONSTRAINT `fk_classes_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `class_fees`
--
ALTER TABLE `class_fees`
  ADD CONSTRAINT `fk_classfees_class` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_classfees_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `class_subject_teachers`
--
ALTER TABLE `class_subject_teachers`
  ADD CONSTRAINT `fk_cst_class` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cst_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cst_subject` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_cst_teacher` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `drivers`
--
ALTER TABLE `drivers`
  ADD CONSTRAINT `fk_drivers_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `exam_schedule`
--
ALTER TABLE `exam_schedule`
  ADD CONSTRAINT `fk_examschedule_class` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_examschedule_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fk_examschedule_subject` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `exam_types`
--
ALTER TABLE `exam_types`
  ADD CONSTRAINT `fk_examtypes_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `expense_categories`
--
ALTER TABLE `expense_categories`
  ADD CONSTRAINT `fk_expcat_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `income_categories`
--
ALTER TABLE `income_categories`
  ADD CONSTRAINT `fk_inccat_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `inventory_items`
--
ALTER TABLE `inventory_items`
  ADD CONSTRAINT `fk_inventory_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `library_members`
--
ALTER TABLE `library_members`
  ADD CONSTRAINT `fk_library_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `notifications`
--
ALTER TABLE `notifications`
  ADD CONSTRAINT `fk_notifications_class` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fk_notifications_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `period_settings`
--
ALTER TABLE `period_settings`
  ADD CONSTRAINT `fk_period_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `receipt_settings`
--
ALTER TABLE `receipt_settings`
  ADD CONSTRAINT `fk_receipt_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `routes`
--
ALTER TABLE `routes`
  ADD CONSTRAINT `fk_routes_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `school_settings`
--
ALTER TABLE `school_settings`
  ADD CONSTRAINT `fk_schoolsettings_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `students`
--
ALTER TABLE `students`
  ADD CONSTRAINT `fk_students_class` FOREIGN KEY (`class_id`) REFERENCES `classes` (`id`) ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_students_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `subjects`
--
ALTER TABLE `subjects`
  ADD CONSTRAINT `fk_subjects_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `teachers`
--
ALTER TABLE `teachers`
  ADD CONSTRAINT `fk_teachers_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `vehicles`
--
ALTER TABLE `vehicles`
  ADD CONSTRAINT `fk_vehicles_school` FOREIGN KEY (`school_id`) REFERENCES `schools` (`id`) ON DELETE CASCADE;
COMMIT;

