

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `class_groups` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `group_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `class_groups_group_name_unique` (`group_name`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `class_groups` (`id`, `group_name`, `created_at`, `updated_at`) VALUES ('1', 'Science', '2026-09-08 08:40:19', '2026-09-08 08:40:19');
INSERT INTO `class_groups` (`id`, `group_name`, `created_at`, `updated_at`) VALUES ('2', 'Humanities', '2026-09-13 19:01:55', '2026-09-13 19:01:55');
INSERT INTO `class_groups` (`id`, `group_name`, `created_at`, `updated_at`) VALUES ('3', 'Commerce', '2026-09-13 19:02:44', '2026-09-13 19:02:44');
INSERT INTO `class_groups` (`id`, `group_name`, `created_at`, `updated_at`) VALUES ('4', 'General', '2026-09-13 19:02:58', '2026-09-13 19:02:58');


CREATE TABLE `class_subject` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` bigint(20) unsigned NOT NULL,
  `subject_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `class_subject_class_id_subject_id_unique` (`class_id`,`subject_id`),
  KEY `class_subject_subject_id_foreign` (`subject_id`),
  CONSTRAINT `class_subject_class_id_foreign` FOREIGN KEY (`class_id`) REFERENCES `clss_m_s` (`id`) ON DELETE CASCADE,
  CONSTRAINT `class_subject_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('1', '1', '9', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('2', '1', '8', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('3', '1', '7', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('4', '1', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('5', '1', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('6', '1', '6', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('7', '1', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('8', '1', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('9', '1', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('10', '2', '9', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('11', '2', '8', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('12', '2', '7', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('13', '2', '6', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('14', '2', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('15', '2', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('16', '2', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('17', '2', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('18', '2', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('28', '3', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('29', '3', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('30', '3', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('31', '3', '6', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('32', '3', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('33', '3', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('34', '3', '7', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('35', '3', '8', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('36', '3', '9', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('37', '3', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('38', '5', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('39', '5', '7', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('40', '5', '8', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('41', '5', '9', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('42', '5', '6', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('43', '5', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('44', '5', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('45', '5', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('46', '5', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('47', '5', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('48', '6', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('49', '6', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('50', '6', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('51', '6', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('52', '6', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('53', '6', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('54', '7', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('55', '7', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('56', '7', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('57', '7', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('58', '7', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('59', '7', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('60', '8', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('61', '8', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('62', '8', '3', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('63', '8', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('64', '8', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('65', '8', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('66', '9', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('67', '9', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('68', '9', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('69', '10', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('70', '10', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('71', '10', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('72', '2', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('73', '1', '18', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('74', '1', '17', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('75', '1', '16', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('76', '1', '15', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('77', '1', '14', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('78', '1', '13', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('79', '1', '12', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('80', '1', '11', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('81', '1', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('82', '11', '18', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('83', '11', '17', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('84', '11', '16', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('85', '11', '13', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('86', '11', '14', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('87', '11', '15', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('88', '11', '12', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('89', '11', '11', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('90', '11', '10', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('91', '11', '7', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('92', '11', '8', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('93', '11', '9', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('94', '11', '6', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('95', '11', '5', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('96', '11', '4', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('97', '11', '1', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('98', '11', '2', NULL, NULL);
INSERT INTO `class_subject` (`id`, `class_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('99', '11', '3', NULL, NULL);


CREATE TABLE `clss_m_s` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `class_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('1', 'Class 9', '2026-09-08 08:41:37', '2026-09-08 08:41:37');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('2', 'Class 8', '2026-09-13 09:08:23', '2026-09-13 09:08:23');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('3', 'Class 7', '2026-09-13 18:51:57', '2026-09-13 18:51:57');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('5', 'Class 6', '2026-09-13 18:57:06', '2026-09-13 18:57:06');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('6', 'Class 5', '2026-09-13 18:57:36', '2026-09-13 18:57:36');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('7', 'Class 4', '2026-09-13 18:57:57', '2026-09-13 18:57:57');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('8', 'Class 3', '2026-09-13 18:58:50', '2026-09-13 18:58:50');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('9', 'Class 2', '2026-09-13 18:59:06', '2026-09-13 18:59:06');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('10', 'Class 1', '2026-09-13 18:59:26', '2026-09-13 18:59:26');
INSERT INTO `clss_m_s` (`id`, `class_name`, `created_at`, `updated_at`) VALUES ('11', 'Class 10', '2026-09-13 19:00:19', '2026-09-13 19:00:19');


CREATE TABLE `examinations` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `examination_type` varchar(255) NOT NULL,
  `examination_year` varchar(255) NOT NULL,
  `exam_mark` decimal(8,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `examinations` (`id`, `examination_type`, `examination_year`, `exam_mark`, `created_at`, `updated_at`) VALUES ('1', 'FINAL', '2026', NULL, '2026-09-08 08:43:13', '2026-09-08 08:43:13');
INSERT INTO `examinations` (`id`, `examination_type`, `examination_year`, `exam_mark`, `created_at`, `updated_at`) VALUES ('2', 'MID-TURM', '2026', NULL, '2026-09-08 08:47:55', '2026-09-08 08:47:55');
INSERT INTO `examinations` (`id`, `examination_type`, `examination_year`, `exam_mark`, `created_at`, `updated_at`) VALUES ('5', 'TUTORIAL', '2026', '25.00', '2026-09-08 20:55:06', '2026-09-08 20:55:06');
INSERT INTO `examinations` (`id`, `examination_type`, `examination_year`, `exam_mark`, `created_at`, `updated_at`) VALUES ('6', 'FINAL', '2025', NULL, '2026-09-10 22:42:07', '2026-09-10 22:42:07');


CREATE TABLE `expenses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `expense_type` varchar(255) NOT NULL,
  `employee_name` varchar(255) DEFAULT NULL,
  `salary_amount` decimal(10,2) NOT NULL,
  `paid_amount` decimal(10,2) NOT NULL,
  `due_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `payment_method` enum('Cash','Bkash','Nagad','Bank') NOT NULL,
  `created_by` varchar(255) DEFAULT NULL,
  `payment_date` date NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `payment_month` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `expenses` (`id`, `expense_type`, `employee_name`, `salary_amount`, `paid_amount`, `due_amount`, `payment_method`, `created_by`, `payment_date`, `created_at`, `updated_at`, `payment_month`) VALUES ('1', 'Internet Bill', NULL, '500.00', '500.00', '0.00', 'Bank', 'Super Manager', '2026-09-13', '2026-09-13 09:51:03', '2026-09-13 18:17:17', '2026-07-01');
INSERT INTO `expenses` (`id`, `expense_type`, `employee_name`, `salary_amount`, `paid_amount`, `due_amount`, `payment_method`, `created_by`, `payment_date`, `created_at`, `updated_at`, `payment_month`) VALUES ('2', 'Teacher Payment', 'Taskiya Tanzin', '20000.00', '10000.00', '10000.00', 'Cash', 'Super Manager', '2026-09-13', '2026-09-13 23:55:40', '2026-09-13 23:55:40', '2026-08-01');


CREATE TABLE `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `final_results` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `examination_id` bigint(20) unsigned NOT NULL,
  `percentage` decimal(5,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `final_results_examination_id_foreign` (`examination_id`),
  CONSTRAINT `final_results_examination_id_foreign` FOREIGN KEY (`examination_id`) REFERENCES `examinations` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `final_results` (`id`, `examination_id`, `percentage`, `created_at`, `updated_at`) VALUES ('1', '5', '20.00', '2026-09-10 19:05:38', '2026-09-10 19:05:38');
INSERT INTO `final_results` (`id`, `examination_id`, `percentage`, `created_at`, `updated_at`) VALUES ('2', '2', '30.00', '2026-09-10 19:05:54', '2026-09-10 19:05:54');
INSERT INTO `final_results` (`id`, `examination_id`, `percentage`, `created_at`, `updated_at`) VALUES ('3', '1', '50.00', '2026-09-10 19:06:08', '2026-09-10 19:06:08');
INSERT INTO `final_results` (`id`, `examination_id`, `percentage`, `created_at`, `updated_at`) VALUES ('4', '6', '50.00', '2026-09-10 22:51:43', '2026-09-10 22:51:43');


CREATE TABLE `grading_systems` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `grade` varchar(10) NOT NULL,
  `grade_point` decimal(3,2) NOT NULL,
  `min_percentage` decimal(5,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('1', 'A+', '5.00', '80.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('2', 'A', '4.00', '70.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('3', 'A-', '3.50', '60.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('4', 'B', '3.00', '50.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('5', 'C', '2.00', '40.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('6', 'D', '1.00', '33.00', NULL, NULL);
INSERT INTO `grading_systems` (`id`, `grade`, `grade_point`, `min_percentage`, `created_at`, `updated_at`) VALUES ('7', 'F', '0.00', '0.00', NULL, NULL);


CREATE TABLE `group_subject_mappings` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `class_group_id` bigint(20) unsigned NOT NULL,
  `subject_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_subject_mappings_class_group_id_subject_id_unique` (`class_group_id`,`subject_id`),
  KEY `group_subject_mappings_subject_id_foreign` (`subject_id`),
  CONSTRAINT `group_subject_mappings_class_group_id_foreign` FOREIGN KEY (`class_group_id`) REFERENCES `class_groups` (`id`) ON DELETE CASCADE,
  CONSTRAINT `group_subject_mappings_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('9', '2', '14', '2026-09-13 19:01:55', '2026-09-13 19:01:55');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('10', '1', '18', '2026-09-13 19:02:13', '2026-09-13 19:02:13');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('11', '1', '17', '2026-09-13 19:02:13', '2026-09-13 19:02:13');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('12', '1', '16', '2026-09-13 19:02:13', '2026-09-13 19:02:13');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('13', '1', '15', '2026-09-13 19:02:13', '2026-09-13 19:02:13');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('14', '3', '13', '2026-09-13 19:02:44', '2026-09-13 19:02:44');
INSERT INTO `group_subject_mappings` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('15', '3', '12', '2026-09-13 19:02:44', '2026-09-13 19:02:44');


CREATE TABLE `group_subjects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `class_group_id` bigint(20) unsigned NOT NULL,
  `subject_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `group_subjects_class_group_id_subject_id_unique` (`class_group_id`,`subject_id`),
  KEY `group_subjects_subject_id_foreign` (`subject_id`),
  CONSTRAINT `group_subjects_class_group_id_foreign` FOREIGN KEY (`class_group_id`) REFERENCES `class_groups` (`id`) ON DELETE CASCADE,
  CONSTRAINT `group_subjects_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `group_subjects` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('2', '1', '17', NULL, NULL);
INSERT INTO `group_subjects` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('3', '2', '11', NULL, NULL);
INSERT INTO `group_subjects` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('4', '2', '12', NULL, NULL);
INSERT INTO `group_subjects` (`id`, `class_group_id`, `subject_id`, `created_at`, `updated_at`) VALUES ('5', '3', '8', NULL, NULL);


CREATE TABLE `holidays` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `holidays` (`id`, `title`, `start_date`, `end_date`, `description`, `created_at`, `updated_at`) VALUES ('1', 'Eid-Ul-Fitr', '2026-09-14', '2026-09-20', 'Enjoy your vacation', '2026-09-13 17:28:55', '2026-09-13 17:28:55');


CREATE TABLE `institute_infos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `institute_name` varchar(255) NOT NULL,
  `established_year` varchar(255) DEFAULT NULL,
  `location` varchar(255) DEFAULT NULL,
  `contact` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `institute_infos` (`id`, `institute_name`, `established_year`, `location`, `contact`, `email`, `logo`, `created_at`, `updated_at`) VALUES ('2', 'Icon Academy', '2000', 'Mirpur, Dhaka', '01753787564', NULL, 'institute/1789334168_cssNG8o3rb.png', '2026-09-13 21:16:08', '2026-09-13 21:16:08');


CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) unsigned NOT NULL,
  `reserved_at` int(10) unsigned DEFAULT NULL,
  `available_at` int(10) unsigned NOT NULL,
  `created_at` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('1', '0001_01_01_000000_create_users_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('2', '0001_01_01_000001_create_cache_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('3', '0001_01_01_000002_create_jobs_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('4', '2026_01_02_152655_create_teachers_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('5', '2026_01_02_164123_create_teachers_attendances_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('6', '2026_02_07_071712_create_shifts_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('7', '2026_04_23_074928_create_sections_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('8', '2026_05_10_191531_create_examinations_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('9', '2026_05_11_210152_create_personal_access_tokens_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('10', '2026_05_18_234106_create_clss_m_s_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('11', '2026_05_19_061918_students', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('12', '2026_05_19_115201_create_payments_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('13', '2026_05_19_182404_add_month_to_payments_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('14', '2026_06_20_161735_create_results_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('15', '2026_07_11_094428_add_exit_time_to_teacher_attendances_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('16', '2026_07_16_083620_add_monthly_fee_to_students_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('17', '2026_07_17_193256_add_admission_fee_and_exam_fee_to_payments_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('18', '2026_07_18_075010_create_other_payments_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('19', '2026_07_19_104636_create_expenses_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('20', '2026_07_19_133530_add_payment_month_to_expenses_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('21', '2026_07_30_174357_add_created_by_to_expenses_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('22', '2026_08_02_152559_create_model_names_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('23', '2026_08_11_154210_staff', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('24', '2026_08_25_095835_create_staff_attendances_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('25', '2026_08_27_191706_create_holidays_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('26', '2026_08_28_120440_create_subjects_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('27', '2026_08_28_121348_create_class_subject_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('28', '2026_08_28_183831_create_result_subjects_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('29', '2026_08_31_175137_create_class_groups_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('30', '2026_08_31_175526_create_group_subjects_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('31', '2026_08_31_190731_add_class_group_id_to_students_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('32', '2026_09_01_160715_create_institute_infos_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('33', '2026_09_07_124506_create_group_subject_mappings_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('34', '2026_09_08_082408_add_full_mark_column_to_subjects_table', '1');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('35', '2026_09_08_090418_create_grading_systems_table', '2');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('36', '2026_09_08_201522_add_exam_mark_to_examinations_table', '3');
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES ('37', '2026_09_10_183844_create_final_results_table', '4');


CREATE TABLE `model_names` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `other_payments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` bigint(20) unsigned NOT NULL,
  `item_name` varchar(255) NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `payment_method` varchar(255) NOT NULL,
  `payment_date` date NOT NULL,
  `remarks` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `other_payments_student_id_foreign` (`student_id`),
  CONSTRAINT `other_payments_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('1', '25', 'Book', '6', '700.00', '4200.00', 'Cash', '2026-09-13', 'Book Mark', '2026-09-13 22:40:34', '2026-09-13 22:40:34');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('2', '6', 'Book', '6', '600.00', '3600.00', 'Cash', '2026-09-13', NULL, '2026-09-13 22:44:03', '2026-09-13 23:56:08');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('3', '25', 'Pencil', '30', '20.00', '600.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:26:44', '2026-09-14 01:26:44');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('4', '5', 'Sheet', '50', '500.00', '25000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:27:33', '2026-09-14 01:27:33');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('5', '25', 'Khata', '50', '60.00', '3000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:28:47', '2026-09-14 01:28:47');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('6', '22', 'Book', '20', '600.00', '12000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:29:26', '2026-09-14 01:29:26');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('7', '19', 'Transfer Certificate', '1', '1000.00', '1000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:30:44', '2026-09-14 01:30:44');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('8', '9', 'Book', '1', '9000.00', '9000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:31:22', '2026-09-14 01:31:22');
INSERT INTO `other_payments` (`id`, `student_id`, `item_name`, `quantity`, `price`, `total_amount`, `payment_method`, `payment_date`, `remarks`, `created_at`, `updated_at`) VALUES ('9', '4', 'Book', '10', '2000.00', '20000.00', 'Cash', '2026-09-14', NULL, '2026-09-14 01:32:18', '2026-09-14 01:32:18');


CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `payments` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` bigint(20) unsigned NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `paid_amount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `admission_fee` decimal(10,2) DEFAULT NULL,
  `exam_fee` decimal(10,2) DEFAULT NULL,
  `due_amount` decimal(10,2) DEFAULT NULL,
  `payment_method` varchar(255) DEFAULT NULL,
  `payment_date` date DEFAULT NULL,
  `status` enum('paid','due') NOT NULL DEFAULT 'due',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `month` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `payments_student_id_foreign` (`student_id`),
  CONSTRAINT `payments_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('11', '1', '1500.00', '1500.00', NULL, NULL, '0.00', 'Bkash', '2026-09-13', 'paid', '2026-09-13 15:53:00', '2026-09-13 15:53:00', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('12', '2', '1200.00', '1200.00', NULL, NULL, '0.00', 'Bkash', '2026-09-13', 'paid', '2026-09-13 15:54:03', '2026-09-13 15:54:03', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('13', '25', '3000.00', '2500.00', NULL, NULL, '500.00', 'Cash', '2026-09-14', 'due', '2026-09-14 00:12:58', '2026-09-14 00:12:58', 'August');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('14', '25', '3000.00', '3000.00', NULL, NULL, '0.00', 'Cash', '2026-09-14', 'paid', '2026-09-14 00:47:24', '2026-09-14 00:47:24', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('15', '24', '3000.00', '2500.00', NULL, NULL, '500.00', 'Nogod', '2026-09-14', 'due', '2026-09-14 00:48:08', '2026-09-14 00:48:08', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('16', '23', '3000.00', '2000.00', NULL, NULL, '1000.00', 'Cash', '2026-09-14', 'due', '2026-09-14 00:49:22', '2026-09-14 00:49:22', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('17', '22', '3000.00', '2000.00', NULL, NULL, '1000.00', 'Bkash', '2026-09-14', 'due', '2026-09-14 00:51:16', '2026-09-14 00:51:16', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('18', '21', '3000.00', '3000.00', NULL, NULL, '0.00', 'Cash', '2026-09-14', 'paid', '2026-09-14 00:52:03', '2026-09-14 00:52:03', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('19', '20', '3000.00', '2000.00', NULL, NULL, '1000.00', 'Nogod', '2026-09-14', 'due', '2026-09-14 00:54:06', '2026-09-14 00:54:06', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('20', '19', '3000.00', '3000.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 00:55:03', '2026-09-14 00:55:03', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('21', '18', '3000.00', '3000.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 00:55:50', '2026-09-14 00:55:50', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('22', '17', '3000.00', '3000.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:10:09', '2026-09-14 01:10:09', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('23', '16', '1497.00', '1400.00', '0.00', '0.00', '97.00', 'Cash', '2026-09-14', 'due', '2026-09-14 01:11:25', '2026-09-14 01:25:37', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('24', '15', '1500.00', '1500.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:12:39', '2026-09-14 01:12:39', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('25', '14', '1500.00', '1500.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:13:32', '2026-09-14 01:13:32', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('26', '13', '1500.00', '1500.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:15:01', '2026-09-14 01:15:01', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('27', '12', '1497.00', '1400.00', NULL, NULL, '97.00', 'Bkash', '2026-09-14', 'due', '2026-09-14 01:16:21', '2026-09-14 01:16:21', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('28', '11', '2000.00', '2000.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:17:45', '2026-09-14 01:17:45', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('29', '10', '2000.00', '2000.00', NULL, NULL, '0.00', 'Cash', '2026-09-14', 'paid', '2026-09-14 01:19:04', '2026-09-14 01:19:04', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('30', '8', '2500.00', '2500.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:20:57', '2026-09-14 01:20:57', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('31', '9', '3000.00', '3000.00', NULL, NULL, '0.00', 'Bkash', '2026-09-14', 'paid', '2026-09-14 01:22:39', '2026-09-14 01:22:39', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('32', '7', '3000.00', '3000.00', NULL, NULL, '0.00', 'Nogod', '2026-09-14', 'paid', '2026-09-14 01:23:24', '2026-09-14 01:23:24', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('33', '6', '2000.00', '2000.00', NULL, NULL, '0.00', 'Cash', '2026-09-14', 'paid', '2026-09-14 01:24:05', '2026-09-14 01:24:05', 'September');
INSERT INTO `payments` (`id`, `student_id`, `amount`, `paid_amount`, `admission_fee`, `exam_fee`, `due_amount`, `payment_method`, `payment_date`, `status`, `created_at`, `updated_at`, `month`) VALUES ('34', '5', '1500.00', '1000.00', '0.00', '0.00', '500.00', 'Cash', '2026-09-14', 'due', '2026-09-14 01:37:42', '2026-09-14 01:38:54', 'August');


CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) unsigned NOT NULL,
  `name` text NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`),
  KEY `personal_access_tokens_expires_at_index` (`expires_at`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('1', 'App\\Models\\Staff', '1', 'staff-token', 'f6c214c4f1e97eab1565a94284f92698c4993198f4545d855efc9f82c37aa877', '[\"*\"]', '2026-09-14 08:16:53', NULL, '2026-09-08 08:27:30', '2026-09-14 08:16:53');
INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('2', 'App\\Models\\Staff', '1', 'staff-token', 'a7e799291f2ad1eec720f69ffa77ca71446f0959ade84dca802aa7db6628ad83', '[\"*\"]', '2026-09-10 17:54:34', NULL, '2026-09-10 17:54:26', '2026-09-10 17:54:34');
INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('3', 'App\\Models\\Staff', '1', 'staff-token', '04983f62935478a7dabe9f1ab43fb628a22f138c3b69586def91f2602d701c2f', '[\"*\"]', '2026-09-14 02:00:04', NULL, '2026-09-10 17:54:32', '2026-09-14 02:00:04');
INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('4', 'App\\Models\\Staff', '1', 'staff-token', '8055160b56e8d889485a3ef78178f6eff6e007628e75fb377a2f11745ca4ee9c', '[\"*\"]', '2026-09-13 10:02:15', NULL, '2026-09-13 04:49:37', '2026-09-13 10:02:15');
INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('5', 'App\\Models\\Staff', '1', 'staff-token', '6fefe2d82ec746bd992509a9b4517719155818a28ee98a2d81cc2a0e6cb892ce', '[\"*\"]', '2026-09-14 07:32:49', NULL, '2026-09-14 07:26:35', '2026-09-14 07:32:49');
INSERT INTO `personal_access_tokens` (`id`, `tokenable_type`, `tokenable_id`, `name`, `token`, `abilities`, `last_used_at`, `expires_at`, `created_at`, `updated_at`) VALUES ('6', 'App\\Models\\Staff', '1', 'staff-token', '924ec0ba1dba503f129cc1b84f2a9fde96b3c659dc7d8bc590e35b4ff7abec3d', '[\"*\"]', '2026-09-14 08:25:06', NULL, '2026-09-14 07:44:20', '2026-09-14 08:25:06');


CREATE TABLE `result_subjects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `result_id` bigint(20) unsigned NOT NULL,
  `subject_id` bigint(20) unsigned NOT NULL,
  `marks` decimal(5,2) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `result_subjects_result_id_subject_id_unique` (`result_id`,`subject_id`),
  KEY `result_subjects_subject_id_foreign` (`subject_id`),
  CONSTRAINT `result_subjects_result_id_foreign` FOREIGN KEY (`result_id`) REFERENCES `results` (`id`) ON DELETE CASCADE,
  CONSTRAINT `result_subjects_subject_id_foreign` FOREIGN KEY (`subject_id`) REFERENCES `subjects` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=73 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('37', '5', '8', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('38', '5', '7', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('39', '5', '6', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('40', '5', '5', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('41', '5', '4', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('42', '5', '1', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('43', '5', '3', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('44', '5', '2', '22.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('45', '5', '9', '15.00', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('46', '6', '8', '90.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('47', '6', '7', '48.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('48', '6', '6', '47.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('49', '6', '5', '98.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('50', '6', '4', '77.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('51', '6', '1', '88.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('52', '6', '3', '89.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('53', '6', '2', '88.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('54', '6', '9', '99.00', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('55', '7', '8', '90.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('56', '7', '7', '49.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('57', '7', '6', '45.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('58', '7', '5', '98.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('59', '7', '4', '88.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('60', '7', '1', '85.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('61', '7', '3', '82.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('62', '7', '2', '98.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('63', '7', '9', '99.00', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('64', '8', '8', '90.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('65', '8', '7', '48.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('66', '8', '6', '49.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('67', '8', '5', '87.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('68', '8', '4', '67.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('69', '8', '1', '90.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('70', '8', '3', '96.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('71', '8', '2', '69.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');
INSERT INTO `result_subjects` (`id`, `result_id`, `subject_id`, `marks`, `created_at`, `updated_at`) VALUES ('72', '8', '9', '99.00', '2026-09-10 22:43:20', '2026-09-10 22:43:20');


CREATE TABLE `results` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` bigint(20) unsigned NOT NULL,
  `exam_year` varchar(255) NOT NULL,
  `exam_type` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `results_student_id_exam_year_exam_type_unique` (`student_id`,`exam_year`,`exam_type`),
  CONSTRAINT `results_student_id_foreign` FOREIGN KEY (`student_id`) REFERENCES `students` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `results` (`id`, `student_id`, `exam_year`, `exam_type`, `created_at`, `updated_at`) VALUES ('5', '1', '2026', 'TUTORIAL', '2026-09-08 20:57:31', '2026-09-08 20:57:31');
INSERT INTO `results` (`id`, `student_id`, `exam_year`, `exam_type`, `created_at`, `updated_at`) VALUES ('6', '1', '2026', 'MID-TURM', '2026-09-10 20:51:48', '2026-09-10 20:51:48');
INSERT INTO `results` (`id`, `student_id`, `exam_year`, `exam_type`, `created_at`, `updated_at`) VALUES ('7', '1', '2026', 'FINAL', '2026-09-10 20:53:49', '2026-09-10 20:53:49');
INSERT INTO `results` (`id`, `student_id`, `exam_year`, `exam_type`, `created_at`, `updated_at`) VALUES ('8', '1', '2025', 'FINAL', '2026-09-10 22:43:20', '2026-09-10 22:43:20');


CREATE TABLE `sections` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `section_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `sections` (`id`, `section_name`, `created_at`, `updated_at`) VALUES ('1', 'A', '2026-09-08 08:39:14', '2026-09-08 08:39:14');
INSERT INTO `sections` (`id`, `section_name`, `created_at`, `updated_at`) VALUES ('2', 'B', '2026-09-13 19:05:04', '2026-09-13 19:05:04');
INSERT INTO `sections` (`id`, `section_name`, `created_at`, `updated_at`) VALUES ('3', 'C', '2026-09-13 19:05:10', '2026-09-13 19:05:10');
INSERT INTO `sections` (`id`, `section_name`, `created_at`, `updated_at`) VALUES ('4', 'D', '2026-09-13 19:05:17', '2026-09-13 19:05:17');


CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) unsigned DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `shifts` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `start_time` time NOT NULL DEFAULT '09:00:00',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `shifts_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `shifts` (`id`, `name`, `start_time`, `created_at`, `updated_at`) VALUES ('1', 'Morning', '09:00:00', '2026-09-08 08:39:29', '2026-09-08 08:39:29');
INSERT INTO `shifts` (`id`, `name`, `start_time`, `created_at`, `updated_at`) VALUES ('2', 'Day', '12:00:00', '2026-09-13 19:05:35', '2026-09-13 19:05:35');
INSERT INTO `shifts` (`id`, `name`, `start_time`, `created_at`, `updated_at`) VALUES ('3', 'Evining', '18:00:00', '2026-09-13 19:05:48', '2026-09-13 19:05:48');


CREATE TABLE `staff` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `shift_id` bigint(20) unsigned DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `user_name` varchar(255) NOT NULL,
  `skill` varchar(255) DEFAULT NULL,
  `role` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `salary` decimal(10,2) NOT NULL,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `staff_user_name_unique` (`user_name`),
  UNIQUE KEY `staff_email_unique` (`email`),
  KEY `staff_shift_id_foreign` (`shift_id`),
  CONSTRAINT `staff_shift_id_foreign` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('1', NULL, 'Super Manager', 'manager', 'Administration', 'Manager', 'manager@coaching.com', NULL, '0.00', '$2y$12$00PIQnFaw7cadhuRYlz.U.04IYPisiGb577ftODAvP8HhT9hpvVtm', NULL, '2026-09-08 08:26:40', '2026-09-08 08:26:40');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('2', NULL, 'Jubair Ahmed Masum', 'jubair', 'Administration', 'Manager', 'masum@coaching.com', NULL, '0.00', '$2y$12$77GIwuoBLM/uJifeUpC2OOIHxU6breuWSNz24IizOp4C2yGrPgxPK', NULL, '2026-09-08 08:26:40', '2026-09-08 08:26:40');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('5', '1', 'Mahmud', 'Hasan', 'Full Time', 'Admin', 'hasan.mahmud20@gmail.com', NULL, '10000.00', '$2y$12$4vQBNInaSlyiK49/Q9HiouZCkT7HtmPAdUatrA8ow2oqalICuwbbC', NULL, '2026-09-13 19:41:41', '2026-09-13 19:41:41');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('6', '1', 'Sultana', 'Anika', 'Full time', 'Accountant', 'anika.sultana19@gmail.com', NULL, '12000.00', '$2y$12$G6EGu.JlPp4R6H1SxEkd1uZyqpqzq/6z9SFQlg1vrE8gMw/Zzd9BK', NULL, '2026-09-13 19:42:51', '2026-09-13 19:42:51');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('7', '2', 'Hossain Rifat', 'Hossain', 'Part-Time', 'Admin', 'hossain18@gmail.com', NULL, '5000.00', '$2y$12$2xk9h0eq843qjEptIr35NuFZGXUWPjUXENg7L5nQxvHSvNAdhtKBO', NULL, '2026-09-13 19:44:19', '2026-09-13 19:44:19');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('8', '1', 'Mariya', 'Akter', 'Full Time', 'Admin', 'akter17@gmail.com', NULL, '15000.00', '$2y$12$zYzSaXUNPZrusDm0/r7wVu4RIGXE3HbCR43EkmWuHIsI5WHPmKNkm', NULL, '2026-09-13 19:45:30', '2026-09-13 19:45:30');
INSERT INTO `staff` (`id`, `shift_id`, `name`, `user_name`, `skill`, `role`, `email`, `image`, `salary`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES ('9', '1', 'Imran Khan', 'Khan', 'Full Time', 'Accountant', 'khan1666@gmail.com', NULL, '15000.00', '$2y$12$7xUo7voz4sekTBAOlbbLj.h/wlrVlPnz.QJ6NbHxSuON74LKbe1Gu', NULL, '2026-09-13 19:48:15', '2026-09-13 19:48:15');


CREATE TABLE `staff_attendances` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `staff_id` bigint(20) unsigned NOT NULL,
  `shift_name` varchar(255) NOT NULL DEFAULT 'General Shift',
  `date` date NOT NULL,
  `status` enum('Present','Absent','Late','Leave') NOT NULL DEFAULT 'Present',
  `in_time` time DEFAULT NULL,
  `out_time` time DEFAULT NULL,
  `note` text DEFAULT NULL,
  `leave` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `staff_attendances_staff_id_shift_name_date_unique` (`staff_id`,`shift_name`,`date`),
  CONSTRAINT `staff_attendances_staff_id_foreign` FOREIGN KEY (`staff_id`) REFERENCES `staff` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `staff_attendances` (`id`, `staff_id`, `shift_name`, `date`, `status`, `in_time`, `out_time`, `note`, `leave`, `created_at`, `updated_at`) VALUES ('1', '2', 'General Shift', '2026-09-13', 'Late', '15:42:00', '23:29:00', 'Late by 402 mins', '0', '2026-09-13 09:42:02', '2026-09-13 17:29:25');


CREATE TABLE `students` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `section_id` bigint(20) unsigned NOT NULL,
  `shift_id` bigint(20) unsigned DEFAULT NULL,
  `class_id` bigint(20) unsigned NOT NULL,
  `class_group_id` bigint(20) unsigned DEFAULT NULL,
  `full_name` varchar(255) NOT NULL,
  `fathers_name` varchar(255) NOT NULL,
  `mothers_name` varchar(255) NOT NULL,
  `student_id` varchar(255) NOT NULL,
  `phone` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `course_name` varchar(255) DEFAULT NULL,
  `image` varchar(255) DEFAULT NULL,
  `admission_date` date DEFAULT NULL,
  `status` enum('active','inactive') NOT NULL DEFAULT 'active',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `monthly_fee` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `students_student_id_unique` (`student_id`),
  KEY `students_section_id_foreign` (`section_id`),
  KEY `students_shift_id_foreign` (`shift_id`),
  KEY `students_class_id_foreign` (`class_id`),
  KEY `students_class_group_id_foreign` (`class_group_id`),
  CONSTRAINT `students_class_group_id_foreign` FOREIGN KEY (`class_group_id`) REFERENCES `class_groups` (`id`) ON DELETE SET NULL,
  CONSTRAINT `students_class_id_foreign` FOREIGN KEY (`class_id`) REFERENCES `clss_m_s` (`id`) ON DELETE CASCADE,
  CONSTRAINT `students_section_id_foreign` FOREIGN KEY (`section_id`) REFERENCES `sections` (`id`) ON DELETE CASCADE,
  CONSTRAINT `students_shift_id_foreign` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('1', '1', '1', '1', '1', 'TASHRIF AHMED', 'Shahidul Islam', 'Taskiya Tanzin', 'STD-1001', '01753787564', 'tashrif@gmail.com', NULL, 'students/1788856946_bZb96fJDHd.png', '2026-09-08', 'active', '2026-09-08 08:42:26', '2026-09-08 08:42:26', '1500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('2', '1', '1', '2', '1', 'asdf`', 'asdf', 'adsf', 'STD-1002', '098765', 'd@g.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 09:45:53', '2026-09-13 09:45:53', '1200.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('4', '1', '1', '2', '1', 'asdf', 'asdf', 'ASDFG', 'STD-1003', '0987', 'D@K.COM', NULL, NULL, '2026-09-13', 'active', '2026-09-13 17:12:22', '2026-09-13 17:12:22', '678.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('5', '1', '1', '2', '1', 'Abir Hasan', 'Md. Anwar Hossain', 'Nasrin Akter', 'STD-1004', '01711000001', 'abir.hasan01@gmail.com', NULL, NULL, '2026-08-01', 'active', '2026-09-13 18:30:21', '2026-09-13 18:30:21', '1500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('6', '1', '1', '2', '4', 'Sakib Ahmed', 'Md. Kamal Ahmed', 'Farzana Begum', 'STD-1005', '01711000002', 'sakib.ahmed02@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:04:37', '2026-09-13 19:04:37', '2000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('7', '2', '2', '1', '1', 'Nafisa Rahman', 'Md. Rafiqul Islam', 'Shahana Akter', 'STD-1006', '01711000003', 'nafisa.rahman03@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:07:13', '2026-09-13 19:07:13', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('8', '3', '3', '11', '2', 'Tanvir Hossain', 'Md. Selim Hossain', 'Rokeya Begum', 'STD-1007', '01711000004', 'tanvir.hossain04@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:08:21', '2026-09-13 19:08:21', '2500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('9', '4', '1', '11', '3', 'Mim Akter', 'Md. Monirul Islam', 'Jannatul Ferdous', 'STD-1008', '01711000005', 'mim.akter05@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:09:30', '2026-09-13 19:09:30', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('10', '1', '2', '3', '4', 'Mimi Akter', 'Md. Monirul Islam', 'Jannatul Ferdous', 'STD-1009', '01711000005', 'mimi.akter05@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:13:08', '2026-09-13 19:13:08', '2000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('11', '1', '1', '5', '4', 'Raihan Kabir', 'Md. Habibur Rahman', 'Salma Khatun', 'STD-1010', '01711000006', 'raihan.kabir06@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:16:45', '2026-09-13 19:16:45', '2000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('12', '2', '2', '6', '4', 'Jannat Ara', 'Md. Abdul Karim', 'Momena Begum', 'STD-1011', '01711000007', 'jannat.ara07@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:17:52', '2026-09-13 19:17:52', '1497.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('13', '3', '3', '7', '4', 'Fahim Hasan', 'Md. Nazrul Islam', 'Shirin Akter', 'STD-1012', '01711000008', 'fahim.hasan08@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:19:40', '2026-09-13 19:19:40', '1500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('14', '3', '1', '9', '4', 'Sumaiya Islam', 'Md. Shah Alam', 'Rumana Akter', 'STD-1013', '01711000009', 'sumaiya.islam09@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:20:32', '2026-09-13 19:20:32', '1500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('15', '2', '1', '10', '4', 'Mehedi Hasan', 'Md. Yasin Ali', 'Laila Begum', 'STD-1014', '01711000010', 'mehedi.hasan10@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:21:49', '2026-09-13 19:21:49', '1500.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('16', '1', '2', '8', '4', 'Arif Hossain', 'Md. Mahbubur Rahman', 'Nasima Akter', 'STD-1015', '01711000011', 'arif.hossain11@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:25:06', '2026-09-13 19:25:06', '1497.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('17', '1', '1', '1', '3', 'Tanjim Ahmed', 'Md. Mostafizur Rahman', 'Shamima Begum', 'STD-1016', '01711000012', 'tanjim.ahmed12@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:26:49', '2026-09-13 19:26:49', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('18', '1', '2', '11', '2', 'Sadia Rahman', 'Md. Zakir Hossain', 'Parvin Akter', 'STD-1017', '01711000013', 'sadia.rahman13@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:28:06', '2026-09-13 19:28:06', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('19', '3', '1', '11', '1', 'Shuvo Das', 'Bimal Chandra Das', 'Mita Rani Das', 'STD-1018', '01711000014', 'shuvo.das14@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:29:18', '2026-09-13 19:29:18', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('20', '1', '1', '11', '1', 'Nusrat Jahan', 'Md. Harun Or Rashid', 'Beauty Begum', 'STD-1019', '01711000015', 'nusrat.jahan15@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:31:08', '2026-09-13 19:31:08', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('21', '1', '1', '11', '2', 'Imran Khan', 'Md. Abdul Latif', 'Ayesha Begum', 'STD-1020', '01711000016', 'imran.khan16@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:32:21', '2026-09-13 19:32:21', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('22', '1', '1', '1', '2', 'Mariya Akter', 'Md. Jahangir Alam', 'Sultana Begum', 'STD-1021', '01711000017', 'mariya.akter17@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:34:08', '2026-09-13 19:34:08', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('23', '1', '1', '11', '3', 'Rifat Hossain', 'Md. Mizanur Rahman', 'Tahmina Akter', 'STD-1022', '01711000018', 'rifat.hossain18@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:35:29', '2026-09-13 19:35:29', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('24', '1', '1', '11', '3', 'Anika Sultana', 'Md. Rezaul Karim', 'Moushumi Akter', 'STD-1023', '01711000019', 'anika.sultana19@gmail.com', NULL, NULL, '2026-09-13', 'active', '2026-09-13 19:38:03', '2026-09-13 19:38:03', '3000.00');
INSERT INTO `students` (`id`, `section_id`, `shift_id`, `class_id`, `class_group_id`, `full_name`, `fathers_name`, `mothers_name`, `student_id`, `phone`, `email`, `course_name`, `image`, `admission_date`, `status`, `created_at`, `updated_at`, `monthly_fee`) VALUES ('25', '1', '1', '11', '3', 'Hasan Mahmud', 'Md. Iqbal Hossain', 'Rina Begum', 'STD-1024', '01711000020', 'hasan.mahmud20@gmail.com', NULL, NULL, '2026-08-08', 'active', '2026-09-13 19:39:03', '2026-09-13 19:39:03', '3000.00');


CREATE TABLE `subjects` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `code` varchar(50) NOT NULL,
  `full_mark` int(10) unsigned NOT NULL DEFAULT 100,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `subjects_code_unique` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('1', 'Mathametic', 'MATH', '100', '2026-09-08 08:31:53', '2026-09-08 08:31:53');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('2', 'English', 'ENG', '100', '2026-09-08 08:36:16', '2026-09-08 08:36:16');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('3', 'Science', 'SCE', '100', '2026-09-08 08:36:27', '2026-09-08 08:36:27');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('4', 'Bangladesh & Global Studies', 'BGS', '100', '2026-09-08 08:36:52', '2026-09-08 08:36:52');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('5', 'Bangla 1st part', 'BANG', '100', '2026-09-08 08:37:20', '2026-09-08 08:37:35');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('6', 'Bangla 2nd part', 'BANG-2', '50', '2026-09-08 08:37:53', '2026-09-08 08:37:53');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('7', 'English 2nd part', 'ENG-2', '50', '2026-09-08 08:38:18', '2026-09-08 08:38:18');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('8', 'Information & Communication', 'ICT', '100', '2026-09-08 08:38:48', '2026-09-08 08:38:48');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('9', 'Agriculture', 'AGRI', '100', '2026-09-08 08:39:01', '2026-09-08 08:39:01');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('10', 'Religion', 'REL', '100', '2026-09-13 18:31:08', '2026-09-13 18:31:08');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('11', 'Garhosto', 'GARHOSTO', '100', '2026-09-13 18:31:42', '2026-09-13 18:31:55');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('12', 'Accounting', 'ACCOUNT', '100', '2026-09-13 18:32:16', '2026-09-13 18:32:16');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('13', 'Finance', 'FINANCE', '100', '2026-09-13 18:32:28', '2026-09-13 18:32:28');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('14', 'History', 'HISTRY', '100', '2026-09-13 18:32:49', '2026-09-13 18:32:49');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('15', 'Physics', 'PHY', '100', '2026-09-13 18:32:58', '2026-09-13 18:32:58');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('16', 'Chymistry', 'CHY', '100', '2026-09-13 18:33:09', '2026-09-13 18:33:09');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('17', 'Higher Math', 'H.MATH', '100', '2026-09-13 18:33:34', '2026-09-13 18:33:34');
INSERT INTO `subjects` (`id`, `name`, `code`, `full_mark`, `created_at`, `updated_at`) VALUES ('18', 'Biology', 'BIOLOGY', '100', '2026-09-13 18:33:45', '2026-09-13 18:33:45');


CREATE TABLE `teacher_shift` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `teacher_id` bigint(20) unsigned NOT NULL,
  `shift_id` bigint(20) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `teacher_shift_teacher_id_foreign` (`teacher_id`),
  KEY `teacher_shift_shift_id_foreign` (`shift_id`),
  CONSTRAINT `teacher_shift_shift_id_foreign` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `teacher_shift_teacher_id_foreign` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('1', '1', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('2', '2', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('3', '3', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('4', '4', '2', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('5', '5', '3', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('6', '6', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('7', '7', '2', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('8', '8', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('9', '9', '3', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('10', '10', '1', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('11', '11', '3', NULL, NULL);
INSERT INTO `teacher_shift` (`id`, `teacher_id`, `shift_id`, `created_at`, `updated_at`) VALUES ('12', '12', '3', NULL, NULL);


CREATE TABLE `teachers` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `teacher_id` varchar(255) NOT NULL,
  `full_name` varchar(255) NOT NULL,
  `designation` varchar(255) NOT NULL,
  `department` varchar(255) NOT NULL,
  `qualification` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `email` varchar(255) NOT NULL,
  `join_date` date NOT NULL,
  `salary` decimal(10,2) NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `teachers_teacher_id_unique` (`teacher_id`),
  UNIQUE KEY `teachers_email_unique` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('1', 'TCH-1001', 'Taskiya Tanzin', 'Senior Teacher', 'English', 'MA in English', '01979787564', 'taskiya@gmail.com', '2026-09-13', '20000.00', NULL, '2026-09-13 17:02:17', '2026-09-13 17:02:17');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('2', 'TCH-1002', 'Nusrat Jahan', 'Senior Teacher', 'Mathematics', 'MA in English', '01711000015', 'jahan15@gmail.com', '2026-09-13', '15000.00', NULL, '2026-09-13 19:52:03', '2026-09-13 19:52:03');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('3', 'TCH-1003', 'Md. Rakib Hasan', 'Senior Mathematics Teacher', 'Mathematics', 'B.Sc. in Mathematics', '01811000001', 'rakib.hasan01@gmail.com', '2026-09-13', '25000.00', NULL, '2026-09-13 19:55:20', '2026-09-13 19:55:20');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('4', 'TCH-1004', 'Nusrat Jahan', 'English Teacher', 'English', 'M.A. in English', '01811000002', 'nusrat.jahan02@gmail.com', '2026-09-13', '19995.00', NULL, '2026-09-13 19:56:44', '2026-09-13 19:56:44');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('5', 'TCH-1005', 'Md. Tanvir Ahmed', 'Physics Teacher', 'Physics', 'M.Sc. in Physics', '01811000003', 'tanvir.ahmed03@gmail.com', '2026-09-13', '30000.00', NULL, '2026-09-13 19:57:46', '2026-09-13 19:57:46');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('6', 'TCH-1006', 'Farzana Akter', 'Chemistry Teacher', 'Mathematics', 'M.Sc. in Chemistry', '01811000004', 'farzana.akter04@gmail.com', '2026-09-13', '25000.00', NULL, '2026-09-13 19:59:45', '2026-09-13 19:59:45');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('7', 'TCH-1007', 'Md. Saiful Islam', 'Biology Teacher', 'Physics', 'M.Sc. in Biology', '01811000005', 'saiful.islam05@gmail.com', '2026-09-13', '20000.00', NULL, '2026-09-13 20:02:23', '2026-09-13 20:02:23');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('8', 'TCH-1008', 'Sadia Rahman', 'Bangla Teacher', 'Computer Science', 'M.A. in Bangla', '01811000006', 'sadia.rahman06@gmail.com', '2026-09-13', '10000.00', NULL, '2026-09-13 20:04:46', '2026-09-13 20:04:46');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('9', 'TCH-1009', 'Md. Imran Hossain', 'ICT Teacher', 'Computer Science', 'B.Sc. in CSE', '01811000007', 'imran.hossain07@gmail.com', '2026-09-13', '8000.00', NULL, '2026-09-13 20:05:39', '2026-09-13 20:05:39');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('10', 'TCH-1010', 'Jannatul Ferdous', 'General Science Teacher', 'Computer Science', 'B.Sc. in Science', '01811000008', 'jannatul.ferdous08@gmail.com', '2026-09-13', '9997.00', NULL, '2026-09-13 20:07:10', '2026-09-13 20:07:10');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('11', 'TCH-1011', 'Md. Mahfuzur Rahman', 'Higher Mathematics Teacher', 'Mathematics', 'M.Sc. in Mathematics', '01811000009', 'mahfuzur.rahman09@gmail.com', '2026-09-13', '15000.00', NULL, '2026-09-13 20:08:44', '2026-09-13 20:08:44');
INSERT INTO `teachers` (`id`, `teacher_id`, `full_name`, `designation`, `department`, `qualification`, `phone`, `email`, `join_date`, `salary`, `image`, `created_at`, `updated_at`) VALUES ('12', 'TCH-1012', 'Mim Akter', 'Social Science Teacher', 'English', 'M.A. in Sociology', '01811000010', 'mim.akter10@gmail.com', '2026-09-13', '9995.00', NULL, '2026-09-13 20:10:13', '2026-09-13 20:10:13');


CREATE TABLE `teachers_attendances` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `teacher_id` bigint(20) unsigned NOT NULL,
  `shift_name` varchar(255) NOT NULL DEFAULT 'General Shift',
  `date` date NOT NULL,
  `status` enum('Present','Absent','Late','Leave') NOT NULL DEFAULT 'Present',
  `leave` tinyint(1) NOT NULL DEFAULT 0,
  `in_time` time DEFAULT NULL,
  `out_time` time DEFAULT NULL,
  `note` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `teachers_attendances_teacher_id_shift_name_date_unique` (`teacher_id`,`shift_name`,`date`),
  CONSTRAINT `teachers_attendances_teacher_id_foreign` FOREIGN KEY (`teacher_id`) REFERENCES `teachers` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



CREATE TABLE `users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

