

--
-- Database: `zeonglob_zap_mpbacademy_sec_abuja`
--




CREATE TABLE `about_us` (
  `about_us_id` int(11) NOT NULL AUTO_INCREMENT,
  `map` varchar(300) NOT NULL,
  `about_us_text` text NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`about_us_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `activity` (
  `assignment_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `table_name` varchar(30) NOT NULL,
  `assignment_title` varchar(200) NOT NULL,
  `assignment_text` text NOT NULL,
  `due_date` datetime NOT NULL,
  `property` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'active',
  `total_score` decimal(15,2) NOT NULL,
  `assignment_date` datetime NOT NULL DEFAULT current_timestamp(),
  `answer_text` text NOT NULL,
  `answer_status` varchar(10) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`assignment_id`),
  KEY `due_date` (`due_date`),
  KEY `topic_id` (`topic_id`),
  KEY `activation` (`activation`),
  KEY `answer_status` (`answer_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `activity_comment` (
  `activity_comment_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `comment` varchar(500) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`activity_comment_id`),
  KEY `assignment_id` (`assignment_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_class` (
  `admission_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_sessions_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `price` decimal(15,2) NOT NULL,
  PRIMARY KEY (`admission_class_id`),
  KEY `admission_session_id` (`admission_sessions_id`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_questions` (
  `admission_exam_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_exam_question_id`),
  KEY `admission_exam_id` (`admission_exam_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_student_questions` (
  `admission_exam_student_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_student_id` int(11) NOT NULL,
  `question_options_id` int(11) NOT NULL,
  PRIMARY KEY (`admission_exam_student_question_id`),
  KEY `admission_exam_student_id` (`admission_exam_student_id`),
  KEY `question_options_id` (`question_options_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_students` (
  `admission_exam_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `admission_student_id` int(11) NOT NULL,
  `start_date` datetime NOT NULL DEFAULT current_timestamp(),
  `end_date` datetime NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `revised_score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `score_percentage` decimal(15,2) DEFAULT NULL,
  `revised_score_percentage` decimal(15,2) DEFAULT NULL,
  `approval` tinyint(4) NOT NULL,
  `fullscreen_exits` int(11) NOT NULL,
  `exam_ended_cond` varchar(30) NOT NULL,
  PRIMARY KEY (`admission_exam_student_id`),
  KEY `admission_exam_id` (`admission_exam_id`),
  KEY `student_id` (`admission_student_id`),
  KEY `approval` (`approval`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_webcams` (
  `admission_exam_webcam_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `admission_student_id` int(11) NOT NULL,
  `google_drive_id` varchar(300) NOT NULL,
  `timestamp` varchar(20) NOT NULL,
  PRIMARY KEY (`admission_exam_webcam_id`),
  KEY `admission_exam_id` (`admission_exam_id`,`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exams` (
  `admission_exam_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_class_id` int(11) NOT NULL,
  `exam_name` varchar(300) NOT NULL,
  `exam_description` text NOT NULL,
  `exam_type` varchar(20) NOT NULL DEFAULT 'multiple_choice',
  `duration` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `maximum_attempt` tinyint(4) NOT NULL,
  `minimum_percentage` tinyint(4) NOT NULL,
  `view_answers` tinyint(4) NOT NULL,
  `surveillance` tinyint(4) NOT NULL,
  `activation` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_exam_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_form` (
  `admission_form_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_form` text NOT NULL,
  `upload_instruction` varchar(500) NOT NULL,
  PRIMARY KEY (`admission_form_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


INSERT INTO admission_form VALUES
("1","[{\"type\":\"text\",\"required\":true,\"label\":\"Last Name\",\"placeholder\":\"ENTER LAST NAME\",\"className\":\"form-control\",\"name\":\"last_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"First Name\",\"placeholder\":\"ENTER FIRST NAME\",\"className\":\"form-control\",\"name\":\"first_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":false,\"label\":\"Other Name\",\"placeholder\":\"ENTER OTHER NAME\",\"className\":\"form-control\",\"name\":\"other_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"select\",\"required\":true,\"label\":\"Gender\",\"className\":\"form-control\",\"name\":\"gender\",\"access\":false,\"values\":[{\"label\":\"MALE\",\"value\":\"male\",\"selected\":true},{\"label\":\"FEMALE\",\"value\":\"female\"}]},{\"type\":\"select\",\"required\":true,\"label\":\"Religion\",\"placeholder\":\"Religion\",\"className\":\"form-control\",\"name\":\"religion\",\"access\":false,\"values\":[{\"label\":\"CHRISTIANITY \",\"value\":\"Christianity\"},{\"label\":\"ISLAM \",\"value\":\"Islam\"}]},{\"type\":\"date\",\"required\":true,\"label\":\"Date of Birth\",\"className\":\"form-control\",\"name\":\"dob\",\"access\":false},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Name\",\"placeholder\":\"ENTER PARENT NAME\",\"className\":\"form-control\",\"name\":\"parent_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Address\",\"placeholder\":\"ENTER PARENT ADDRESS\",\"className\":\"form-control\",\"name\":\"home_address\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Occupation\",\"placeholder\":\"ENTER PARENT OCCUPATION\",\"className\":\"form-control\",\"name\":\"occupation\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"autocomplete\",\"required\":true,\"label\":\"Parent State of Origin\",\"className\":\"form-control\",\"name\":\"parent_state_origin\",\"access\":false,\"requireValidOption\":true,\"values\":[{\"label\":\"ABIA\",\"value\":\"ABIA\"},{\"label\":\"ADAMAWA\",\"value\":\"ADAMAWA\"},{\"label\":\"AKWA IBOM\",\"value\":\"AKWA IBOM\"},{\"label\":\"ANAMBRA\",\"value\":\"ANAMBRA\"},{\"label\":\"BAUCHI\",\"value\":\"BAUCHI\"},{\"label\":\"BAYELSA\",\"value\":\"BAYELSA\"},{\"label\":\"BENUE\",\"value\":\"BENUE\"},{\"label\":\"BORNO\",\"value\":\"BORNO\"},{\"label\":\"CROSS RIVER\",\"value\":\"CROSS RIVER\"},{\"label\":\"DELTA\",\"value\":\"DELTA\"},{\"label\":\"EBONYI\",\"value\":\"EBONYI\"},{\"label\":\"EDO\",\"value\":\"EDO\"},{\"label\":\"EKITI\",\"value\":\"EKITI\"},{\"label\":\"ENUGU\",\"value\":\"ENUGU\"},{\"label\":\"FCT\",\"value\":\"FCT\"},{\"label\":\"GOMBE\",\"value\":\"GOMBE\"},{\"label\":\"IMO\",\"value\":\"IMO\"},{\"label\":\"JIGAWA\",\"value\":\"JIGAWA\"},{\"label\":\"KADUNA\",\"value\":\"KADUNA\"},{\"label\":\"KANO\",\"value\":\"KANO\"},{\"label\":\"KATSINA\",\"value\":\"KATSINA\"},{\"label\":\"KEBBI\",\"value\":\"KEBBI\"},{\"label\":\"KOGI\",\"value\":\"KOGI\"},{\"label\":\"KWARA\",\"value\":\"KWARA\"},{\"label\":\"LAGOS\",\"value\":\"LAGOS\"},{\"label\":\"NASARAWA\",\"value\":\"NASARAWA\"},{\"label\":\"NIGER\",\"value\":\"NIGER\"},{\"label\":\"OGUN\",\"value\":\"OGUN\"},{\"label\":\"ONDO\",\"value\":\"ONDO\"},{\"label\":\"OSUN\",\"value\":\"OSUN\"},{\"label\":\"OYO\",\"value\":\"OYO\"},{\"label\":\"PLATEAU\",\"value\":\"PLATEAU\"},{\"label\":\"RIVERS\",\"value\":\"RIVERS\"},{\"label\":\"SOKOTO\",\"value\":\"SOKOTO\"},{\"label\":\"TARABA\",\"value\":\"TARABA\"},{\"label\":\"YOBE\",\"value\":\"YOBE\"},{\"label\":\"ZAMFARA\",\"value\":\"ZAMFARA\"}]},{\"type\":\"select\",\"required\":true,\"label\":\"Parent Religion\",\"placeholder\":\"Religion\",\"className\":\"form-control\",\"name\":\"select-1595660440643\",\"access\":false,\"values\":[{\"label\":\"CHRISTIANITY \",\"value\":\"Christianity\",\"selected\":true},{\"label\":\"ISLAM \",\"value\":\"Islam\"}]}]","");




CREATE TABLE `admission_sessions` (
  `admission_sessions_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_sessions_name` varchar(300) NOT NULL,
  `admission_status` varchar(100) NOT NULL DEFAULT 'active',
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_sessions_id`),
  KEY `admission_status` (`admission_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `admission_students` (
  `admission_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_class_id` int(11) NOT NULL,
  `main_phonenumber` varchar(20) NOT NULL,
  `phone_number2` varchar(20) DEFAULT NULL,
  `email` varchar(300) NOT NULL,
  `student_info` text NOT NULL,
  `payment` varchar(10) NOT NULL,
  `application_status` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_uploads` (
  `admission_upload_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_student_id` int(11) NOT NULL,
  `upload_title` varchar(50) NOT NULL,
  `google_drive_id` varchar(100) NOT NULL,
  `google_drive_title` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_upload_id`),
  KEY `admission_student_id` (`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `album` (
  `album_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `album_cat` varchar(20) NOT NULL,
  `album_name` varchar(100) NOT NULL,
  `album_date` datetime NOT NULL,
  PRIMARY KEY (`album_id`),
  KEY `album_cat` (`album_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `album_images` (
  `album_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `album_id` int(11) NOT NULL,
  `image_name` varchar(20) NOT NULL,
  `image_dir` varchar(300) NOT NULL,
  PRIMARY KEY (`album_images_id`),
  KEY `album_id` (`album_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `alumni` (
  `alumni_id` int(11) NOT NULL AUTO_INCREMENT,
  `alumni_class_id` int(11) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `first_name` varchar(50) NOT NULL,
  `address` varchar(400) NOT NULL,
  `phonenumber` varchar(20) NOT NULL,
  `email` varchar(200) NOT NULL,
  `payment_reference` varchar(50) DEFAULT NULL,
  `year_you_left` varchar(20) NOT NULL,
  `set_name` varchar(15) NOT NULL,
  `brief_info` varchar(400) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`alumni_id`),
  KEY `alumni_class_id` (`alumni_class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `alumni_class` (
  `alumni_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(50) NOT NULL,
  `class_group` varchar(10) NOT NULL,
  `class_order` int(11) NOT NULL,
  PRIMARY KEY (`alumni_class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `app_token` (
  `app_token_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(100) NOT NULL,
  `user_key` varchar(100) NOT NULL,
  `browser_token` varchar(100) NOT NULL,
  `db_name` varchar(100) NOT NULL,
  `token` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `last_updated` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`app_token_id`),
  KEY `user_key` (`user_key`,`token`),
  KEY `browser_token` (`browser_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments` (
  `assignment_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `assignment_title` varchar(200) NOT NULL,
  `assignment_text` text NOT NULL,
  `assignment_dir` varchar(500) NOT NULL,
  `assignment_date` datetime NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments_answer_file` (
  `assignments_answer_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `file_name` varchar(100) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_answer_file_id`),
  KEY `assignment_id` (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_files` (
  `assignments_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_file_id`),
  KEY `assignment_id` (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_marked_file` (
  `assignments_marked_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignments_submitted_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_marked_file_id`),
  KEY `assignments_submitted_id` (`assignments_submitted_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_submitted` (
  `assignments_submitted_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `typed_assignment` text NOT NULL,
  `uploaded_assignment` varchar(500) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `student_submit_status` varchar(30) NOT NULL,
  `staff_marked_status` varchar(30) NOT NULL,
  `typed_marked` text NOT NULL,
  `student_score` decimal(15,2) DEFAULT NULL,
  `date_marked` datetime NOT NULL,
  PRIMARY KEY (`assignments_submitted_id`),
  KEY `assignment_id` (`assignment_id`),
  KEY `student_id` (`student_id`),
  KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments_submitted_file` (
  `assignments_submitted_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignments_submitted_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_submitted_file_id`),
  KEY `assignments_submitted_id` (`assignments_submitted_id`),
  KEY `date_added` (`date_added`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `attendance_behaviour` (
  `attendance_behaviour_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) NOT NULL,
  `handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`attendance_behaviour_id`),
  KEY `student_id` (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO attendance_behaviour VALUES
("1","1","112","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("2","4","114","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("3","3","110","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("4","2","106","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term");




CREATE TABLE `autologin` (
  `user_key` varchar(100) NOT NULL,
  `token` char(32) NOT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `browser_token` char(32) NOT NULL,
  `dbname` varchar(300) NOT NULL,
  `data` text DEFAULT NULL,
  `used` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`user_key`,`token`),
  KEY `dbname` (`dbname`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `backup_class` (
  `backup_class_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(10) unsigned NOT NULL,
  `class_name` varchar(10) NOT NULL,
  `class_order` int(10) unsigned NOT NULL,
  `section` varchar(10) NOT NULL,
  `promotional_average` varchar(5) NOT NULL,
  `new_student_fee` decimal(15,2) unsigned NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_class_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `backup_new_fees_class` (
  `backup_new_fees_class_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `new_fees_class_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `term` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_new_fees_class_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `backup_plan` (
  `backup_plan_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `plan_id` int(10) unsigned NOT NULL,
  `plan_name` varchar(100) NOT NULL,
  `amount` decimal(15,2) unsigned NOT NULL,
  `date_added` datetime NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_plan_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `behaviours` (
  `behaviour_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `behaviour_order` int(11) NOT NULL,
  `behaviour_name` varchar(200) NOT NULL,
  PRIMARY KEY (`behaviour_id`),
  KEY `class_id` (`class_id`,`behaviour_order`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1;


INSERT INTO behaviours VALUES
("1","1","1","HANDWRITING"),
("2","1","2","NEATNESS"),
("3","1","3","PUNCTUALITY"),
("4","1","4","ATTENTIVENESS"),
("5","1","5","INITIATIVE"),
("6","1","6","RESPECT"),
("7","1","7","OBEDIENCE"),
("8","1","8","ATTITUDE"),
("9","1","9","HONESTY"),
("10","1","10","CREATIVITY"),
("11","2","1","HANDWRITING"),
("12","2","2","NEATNESS"),
("13","2","3","PUNCTUALITY"),
("14","2","4","ATTENTIVENESS"),
("15","2","5","INITIATIVE"),
("16","2","6","RESPECT"),
("17","2","7","OBEDIENCE"),
("18","2","8","ATTITUDE"),
("19","2","9","HONESTY"),
("20","2","10","CREATIVITY"),
("21","3","1","HANDWRITING"),
("22","3","2","NEATNESS"),
("23","3","3","PUNCTUALITY"),
("24","3","4","ATTENTIVENESS"),
("25","3","5","INITIATIVE"),
("26","3","6","RESPECT"),
("27","3","7","OBEDIENCE"),
("28","3","8","ATTITUDE"),
("29","3","9","HONESTY"),
("30","3","10","CREATIVITY"),
("31","4","1","HANDWRITING"),
("32","4","2","NEATNESS"),
("33","4","3","PUNCTUALITY"),
("34","4","4","ATTENTIVENESS"),
("35","4","5","INITIATIVE"),
("36","4","6","RESPECT"),
("37","4","7","OBEDIENCE"),
("38","4","8","ATTITUDE"),
("39","4","9","HONESTY"),
("40","4","10","CREATIVITY"),
("41","5","1","HANDWRITING"),
("42","5","2","NEATNESS"),
("43","5","3","PUNCTUALITY"),
("44","5","4","ATTENTIVENESS"),
("45","5","5","INITIATIVE"),
("46","5","6","RESPECT"),
("47","5","7","OBEDIENCE"),
("48","5","8","ATTITUDE"),
("49","5","9","HONESTY"),
("50","5","10","CREATIVITY"),
("51","6","1","HANDWRITING"),
("52","6","2","NEATNESS"),
("53","6","3","PUNCTUALITY"),
("54","6","4","ATTENTIVENESS"),
("55","6","5","INITIATIVE"),
("56","6","6","RESPECT"),
("57","6","7","OBEDIENCE"),
("58","6","8","ATTITUDE"),
("59","6","9","HONESTY"),
("60","6","10","CREATIVITY");




CREATE TABLE `class` (
  `class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(30) NOT NULL,
  `class_order` int(10) unsigned NOT NULL,
  `section` varchar(10) NOT NULL,
  `promotional_average` varchar(5) NOT NULL,
  `new_student_fee` decimal(15,2) unsigned NOT NULL,
  PRIMARY KEY (`class_id`),
  KEY `order` (`class_order`),
  KEY `section` (`section`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;


INSERT INTO class VALUES
("1","JSS 1","1","junior","50","0.00"),
("2","JSS 2","2","junior","50","0.00"),
("3","JSS 3","3","junior","50","0.00"),
("4","SS 1","4","senior","50","0.00"),
("5","SS 2","5","senior","50","0.00"),
("6","SS 3","6","senior","50","0.00");




CREATE TABLE `class_approval` (
  `class_approval_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `old_class_id` int(11) NOT NULL,
  `new_class_id` int(11) NOT NULL,
  `old_status` char(20) NOT NULL,
  `mode` char(20) NOT NULL,
  `date_sent` datetime NOT NULL,
  PRIMARY KEY (`class_approval_id`),
  KEY `old_status` (`old_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_category` (
  `class_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_category_name` varchar(80) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_class_category` (
  `class_class_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_category_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`class_class_category_id`),
  KEY `class_id` (`class_id`),
  KEY `class_category_id` (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_storages` (
  `class_storage_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_storage_title` varchar(200) NOT NULL,
  `class_storage_dir` varchar(500) NOT NULL,
  `class_storage_date` datetime NOT NULL,
  PRIMARY KEY (`class_storage_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_subclass` (
  `class_subclass_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(10) unsigned NOT NULL,
  `subclass_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`class_subclass_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;


INSERT INTO class_subclass VALUES
("1","1","0"),
("2","2","0"),
("3","3","0"),
("4","4","0"),
("5","5","0"),
("6","6","0");




CREATE TABLE `contact_us` (
  `contact_us_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `role` varchar(200) NOT NULL,
  `phonenumber` varchar(100) NOT NULL,
  `email` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`contact_us_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `current_fees_info` (
  `current_fees_info_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(11) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `current_school_fees` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL,
  `surcharge_amount` decimal(15,2) NOT NULL,
  `surcharge_reason` varchar(500) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `present_owing` decimal(15,2) NOT NULL,
  `class_fee` decimal(15,2) NOT NULL,
  `plan_fee` decimal(15,2) NOT NULL,
  `new_student_fee` decimal(15,2) NOT NULL,
  `room_fee` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`current_fees_info_id`),
  KEY `student_id` (`student_id`),
  KEY `sess_term` (`sessions`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO current_fees_info VALUES
("1","1","1","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("2","2","3","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("3","3","2","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("4","4","1","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term");




CREATE TABLE `e_library_cat` (
  `e_library_cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_library_cat_name` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`e_library_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `e_library_file` (
  `e_library_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_library_cat_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `title` varchar(300) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `description` varchar(500) NOT NULL,
  `preview_status` varchar(20) NOT NULL DEFAULT 'preview_download',
  `mode` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'active',
  `file_dir` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`e_library_file_id`),
  KEY `e_library_cat_id` (`e_library_cat_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `class_id` (`class_id`),
  KEY `staff_id` (`staff_id`),
  KEY `topic_id` (`topic_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `e_r_cat` (
  `e_r_cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_name` varchar(300) NOT NULL,
  `e_r_scratch_card` varchar(4) NOT NULL DEFAULT 'no',
  PRIMARY KEY (`e_r_cat_id`),
  KEY `e_r_scratch_card` (`e_r_scratch_card`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_class_term` (
  `e_r_class_term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(10) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`e_r_class_term_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`class_id`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_main` (
  `e_r_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `e_r_cat_name` varchar(100) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `total_student_class` int(11) NOT NULL,
  `total_student_subclass` int(11) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `subcat1_total` float NOT NULL,
  `subcat2_total` float NOT NULL,
  `subcat3_total` float NOT NULL,
  `subcat4_total` float NOT NULL,
  `subcat5_total` float NOT NULL,
  `subcat6_total` float NOT NULL,
  `subcat7_total` float NOT NULL,
  `subcat8_total` float NOT NULL,
  `subcat9_total` float NOT NULL,
  `subcat10_total` float NOT NULL,
  `subcat1_name` varchar(50) NOT NULL,
  `subcat2_name` varchar(50) NOT NULL,
  `subcat3_name` varchar(50) NOT NULL,
  `subcat4_name` varchar(50) NOT NULL,
  `subcat5_name` varchar(50) NOT NULL,
  `subcat6_name` varchar(50) NOT NULL,
  `subcat7_name` varchar(50) NOT NULL,
  `subcat8_name` varchar(50) NOT NULL,
  `subcat9_name` varchar(50) NOT NULL,
  `subcat10_name` varchar(50) NOT NULL,
  `subcat1_short_name` varchar(40) NOT NULL,
  `subcat2_short_name` varchar(40) NOT NULL,
  `subcat3_short_name` varchar(40) NOT NULL,
  `subcat4_short_name` varchar(40) NOT NULL,
  `subcat5_short_name` varchar(40) NOT NULL,
  `subcat6_short_name` varchar(40) NOT NULL,
  `subcat7_short_name` varchar(40) NOT NULL,
  `subcat8_short_name` varchar(40) NOT NULL,
  `subcat9_short_name` varchar(40) NOT NULL,
  `subcat10_short_name` varchar(40) NOT NULL,
  `count_subcat` int(11) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` varchar(200) NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` varchar(300) NOT NULL,
  `principal_signature` varchar(60) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`e_r_main_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_subcat` (
  `e_r_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(10) unsigned NOT NULL,
  `e_r_subcat_name` varchar(300) NOT NULL,
  `e_r_short_form` varchar(100) NOT NULL,
  `total_score` float NOT NULL,
  PRIMARY KEY (`e_r_subcat_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`),
  KEY `e_r_cat_id_2` (`e_r_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_subject` (
  `e_r_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_name` varchar(300) NOT NULL,
  `subclass_name` varchar(300) NOT NULL,
  `subject_name` varchar(300) NOT NULL,
  `subcat1` float DEFAULT NULL,
  `subcat2` float DEFAULT NULL,
  `subcat3` float DEFAULT NULL,
  `subcat4` float DEFAULT NULL,
  `subcat5` float DEFAULT NULL,
  `subcat6` float DEFAULT NULL,
  `subcat7` float DEFAULT NULL,
  `subcat8` float DEFAULT NULL,
  `subcat9` float DEFAULT NULL,
  `subcat10` float DEFAULT NULL,
  `total` float NOT NULL,
  `total_percent` varchar(10) NOT NULL,
  `position_subclass` varchar(30) NOT NULL,
  `grade` varchar(20) NOT NULL,
  `grade_comment` varchar(300) NOT NULL,
  `staff_name` varchar(300) NOT NULL,
  `staff_comment` varchar(300) NOT NULL,
  `status` varchar(20) NOT NULL,
  `generate_result` varchar(20) NOT NULL DEFAULT 'not_generated',
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`e_r_subject_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `class_id` (`class_id`,`subclass_id`,`subject_id`,`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `end_term_info` (
  `end_term_id` int(11) NOT NULL AUTO_INCREMENT,
  `new_student_number` int(11) NOT NULL,
  `no_of_students` int(11) NOT NULL,
  `no_of_male_students` int(11) NOT NULL,
  `no_of_female_students` int(11) NOT NULL,
  `no_of_grad_students` int(11) NOT NULL,
  `no_of_deact_students` int(11) NOT NULL,
  `no_of_parents` int(11) NOT NULL,
  `no_of_staff` int(11) NOT NULL,
  `no_of_academic_staff` int(11) NOT NULL,
  `no_of_non_academic_staff` int(11) NOT NULL,
  `no_of_accountant` int(11) NOT NULL,
  `no_of_admin` int(11) NOT NULL,
  `owing` int(11) NOT NULL,
  `annual_only_last_subjects` varchar(5) NOT NULL,
  `third_term_in_annual` varchar(3) NOT NULL DEFAULT 'no',
  `allow_finance` varchar(5) NOT NULL,
  `scratch_card` varchar(5) NOT NULL,
  `generate_result` varchar(20) NOT NULL,
  `publish_result` char(30) NOT NULL,
  `next_term_begins` date NOT NULL,
  `publish_result_deadline` date NOT NULL,
  `report_ready` varchar(15) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_entered` datetime NOT NULL DEFAULT current_timestamp(),
  `account_balanced` varchar(12) NOT NULL,
  PRIMARY KEY (`end_term_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `report_ready` (`report_ready`),
  KEY `date_entered` (`date_entered`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO end_term_info VALUES
("18","0","0","0","0","0","0","0","0","0","0","0","0","0","yes","no","yes","no","not_generated","not_published","2022-01-11","2021-12-17","not_ready","2021/2022","1st Term","2018-04-14 13:39:26","unbalanced");




CREATE TABLE `end_term_inventory` (
  `end_term_inventory_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(20) NOT NULL DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_inventory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `end_term_ledger` (
  `end_term_ledger_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(15) NOT NULL DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_ledger_id`),
  KEY `terms` (`terms`,`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `end_term_school_fees` (
  `end_term_school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(20) DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_school_fees_id`),
  KEY `sessions` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `event` (
  `event_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `event_title` varchar(300) NOT NULL,
  `event_cat` varchar(20) NOT NULL,
  `event_image` varchar(300) NOT NULL,
  `location` varchar(300) NOT NULL,
  `description` text NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`event_id`),
  KEY `date_created` (`date_created`),
  KEY `event_cat` (`event_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_questions` (
  `exam_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_student_questions` (
  `exam_student_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_options_id` int(11) NOT NULL,
  PRIMARY KEY (`exam_student_question_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_options_id` (`question_options_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_student_theory` (
  `exam_student_theory_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `question_text` text NOT NULL,
  `corrected_text` text NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_student_theory_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_student_theory_images` (
  `exam_student_theory_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `google_drive_id` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_student_theory_images_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_id` (`question_id`),
  KEY `google_drive_id` (`google_drive_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_students` (
  `exam_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `start_date` datetime NOT NULL DEFAULT current_timestamp(),
  `end_date` datetime NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `revised_score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `score_percentage` decimal(15,2) DEFAULT NULL,
  `revised_score_percentage` decimal(15,2) DEFAULT NULL,
  `approval` tinyint(4) NOT NULL,
  `fullscreen_exits` int(11) NOT NULL,
  `exam_ended_cond` varchar(30) NOT NULL,
  PRIMARY KEY (`exam_student_id`),
  KEY `exam_id` (`exam_id`),
  KEY `student_id` (`student_id`),
  KEY `approval` (`approval`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_webcams` (
  `exam_webcam_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `google_drive_id` varchar(300) NOT NULL,
  `timestamp` varchar(20) NOT NULL,
  PRIMARY KEY (`exam_webcam_id`),
  KEY `exam_id` (`exam_id`,`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exams` (
  `exam_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `exam_name` varchar(300) NOT NULL,
  `exam_description` text NOT NULL,
  `exam_pass` varchar(300) NOT NULL,
  `exam_pass_hash` varchar(300) NOT NULL,
  `duration` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `maximum_attempt` tinyint(4) NOT NULL,
  `minimum_percentage` tinyint(4) NOT NULL,
  `view_answers` tinyint(4) NOT NULL,
  `surveillance` tinyint(4) NOT NULL,
  `randomize_question` tinyint(4) NOT NULL,
  `exam_type` varchar(20) NOT NULL,
  `activation` varchar(10) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `executives` (
  `executive_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(10) unsigned NOT NULL,
  `user_key` varchar(100) DEFAULT NULL,
  `serial_number` varchar(30) NOT NULL,
  `pass` char(255) NOT NULL,
  `new_password` char(255) NOT NULL,
  `email` varchar(200) NOT NULL,
  `status` varchar(30) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`executive_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO executives VALUES
("1","0","1b86783ae","O/16/0001","$2y$10$/WPShfudvtky2Lvam61YyuCdOUGnP1SL6eY7ovm0doCDrnTPli/AW","","zeonorganisation@gmail.com","","","","0","1505998587"),
("2","0","2df20249c","B/16/0001","$2y$10$n407Q9ygVsOdUWfe52PHNO6SYlzLRcUq2CQdZdfjF4fnDgt25v8W2","Mynameisbackend","zeonglobal@gmail.com","","","","0","1505995243"),
("3","0","392f989c6","U/16/0001","$2y$10$hXRdO2YNOVyphYSz.pPHEuD4Zw9PhdaG6SNGJHJgQb87QUWV22tV.","","","admin","","","0","1505981376"),
("4","0","4a0978df3","A/16/0001","$2y$10$Gg5mWpO2Pt/lM7sClJy90u7orPh02Z9.ST0B5RSMl9ckFg6ls6a8K","","","account","","","0","1506032093");




CREATE TABLE `facility` (
  `facility_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `facility_cat` varchar(100) NOT NULL,
  `facility_name` varchar(300) NOT NULL,
  `facility_date` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`facility_id`),
  KEY `facility_cat` (`facility_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `facility_images` (
  `facility_images_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `facility_id` int(10) unsigned NOT NULL,
  `image_name` varchar(300) NOT NULL,
  `image_dir` varchar(500) NOT NULL,
  PRIMARY KEY (`facility_images_id`),
  KEY `facility_id` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `fees_discount` (
  `fees_discount_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(300) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`fees_discount_id`),
  KEY `student_id` (`student_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `form_staff_class_subclass` (
  `form_staff_class_subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  PRIMARY KEY (`form_staff_class_subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO form_staff_class_subclass VALUES
("1","2","1","0"),
("3","2","3","0"),
("4","3","2","0");




CREATE TABLE `grading` (
  `grading_id` int(11) NOT NULL AUTO_INCREMENT,
  `grade_from` int(11) NOT NULL,
  `grade_to` int(11) NOT NULL,
  `grade` char(20) NOT NULL,
  `remark` char(100) NOT NULL,
  `principal_name` char(200) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_comment` text NOT NULL,
  `subject_comment` text NOT NULL,
  `groups` char(20) NOT NULL,
  PRIMARY KEY (`grading_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;


INSERT INTO grading VALUES
("1","0","29","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("2","30","34","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("3","35","39","F9","FAIL","","YOU CAN SOAR HIGH LIKE AN EAGLE. PUT MORE EFFORT, IT\'S IN YOU TO SUCCEED.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("4","40","44","E8","VERY POOR","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","lower"),
("5","45","49","D7","POOR","","YOU HAVE THE POTENTIALS TO FLY, RELEASE MORE OF IT, AND YOU WILL FLY WITH MASTERY.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","lower"),
("6","50","54","C6","CREDIT","","IMPRESSIVE EFFORT, YOU ARE MIDDLE WAY TO SUCCESS, WELL DONE! YOU CAN DO MORE.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","lower"),
("7","55","59","C5","CREDIT","","WELL DONE! YOU ARE ABOUT TO FLY, WITH MORE HARD WORK YOU CAN SCALE HIGHER WITH FLYING COLOURS.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","lower"),
("8","60","64","C4","CREDIT","","GREAT EFFORT. YOU DESERVE TO BE CELEBRATED, YOU HAVE SHOWN POTENTIALS FOR SUCCESS. YOU CAN DO BETTER.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","lower"),
("9","65","69","B3","GOOD","","IMPRESSIVE WORK. YOU ARE ON THE PATH TO EXCELLENCE, JUST A LITTLE MORE EFFORT AND YOU ARE ON TOP.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","lower"),
("10","70","74","B2","VERY GOOD","","YOU HAVE UNLOCKED THE SUCCESS KEY, KEEP IT UP. THE SKY IS YOUR STARTING POINT.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","lower"),
("11","75","79","B2","VERY GOOD","","YOU HAVE RANKED  YOURSELF AMONG THE ACADEMIC GLADIATORS, WELL DONE!  KEEP IT UP. THERE ARE MORE GROUNDS TO CONQUER.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","lower"),
("12","80","84","A1","EXCELLENT","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","lower"),
("13","85","89","A1","EXCELLENT","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","lower"),
("14","90","94","A1","EXCELLENT","","YOU HAVE HIT THE MARK OF A CHAMPION, BRILLIANT PERFORMANCE. SOAR TO THE PEAK","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","lower"),
("15","95","100","A1","EXCELLENT","","YOU ARE A GENERAL, YOU HAVE EARNED YOURSELF AN EXCEPTIONAL PLACE. WELL DONE! KEEP ON SOARING","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","lower"),
("16","0","29","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("17","30","34","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("18","35","39","F9","FAIL","","YOU CAN SOAR HIGH LIKE AN EAGLE. PUT MORE EFFORT, IT\'S IN YOU TO SUCCEED.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("19","40","44","E8","VERY POOR","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","higher"),
("20","45","49","D7","POOR","","YOU HAVE THE POTENTIALS TO FLY, RELEASE MORE OF IT, AND YOU WILL FLY WITH MASTERY.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","higher"),
("21","50","54","C6","CREDIT","","IMPRESSIVE EFFORT, YOU ARE MIDDLE WAY TO SUCCESS, WELL DONE! YOU CAN DO MORE.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","higher"),
("22","55","59","C5","CREDIT","","WELL DONE! YOU ARE ABOUT TO FLY, WITH MORE HARD WORK YOU CAN SCALE HIGHER WITH FLYING COLOURS.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","higher"),
("23","60","64","C4","CREDIT","","GREAT EFFORT. YOU DESERVE TO BE CELEBRATED, YOU HAVE SHOWN POTENTIALS FOR SUCCESS. YOU CAN DO BETTER.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","higher"),
("24","65","69","B3","GOOD","","IMPRESSIVE WORK. YOU ARE ON THE PATH TO EXCELLENCE, JUST A LITTLE MORE EFFORT AND YOU ARE ON TOP.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","higher"),
("25","70","74","B2","VERY GOOD","","YOU HAVE UNLOCKED THE SUCCESS KEY, KEEP IT UP. THE SKY IS YOUR STARTING POINT.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","higher"),
("26","75","79","B2","VERY GOOD","","YOU HAVE RANKED  YOURSELF AMONG THE ACADEMIC GLADIATORS, WELL DONE!  KEEP IT UP. THERE ARE MORE GROUNDS TO CONQUER.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","higher"),
("27","80","84","A1","EXCELLENT","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","higher"),
("28","85","89","A1","EXCELLENT","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","higher"),
("29","90","94","A1","EXCELLENT","","YOU HAVE HIT THE MARK OF A CHAMPION, BRILLIANT PERFORMANCE. SOAR TO THE PEAK","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","higher"),
("30","95","100","A1","EXCELLENT","","YOU ARE A GENERAL, YOU HAVE EARNED YOURSELF AN EXCEPTIONAL PLACE. WELL DONE! KEEP ON SOARING","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","higher");




CREATE TABLE `hostel_rooms` (
  `room_id` int(11) NOT NULL AUTO_INCREMENT,
  `hostel_id` int(11) NOT NULL,
  `room_name` varchar(400) NOT NULL,
  `bedspace_prefix` varchar(400) NOT NULL,
  `room_fee` int(11) NOT NULL,
  `room_space` int(11) NOT NULL,
  `available` int(11) NOT NULL,
  PRIMARY KEY (`room_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `hostels` (
  `hostel_id` int(11) NOT NULL AUTO_INCREMENT,
  `hostel_name` varchar(400) NOT NULL,
  `hostel_gender` varchar(20) NOT NULL,
  PRIMARY KEY (`hostel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `html5_games` (
  `html5_games_id` int(11) NOT NULL AUTO_INCREMENT,
  `html5_games_category_id` int(11) NOT NULL,
  `game_name` varchar(50) NOT NULL,
  `game_image` varchar(150) NOT NULL,
  `game_link` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`html5_games_id`),
  KEY `html5_games_category_id` (`html5_games_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;


INSERT INTO html5_games VALUES
("1","1","Trivia Quiz","/app/private/images/games/1.jpg","https://html5.gamedistribution.com/66c37511b2d14fe4a2b5ce334c986cae/","2020-04-19 00:56:55"),
("2","1","Quiz Story Animal","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/quiz-story-animal/big_icon.jpg","https://games.softgames.com/games/quiz-story-animal/gamesites/6326/locale/en","2020-04-19 00:56:55"),
("3","1","Words with Owl","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/words-with-owl/big_icon.jpg","https://games.softgames.com/games/words-with-owl/gamesites/6326/locale/en","2020-04-19 00:56:55"),
("4","2","Waffle Game","https://www.h5games.com/imgs/img.GameDistribution.com/c501bf4c7c124cad960a0bfcedf74e49.jpg","https://html5.gamedistribution.com/c501bf4c7c124cad960a0bfcedf74e49/","2020-04-19 00:56:55"),
("5","2","Word Finder","https://www.h5games.com/imgs/img.GameDistribution.com/06f2049a0e14444eace08ead61b295aa.jpg","https://html5.gamedistribution.com/06f2049a0e14444eace08ead61b295aa/","2020-04-19 00:56:55"),
("6","3","Matt Vs Math","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/matt-vs-math/big_icon.jpg","https://games.softgames.com/games/matt-vs-math/gamesites/6326/locale/en","2020-04-19 01:02:09"),
("7","2","Tetra","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/2020-tetra/big_icon.jpg","https://games.softgames.com/games/2020-tetra/gamesites/6326/locale/en","2020-04-19 01:02:09"),
("8","2","4 Images and 1 Word","https://www.h5games.com/imgs/img.GameDistribution.com/2fcdda0631b24da5902b0a837d94f21d.jpg","https://html5.gamedistribution.com/2fcdda0631b24da5902b0a837d94f21d/","2020-04-19 01:02:09"),
("9","3","Number Search","https://cdn.htmlgames.com/NumberSearch/img/icon/icon-196x196.png","https://cdn.htmlgames.com/NumberSearch/index.html","2020-04-19 01:06:56"),
("10","3","Numbers In The City","https://cdn.htmlgames.com/NumbersInTheCity/img/icon/icon-196x196.png","https://cdn.htmlgames.com/NumbersInTheCity/index.html","2020-04-19 01:28:16");




CREATE TABLE `html5_games_category` (
  `html5_games_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`html5_games_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO html5_games_category VALUES
("1","WORDS TRIVIA","2020-04-19 00:51:16"),
("2","PUZZLE","2020-04-19 00:51:16"),
("3","MATHS TRIVIA","2020-04-19 00:58:15");




CREATE TABLE `inv_cat` (
  `cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `cat_name` varchar(200) NOT NULL,
  PRIMARY KEY (`cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_payment` (
  `inv_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `subcat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `transaction_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `inv_payment_delete` tinyint(4) NOT NULL DEFAULT 0,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`inv_payment_id`),
  KEY `subcat_id` (`subcat_id`),
  KEY `student_id` (`student_id`),
  KEY `transaction_id` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `inv_stack_payment` (
  `stack_payment_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sold` int(11) NOT NULL,
  `each_amount` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`stack_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_stock_cat` (
  `stock_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `accountant_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `no_of_stock` int(11) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`stock_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_stock_subcat` (
  `inv_stock_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stock_id` int(11) NOT NULL,
  `cat_id` int(11) NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `no_of_sub` int(11) NOT NULL,
  PRIMARY KEY (`inv_stock_subcat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_subcat` (
  `subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `sub_cat_name` varchar(200) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  PRIMARY KEY (`subcat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_transaction` (
  `trans_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(10) unsigned NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `total_no` int(11) NOT NULL,
  `remaining` int(11) NOT NULL,
  `bought` int(11) NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `expected_income` decimal(15,2) NOT NULL,
  `current_income` decimal(15,2) NOT NULL,
  `damaged_items` int(11) NOT NULL,
  `damages` decimal(15,2) NOT NULL,
  `damage_reason` varchar(300) NOT NULL,
  `remove` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`trans_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_category` (
  `ledger_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(200) NOT NULL,
  `status` varchar(20) NOT NULL,
  PRIMARY KEY (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_expense` (
  `ledger_expense_id` int(11) NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_spent` decimal(15,2) NOT NULL,
  `f_explain` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`ledger_expense_id`),
  KEY `ledger_category_id` (`ledger_category_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_income` (
  `ledger_income_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(10) unsigned NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_gotten` decimal(15,2) unsigned NOT NULL,
  `f_explain` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`ledger_income_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `ledger_category_id` (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_info` (
  `ledger_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(10) unsigned NOT NULL,
  `income` decimal(15,2) NOT NULL,
  `expense` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`ledger_info_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `ledger_category_id` (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `lesson_note_template` (
  `lesson_note_template_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `topic` varchar(500) NOT NULL,
  `date` datetime NOT NULL,
  `ages` varchar(500) NOT NULL,
  `no_of_period` varchar(500) NOT NULL,
  `specific_objectives` varchar(500) NOT NULL,
  `instructional_materials` varchar(500) NOT NULL,
  `resource_materials` varchar(500) NOT NULL,
  `teaching_methods` varchar(500) NOT NULL,
  `previous_knowledge` varchar(500) NOT NULL,
  `teachers_intro` varchar(500) NOT NULL,
  `students_intro` varchar(500) NOT NULL,
  `learning_intro` varchar(500) NOT NULL,
  `teachers_step_one` varchar(500) NOT NULL,
  `students_step_one` varchar(500) NOT NULL,
  `learning_step_one` varchar(500) NOT NULL,
  `teachers_step_two` varchar(500) NOT NULL,
  `students_step_two` varchar(500) NOT NULL,
  `learning_step_two` varchar(500) NOT NULL,
  `teachers_step_three` varchar(500) NOT NULL,
  `students_step_three` varchar(500) NOT NULL,
  `learning_step_three` varchar(500) NOT NULL,
  `teachers_step_four` varchar(500) NOT NULL,
  `students_step_four` varchar(500) NOT NULL,
  `learning_step_four` varchar(500) NOT NULL,
  `teachers_classwork` varchar(500) NOT NULL,
  `students_classwork` varchar(500) NOT NULL,
  `learning_classwork` varchar(500) NOT NULL,
  `teachers_assignment` varchar(500) NOT NULL,
  `students_assignment` varchar(500) NOT NULL,
  `learning_assignment` varchar(500) NOT NULL,
  `teachers_conclusion` varchar(500) NOT NULL,
  `students_conclusion` varchar(500) NOT NULL,
  `learning_conclusion` varchar(500) NOT NULL,
  `summary_note` text NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`lesson_note_template_id`),
  KEY `class_id` (`class_id`,`subclass_id`,`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `new_fees_class` (
  `new_fees_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `term` varchar(20) NOT NULL,
  PRIMARY KEY (`new_fees_class_id`),
  KEY `term` (`term`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO new_fees_class VALUES
("1","1","0.00","1st Term"),
("2","1","0.00","2nd Term"),
("3","1","0.00","3rd Term"),
("4","2","0.00","1st Term"),
("5","2","0.00","2nd Term"),
("6","2","0.00","3rd Term"),
("7","3","0.00","1st Term"),
("8","3","0.00","2nd Term"),
("9","3","0.00","3rd Term"),
("10","4","0.00","1st Term"),
("11","4","0.00","2nd Term"),
("12","4","0.00","3rd Term"),
("13","5","0.00","1st Term"),
("14","5","0.00","2nd Term"),
("15","5","0.00","3rd Term"),
("16","6","0.00","1st Term"),
("17","6","0.00","2nd Term"),
("18","6","0.00","3rd Term");




CREATE TABLE `news` (
  `news_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `news_title` varchar(300) NOT NULL,
  `news_message` text NOT NULL,
  `news_category` varchar(11) NOT NULL,
  `news_image` varchar(500) NOT NULL,
  `news_date` datetime NOT NULL,
  PRIMARY KEY (`news_id`),
  KEY `news_category` (`news_category`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `news_images` (
  `news_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `news_id` int(11) NOT NULL,
  `image_name` varchar(300) NOT NULL,
  `image_dir` varchar(300) NOT NULL,
  PRIMARY KEY (`news_images_id`),
  KEY `news_id` (`news_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify` (
  `notify_id` int(11) NOT NULL AUTO_INCREMENT,
  `notify_collection_id` int(10) unsigned NOT NULL,
  `person_id` int(11) NOT NULL,
  `notify_table_name` varchar(20) NOT NULL,
  `notify_title` varchar(300) NOT NULL,
  `notify_message` text NOT NULL,
  `notify_status` varchar(100) NOT NULL,
  `notify_icon` varchar(100) NOT NULL,
  `notify_color` varchar(20) NOT NULL,
  `notify_date` datetime NOT NULL,
  PRIMARY KEY (`notify_id`),
  KEY `notify_collection_id` (`notify_collection_id`),
  KEY `notify_date` (`notify_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify_attachments` (
  `notify_attachment_id` int(11) NOT NULL AUTO_INCREMENT,
  `notify_collection_id` int(11) NOT NULL,
  `attachment_name` varchar(300) NOT NULL,
  `attachment_dir` varchar(300) NOT NULL,
  PRIMARY KEY (`notify_attachment_id`),
  KEY `notify_collection_id` (`notify_collection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify_collection` (
  `notify_collection_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `notify_table_name` varchar(20) NOT NULL,
  `notify_title` varchar(300) NOT NULL,
  `notify_message` text NOT NULL,
  `notify_icon` varchar(100) NOT NULL,
  `notify_color` varchar(20) NOT NULL,
  `notify_date` datetime NOT NULL,
  PRIMARY KEY (`notify_collection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `order_scratch_card` (
  `order_scratch_card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` varchar(20) NOT NULL,
  `number_bought` int(10) unsigned NOT NULL,
  `amount` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `payment_mode` varchar(5) NOT NULL,
  `date_bought` datetime NOT NULL,
  PRIMARY KEY (`order_scratch_card_id`),
  UNIQUE KEY `transaction_id` (`transaction_id`),
  KEY `mode` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `other_fees_cat` (
  `other_fees_cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `other_fees_cat_name` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_cat_id`),
  KEY `other_fees_cat_name` (`other_fees_cat_name`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `other_fees_subcat` (
  `other_fees_subcat_id` int(11) NOT NULL AUTO_INCREMENT,
  `other_fees_cat_id` int(11) NOT NULL,
  `other_fees_subcat_name` varchar(200) NOT NULL,
  `other_fees_subcat_amount` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_subcat_id`),
  KEY `other_fees_cat_id` (`other_fees_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `other_fees_subcat_payment` (
  `other_fees_subcat_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `transaction_id` varchar(20) NOT NULL,
  `other_fees_subcat_id` int(11) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `other_fees_delete` tinyint(4) NOT NULL DEFAULT 0,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_subcat_payment_id`),
  KEY `student_id` (`student_id`),
  KEY `other_fees_subcat_id` (`other_fees_subcat_id`),
  KEY `sessions` (`sessions`,`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `other_fees_delete` (`other_fees_delete`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `parent_student_school` (
  `parent_student_school_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  PRIMARY KEY (`parent_student_school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `parents` (
  `parent_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_key` varchar(100) DEFAULT NULL,
  `school_id` int(11) NOT NULL,
  `parent_name` varchar(200) NOT NULL,
  `serial_number` varchar(100) NOT NULL,
  `pass` char(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(255) NOT NULL,
  `email` varchar(200) NOT NULL,
  `main_phonenumber` bigint(20) NOT NULL,
  `phone_number2` bigint(20) NOT NULL,
  `phone_number3` bigint(20) NOT NULL,
  `occupation` varchar(200) NOT NULL,
  `home_address` text NOT NULL,
  `office_address` text NOT NULL,
  `state_origin` varchar(200) NOT NULL,
  `religion` varchar(200) NOT NULL,
  `local_govt` varchar(200) NOT NULL,
  `country` varchar(200) NOT NULL,
  `sent_serial_pass_sms` char(3) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `activation` varchar(50) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`parent_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `sent_serial_pass_sms` (`sent_serial_pass_sms`),
  KEY `religion` (`religion`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `plans` (
  `plan_id` int(11) NOT NULL AUTO_INCREMENT,
  `plan_name` varchar(100) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `print_slip_dates` (
  `print_slip_dates_id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(30) NOT NULL,
  `date_printed` date NOT NULL,
  PRIMARY KEY (`print_slip_dates_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `push_subscriptions` (
  `push_subscriptions_id` int(11) NOT NULL AUTO_INCREMENT,
  `endpoint` varchar(500) NOT NULL,
  `p256dh` varchar(500) NOT NULL,
  `auth` varchar(500) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `user_id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `table_name` varchar(100) NOT NULL,
  `user_key` varchar(100) NOT NULL,
  `browser_token` char(32) NOT NULL,
  PRIMARY KEY (`push_subscriptions_id`),
  KEY `user_id` (`user_id`),
  KEY `school_id` (`school_id`),
  KEY `table_name` (`table_name`),
  KEY `user_key` (`user_key`),
  KEY `browser_token` (`browser_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `question_bank` (
  `question_bank_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_title` varchar(30) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `question_bank_type` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_bank_id`),
  KEY `class_id` (`class_id`),
  KEY `subject_id` (`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `question_lead` (
  `question_lead_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_id` int(11) NOT NULL,
  `question_lead_title` varchar(300) NOT NULL,
  `question_lead_description` text NOT NULL,
  `question_lead_dir` varchar(500) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `question_lead_embed_dir` varchar(300) NOT NULL,
  `question_lead_thumb_dir` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_lead_id`),
  KEY `question_bank_id` (`question_bank_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `question_options` (
  `question_options_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `option_text` varchar(500) NOT NULL,
  `option_dir` varchar(300) NOT NULL,
  `option_embed_dir` varchar(300) NOT NULL,
  `option_thumb_dir` varchar(200) NOT NULL,
  `answer` tinyint(4) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_options_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `questions` (
  `question_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_id` int(11) NOT NULL,
  `question_lead_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `correct_answer` int(11) NOT NULL,
  `incorrect_answer` int(11) NOT NULL,
  `question_type` varchar(30) NOT NULL,
  `question_text` text NOT NULL,
  `question_dir` varchar(500) NOT NULL,
  `question_embed_dir` varchar(200) NOT NULL,
  `question_thumb_dir` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_id`),
  KEY `question_bank_id` (`question_bank_id`),
  KEY `question_lead_id` (`question_lead_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `received_students` (
  `received_students_id` int(11) NOT NULL AUTO_INCREMENT,
  `old_student_id` int(11) NOT NULL,
  `new_student_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `student_name` varchar(300) NOT NULL,
  `class_id` int(11) NOT NULL,
  `old_class_name` varchar(100) NOT NULL,
  `new_class_name` varchar(100) NOT NULL,
  `old_serial_number` varchar(30) NOT NULL,
  `new_serial_number` varchar(30) NOT NULL,
  `school_id` int(11) NOT NULL,
  `database_name` varchar(300) NOT NULL,
  `status` varchar(20) NOT NULL,
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`received_students_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result` (
  `remark_result_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_name` varchar(300) NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `terms` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'activated',
  PRIMARY KEY (`remark_result_id`),
  KEY `class_id` (`class_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_cat` (
  `remark_result_cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_name` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`remark_result_cat_id`),
  KEY `remark_result_id` (`remark_result_id`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_column` (
  `remark_result_column_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_column_name` varchar(300) NOT NULL,
  PRIMARY KEY (`remark_result_column_id`),
  KEY `remark_result_id` (`remark_result_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_mark` (
  `remark_result_mark_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `grade_from` int(11) NOT NULL,
  `grade_to` int(11) NOT NULL,
  `remark_result_mark_name` varchar(300) NOT NULL,
  `remark_result_mark_desc` varchar(500) NOT NULL,
  PRIMARY KEY (`remark_result_mark_id`),
  KEY `remark_result_id` (`remark_result_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_student` (
  `remark_result_student_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(10) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `subclass_id` int(10) unsigned NOT NULL,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_id` int(10) unsigned NOT NULL,
  `remark_result_subcat_id` int(10) unsigned NOT NULL,
  `remark_result_column_id` int(10) unsigned NOT NULL,
  `remark_result_mark_id` int(10) unsigned NOT NULL,
  `class_name` varchar(300) NOT NULL,
  `subclass_name` varchar(300) NOT NULL,
  `remark_result_name` varchar(300) NOT NULL,
  `remark_result_cat_name` varchar(300) NOT NULL,
  `remark_result_subcat_name` varchar(300) NOT NULL,
  `remark_result_column_name` varchar(300) NOT NULL,
  `remark_result_mark_name` varchar(300) NOT NULL,
  `remark_result_mark_desc` varchar(500) NOT NULL,
  `score` int(11) DEFAULT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `principal_name` varchar(200) NOT NULL,
  `principal_comment` text NOT NULL,
  `principal_signature` varchar(400) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `status` varchar(20) NOT NULL,
  `publish_result` varchar(20) NOT NULL DEFAULT 'not_published',
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`remark_result_student_id`),
  KEY `student_id` (`student_id`,`class_id`,`subclass_id`,`remark_result_id`,`remark_result_cat_id`,`remark_result_subcat_id`,`remark_result_column_id`,`remark_result_mark_id`),
  KEY `status` (`status`),
  KEY `publish_result` (`publish_result`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_subcat` (
  `remark_result_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_id` int(10) unsigned NOT NULL,
  `remark_result_subcat_name` varchar(300) NOT NULL,
  PRIMARY KEY (`remark_result_subcat_id`),
  KEY `remark_result_id` (`remark_result_id`,`remark_result_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `result_class` (
  `result_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_name` varchar(30) NOT NULL,
  `generate_result` varchar(30) NOT NULL,
  `skip_result` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_class_id`),
  KEY `class_id` (`class_id`,`generate_result`,`sessions`,`terms`),
  KEY `skip_result` (`skip_result`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1;


INSERT INTO result_class VALUES
("1","1","JSS1","generated","not_skipped","2021/2022","1st Term"),
("2","2","JSS2","generated","not_skipped","2021/2022","1st Term"),
("3","3","JSS3","generated","not_skipped","2021/2022","1st Term"),
("4","4","SSS1","not_generated","not_skipped","2021/2022","1st Term"),
("5","5","SSS2","not_generated","not_skipped","2021/2022","1st Term"),
("6","6","SSS3","not_generated","not_skipped","2021/2022","1st Term"),
("7","1","JSS 1","generated","not_skipped","2021/2022","1st Term"),
("8","2","JSS 2","generated","not_skipped","2021/2022","1st Term"),
("9","3","JSS 3","generated","not_skipped","2021/2022","1st Term"),
("10","4","SS 1","not_generated","not_skipped","2021/2022","1st Term"),
("11","5","SS 2","not_generated","not_skipped","2021/2022","1st Term"),
("12","6","SS 3","not_generated","not_skipped","2021/2022","1st Term");




CREATE TABLE `result_class_score` (
  `result_class_score_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(11) unsigned NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca7_total_score` float NOT NULL,
  `ca8_total_score` float NOT NULL,
  `ca9_total_score` float NOT NULL,
  `ca10_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `total_score` float NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `ca_name_7` varchar(50) NOT NULL,
  `ca_name_8` varchar(50) NOT NULL,
  `ca_name_9` varchar(50) NOT NULL,
  `ca_name_10` varchar(50) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_class_score_id`),
  KEY `class_id` (`class_id`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO result_class_score VALUES
("1","1","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("2","1","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("3","1","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("4","2","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("5","2","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("6","2","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("7","3","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("8","3","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("9","3","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("10","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("11","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("12","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("13","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("14","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("15","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("16","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("17","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("18","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term");




CREATE TABLE `result_class_term` (
  `result_class_term` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_class_term`),
  KEY `class_id` (`class_id`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO result_class_term VALUES
("1","1","1st Term"),
("2","1","2nd Term"),
("3","1","3rd Term"),
("4","2","1st Term"),
("5","2","2nd Term"),
("6","2","3rd Term"),
("7","3","1st Term"),
("8","3","2nd Term"),
("9","3","3rd Term"),
("10","4","1st Term"),
("11","4","2nd Term"),
("12","4","3rd Term"),
("13","5","1st Term"),
("14","5","2nd Term"),
("15","5","3rd Term"),
("16","6","1st Term"),
("17","6","2nd Term"),
("18","6","3rd Term");




CREATE TABLE `result_main` (
  `result_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `class_name` char(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subclass_name` char(50) NOT NULL,
  `total` float NOT NULL,
  `cumulative_total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `cumu_total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `cumulative_average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `cumulative_position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `cumulative_position_subclass` varchar(20) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `total_student_class` int(10) unsigned NOT NULL,
  `total_student_subclass` int(10) unsigned NOT NULL,
  `cumulative_total_student_class` int(10) unsigned NOT NULL,
  `cumulative_total_student_subclass` int(10) unsigned NOT NULL,
  `handwriting` int(11) NOT NULL,
  `cumulative_handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `cumulative_neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `cumulative_punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `cumulative_attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `cumulative_initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `cumulative_respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `cumulative_obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `cumulative_attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `cumulative_honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `cumulative_creativity` int(11) NOT NULL,
  `behaviour1_name` varchar(100) NOT NULL,
  `behaviour2_name` varchar(100) NOT NULL,
  `behaviour3_name` varchar(100) NOT NULL,
  `behaviour4_name` varchar(100) NOT NULL,
  `behaviour5_name` varchar(100) NOT NULL,
  `behaviour6_name` varchar(100) NOT NULL,
  `behaviour7_name` varchar(100) NOT NULL,
  `behaviour8_name` varchar(100) NOT NULL,
  `behaviour9_name` varchar(100) NOT NULL,
  `behaviour10_name` varchar(100) NOT NULL,
  `promotion` varchar(50) NOT NULL,
  `promotion_class_id` int(11) NOT NULL,
  `promotion_class_name` varchar(50) NOT NULL,
  `promotion_comment` varchar(500) NOT NULL,
  `promotion_subclass_id` int(11) NOT NULL,
  `promotion_subclass_name` varchar(50) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca7_total_score` float NOT NULL,
  `ca8_total_score` float NOT NULL,
  `ca9_total_score` float NOT NULL,
  `ca10_total_score` float NOT NULL,
  `ca_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `ca_name_7` varchar(50) NOT NULL,
  `ca_name_8` varchar(50) NOT NULL,
  `ca_name_9` varchar(50) NOT NULL,
  `ca_name_10` varchar(50) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `student_affairs_comment` text NOT NULL,
  `cumulative_principal_comment` text NOT NULL,
  `cumulative_form_staff_comment` text NOT NULL,
  `principal_signature` varchar(150) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_main_id`),
  KEY `student_id` (`student_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `promotion` (`promotion`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO result_main VALUES
("1","1","1","JSS 1","junior","0","","619.4","0","1500","0","41.29","","2nd","","2nd","","112","122","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","KHALID MUHAMMED","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term"),
("2","4","1","JSS 1","junior","0","","1290","0","1500","0","86","","1st","","1st","","114","122","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term"),
("3","3","2","JSS 2","junior","0","","1295.9","0","1500","0","86.39","","1st","","1st","","110","122","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","VWANDE JOYCE","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term"),
("4","2","3","JSS 3","junior","0","","1298","0","1600","0","81.13","","1st","","1st","","106","122","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term");




CREATE TABLE `result_page` (
  `result_page_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `status` char(10) NOT NULL,
  `students` int(11) NOT NULL,
  `t_attendance` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_page_id`),
  KEY `status` (`status`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=latin1;


INSERT INTO result_page VALUES
("1","1","1","0","JSS 1","","MATHEMATICS","submit","2","0","2021/2022","1st Term"),
("2","1","3","0","JSS 3","","MATHEMATICS","submit","1","0","2021/2022","1st Term"),
("3","5","1","0","JSS 1","","BASIC SCIENCE","submit","2","0","2021/2022","1st Term"),
("4","15","1","0","JSS 1","","BUSINESS STUDIES","submit","2","0","2021/2022","1st Term"),
("5","7","1","0","JSS 1","","SOCIAL STUDIES","submit","2","0","2021/2022","1st Term"),
("6","2","1","0","JSS 1","","CIVIC EDUCATION","submit","2","0","2021/2022","1st Term"),
("7","6","1","0","JSS 1","","COMPUTER SCIENCE","submit","2","0","2021/2022","1st Term"),
("8","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","submit","2","0","2021/2022","1st Term"),
("9","8","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","2","0","2021/2022","1st Term"),
("10","16","1","0","JSS 1","","BASIC TECHNOLOGY","submit","2","0","2021/2022","1st Term"),
("11","10","1","0","JSS 1","","FRENCH","submit","2","0","2021/2022","1st Term"),
("12","12","1","0","JSS 1","","HISTORY","submit","2","0","2021/2022","1st Term"),
("13","14","1","0","JSS 1","","HOME ECONOMICS","submit","2","0","2021/2022","1st Term"),
("14","9","1","0","JSS 1","","TECHNICAL DRAWING","submit","2","0","2021/2022","1st Term"),
("15","13","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","submit","2","0","2021/2022","1st Term"),
("16","11","1","0","JSS 1","","LANGUAGE ARTS","submit","2","0","2021/2022","1st Term"),
("17","11","3","0","JSS 3","","LANGUAGE ARTS","submit","1","0","2021/2022","1st Term"),
("18","4","3","0","JSS 3","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","1st Term"),
("19","5","3","0","JSS 3","","BASIC SCIENCE","submit","1","0","2021/2022","1st Term"),
("20","16","3","0","JSS 3","","BASIC TECHNOLOGY","submit","1","0","2021/2022","1st Term"),
("21","15","3","0","JSS 3","","BUSINESS STUDIES","submit","1","0","2021/2022","1st Term"),
("22","13","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","1st Term"),
("23","14","3","0","JSS 3","","HOME ECONOMICS","submit","1","0","2021/2022","1st Term"),
("24","12","3","0","JSS 3","","HISTORY","submit","1","0","2021/2022","1st Term"),
("25","10","3","0","JSS 3","","FRENCH","submit","1","0","2021/2022","1st Term"),
("26","6","3","0","JSS 3","","COMPUTER SCIENCE","submit","1","0","2021/2022","1st Term"),
("27","3","3","0","JSS 3","","HAUSA LANGUAGE","submit","1","0","2021/2022","1st Term"),
("28","2","3","0","JSS 3","","CIVIC EDUCATION","submit","1","0","2021/2022","1st Term"),
("29","8","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","1st Term"),
("30","9","3","0","JSS 3","","TECHNICAL DRAWING","submit","1","0","2021/2022","1st Term"),
("31","7","3","0","JSS 3","","SOCIAL STUDIES","submit","1","0","2021/2022","1st Term"),
("32","4","2","0","JSS 2","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","1st Term"),
("33","5","2","0","JSS 2","","BASIC SCIENCE","submit","1","0","2021/2022","1st Term"),
("34","16","2","0","JSS 2","","BASIC TECHNOLOGY","submit","1","0","2021/2022","1st Term"),
("35","15","2","0","JSS 2","","BUSINESS STUDIES","submit","1","0","2021/2022","1st Term"),
("36","8","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","1st Term"),
("37","2","2","0","JSS 2","","CIVIC EDUCATION","submit","1","0","2021/2022","1st Term"),
("38","6","2","0","JSS 2","","COMPUTER SCIENCE","submit","1","0","2021/2022","1st Term"),
("39","10","2","0","JSS 2","","FRENCH","submit","1","0","2021/2022","1st Term"),
("40","12","2","0","JSS 2","","HISTORY","submit","1","0","2021/2022","1st Term"),
("41","14","2","0","JSS 2","","HOME ECONOMICS","submit","1","0","2021/2022","1st Term"),
("42","9","2","0","JSS 2","","TECHNICAL DRAWING","submit","1","0","2021/2022","1st Term"),
("43","11","2","0","JSS 2","","LANGUAGE ARTS","submit","1","0","2021/2022","1st Term"),
("44","1","2","0","JSS 2","","MATHEMATICS","submit","1","0","2021/2022","1st Term"),
("45","13","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","1st Term"),
("46","7","2","0","JSS 2","","SOCIAL STUDIES","submit","1","0","2021/2022","1st Term");




CREATE TABLE `result_subject` (
  `result_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `ca1` float DEFAULT NULL,
  `ca2` float DEFAULT NULL,
  `ca3` float DEFAULT NULL,
  `ca4` float DEFAULT NULL,
  `ca5` float DEFAULT NULL,
  `ca6` float DEFAULT NULL,
  `ca7` float DEFAULT NULL,
  `ca8` float DEFAULT NULL,
  `ca9` float DEFAULT NULL,
  `ca10` float DEFAULT NULL,
  `ca` float DEFAULT NULL,
  `exam` float DEFAULT NULL,
  `sum_total` float DEFAULT NULL,
  `total` float NOT NULL,
  `cumulative_score` float NOT NULL,
  `cumulative_score_percent` float DEFAULT NULL,
  `cumulative_position` char(10) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `grade` varchar(5) NOT NULL,
  `grade_comment` varchar(50) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `staff_comment` varchar(60) NOT NULL,
  `attendance` int(11) DEFAULT NULL,
  `percent_attendance` varchar(10) DEFAULT NULL,
  `handwriting` int(11) DEFAULT NULL,
  `neatness` int(11) DEFAULT NULL,
  `punctuality` int(11) DEFAULT NULL,
  `attentiveness` int(11) DEFAULT NULL,
  `initiative` int(11) DEFAULT NULL,
  `respect` int(11) DEFAULT NULL,
  `obedience` int(11) DEFAULT NULL,
  `attitude` int(11) DEFAULT NULL,
  `honesty` int(11) DEFAULT NULL,
  `creativity` int(11) DEFAULT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_subject_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `foreign_keys` (`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=latin1;


INSERT INTO result_subject VALUES
("1","1","1","0","JSS 1","","MATHEMATICS","1","10","10","10","","","","","","","","30","4","34","34","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("2","4","1","0","JSS 1","","MATHEMATICS","1","16","10","10","","","","","","","","36","48","84","84","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("3","2","3","0","JSS 3","","MATHEMATICS","1","15","10","10","","","","","","","","35","36","71","71","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("4","1","1","0","JSS 1","","BASIC SCIENCE","5","10","0","0","","","","","","","","10","29","39","39","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("5","4","1","0","JSS 1","","BASIC SCIENCE","5","20","5","5","","","","","","","","30","59","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("6","1","1","0","JSS 1","","BUSINESS STUDIES","15","7","0","0","","","","","","","","7","26","33","33","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("7","4","1","0","JSS 1","","BUSINESS STUDIES","15","14","10","10","","","","","","","","34","52","86","86","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("8","1","1","0","JSS 1","","SOCIAL STUDIES","7","8","0","0","","","","","","","","8","17","25","25","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("9","4","1","0","JSS 1","","SOCIAL STUDIES","7","18","10","10","","","","","","","","38","45","83","83","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("10","1","1","0","JSS 1","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","6","46","46","0","","","2nd","D7","POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("11","4","1","0","JSS 1","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","50","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("12","1","1","0","JSS 1","","COMPUTER SCIENCE","6","8","10","10","","","","","","","","28","38","66","66","0","","","2nd","B3","GOOD","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("13","4","1","0","JSS 1","","COMPUTER SCIENCE","6","14","10","10","","","","","","","","34","58","92","92","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("14","1","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","5","10","10","","","","","","","","25","10","35","35","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("15","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","8","10","10","","","","","","","","28","52","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("16","1","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","0","0","0","","","","","","","","","0","0","0","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("17","4","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","10","10","10","","","","","","","","30","50","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("18","1","1","0","JSS 1","","BASIC TECHNOLOGY","16","7","0","0","","","","","","","","7","27","34","34","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("19","4","1","0","JSS 1","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("20","1","1","0","JSS 1","","FRENCH","10","10","10","10","","","","","","","","30","29.4","59.4","59.4","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("21","4","1","0","JSS 1","","FRENCH","10","10","10","10","","","","","","","","30","60","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("22","1","1","0","JSS 1","","HISTORY","12","10","10","10","","","","","","","","30","15","45","45","0","","","2nd","D7","POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("23","4","1","0","JSS 1","","HISTORY","12","10","10","10","","","","","","","","30","50","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("24","1","1","0","JSS 1","","HOME ECONOMICS","14","10","10","10","","","","","","","","30","26","56","56","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("25","4","1","0","JSS 1","","HOME ECONOMICS","14","10","10","10","","","","","","","","30","57","87","87","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("26","1","1","0","JSS 1","","TECHNICAL DRAWING","9","13","10","10","","","","","","","","33","30","63","63","0","","","2nd","C4","CREDIT","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("27","4","1","0","JSS 1","","TECHNICAL DRAWING","9","7","10","10","","","","","","","","27","49","76","76","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("28","1","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","2","10","10","","","","","","","","22","32","54","54","0","","","2nd","C6","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("29","4","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","7","10","10","","","","","","","","27","57","84","84","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("30","1","1","0","JSS 1","","LANGUAGE ARTS","11","8","8","5","","","","","","","","21","9","30","30","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("31","4","1","0","JSS 1","","LANGUAGE ARTS","11","15","10","10","","","","","","","","35","54","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("32","2","3","0","JSS 3","","LANGUAGE ARTS","11","15","10","10","","","","","","","","35","39","74","74","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("33","2","3","0","JSS 3","","AGRICULTURAL SCIENCE","4","11","10","10","","","","","","","","31","49","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("34","2","3","0","JSS 3","","BASIC SCIENCE","5","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("35","2","3","0","JSS 3","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("36","2","3","0","JSS 3","","BUSINESS STUDIES","15","14","10","10","","","","","","","","34","55","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("37","2","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","13","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("38","2","3","0","JSS 3","","HOME ECONOMICS","14","20","10","10","","","","","","","","40","49","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("39","2","3","0","JSS 3","","HISTORY","12","20","10","10","","","","","","","","40","29","69","69","0","","","1st","B3","GOOD","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("40","2","3","0","JSS 3","","FRENCH","10","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("41","2","3","0","JSS 3","","COMPUTER SCIENCE","6","11","10","10","","","","","","","","31","56","87","87","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("42","2","3","0","JSS 3","","HAUSA LANGUAGE","3","0","0","0","","","","","","","","","0","0","0","0","","","1st","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("43","2","3","0","JSS 3","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","50","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("44","2","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","20","10","10","","","","","","","","40","45","85","85","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("45","2","3","0","JSS 3","","TECHNICAL DRAWING","9","19","10","10","","","","","","","","39","50","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("46","2","3","0","JSS 3","","SOCIAL STUDIES","7","15","10","8","","","","","","","","33","48","81","81","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("47","3","2","0","JSS 2","","AGRICULTURAL SCIENCE","4","12","10","10","","","","","","","","32","60","92","92","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("48","3","2","0","JSS 2","","BASIC SCIENCE","5","18","10","10","","","","","","","","38","46","84","84","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("49","3","2","0","JSS 2","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("50","3","2","0","JSS 2","","BUSINESS STUDIES","15","12","10","6","","","","","","","","28","41","69","69","0","","","1st","B3","GOOD","VWANDE JOYCE","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("51","3","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","20","10","10","","","","","","","","40","37","77","77","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("52","3","2","0","JSS 2","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","40","80","80","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("53","3","2","0","JSS 2","","COMPUTER SCIENCE","6","20","10","10","","","","","","","","40","57","97","97","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("54","3","2","0","JSS 2","","FRENCH","10","20","10","10","","","","","","","","40","50.4","90.4","90.4","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("55","3","2","0","JSS 2","","HISTORY","12","20","10","10","","","","","","","","40","37","77","77","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("56","3","2","0","JSS 2","","HOME ECONOMICS","14","18","10","10","","","","","","","","38","60","98","98","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("57","3","2","0","JSS 2","","TECHNICAL DRAWING","9","17","10","10","","","","","","","","37","45","82","82","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("58","3","2","0","JSS 2","","LANGUAGE ARTS","11","16","10","10","","","","","","","","36","45.5","81.5","81.5","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("59","3","2","0","JSS 2","","MATHEMATICS","1","12","10","10","","","","","","","","32","47","79","79","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("60","3","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","13","20","10","10","","","","","","","","40","57","97","97","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("61","3","2","0","JSS 2","","SOCIAL STUDIES","7","20","10","7","","","","","","","","37","55","92","92","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term");




CREATE TABLE `result_subject_group_assign` (
  `result_subject_group_assign_id` int(11) NOT NULL AUTO_INCREMENT,
  `result_subject_group_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  PRIMARY KEY (`result_subject_group_assign_id`),
  KEY `result_subject_group_id` (`result_subject_group_id`,`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `result_subject_groups` (
  `result_subject_group_id` int(11) NOT NULL AUTO_INCREMENT,
  `result_subject_group_name` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`result_subject_group_id`),
  UNIQUE KEY `result_subject_group_name` (`result_subject_group_name`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_deduct` (
  `salary_deduct_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_deduct_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `months` (`months`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_info` (
  `salary_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `current_salary` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `current_debt` decimal(15,2) NOT NULL,
  `deduct` decimal(15,2) NOT NULL,
  `appreciation_amount` decimal(15,2) NOT NULL,
  `appreciation_reason` varchar(500) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_info_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_payment` (
  `salary_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`salary_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_fees` (
  `school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` char(20) NOT NULL,
  `student_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `school_fees_payment_mode_id` int(11) NOT NULL,
  `payment_mode` varchar(300) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `payment_no` varchar(20) NOT NULL,
  `payment_date` date NOT NULL,
  `fees_status` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`school_fees_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `school_fees_payment_mode_id` (`school_fees_payment_mode_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_fees_payment_modes` (
  `school_fees_payment_mode_id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_mode` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`school_fees_payment_mode_id`),
  UNIQUE KEY `payment_mode` (`payment_mode`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_storages` (
  `school_storage_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_storage_title` varchar(200) NOT NULL,
  `school_storage_dir` varchar(500) NOT NULL,
  `school_storage_date` datetime NOT NULL,
  PRIMARY KEY (`school_storage_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `sent_sms` (
  `sent_sms_id` int(11) NOT NULL AUTO_INCREMENT,
  `unit_spent` varchar(300) NOT NULL,
  `message` text NOT NULL,
  `people` text NOT NULL,
  `date_sent` datetime NOT NULL,
  PRIMARY KEY (`sent_sms_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `session_month` (
  `session_month_id` int(11) NOT NULL AUTO_INCREMENT,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`session_month_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `session_term` (
  `session_term_id` int(11) NOT NULL AUTO_INCREMENT,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`session_term_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO session_term VALUES
("4","2021/2022","1st Term");




CREATE TABLE `sessions` (
  `sid` varchar(40) NOT NULL,
  `expiry` int(10) unsigned NOT NULL,
  `data` text NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `settings` (
  `settings_id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_name` varchar(300) NOT NULL,
  `setting_value` varchar(300) NOT NULL,
  PRIMARY KEY (`settings_id`),
  KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=latin1;


INSERT INTO settings VALUES
("1","total_sms","100"),
("2","school_name","NO NAME"),
("3","school_login_logo","assets/images/logo.png"),
("4","login_attempt","30"),
("5","holiday_project","yes"),
("6","cumulate_test","yes"),
("7","show_test","yes"),
("8","show_waec","yes"),
("9","show_neco","yes"),
("10","lower_ca_score","30"),
("11","lower_exam_score","70"),
("12","school_phonenumber","2340000000000"),
("13","teacher_subclass","yes"),
("14","country","NIGERIA"),
("15","country_code","234"),
("16","phonenumber_length","10"),
("17","full_phonenumber_length","11"),
("18","main_phonenumber_length","13"),
("19","one_sms_amount","3"),
("20","result_cumulative","yes"),
("21","result_school_fees","no"),
("22","school_address","NO ADDRESS"),
("23","principal_finance","no"),
("24","one_card_amount","1000"),
("25","principal_name","SCHOOL HEAD"),
("26","principal_signature","images/principal_signatures/887704.png"),
("27","third_term_lower","no"),
("28","third_term_higher","no"),
("29","allow_finance","no"),
("30","order_class","no"),
("31","online_school_fees_payment","no"),
("32","sms_sender","NO NAME"),
("33","school_email","school@mail.com"),
("34","school_email_password","DÓ¬øÇÍÕ³J©A#ÏÌÏ"),
("35","school_email_name","School Name"),
("36","scratch_card","no"),
("37","higher_ca_score","30"),
("38","higher_exam_score","70"),
("39","class_approval","no"),
("40","allow_hostel","no"),
("41","result_attendance","no"),
("42","second_principal_signature","images/principal_signatures/15bddf.png"),
("43","lower_no_of_ca","1"),
("44","higher_no_of_ca","1"),
("45","lower_ca1","40"),
("46","lower_ca2","0"),
("47","lower_ca3","0"),
("48","lower_ca4","0"),
("49","lower_ca5","0"),
("50","lower_ca6","0"),
("51","higher_ca1","40"),
("52","higher_ca2","0"),
("53","higher_ca3","0"),
("54","higher_ca4","0"),
("55","higher_ca5","0"),
("56","higher_ca6","0"),
("57","lower_ca_name_1","CA"),
("58","lower_ca_name_2","CA 2"),
("59","lower_ca_name_3","CA 3"),
("60","lower_ca_name_4","CA 4"),
("61","lower_ca_name_5","CA 5"),
("62","lower_ca_name_6","CA 6"),
("63","higher_ca_name_1","CA"),
("64","higher_ca_name_2","CA 2"),
("65","higher_ca_name_3","CA 3"),
("66","higher_ca_name_4","CA 4"),
("67","higher_ca_name_5","CA 5"),
("68","higher_ca_name_6","CA 6"),
("69","lower_exam_name","Exam"),
("70","higher_exam_name","Exam"),
("71","main_school_id","1"),
("72","school_id","1"),
("73","school_storage","yes"),
("74","class_storage","yes"),
("75","class_teacher_comment_setting","yes"),
("76","student_affairs","no"),
("77","admission_number","no"),
("78","admission_format",""),
("79","paystack_subaccount","ACCT_t3w6pmnwzvmv2np"),
("80","currency","&#8358;"),
("81","annual_position_for_last_term","yes"),
("82","annual_only_last_subjects","no"),
("83","parent_finance","yes"),
("84","third_term_in_annual","no"),
("85","admin_class_check_result","yes"),
("86","refresh_token","1//050SH4EtODsccCgYIARAAGAUSNwF-L9Irppe_Bv2rl35Mkj_CsbQEnCFFKltUjnWiPalTUqfLeXyBcZNM05DkpzD5NJ3CFyfFfUM"),
("87","folder_id",""),
("88","google_client_id","150277175744-n19rn2vsuio1lt7ot1cirgvfp3ehjp2l.apps.googleusercontent.com"),
("89","google_client_secret","eTWa1cXmNcG-Ky2h32o7bv4n"),
("90","online_class","no"),
("91","payment_warning","no"),
("92","instalmental_payment","yes"),
("93","classroom_materials","no"),
("94","class_activity_name","CLASS ACTIVITY"),
("95","upload_admission_form","yes");




CREATE TABLE `sms_account` (
  `sms_account_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` varchar(20) NOT NULL,
  `unit_bought` int(10) unsigned NOT NULL,
  `amount` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `mode` varchar(20) NOT NULL,
  `date_bought` datetime NOT NULL,
  PRIMARY KEY (`sms_account_id`),
  UNIQUE KEY `transaction_id` (`transaction_id`),
  KEY `mode` (`mode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `staff` (
  `staff_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(10) unsigned NOT NULL,
  `user_key` varchar(100) DEFAULT NULL,
  `serial_number` varchar(200) NOT NULL,
  `pass` varchar(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(255) NOT NULL,
  `first_name` varchar(200) NOT NULL,
  `other_name` varchar(200) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `gender` varchar(10) NOT NULL,
  `status` varchar(50) NOT NULL,
  `groups` varchar(20) NOT NULL,
  `position` varchar(200) NOT NULL,
  `student_affairs` varchar(20) NOT NULL,
  `address` varchar(200) NOT NULL,
  `dob` date NOT NULL,
  `phone_number` bigint(20) unsigned NOT NULL,
  `email` varchar(200) NOT NULL,
  `country` varchar(200) NOT NULL,
  `state_origin` varchar(200) NOT NULL,
  `religion` varchar(50) NOT NULL,
  `disability` varchar(300) NOT NULL,
  `passport` varchar(200) NOT NULL,
  `form` varchar(5) NOT NULL,
  `sent_serial_pass_sms` char(3) NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `skip` varchar(5) NOT NULL,
  `activation` varchar(50) NOT NULL,
  `year_of_employment` varchar(15) NOT NULL,
  `term_of_employment` varchar(15) NOT NULL,
  PRIMARY KEY (`staff_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `serial_number` (`serial_number`),
  KEY `status` (`status`),
  KEY `religion` (`religion`),
  KEY `sent_serial_pass_sms` (`sent_serial_pass_sms`),
  KEY `skip` (`skip`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO staff VALUES
("1","186","11867a94f59f","T/21/0001","$2y$10$ANlAt.xD054hQD3.WOQeCuBUKL3qMTXu/sFaQdL6NioLxriujWrx2","ffstaff","ffstaff","STAFF","","STAFF","male","academic","both","","","NONE","2021-12-06","2349030303033","","NIGERIA","AKWA IBOM","Christianity","","","","","","0","0","","activated","2021/2022","1st Term"),
("2","186","21868942ec7c","T/21/0002","$2y$10$pNfGmUmNmFTZDOQax0mmUOyUigZtY9hyExae8pl3FD2Y39I8uXRLi","idmuhammed","idmuhammed","MUHAMMED","NASIR","KHALID","male","academic","junior","","","BEHIND MOUNTAIN OF FIRE ZONE 8 LUGBE ABUJA","1995-04-25","2347016288112","Muhammedkhalid019@gmail.com","NIGERIA","NIGER","Islam","","","form","","","0","1639557933","","activated","2021/2022","1st Term"),
("3","186","3186164ab7a0","T/21/0003","$2y$10$BJn3/eoiaBkevGZ2tjPLB.otnH7lXcKtd1BwPjKVhoobV0/8Hb9zC","dejoyce","dejoyce","JOYCE","JAH","VWANDE","female","academic","junior","","","GOSA","1981-08-27","2348188262838","Joycejonyeledo@gmail.com","NIGERIA","PLATEAU","Christianity","","","form","","","0","1639489361","","activated","2021/2022","1st Term");




CREATE TABLE `staff_salary` (
  `staff_salary_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  PRIMARY KEY (`staff_salary_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO staff_salary VALUES
("1","1","0.00"),
("2","2","0.00"),
("3","3","0.00");




CREATE TABLE `staff_subject` (
  `staff_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  PRIMARY KEY (`staff_subject_id`),
  KEY `staff_subject_class` (`staff_id`,`subject_id`,`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO staff_subject VALUES
("12","0","3","1"),
("27","0","3","2"),
("1","2","1","1"),
("3","2","1","3"),
("11","2","2","1"),
("41","2","2","3"),
("42","2","3","3"),
("13","2","4","1"),
("43","2","4","3"),
("14","2","5","1"),
("44","2","5","3"),
("15","2","6","1"),
("45","2","6","3"),
("16","2","7","1"),
("46","2","7","3"),
("17","2","8","1"),
("47","2","8","3"),
("18","2","9","1"),
("48","2","9","3"),
("4","2","10","1"),
("34","2","10","3"),
("5","2","11","1"),
("35","2","11","3"),
("6","2","12","1"),
("36","2","12","3"),
("7","2","13","1"),
("37","2","13","3"),
("8","2","14","1"),
("38","2","14","3"),
("9","2","15","1"),
("39","2","15","3"),
("10","2","16","1"),
("40","2","16","3"),
("2","3","1","2"),
("26","3","2","2"),
("28","3","4","2"),
("29","3","5","2"),
("30","3","6","2"),
("31","3","7","2"),
("32","3","8","2"),
("33","3","9","2"),
("19","3","10","2"),
("20","3","11","2"),
("21","3","12","2"),
("22","3","13","2"),
("23","3","14","2"),
("24","3","15","2"),
("25","3","16","2");




CREATE TABLE `staff_subject_subclass` (
  `staff_subject_subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  PRIMARY KEY (`staff_subject_subclass_id`),
  UNIQUE KEY `staff_subject_subclass` (`staff_id`,`subject_id`,`class_id`,`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO staff_subject_subclass VALUES
("12","0","3","1","0"),
("27","0","3","2","0"),
("1","2","1","1","0"),
("3","2","1","3","0"),
("11","2","2","1","0"),
("41","2","2","3","0"),
("42","2","3","3","0"),
("13","2","4","1","0"),
("43","2","4","3","0"),
("14","2","5","1","0"),
("44","2","5","3","0"),
("15","2","6","1","0"),
("45","2","6","3","0"),
("16","2","7","1","0"),
("46","2","7","3","0"),
("17","2","8","1","0"),
("47","2","8","3","0"),
("18","2","9","1","0"),
("48","2","9","3","0"),
("4","2","10","1","0"),
("34","2","10","3","0"),
("5","2","11","1","0"),
("35","2","11","3","0"),
("6","2","12","1","0"),
("36","2","12","3","0"),
("7","2","13","1","0"),
("37","2","13","3","0"),
("8","2","14","1","0"),
("38","2","14","3","0"),
("9","2","15","1","0"),
("39","2","15","3","0"),
("10","2","16","1","0"),
("40","2","16","3","0"),
("2","3","1","2","0"),
("26","3","2","2","0"),
("28","3","4","2","0"),
("29","3","5","2","0"),
("30","3","6","2","0"),
("31","3","7","2","0"),
("32","3","8","2","0"),
("33","3","9","2","0"),
("19","3","10","2","0"),
("20","3","11","2","0"),
("21","3","12","2","0"),
("22","3","13","2","0"),
("23","3","14","2","0"),
("24","3","15","2","0"),
("25","3","16","2","0");




CREATE TABLE `student_plan` (
  `student_plan_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  PRIMARY KEY (`student_plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `student_subject` (
  `student_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  PRIMARY KEY (`student_subject_id`),
  KEY `student_subject_status` (`student_id`,`subject_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=latin1;


INSERT INTO student_subject VALUES
("1","1","1","doing"),
("12","1","2","doing"),
("13","1","3","doing"),
("14","1","4","doing"),
("15","1","5","doing"),
("16","1","6","doing"),
("17","1","7","doing"),
("18","1","8","doing"),
("19","1","9","doing"),
("5","1","10","doing"),
("6","1","11","doing"),
("7","1","12","doing"),
("8","1","13","doing"),
("9","1","14","doing"),
("10","1","15","doing"),
("11","1","16","doing"),
("2","2","1","doing"),
("57","2","2","doing"),
("58","2","3","doing"),
("59","2","4","doing"),
("60","2","5","doing"),
("61","2","6","doing"),
("62","2","7","doing"),
("63","2","8","doing"),
("64","2","9","doing"),
("50","2","10","doing"),
("51","2","11","doing"),
("52","2","12","doing"),
("53","2","13","doing"),
("54","2","14","doing"),
("55","2","15","doing"),
("56","2","16","doing"),
("3","3","1","doing"),
("42","3","2","doing"),
("43","3","3","doing"),
("44","3","4","doing"),
("45","3","5","doing"),
("46","3","6","doing"),
("47","3","7","doing"),
("48","3","8","doing"),
("49","3","9","doing"),
("35","3","10","doing"),
("36","3","11","doing"),
("37","3","12","doing"),
("38","3","13","doing"),
("39","3","14","doing"),
("40","3","15","doing"),
("41","3","16","doing"),
("4","4","1","doing"),
("27","4","2","doing"),
("28","4","3","doing"),
("29","4","4","doing"),
("30","4","5","doing"),
("31","4","6","doing"),
("32","4","7","doing"),
("33","4","8","doing"),
("34","4","9","doing"),
("20","4","10","doing"),
("21","4","11","doing"),
("22","4","12","doing"),
("23","4","13","doing"),
("24","4","14","doing"),
("25","4","15","doing"),
("26","4","16","doing");




CREATE TABLE `students` (
  `student_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_key` varchar(100) DEFAULT NULL,
  `school_id` int(10) unsigned NOT NULL,
  `parent_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `hostel_id` int(11) NOT NULL,
  `room_id` int(11) NOT NULL,
  `bedspace` int(11) DEFAULT NULL,
  `first_name` varchar(50) NOT NULL,
  `other_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `serial_number` varchar(50) NOT NULL,
  `pass` char(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(200) NOT NULL,
  `email` varchar(200) NOT NULL,
  `dob` date NOT NULL,
  `gender` varchar(10) NOT NULL,
  `religion` varchar(50) NOT NULL,
  `reg_no` varchar(20) NOT NULL,
  `adm_no` varchar(60) NOT NULL,
  `graduation_year` varchar(20) NOT NULL,
  `graduation_term` varchar(10) NOT NULL,
  `deactivation_sess` char(20) NOT NULL,
  `deactivation_term` char(10) NOT NULL,
  `disability` varchar(300) NOT NULL,
  `passport` varchar(200) NOT NULL,
  `relationship` varchar(20) NOT NULL,
  `new_student` varchar(20) NOT NULL,
  `new_student_finance` varchar(20) NOT NULL,
  `forget_token` varchar(50) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `scratch_card_attempt` int(10) unsigned NOT NULL,
  `scratch_card_last_time` int(10) unsigned NOT NULL,
  `transfer` char(20) NOT NULL,
  `transfer_school_id` int(11) NOT NULL,
  `exempt` char(10) NOT NULL,
  `check_result` varchar(20) NOT NULL DEFAULT 'check_result',
  `activation` varchar(20) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`student_id`),
  UNIQUE KEY `serial_number` (`serial_number`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `parent_id` (`parent_id`),
  KEY `plan_id` (`plan_id`),
  KEY `class_subclass` (`class_id`,`subclass_id`,`activation`),
  KEY `exempt` (`exempt`),
  KEY `check_result` (`check_result`),
  KEY `date_created` (`date_created`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO students VALUES
("1","11860a75d372","186","79","1","0","0","0","0","","ADAM","SEKURE","AHMAD","S/21/0001","$2y$10$hNKyZLXNQvxwWnqGrXHdpuL8U0ZtWh8QiQVwq7SfHH2SWzLa1yGv2","zeonglobal","zeonglobal","","2010-11-07","male","Islam","","","","","","","","","PARENT","new_student","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:39:26"),
("2","2186f9291be0","186","80","3","0","0","0","0","","CHIOMA","EMERALD","NWEKE","S/21/0002","$2y$10$.uhYnfz4l5nrI.imeZ/4MuxNIwMt9H4F7dVqMpnaeQ4thplqvxaFy","zeonglobal","zeonglobal","","2009-05-21","female","Christianity","","","","","","","","","PARENT","new_student","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:44:53"),
("3","31862216901c","186","65","2","0","0","0","0","","CHIAGOZIEM","EPHRAIM","NWEKE","S/21/0003","$2y$10$wUhKZ2ymfvNo8hr3ptUjsu4dU0xoumyyIX8K5AFNh5qmo0FqB2o/O","kechiagoziem","kechiagoziem","","2011-02-07","male","Christianity","","","","","","","","","PARENT","new_student","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:46:42"),
("4","418604dce526","186","81","1","0","0","0","0","","ZOE-PRAIZE","MAYOWA","EKPERIGIN","S/21/0004","$2y$10$6txL1vk7qfRqZZhH4cnZFu9yHYxMVPOoP1AuGLNHe/QK/C/EL/cUO","zeonglobal","zeonglobal","","2011-10-28","female","Christianity","","","","","","","","","PARENT","new_student","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:53:49");




CREATE TABLE `subclass` (
  `subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `subclass_name` varchar(30) NOT NULL,
  PRIMARY KEY (`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;






CREATE TABLE `subject_class` (
  `subject_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  PRIMARY KEY (`subject_class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO subject_class VALUES
("1","1","1"),
("2","1","2"),
("3","1","3"),
("4","10","1"),
("5","11","1"),
("6","12","1"),
("7","13","1"),
("8","14","1"),
("9","15","1"),
("10","16","1"),
("11","2","1"),
("12","3","1"),
("13","4","1"),
("14","5","1"),
("15","6","1"),
("16","7","1"),
("17","8","1"),
("18","9","1"),
("19","10","2"),
("20","11","2"),
("21","12","2"),
("22","13","2"),
("23","14","2"),
("24","15","2"),
("25","16","2"),
("26","2","2"),
("27","3","2"),
("28","4","2"),
("29","5","2"),
("30","6","2"),
("31","7","2"),
("32","8","2"),
("33","9","2"),
("34","10","3"),
("35","11","3"),
("36","12","3"),
("37","13","3"),
("38","14","3"),
("39","15","3"),
("40","16","3"),
("41","2","3"),
("42","3","3"),
("43","4","3"),
("44","5","3"),
("45","6","3"),
("46","7","3"),
("47","8","3"),
("48","9","3");




CREATE TABLE `subjects` (
  `subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_name` varchar(50) NOT NULL,
  `subject_short` varchar(30) NOT NULL,
  `groups` varchar(100) NOT NULL,
  PRIMARY KEY (`subject_id`),
  KEY `groups` (`groups`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;


INSERT INTO subjects VALUES
("1","MATHEMATICS","MATHS","junior"),
("2","CIVIC EDUCATION","CUVIC","junior"),
("3","HAUSA LANGUAGE","HAUSA","junior"),
("4","AGRICULTURAL SCIENCE","AGRIC","junior"),
("5","BASIC SCIENCE","B.SC","junior"),
("6","COMPUTER SCIENCE","COMPUTER","junior"),
("7","SOCIAL STUDIES","S/S","junior"),
("8","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","CRS/IRS","junior"),
("9","TECHNICAL DRAWING","TD","junior"),
("10","FRENCH","FRENCH","junior"),
("11","LANGUAGE ARTS","LANGUAGE ARTS","junior"),
("12","HISTORY","HISTORY","junior"),
("13","PHYSICAL AND HEALTH EDUCATION","PHE","junior"),
("14","HOME ECONOMICS","HOME ECONS","junior"),
("15","BUSINESS STUDIES","B.S","junior"),
("16","BASIC TECHNOLOGY","BASIC TECH","junior");




CREATE TABLE `test` (
  `test_id` int(11) NOT NULL AUTO_INCREMENT,
  `test_page_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `student_score` float DEFAULT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` char(20) NOT NULL,
  `terms` char(20) NOT NULL,
  PRIMARY KEY (`test_id`),
  KEY `test_page_id` (`test_page_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `student_score` (`student_score`),
  KEY `status` (`status`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `test_page` (
  `test_page_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `test_title` varchar(100) NOT NULL,
  `total_score` float NOT NULL,
  `students` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` char(20) NOT NULL,
  `terms` char(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`test_page_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `topic` (
  `topic_id` int(11) NOT NULL AUTO_INCREMENT,
  `topic_name` varchar(200) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `published` varchar(20) NOT NULL DEFAULT 'not_published',
  `discussion_signal` tinyint(4) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`topic_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `user_id` (`user_id`),
  KEY `published` (`published`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `topic_discussions` (
  `topic_discussions_id` int(11) NOT NULL AUTO_INCREMENT,
  `topic_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `discussion` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`topic_discussions_id`),
  KEY `user_id` (`user_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `transfer_current_fees_info` (
  `current_fees_info_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(11) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `current_school_fees` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL,
  `surcharge_amount` decimal(15,2) NOT NULL,
  `surcharge_reason` varchar(500) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `present_owing` decimal(15,2) NOT NULL,
  `class_fee` decimal(15,2) NOT NULL,
  `plan_fee` decimal(15,2) NOT NULL,
  `new_student_fee` decimal(15,2) NOT NULL,
  `room_fee` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`current_fees_info_id`),
  KEY `student_id` (`student_id`),
  KEY `sess_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_fees_discount` (
  `fees_discount_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(300) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`fees_discount_id`),
  KEY `student_id` (`student_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_result_main` (
  `result_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `class_name` char(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subclass_name` char(50) NOT NULL,
  `total` float NOT NULL,
  `cumulative_total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `cumu_total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `cumulative_average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `cumulative_position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `cumulative_position_subclass` varchar(20) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `total_student_class` int(10) unsigned NOT NULL,
  `total_student_subclass` int(10) unsigned NOT NULL,
  `cumulative_total_student_class` int(10) unsigned NOT NULL,
  `cumulative_total_student_subclass` int(10) unsigned NOT NULL,
  `handwriting` int(11) NOT NULL,
  `cumulative_handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `cumulative_neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `cumulative_punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `cumulative_attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `cumulative_initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `cumulative_respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `cumulative_obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `cumulative_attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `cumulative_honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `cumulative_creativity` int(11) NOT NULL,
  `behaviour1_name` varchar(100) NOT NULL,
  `behaviour2_name` varchar(100) NOT NULL,
  `behaviour3_name` varchar(100) NOT NULL,
  `behaviour4_name` varchar(100) NOT NULL,
  `behaviour5_name` varchar(100) NOT NULL,
  `behaviour6_name` varchar(100) NOT NULL,
  `behaviour7_name` varchar(100) NOT NULL,
  `behaviour8_name` varchar(100) NOT NULL,
  `behaviour9_name` varchar(100) NOT NULL,
  `behaviour10_name` varchar(100) NOT NULL,
  `promotion` varchar(50) NOT NULL,
  `promotion_class_id` int(11) NOT NULL,
  `promotion_class_name` varchar(50) NOT NULL,
  `promotion_comment` varchar(500) NOT NULL,
  `promotion_subclass_id` int(11) NOT NULL,
  `promotion_subclass_name` varchar(50) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `student_affairs_comment` text NOT NULL,
  `cumulative_principal_comment` text NOT NULL,
  `cumulative_form_staff_comment` text NOT NULL,
  `principal_signature` varchar(150) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_main_id`),
  KEY `student_id` (`student_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `promotion` (`promotion`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_result_subject` (
  `result_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `ca1` float DEFAULT NULL,
  `ca2` float DEFAULT NULL,
  `ca3` float DEFAULT NULL,
  `ca4` float DEFAULT NULL,
  `ca5` float DEFAULT NULL,
  `ca6` float DEFAULT NULL,
  `ca` float DEFAULT NULL,
  `exam` float DEFAULT NULL,
  `sum_total` float DEFAULT NULL,
  `total` float NOT NULL,
  `cumulative_score` float NOT NULL,
  `cumulative_score_percent` float DEFAULT NULL,
  `cumulative_position` char(10) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `grade` varchar(5) NOT NULL,
  `grade_comment` varchar(50) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `staff_comment` varchar(60) NOT NULL,
  `attendance` int(11) DEFAULT NULL,
  `percent_attendance` varchar(10) DEFAULT NULL,
  `handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_subject_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `foreign_keys` (`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_salary_info` (
  `salary_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `current_salary` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `current_debt` decimal(15,2) NOT NULL,
  `deduct` decimal(15,2) NOT NULL,
  `appreciation_amount` decimal(15,2) NOT NULL,
  `appreciation_reason` varchar(500) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_info_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_salary_payment` (
  `salary_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`salary_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_school_fees` (
  `school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` char(20) NOT NULL,
  `student_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `school_fees_payment_mode_id` int(11) NOT NULL,
  `payment_mode` varchar(300) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `payment_no` varchar(20) NOT NULL,
  `fees_status` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`school_fees_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `school_fees_payment_mode_id` (`school_fees_payment_mode_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transferred_students` (
  `transferred_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `student_name` varchar(300) NOT NULL,
  `class_id` int(11) NOT NULL,
  `old_class_name` varchar(100) NOT NULL,
  `new_class_name` varchar(100) NOT NULL,
  `serial_number` varchar(50) NOT NULL,
  `school_id` int(11) NOT NULL,
  `database_name` varchar(100) NOT NULL,
  `status` varchar(30) NOT NULL,
  `date_transferred` datetime NOT NULL,
  PRIMARY KEY (`transferred_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `zoom` (
  `zoom_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_category_id` int(11) NOT NULL,
  `email` varchar(100) NOT NULL,
  `pass` varchar(50) NOT NULL,
  `api_key` varchar(200) NOT NULL,
  `api_secret` varchar(200) NOT NULL,
  `meeting_id` varchar(20) NOT NULL,
  `meeting_password` varchar(30) NOT NULL,
  `meeting_url_pwd` varchar(400) NOT NULL,
  `host_key` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`zoom_id`),
  KEY `class_id` (`class_id`),
  KEY `class_category_id` (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";


--
-- Database: `zeonglob_zap_mpbacademy_sec_abuja`
--




CREATE TABLE `about_us` (
  `about_us_id` int(11) NOT NULL AUTO_INCREMENT,
  `map` varchar(300) NOT NULL,
  `about_us_text` text NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`about_us_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `activity` (
  `assignment_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `table_name` varchar(30) NOT NULL,
  `assignment_title` varchar(200) NOT NULL,
  `assignment_text` text NOT NULL,
  `due_date` datetime NOT NULL,
  `property` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'active',
  `total_score` decimal(15,2) NOT NULL,
  `assignment_date` datetime NOT NULL DEFAULT current_timestamp(),
  `answer_text` text NOT NULL,
  `answer_status` varchar(10) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`assignment_id`),
  KEY `due_date` (`due_date`),
  KEY `topic_id` (`topic_id`),
  KEY `activation` (`activation`),
  KEY `answer_status` (`answer_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `activity_comment` (
  `activity_comment_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `comment` varchar(500) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`activity_comment_id`),
  KEY `assignment_id` (`assignment_id`,`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_class` (
  `admission_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_sessions_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `price` decimal(15,2) NOT NULL,
  PRIMARY KEY (`admission_class_id`),
  KEY `admission_session_id` (`admission_sessions_id`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_questions` (
  `admission_exam_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_exam_question_id`),
  KEY `admission_exam_id` (`admission_exam_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_student_questions` (
  `admission_exam_student_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_student_id` int(11) NOT NULL,
  `question_options_id` int(11) NOT NULL,
  PRIMARY KEY (`admission_exam_student_question_id`),
  KEY `admission_exam_student_id` (`admission_exam_student_id`),
  KEY `question_options_id` (`question_options_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_students` (
  `admission_exam_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `admission_student_id` int(11) NOT NULL,
  `start_date` datetime NOT NULL DEFAULT current_timestamp(),
  `end_date` datetime NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `revised_score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `score_percentage` decimal(15,2) DEFAULT NULL,
  `revised_score_percentage` decimal(15,2) DEFAULT NULL,
  `approval` tinyint(4) NOT NULL,
  `fullscreen_exits` int(11) NOT NULL,
  `exam_ended_cond` varchar(30) NOT NULL,
  PRIMARY KEY (`admission_exam_student_id`),
  KEY `admission_exam_id` (`admission_exam_id`),
  KEY `student_id` (`admission_student_id`),
  KEY `approval` (`approval`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exam_webcams` (
  `admission_exam_webcam_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_exam_id` int(11) NOT NULL,
  `admission_student_id` int(11) NOT NULL,
  `google_drive_id` varchar(300) NOT NULL,
  `timestamp` varchar(20) NOT NULL,
  PRIMARY KEY (`admission_exam_webcam_id`),
  KEY `admission_exam_id` (`admission_exam_id`,`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_exams` (
  `admission_exam_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_class_id` int(11) NOT NULL,
  `exam_name` varchar(300) NOT NULL,
  `exam_description` text NOT NULL,
  `exam_type` varchar(20) NOT NULL DEFAULT 'multiple_choice',
  `duration` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `maximum_attempt` tinyint(4) NOT NULL,
  `minimum_percentage` tinyint(4) NOT NULL,
  `view_answers` tinyint(4) NOT NULL,
  `surveillance` tinyint(4) NOT NULL,
  `activation` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_exam_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_form` (
  `admission_form_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_form` text NOT NULL,
  `upload_instruction` varchar(500) NOT NULL,
  PRIMARY KEY (`admission_form_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4;


INSERT INTO admission_form VALUES
("1","[{\"type\":\"text\",\"required\":true,\"label\":\"Last Name\",\"placeholder\":\"ENTER LAST NAME\",\"className\":\"form-control\",\"name\":\"last_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"First Name\",\"placeholder\":\"ENTER FIRST NAME\",\"className\":\"form-control\",\"name\":\"first_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":false,\"label\":\"Other Name\",\"placeholder\":\"ENTER OTHER NAME\",\"className\":\"form-control\",\"name\":\"other_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"select\",\"required\":true,\"label\":\"Gender\",\"className\":\"form-control\",\"name\":\"gender\",\"access\":false,\"values\":[{\"label\":\"MALE\",\"value\":\"male\",\"selected\":true},{\"label\":\"FEMALE\",\"value\":\"female\"}]},{\"type\":\"select\",\"required\":true,\"label\":\"Religion\",\"placeholder\":\"Religion\",\"className\":\"form-control\",\"name\":\"religion\",\"access\":false,\"values\":[{\"label\":\"CHRISTIANITY \",\"value\":\"Christianity\"},{\"label\":\"ISLAM \",\"value\":\"Islam\"}]},{\"type\":\"date\",\"required\":true,\"label\":\"Date of Birth\",\"className\":\"form-control\",\"name\":\"dob\",\"access\":false},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Name\",\"placeholder\":\"ENTER PARENT NAME\",\"className\":\"form-control\",\"name\":\"parent_name\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Address\",\"placeholder\":\"ENTER PARENT ADDRESS\",\"className\":\"form-control\",\"name\":\"home_address\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"text\",\"required\":true,\"label\":\"Parent Occupation\",\"placeholder\":\"ENTER PARENT OCCUPATION\",\"className\":\"form-control\",\"name\":\"occupation\",\"access\":false,\"subtype\":\"text\"},{\"type\":\"autocomplete\",\"required\":true,\"label\":\"Parent State of Origin\",\"className\":\"form-control\",\"name\":\"parent_state_origin\",\"access\":false,\"requireValidOption\":true,\"values\":[{\"label\":\"ABIA\",\"value\":\"ABIA\"},{\"label\":\"ADAMAWA\",\"value\":\"ADAMAWA\"},{\"label\":\"AKWA IBOM\",\"value\":\"AKWA IBOM\"},{\"label\":\"ANAMBRA\",\"value\":\"ANAMBRA\"},{\"label\":\"BAUCHI\",\"value\":\"BAUCHI\"},{\"label\":\"BAYELSA\",\"value\":\"BAYELSA\"},{\"label\":\"BENUE\",\"value\":\"BENUE\"},{\"label\":\"BORNO\",\"value\":\"BORNO\"},{\"label\":\"CROSS RIVER\",\"value\":\"CROSS RIVER\"},{\"label\":\"DELTA\",\"value\":\"DELTA\"},{\"label\":\"EBONYI\",\"value\":\"EBONYI\"},{\"label\":\"EDO\",\"value\":\"EDO\"},{\"label\":\"EKITI\",\"value\":\"EKITI\"},{\"label\":\"ENUGU\",\"value\":\"ENUGU\"},{\"label\":\"FCT\",\"value\":\"FCT\"},{\"label\":\"GOMBE\",\"value\":\"GOMBE\"},{\"label\":\"IMO\",\"value\":\"IMO\"},{\"label\":\"JIGAWA\",\"value\":\"JIGAWA\"},{\"label\":\"KADUNA\",\"value\":\"KADUNA\"},{\"label\":\"KANO\",\"value\":\"KANO\"},{\"label\":\"KATSINA\",\"value\":\"KATSINA\"},{\"label\":\"KEBBI\",\"value\":\"KEBBI\"},{\"label\":\"KOGI\",\"value\":\"KOGI\"},{\"label\":\"KWARA\",\"value\":\"KWARA\"},{\"label\":\"LAGOS\",\"value\":\"LAGOS\"},{\"label\":\"NASARAWA\",\"value\":\"NASARAWA\"},{\"label\":\"NIGER\",\"value\":\"NIGER\"},{\"label\":\"OGUN\",\"value\":\"OGUN\"},{\"label\":\"ONDO\",\"value\":\"ONDO\"},{\"label\":\"OSUN\",\"value\":\"OSUN\"},{\"label\":\"OYO\",\"value\":\"OYO\"},{\"label\":\"PLATEAU\",\"value\":\"PLATEAU\"},{\"label\":\"RIVERS\",\"value\":\"RIVERS\"},{\"label\":\"SOKOTO\",\"value\":\"SOKOTO\"},{\"label\":\"TARABA\",\"value\":\"TARABA\"},{\"label\":\"YOBE\",\"value\":\"YOBE\"},{\"label\":\"ZAMFARA\",\"value\":\"ZAMFARA\"}]},{\"type\":\"select\",\"required\":true,\"label\":\"Parent Religion\",\"placeholder\":\"Religion\",\"className\":\"form-control\",\"name\":\"select-1595660440643\",\"access\":false,\"values\":[{\"label\":\"CHRISTIANITY \",\"value\":\"Christianity\",\"selected\":true},{\"label\":\"ISLAM \",\"value\":\"Islam\"}]}]","");




CREATE TABLE `admission_sessions` (
  `admission_sessions_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_sessions_name` varchar(300) NOT NULL,
  `admission_status` varchar(100) NOT NULL DEFAULT 'active',
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_sessions_id`),
  KEY `admission_status` (`admission_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `admission_students` (
  `admission_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_class_id` int(11) NOT NULL,
  `main_phonenumber` varchar(20) NOT NULL,
  `phone_number2` varchar(20) DEFAULT NULL,
  `email` varchar(300) NOT NULL,
  `student_info` text NOT NULL,
  `payment` varchar(10) NOT NULL,
  `application_status` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `admission_uploads` (
  `admission_upload_id` int(11) NOT NULL AUTO_INCREMENT,
  `admission_student_id` int(11) NOT NULL,
  `upload_title` varchar(50) NOT NULL,
  `google_drive_id` varchar(100) NOT NULL,
  `google_drive_title` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`admission_upload_id`),
  KEY `admission_student_id` (`admission_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `album` (
  `album_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `album_cat` varchar(20) NOT NULL,
  `album_name` varchar(100) NOT NULL,
  `album_date` datetime NOT NULL,
  PRIMARY KEY (`album_id`),
  KEY `album_cat` (`album_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `album_images` (
  `album_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `album_id` int(11) NOT NULL,
  `image_name` varchar(20) NOT NULL,
  `image_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(300) DEFAULT NULL,
  `image_google_drive_dir` varchar(300) DEFAULT NULL,
  `image_embed_dir` varchar(300) DEFAULT NULL,
  `image_thumb_dir` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`album_images_id`),
  KEY `album_id` (`album_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `alumni` (
  `alumni_id` int(11) NOT NULL AUTO_INCREMENT,
  `alumni_class_id` int(11) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `first_name` varchar(50) NOT NULL,
  `address` varchar(400) NOT NULL,
  `phonenumber` varchar(20) NOT NULL,
  `email` varchar(200) NOT NULL,
  `payment_reference` varchar(50) DEFAULT NULL,
  `year_you_left` varchar(20) NOT NULL,
  `set_name` varchar(15) NOT NULL,
  `brief_info` varchar(400) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`alumni_id`),
  KEY `alumni_class_id` (`alumni_class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `alumni_class` (
  `alumni_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(50) NOT NULL,
  `class_group` varchar(10) NOT NULL,
  `class_order` int(11) NOT NULL,
  PRIMARY KEY (`alumni_class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `app_token` (
  `app_token_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(100) NOT NULL,
  `user_key` varchar(100) NOT NULL,
  `browser_token` varchar(100) NOT NULL,
  `db_name` varchar(100) NOT NULL,
  `token` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `last_updated` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`app_token_id`),
  KEY `user_key` (`user_key`,`token`),
  KEY `browser_token` (`browser_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments` (
  `assignment_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `assignment_title` varchar(200) NOT NULL,
  `assignment_text` text NOT NULL,
  `assignment_dir` varchar(500) NOT NULL,
  `assignment_date` datetime NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments_answer_file` (
  `assignments_answer_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `file_name` varchar(100) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_answer_file_id`),
  KEY `assignment_id` (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_files` (
  `assignments_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_file_id`),
  KEY `assignment_id` (`assignment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_marked_file` (
  `assignments_marked_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignments_submitted_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_marked_file_id`),
  KEY `assignments_submitted_id` (`assignments_submitted_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `assignments_submitted` (
  `assignments_submitted_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignment_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `typed_assignment` text NOT NULL,
  `uploaded_assignment` varchar(500) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `student_submit_status` varchar(30) NOT NULL,
  `staff_marked_status` varchar(30) NOT NULL,
  `typed_marked` text NOT NULL,
  `student_score` decimal(15,2) DEFAULT NULL,
  `date_marked` datetime NOT NULL,
  PRIMARY KEY (`assignments_submitted_id`),
  KEY `assignment_id` (`assignment_id`),
  KEY `student_id` (`student_id`),
  KEY `staff_id` (`staff_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `assignments_submitted_file` (
  `assignments_submitted_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `assignments_submitted_id` int(11) NOT NULL,
  `file_name` varchar(200) NOT NULL,
  `file_dir` varchar(300) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`assignments_submitted_file_id`),
  KEY `assignments_submitted_id` (`assignments_submitted_id`),
  KEY `date_added` (`date_added`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `attendance_behaviour` (
  `attendance_behaviour_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) NOT NULL,
  `handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`attendance_behaviour_id`),
  KEY `student_id` (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;


INSERT INTO attendance_behaviour VALUES
("1","1","112","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("2","4","114","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("3","3","110","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("4","2","106","122","0","0","0","0","0","0","0","0","0","0","2021/2022","1st Term"),
("5","1","82","112","0","0","0","0","0","0","0","0","0","0","2021/2022","2nd Term"),
("6","4","100","112","0","0","0","0","0","0","0","0","0","0","2021/2022","2nd Term"),
("7","3","102","112","0","0","0","0","0","0","0","0","0","0","2021/2022","2nd Term"),
("8","2","100","112","0","0","0","0","0","0","0","0","0","0","2021/2022","2nd Term");




CREATE TABLE `autologin` (
  `user_key` varchar(100) NOT NULL,
  `token` char(32) NOT NULL,
  `created` timestamp NOT NULL DEFAULT current_timestamp(),
  `browser_token` char(32) NOT NULL,
  `dbname` varchar(300) NOT NULL,
  `data` text DEFAULT NULL,
  `used` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`user_key`,`token`),
  KEY `dbname` (`dbname`(255))
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `backup_class` (
  `backup_class_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(10) unsigned NOT NULL,
  `class_name` varchar(10) NOT NULL,
  `class_order` int(10) unsigned NOT NULL,
  `section` varchar(10) NOT NULL,
  `promotional_average` varchar(5) NOT NULL,
  `new_student_fee` decimal(15,2) unsigned NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_class_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;


INSERT INTO backup_class VALUES
("1","1","JSS 1","1","junior","50","0.00","2021/2022","1st Term"),
("2","2","JSS 2","2","junior","50","0.00","2021/2022","1st Term"),
("3","3","JSS 3","3","junior","50","0.00","2021/2022","1st Term"),
("4","4","SS 1","4","senior","50","0.00","2021/2022","1st Term"),
("5","5","SS 2","5","senior","50","0.00","2021/2022","1st Term"),
("6","6","SS 3","6","senior","50","0.00","2021/2022","1st Term");




CREATE TABLE `backup_new_fees_class` (
  `backup_new_fees_class_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `new_fees_class_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `term` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_new_fees_class_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO backup_new_fees_class VALUES
("1","1","1","0.00","1st Term","2021/2022","1st Term"),
("2","2","1","0.00","2nd Term","2021/2022","1st Term"),
("3","3","1","0.00","3rd Term","2021/2022","1st Term"),
("4","4","2","0.00","1st Term","2021/2022","1st Term"),
("5","5","2","0.00","2nd Term","2021/2022","1st Term"),
("6","6","2","0.00","3rd Term","2021/2022","1st Term"),
("7","7","3","0.00","1st Term","2021/2022","1st Term"),
("8","8","3","0.00","2nd Term","2021/2022","1st Term"),
("9","9","3","0.00","3rd Term","2021/2022","1st Term"),
("10","10","4","0.00","1st Term","2021/2022","1st Term"),
("11","11","4","0.00","2nd Term","2021/2022","1st Term"),
("12","12","4","0.00","3rd Term","2021/2022","1st Term"),
("13","13","5","0.00","1st Term","2021/2022","1st Term"),
("14","14","5","0.00","2nd Term","2021/2022","1st Term"),
("15","15","5","0.00","3rd Term","2021/2022","1st Term"),
("16","16","6","0.00","1st Term","2021/2022","1st Term"),
("17","17","6","0.00","2nd Term","2021/2022","1st Term"),
("18","18","6","0.00","3rd Term","2021/2022","1st Term");




CREATE TABLE `backup_plan` (
  `backup_plan_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `plan_id` int(10) unsigned NOT NULL,
  `plan_name` varchar(100) NOT NULL,
  `amount` decimal(15,2) unsigned NOT NULL,
  `date_added` datetime NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`backup_plan_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `behaviours` (
  `behaviour_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `behaviour_order` int(11) NOT NULL,
  `behaviour_name` varchar(200) NOT NULL,
  PRIMARY KEY (`behaviour_id`),
  KEY `class_id` (`class_id`,`behaviour_order`)
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=latin1;


INSERT INTO behaviours VALUES
("1","1","1","HANDWRITING"),
("2","1","2","NEATNESS"),
("3","1","3","PUNCTUALITY"),
("4","1","4","ATTENTIVENESS"),
("5","1","5","INITIATIVE"),
("6","1","6","RESPECT"),
("7","1","7","OBEDIENCE"),
("8","1","8","ATTITUDE"),
("9","1","9","HONESTY"),
("10","1","10","CREATIVITY"),
("11","2","1","HANDWRITING"),
("12","2","2","NEATNESS"),
("13","2","3","PUNCTUALITY"),
("14","2","4","ATTENTIVENESS"),
("15","2","5","INITIATIVE"),
("16","2","6","RESPECT"),
("17","2","7","OBEDIENCE"),
("18","2","8","ATTITUDE"),
("19","2","9","HONESTY"),
("20","2","10","CREATIVITY"),
("21","3","1","HANDWRITING"),
("22","3","2","NEATNESS"),
("23","3","3","PUNCTUALITY"),
("24","3","4","ATTENTIVENESS"),
("25","3","5","INITIATIVE"),
("26","3","6","RESPECT"),
("27","3","7","OBEDIENCE"),
("28","3","8","ATTITUDE"),
("29","3","9","HONESTY"),
("30","3","10","CREATIVITY"),
("31","4","1","HANDWRITING"),
("32","4","2","NEATNESS"),
("33","4","3","PUNCTUALITY"),
("34","4","4","ATTENTIVENESS"),
("35","4","5","INITIATIVE"),
("36","4","6","RESPECT"),
("37","4","7","OBEDIENCE"),
("38","4","8","ATTITUDE"),
("39","4","9","HONESTY"),
("40","4","10","CREATIVITY"),
("41","5","1","HANDWRITING"),
("42","5","2","NEATNESS"),
("43","5","3","PUNCTUALITY"),
("44","5","4","ATTENTIVENESS"),
("45","5","5","INITIATIVE"),
("46","5","6","RESPECT"),
("47","5","7","OBEDIENCE"),
("48","5","8","ATTITUDE"),
("49","5","9","HONESTY"),
("50","5","10","CREATIVITY"),
("51","6","1","HANDWRITING"),
("52","6","2","NEATNESS"),
("53","6","3","PUNCTUALITY"),
("54","6","4","ATTENTIVENESS"),
("55","6","5","INITIATIVE"),
("56","6","6","RESPECT"),
("57","6","7","OBEDIENCE"),
("58","6","8","ATTITUDE"),
("59","6","9","HONESTY"),
("60","6","10","CREATIVITY");




CREATE TABLE `class` (
  `class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_name` varchar(30) NOT NULL,
  `class_order` int(10) unsigned NOT NULL,
  `section` varchar(10) NOT NULL,
  `promotional_average` varchar(5) NOT NULL,
  `new_student_fee` decimal(15,2) unsigned NOT NULL,
  PRIMARY KEY (`class_id`),
  KEY `order` (`class_order`),
  KEY `section` (`section`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;


INSERT INTO class VALUES
("1","JSS 1","1","junior","50","0.00"),
("2","JSS 2","2","junior","50","0.00"),
("3","JSS 3","3","junior","50","0.00"),
("4","SS 1","4","senior","50","0.00"),
("5","SS 2","5","senior","50","0.00"),
("6","SS 3","6","senior","50","0.00");




CREATE TABLE `class_approval` (
  `class_approval_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `old_class_id` int(11) NOT NULL,
  `new_class_id` int(11) NOT NULL,
  `old_status` char(20) NOT NULL,
  `mode` char(20) NOT NULL,
  `date_sent` datetime NOT NULL,
  PRIMARY KEY (`class_approval_id`),
  KEY `old_status` (`old_status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_category` (
  `class_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_category_name` varchar(80) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_class_category` (
  `class_class_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_category_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`class_class_category_id`),
  KEY `class_id` (`class_id`),
  KEY `class_category_id` (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_storages` (
  `class_storage_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_storage_title` varchar(200) NOT NULL,
  `class_storage_dir` varchar(500) NOT NULL,
  `class_storage_date` datetime NOT NULL,
  PRIMARY KEY (`class_storage_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `class_subclass` (
  `class_subclass_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(10) unsigned NOT NULL,
  `subclass_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`class_subclass_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;


INSERT INTO class_subclass VALUES
("1","1","0"),
("2","2","0"),
("3","3","0"),
("4","4","0"),
("5","5","0"),
("6","6","0");




CREATE TABLE `contact_us` (
  `contact_us_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `role` varchar(200) NOT NULL,
  `phonenumber` varchar(100) NOT NULL,
  `email` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`contact_us_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `current_fees_info` (
  `current_fees_info_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(11) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `current_school_fees` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL,
  `surcharge_amount` decimal(15,2) NOT NULL,
  `surcharge_reason` varchar(500) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `present_owing` decimal(15,2) NOT NULL,
  `class_fee` decimal(15,2) NOT NULL,
  `plan_fee` decimal(15,2) NOT NULL,
  `new_student_fee` decimal(15,2) NOT NULL,
  `room_fee` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`current_fees_info_id`),
  KEY `student_id` (`student_id`),
  KEY `sess_term` (`sessions`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO current_fees_info VALUES
("1","1","1","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("2","2","3","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("3","3","2","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term"),
("4","4","1","0.00","0.00","0.00","0.00","0.00","0.00","","0.00","0.00","0.00","0.00","0.00","0.00","0.00","2021/2022","1st Term");




CREATE TABLE `e_library_cat` (
  `e_library_cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_library_cat_name` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`e_library_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `e_library_file` (
  `e_library_file_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_library_cat_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `title` varchar(300) NOT NULL,
  `google_drive_title` varchar(200) NOT NULL,
  `google_drive_thumbnail_link` varchar(300) NOT NULL,
  `description` varchar(500) NOT NULL,
  `preview_status` varchar(20) NOT NULL DEFAULT 'preview_download',
  `mode` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'active',
  `file_dir` varchar(300) NOT NULL,
  `google_drive_dir` varchar(300) NOT NULL,
  `google_drive_embed_link` varchar(300) NOT NULL,
  `google_drive_filesize` varchar(30) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`e_library_file_id`),
  KEY `e_library_cat_id` (`e_library_cat_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `class_id` (`class_id`),
  KEY `staff_id` (`staff_id`),
  KEY `topic_id` (`topic_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `e_r_cat` (
  `e_r_cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_name` varchar(300) NOT NULL,
  `e_r_scratch_card` varchar(4) NOT NULL DEFAULT 'no',
  PRIMARY KEY (`e_r_cat_id`),
  KEY `e_r_scratch_card` (`e_r_scratch_card`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_class_term` (
  `e_r_class_term_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(10) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`e_r_class_term_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`class_id`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_main` (
  `e_r_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `e_r_cat_name` varchar(100) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `total_student_class` int(11) NOT NULL,
  `total_student_subclass` int(11) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `subcat1_total` float NOT NULL,
  `subcat2_total` float NOT NULL,
  `subcat3_total` float NOT NULL,
  `subcat4_total` float NOT NULL,
  `subcat5_total` float NOT NULL,
  `subcat6_total` float NOT NULL,
  `subcat7_total` float NOT NULL,
  `subcat8_total` float NOT NULL,
  `subcat9_total` float NOT NULL,
  `subcat10_total` float NOT NULL,
  `subcat1_name` varchar(50) NOT NULL,
  `subcat2_name` varchar(50) NOT NULL,
  `subcat3_name` varchar(50) NOT NULL,
  `subcat4_name` varchar(50) NOT NULL,
  `subcat5_name` varchar(50) NOT NULL,
  `subcat6_name` varchar(50) NOT NULL,
  `subcat7_name` varchar(50) NOT NULL,
  `subcat8_name` varchar(50) NOT NULL,
  `subcat9_name` varchar(50) NOT NULL,
  `subcat10_name` varchar(50) NOT NULL,
  `subcat1_short_name` varchar(40) NOT NULL,
  `subcat2_short_name` varchar(40) NOT NULL,
  `subcat3_short_name` varchar(40) NOT NULL,
  `subcat4_short_name` varchar(40) NOT NULL,
  `subcat5_short_name` varchar(40) NOT NULL,
  `subcat6_short_name` varchar(40) NOT NULL,
  `subcat7_short_name` varchar(40) NOT NULL,
  `subcat8_short_name` varchar(40) NOT NULL,
  `subcat9_short_name` varchar(40) NOT NULL,
  `subcat10_short_name` varchar(40) NOT NULL,
  `count_subcat` int(11) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` varchar(200) NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` varchar(300) NOT NULL,
  `principal_signature` varchar(60) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`e_r_main_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_subcat` (
  `e_r_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(10) unsigned NOT NULL,
  `e_r_subcat_name` varchar(300) NOT NULL,
  `e_r_short_form` varchar(100) NOT NULL,
  `total_score` float NOT NULL,
  PRIMARY KEY (`e_r_subcat_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`),
  KEY `e_r_cat_id_2` (`e_r_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `e_r_subject` (
  `e_r_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `e_r_cat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_name` varchar(300) NOT NULL,
  `subclass_name` varchar(300) NOT NULL,
  `subject_name` varchar(300) NOT NULL,
  `subcat1` float DEFAULT NULL,
  `subcat2` float DEFAULT NULL,
  `subcat3` float DEFAULT NULL,
  `subcat4` float DEFAULT NULL,
  `subcat5` float DEFAULT NULL,
  `subcat6` float DEFAULT NULL,
  `subcat7` float DEFAULT NULL,
  `subcat8` float DEFAULT NULL,
  `subcat9` float DEFAULT NULL,
  `subcat10` float DEFAULT NULL,
  `total` float NOT NULL,
  `total_percent` varchar(10) NOT NULL,
  `position_subclass` varchar(30) NOT NULL,
  `grade` varchar(20) NOT NULL,
  `grade_comment` varchar(300) NOT NULL,
  `staff_name` varchar(300) NOT NULL,
  `staff_comment` varchar(300) NOT NULL,
  `status` varchar(20) NOT NULL,
  `generate_result` varchar(20) NOT NULL DEFAULT 'not_generated',
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`e_r_subject_id`),
  KEY `e_r_cat_id` (`e_r_cat_id`,`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `class_id` (`class_id`,`subclass_id`,`subject_id`,`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `end_term_info` (
  `end_term_id` int(11) NOT NULL AUTO_INCREMENT,
  `new_student_number` int(11) NOT NULL,
  `no_of_students` int(11) NOT NULL,
  `no_of_male_students` int(11) NOT NULL,
  `no_of_female_students` int(11) NOT NULL,
  `no_of_grad_students` int(11) NOT NULL,
  `no_of_deact_students` int(11) NOT NULL,
  `no_of_parents` int(11) NOT NULL,
  `no_of_staff` int(11) NOT NULL,
  `no_of_academic_staff` int(11) NOT NULL,
  `no_of_non_academic_staff` int(11) NOT NULL,
  `no_of_accountant` int(11) NOT NULL,
  `no_of_admin` int(11) NOT NULL,
  `owing` int(11) NOT NULL,
  `annual_only_last_subjects` varchar(5) NOT NULL,
  `third_term_in_annual` varchar(3) NOT NULL DEFAULT 'no',
  `allow_finance` varchar(5) NOT NULL,
  `scratch_card` varchar(5) NOT NULL,
  `generate_result` varchar(20) NOT NULL,
  `publish_result` char(30) NOT NULL,
  `next_term_begins` date NOT NULL,
  `publish_result_deadline` date NOT NULL,
  `report_ready` varchar(15) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_entered` datetime NOT NULL DEFAULT current_timestamp(),
  `account_balanced` varchar(12) NOT NULL,
  PRIMARY KEY (`end_term_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `report_ready` (`report_ready`),
  KEY `date_entered` (`date_entered`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1;


INSERT INTO end_term_info VALUES
("18","4","4","2","2","0","0","0","3","3","0","0","0","0","no","no","no","no","generated","published","2022-01-11","2021-12-17","ready","2021/2022","1st Term","2018-04-14 13:39:26","unbalanced"),
("19","0","0","0","0","0","0","0","0","0","0","0","0","0","no","no","no","no","not_generated","not_published","2022-05-10","2022-04-05","not_ready","2021/2022","2nd Term","2022-04-01 16:09:21","unbalanced");




CREATE TABLE `end_term_inventory` (
  `end_term_inventory_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(20) NOT NULL DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_inventory_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `end_term_ledger` (
  `end_term_ledger_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(15) NOT NULL DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_ledger_id`),
  KEY `terms` (`terms`,`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `end_term_school_fees` (
  `end_term_school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `account_balanced` varchar(20) DEFAULT 'unbalanced',
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  PRIMARY KEY (`end_term_school_fees_id`),
  KEY `sessions` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `event` (
  `event_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `event_title` varchar(300) NOT NULL,
  `event_cat` varchar(20) NOT NULL,
  `event_image` varchar(300) NOT NULL,
  `location` varchar(300) NOT NULL,
  `description` text NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`event_id`),
  KEY `date_created` (`date_created`),
  KEY `event_cat` (`event_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_questions` (
  `exam_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_student_questions` (
  `exam_student_question_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_options_id` int(11) NOT NULL,
  PRIMARY KEY (`exam_student_question_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_options_id` (`question_options_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_student_theory` (
  `exam_student_theory_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `question_text` text NOT NULL,
  `corrected_text` text NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_student_theory_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_student_theory_images` (
  `exam_student_theory_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_student_id` int(11) NOT NULL,
  `question_id` int(11) NOT NULL,
  `google_drive_id` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_student_theory_images_id`),
  KEY `exam_student_id` (`exam_student_id`),
  KEY `question_id` (`question_id`),
  KEY `google_drive_id` (`google_drive_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `exam_students` (
  `exam_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `start_date` datetime NOT NULL DEFAULT current_timestamp(),
  `end_date` datetime NOT NULL,
  `score` decimal(15,2) DEFAULT NULL,
  `revised_score` decimal(15,2) DEFAULT NULL,
  `total_score` decimal(15,2) DEFAULT NULL,
  `score_percentage` decimal(15,2) DEFAULT NULL,
  `revised_score_percentage` decimal(15,2) DEFAULT NULL,
  `approval` tinyint(4) NOT NULL,
  `fullscreen_exits` int(11) NOT NULL,
  `exam_ended_cond` varchar(30) NOT NULL,
  PRIMARY KEY (`exam_student_id`),
  KEY `exam_id` (`exam_id`),
  KEY `student_id` (`student_id`),
  KEY `approval` (`approval`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exam_webcams` (
  `exam_webcam_id` int(11) NOT NULL AUTO_INCREMENT,
  `exam_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `google_drive_id` varchar(300) NOT NULL,
  `timestamp` varchar(20) NOT NULL,
  PRIMARY KEY (`exam_webcam_id`),
  KEY `exam_id` (`exam_id`,`student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `exams` (
  `exam_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `topic_id` int(11) NOT NULL,
  `exam_name` varchar(300) NOT NULL,
  `exam_description` text NOT NULL,
  `exam_pass` varchar(300) NOT NULL,
  `exam_pass_hash` varchar(300) NOT NULL,
  `duration` int(11) NOT NULL,
  `start_date` datetime NOT NULL,
  `end_date` datetime NOT NULL,
  `maximum_attempt` tinyint(4) NOT NULL,
  `minimum_percentage` tinyint(4) NOT NULL,
  `view_answers` tinyint(4) NOT NULL,
  `surveillance` tinyint(4) NOT NULL,
  `randomize_question` tinyint(4) NOT NULL,
  `exam_type` varchar(20) NOT NULL,
  `activation` varchar(10) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`exam_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `executives` (
  `executive_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(10) unsigned NOT NULL,
  `user_key` varchar(100) DEFAULT NULL,
  `serial_number` varchar(30) NOT NULL,
  `pass` char(255) NOT NULL,
  `new_password` char(255) NOT NULL,
  `email` varchar(200) NOT NULL,
  `status` varchar(30) NOT NULL,
  `phone_number` varchar(20) NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(10) unsigned NOT NULL,
  PRIMARY KEY (`executive_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO executives VALUES
("1","0","1b86783ae","O/16/0001","$2y$10$/WPShfudvtky2Lvam61YyuCdOUGnP1SL6eY7ovm0doCDrnTPli/AW","","zeonorganisation@gmail.com","","","","0","1505998587"),
("2","0","2df20249c","B/16/0001","$2y$10$n407Q9ygVsOdUWfe52PHNO6SYlzLRcUq2CQdZdfjF4fnDgt25v8W2","Mynameisbackend","zeonglobal@gmail.com","","","","0","1505995243"),
("3","0","392f989c6","U/16/0001","$2y$10$hXRdO2YNOVyphYSz.pPHEuD4Zw9PhdaG6SNGJHJgQb87QUWV22tV.","","","admin","","","0","1505981376"),
("4","0","4a0978df3","A/16/0001","$2y$10$Gg5mWpO2Pt/lM7sClJy90u7orPh02Z9.ST0B5RSMl9ckFg6ls6a8K","","","account","","","0","1506032093");




CREATE TABLE `facility` (
  `facility_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `facility_cat` varchar(100) NOT NULL,
  `facility_name` varchar(300) NOT NULL,
  `facility_date` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`facility_id`),
  KEY `facility_cat` (`facility_cat`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `facility_images` (
  `facility_images_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `facility_id` int(10) unsigned NOT NULL,
  `image_name` varchar(300) NOT NULL,
  `image_dir` varchar(500) NOT NULL,
  PRIMARY KEY (`facility_images_id`),
  KEY `facility_id` (`facility_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `fees_discount` (
  `fees_discount_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(300) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`fees_discount_id`),
  KEY `student_id` (`student_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `form_staff_class_subclass` (
  `form_staff_class_subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  PRIMARY KEY (`form_staff_class_subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO form_staff_class_subclass VALUES
("1","2","1","0"),
("3","2","3","0"),
("4","3","2","0");




CREATE TABLE `grading` (
  `grading_id` int(11) NOT NULL AUTO_INCREMENT,
  `grade_from` int(11) NOT NULL,
  `grade_to` int(11) NOT NULL,
  `grade` char(20) NOT NULL,
  `remark` char(100) NOT NULL,
  `principal_name` char(200) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_comment` text NOT NULL,
  `subject_comment` text NOT NULL,
  `groups` char(20) NOT NULL,
  PRIMARY KEY (`grading_id`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;


INSERT INTO grading VALUES
("1","0","29","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("2","30","34","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("3","35","39","F9","FAIL","","YOU CAN SOAR HIGH LIKE AN EAGLE. PUT MORE EFFORT, IT\'S IN YOU TO SUCCEED.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","lower"),
("4","40","44","E8","VERY POOR","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","lower"),
("5","45","49","D7","POOR","","YOU HAVE THE POTENTIALS TO FLY, RELEASE MORE OF IT, AND YOU WILL FLY WITH MASTERY.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","lower"),
("6","50","54","C6","CREDIT","","IMPRESSIVE EFFORT, YOU ARE MIDDLE WAY TO SUCCESS, WELL DONE! YOU CAN DO MORE.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","lower"),
("7","55","59","C5","CREDIT","","WELL DONE! YOU ARE ABOUT TO FLY, WITH MORE HARD WORK YOU CAN SCALE HIGHER WITH FLYING COLOURS.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","lower"),
("8","60","64","C4","CREDIT","","GREAT EFFORT. YOU DESERVE TO BE CELEBRATED, YOU HAVE SHOWN POTENTIALS FOR SUCCESS. YOU CAN DO BETTER.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","lower"),
("9","65","69","B3","GOOD","","IMPRESSIVE WORK. YOU ARE ON THE PATH TO EXCELLENCE, JUST A LITTLE MORE EFFORT AND YOU ARE ON TOP.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","lower"),
("10","70","74","B2","VERY GOOD","","YOU HAVE UNLOCKED THE SUCCESS KEY, KEEP IT UP. THE SKY IS YOUR STARTING POINT.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","lower"),
("11","75","79","B2","VERY GOOD","","YOU HAVE RANKED  YOURSELF AMONG THE ACADEMIC GLADIATORS, WELL DONE!  KEEP IT UP. THERE ARE MORE GROUNDS TO CONQUER.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","lower"),
("12","80","84","A1","EXCELLENT","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","lower"),
("13","85","89","A1","EXCELLENT","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","lower"),
("14","90","94","A1","EXCELLENT","","YOU HAVE HIT THE MARK OF A CHAMPION, BRILLIANT PERFORMANCE. SOAR TO THE PEAK","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","lower"),
("15","95","100","A1","EXCELLENT","","YOU ARE A GENERAL, YOU HAVE EARNED YOURSELF AN EXCEPTIONAL PLACE. WELL DONE! KEEP ON SOARING","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","lower"),
("16","0","29","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("17","30","34","F9","FAIL","","YOU CAN BE A STAR! YOU HAVE THE POTENTIALS IN YOU. BRING IT OUT SO YOU CAN SHINE NEXT TIME.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("18","35","39","F9","FAIL","","YOU CAN SOAR HIGH LIKE AN EAGLE. PUT MORE EFFORT, IT\'S IN YOU TO SUCCEED.","WE WILL WORK TOWARDS IMPROVING ON THIS NEXT TERM","FAIR, YOU CAN DO BETTER","higher"),
("19","40","44","E8","VERY POOR","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","higher"),
("20","45","49","D7","POOR","","YOU HAVE THE POTENTIALS TO FLY, RELEASE MORE OF IT, AND YOU WILL FLY WITH MASTERY.","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","FAIR, TRY HARDER NEXT TIME","higher"),
("21","50","54","C6","CREDIT","","IMPRESSIVE EFFORT, YOU ARE MIDDLE WAY TO SUCCESS, WELL DONE! YOU CAN DO MORE.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","higher"),
("22","55","59","C5","CREDIT","","WELL DONE! YOU ARE ABOUT TO FLY, WITH MORE HARD WORK YOU CAN SCALE HIGHER WITH FLYING COLOURS.","GOOD RESULT, PUT IN MORE EFFORT","GOOD WORK. WORK HARDER","higher"),
("23","60","64","C4","CREDIT","","GREAT EFFORT. YOU DESERVE TO BE CELEBRATED, YOU HAVE SHOWN POTENTIALS FOR SUCCESS. YOU CAN DO BETTER.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","higher"),
("24","65","69","B3","GOOD","","IMPRESSIVE WORK. YOU ARE ON THE PATH TO EXCELLENCE, JUST A LITTLE MORE EFFORT AND YOU ARE ON TOP.","GOOD RESULT, PUT IN MORE EFFORT","SATISFACTORY. YOU CAN DO BETTER.","higher"),
("25","70","74","B2","VERY GOOD","","YOU HAVE UNLOCKED THE SUCCESS KEY, KEEP IT UP. THE SKY IS YOUR STARTING POINT.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","higher"),
("26","75","79","B2","VERY GOOD","","YOU HAVE RANKED  YOURSELF AMONG THE ACADEMIC GLADIATORS, WELL DONE!  KEEP IT UP. THERE ARE MORE GROUNDS TO CONQUER.","VERY GOOD PERFORMANCE","VERY GOOD, WELL DONE","higher"),
("27","80","84","A1","EXCELLENT","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","higher"),
("28","85","89","A1","EXCELLENT","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","EXECELLENT RESULT, KEEP IT UP","EXCELLENT PERFORMANCE, KEEP IT UP","higher"),
("29","90","94","A1","EXCELLENT","","YOU HAVE HIT THE MARK OF A CHAMPION, BRILLIANT PERFORMANCE. SOAR TO THE PEAK","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","higher"),
("30","95","100","A1","EXCELLENT","","YOU ARE A GENERAL, YOU HAVE EARNED YOURSELF AN EXCEPTIONAL PLACE. WELL DONE! KEEP ON SOARING","EXECELLENT RESULT, KEEP IT UP","EXCEPTIONAL WORK. WONDERFULLY DONE.","higher");




CREATE TABLE `hostel_rooms` (
  `room_id` int(11) NOT NULL AUTO_INCREMENT,
  `hostel_id` int(11) NOT NULL,
  `room_name` varchar(400) NOT NULL,
  `bedspace_prefix` varchar(400) NOT NULL,
  `room_fee` int(11) NOT NULL,
  `room_space` int(11) NOT NULL,
  `available` int(11) NOT NULL,
  PRIMARY KEY (`room_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `hostels` (
  `hostel_id` int(11) NOT NULL AUTO_INCREMENT,
  `hostel_name` varchar(400) NOT NULL,
  `hostel_gender` varchar(20) NOT NULL,
  PRIMARY KEY (`hostel_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `html5_games` (
  `html5_games_id` int(11) NOT NULL AUTO_INCREMENT,
  `html5_games_category_id` int(11) NOT NULL,
  `game_name` varchar(50) NOT NULL,
  `game_image` varchar(150) NOT NULL,
  `game_link` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`html5_games_id`),
  KEY `html5_games_category_id` (`html5_games_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;


INSERT INTO html5_games VALUES
("1","1","Trivia Quiz","/app/private/images/games/1.jpg","https://html5.gamedistribution.com/66c37511b2d14fe4a2b5ce334c986cae/","2020-04-19 00:56:55"),
("2","1","Quiz Story Animal","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/quiz-story-animal/big_icon.jpg","https://games.softgames.com/games/quiz-story-animal/gamesites/6326/locale/en","2020-04-19 00:56:55"),
("3","1","Words with Owl","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/words-with-owl/big_icon.jpg","https://games.softgames.com/games/words-with-owl/gamesites/6326/locale/en","2020-04-19 00:56:55"),
("4","2","Waffle Game","https://www.h5games.com/imgs/img.GameDistribution.com/c501bf4c7c124cad960a0bfcedf74e49.jpg","https://html5.gamedistribution.com/c501bf4c7c124cad960a0bfcedf74e49/","2020-04-19 00:56:55"),
("5","2","Word Finder","https://www.h5games.com/imgs/img.GameDistribution.com/06f2049a0e14444eace08ead61b295aa.jpg","https://html5.gamedistribution.com/06f2049a0e14444eace08ead61b295aa/","2020-04-19 00:56:55"),
("6","3","Matt Vs Math","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/matt-vs-math/big_icon.jpg","https://games.softgames.com/games/matt-vs-math/gamesites/6326/locale/en","2020-04-19 01:02:09"),
("7","2","Tetra","https://www.h5games.com/imgs/d1bjj4kazoovdg.cloudfront.net/assets/games/2020-tetra/big_icon.jpg","https://games.softgames.com/games/2020-tetra/gamesites/6326/locale/en","2020-04-19 01:02:09"),
("8","2","4 Images and 1 Word","https://www.h5games.com/imgs/img.GameDistribution.com/2fcdda0631b24da5902b0a837d94f21d.jpg","https://html5.gamedistribution.com/2fcdda0631b24da5902b0a837d94f21d/","2020-04-19 01:02:09"),
("9","3","Number Search","https://cdn.htmlgames.com/NumberSearch/img/icon/icon-196x196.png","https://cdn.htmlgames.com/NumberSearch/index.html","2020-04-19 01:06:56"),
("10","3","Numbers In The City","https://cdn.htmlgames.com/NumbersInTheCity/img/icon/icon-196x196.png","https://cdn.htmlgames.com/NumbersInTheCity/index.html","2020-04-19 01:28:16");




CREATE TABLE `html5_games_category` (
  `html5_games_category_id` int(11) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(50) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`html5_games_category_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO html5_games_category VALUES
("1","WORDS TRIVIA","2020-04-19 00:51:16"),
("2","PUZZLE","2020-04-19 00:51:16"),
("3","MATHS TRIVIA","2020-04-19 00:58:15");




CREATE TABLE `inv_cat` (
  `cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `cat_name` varchar(200) NOT NULL,
  PRIMARY KEY (`cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_payment` (
  `inv_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `subcat_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `transaction_id` int(11) NOT NULL,
  `quantity` int(11) DEFAULT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `inv_payment_delete` tinyint(4) NOT NULL DEFAULT 0,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`inv_payment_id`),
  KEY `subcat_id` (`subcat_id`),
  KEY `student_id` (`student_id`),
  KEY `transaction_id` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `inv_stack_payment` (
  `stack_payment_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sold` int(11) NOT NULL,
  `each_amount` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`stack_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_stock_cat` (
  `stock_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `accountant_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `no_of_stock` int(11) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`stock_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_stock_subcat` (
  `inv_stock_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `stock_id` int(11) NOT NULL,
  `cat_id` int(11) NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `no_of_sub` int(11) NOT NULL,
  PRIMARY KEY (`inv_stock_subcat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_subcat` (
  `subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(11) NOT NULL,
  `sub_cat_name` varchar(200) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  PRIMARY KEY (`subcat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `inv_transaction` (
  `trans_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `cat_id` int(10) unsigned NOT NULL,
  `subcat_id` int(11) NOT NULL,
  `total_no` int(11) NOT NULL,
  `remaining` int(11) NOT NULL,
  `bought` int(11) NOT NULL,
  `total_amount` decimal(15,2) NOT NULL,
  `expected_income` decimal(15,2) NOT NULL,
  `current_income` decimal(15,2) NOT NULL,
  `damaged_items` int(11) NOT NULL,
  `damages` decimal(15,2) NOT NULL,
  `damage_reason` varchar(300) NOT NULL,
  `remove` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`trans_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_category` (
  `ledger_category_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_name` varchar(200) NOT NULL,
  `status` varchar(20) NOT NULL,
  PRIMARY KEY (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_expense` (
  `ledger_expense_id` int(11) NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_spent` decimal(15,2) NOT NULL,
  `f_explain` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`ledger_expense_id`),
  KEY `ledger_category_id` (`ledger_category_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_income` (
  `ledger_income_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(10) unsigned NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_gotten` decimal(15,2) unsigned NOT NULL,
  `f_explain` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`ledger_income_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `ledger_category_id` (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `ledger_info` (
  `ledger_info_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ledger_category_id` int(10) unsigned NOT NULL,
  `income` decimal(15,2) NOT NULL,
  `expense` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`ledger_info_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `ledger_category_id` (`ledger_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `lesson_note_template` (
  `lesson_note_template_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `topic` varchar(500) NOT NULL,
  `date` datetime NOT NULL,
  `ages` varchar(500) NOT NULL,
  `no_of_period` varchar(500) NOT NULL,
  `specific_objectives` varchar(500) NOT NULL,
  `instructional_materials` varchar(500) NOT NULL,
  `resource_materials` varchar(500) NOT NULL,
  `teaching_methods` varchar(500) NOT NULL,
  `previous_knowledge` varchar(500) NOT NULL,
  `teachers_intro` varchar(500) NOT NULL,
  `students_intro` varchar(500) NOT NULL,
  `learning_intro` varchar(500) NOT NULL,
  `teachers_step_one` varchar(500) NOT NULL,
  `students_step_one` varchar(500) NOT NULL,
  `learning_step_one` varchar(500) NOT NULL,
  `teachers_step_two` varchar(500) NOT NULL,
  `students_step_two` varchar(500) NOT NULL,
  `learning_step_two` varchar(500) NOT NULL,
  `teachers_step_three` varchar(500) NOT NULL,
  `students_step_three` varchar(500) NOT NULL,
  `learning_step_three` varchar(500) NOT NULL,
  `teachers_step_four` varchar(500) NOT NULL,
  `students_step_four` varchar(500) NOT NULL,
  `learning_step_four` varchar(500) NOT NULL,
  `teachers_classwork` varchar(500) NOT NULL,
  `students_classwork` varchar(500) NOT NULL,
  `learning_classwork` varchar(500) NOT NULL,
  `teachers_assignment` varchar(500) NOT NULL,
  `students_assignment` varchar(500) NOT NULL,
  `learning_assignment` varchar(500) NOT NULL,
  `teachers_conclusion` varchar(500) NOT NULL,
  `students_conclusion` varchar(500) NOT NULL,
  `learning_conclusion` varchar(500) NOT NULL,
  `summary_note` text NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`lesson_note_template_id`),
  KEY `class_id` (`class_id`,`subclass_id`,`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `new_fees_class` (
  `new_fees_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `term` varchar(20) NOT NULL,
  PRIMARY KEY (`new_fees_class_id`),
  KEY `term` (`term`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO new_fees_class VALUES
("1","1","0.00","1st Term"),
("2","1","0.00","2nd Term"),
("3","1","0.00","3rd Term"),
("4","2","0.00","1st Term"),
("5","2","0.00","2nd Term"),
("6","2","0.00","3rd Term"),
("7","3","0.00","1st Term"),
("8","3","0.00","2nd Term"),
("9","3","0.00","3rd Term"),
("10","4","0.00","1st Term"),
("11","4","0.00","2nd Term"),
("12","4","0.00","3rd Term"),
("13","5","0.00","1st Term"),
("14","5","0.00","2nd Term"),
("15","5","0.00","3rd Term"),
("16","6","0.00","1st Term"),
("17","6","0.00","2nd Term"),
("18","6","0.00","3rd Term");




CREATE TABLE `news` (
  `news_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `news_title` varchar(300) NOT NULL,
  `news_message` text NOT NULL,
  `news_category` varchar(11) NOT NULL,
  `news_image` varchar(500) NOT NULL,
  `news_date` datetime NOT NULL,
  PRIMARY KEY (`news_id`),
  KEY `news_category` (`news_category`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;


INSERT INTO news VALUES
("1","0","0","RESULT FOR 2021/2022 1ST TERM IS READY !!!","<p style=\"text-align: justify;\">All students and parents of No Name should be informed that the result of <strong>2021/2022 1st Term</strong> has been published. Please you are required to complete all fee payment before checking your result.</p>
\n		<p style=\"text-align: justify;\">&nbsp;</p>
\n		<p style=\"text-align: center;\"><strong><span style=\"text-decoration: underline;\">OUTSTANDING STUDENTS</span></strong></p>
\n		<p style=\"text-align: justify;\">From the outcome of the result, these are the best students in their various classes:</p>
\n		<p style=\"text-align: justify;\">&nbsp;</p><p style=\"text-align: justify;\">JSS 1: <strong>EKPERIGIN ZOE-PRAIZE MAYOWA</strong></p>
\n						<p style=\"text-align: justify;\">&nbsp;</p><p style=\"text-align: justify;\">JSS 2: <strong>NWEKE CHIAGOZIEM EPHRAIM</strong></p>
\n						<p style=\"text-align: justify;\">&nbsp;</p><p style=\"text-align: justify;\">JSS 3: <strong>NWEKE CHIOMA EMERALD</strong></p>
\n						<p style=\"text-align: justify;\">&nbsp;</p>
\n		<p style=\"text-align: justify;\">&nbsp;</p>
\n		<p style=\"text-align: justify;\">Signed</p>
\n		<p style=\"text-align: justify;\">Management</p>","secondary","/private/images/default_result.png","2021-12-16 11:25:36");




CREATE TABLE `news_images` (
  `news_images_id` int(11) NOT NULL AUTO_INCREMENT,
  `news_id` int(11) NOT NULL,
  `image_name` varchar(300) NOT NULL,
  `image_dir` varchar(300) NOT NULL,
  PRIMARY KEY (`news_images_id`),
  KEY `news_id` (`news_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify` (
  `notify_id` int(11) NOT NULL AUTO_INCREMENT,
  `notify_collection_id` int(10) unsigned NOT NULL,
  `person_id` int(11) NOT NULL,
  `notify_table_name` varchar(20) NOT NULL,
  `notify_title` varchar(300) NOT NULL,
  `notify_message` text NOT NULL,
  `notify_status` varchar(100) NOT NULL,
  `notify_icon` varchar(100) NOT NULL,
  `notify_color` varchar(20) NOT NULL,
  `notify_date` datetime NOT NULL,
  PRIMARY KEY (`notify_id`),
  KEY `notify_collection_id` (`notify_collection_id`),
  KEY `notify_date` (`notify_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify_attachments` (
  `notify_attachment_id` int(11) NOT NULL AUTO_INCREMENT,
  `notify_collection_id` int(11) NOT NULL,
  `attachment_name` varchar(300) NOT NULL,
  `attachment_dir` varchar(300) NOT NULL,
  PRIMARY KEY (`notify_attachment_id`),
  KEY `notify_collection_id` (`notify_collection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `notify_collection` (
  `notify_collection_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `notify_table_name` varchar(20) NOT NULL,
  `notify_title` varchar(300) NOT NULL,
  `notify_message` text NOT NULL,
  `notify_icon` varchar(100) NOT NULL,
  `notify_color` varchar(20) NOT NULL,
  `notify_date` datetime NOT NULL,
  PRIMARY KEY (`notify_collection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `order_scratch_card` (
  `order_scratch_card_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` varchar(20) NOT NULL,
  `number_bought` int(10) unsigned NOT NULL,
  `amount` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `payment_mode` varchar(5) NOT NULL,
  `date_bought` datetime NOT NULL,
  PRIMARY KEY (`order_scratch_card_id`),
  UNIQUE KEY `transaction_id` (`transaction_id`),
  KEY `mode` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `other_fees_cat` (
  `other_fees_cat_id` int(11) NOT NULL AUTO_INCREMENT,
  `other_fees_cat_name` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_cat_id`),
  KEY `other_fees_cat_name` (`other_fees_cat_name`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `other_fees_subcat` (
  `other_fees_subcat_id` int(11) NOT NULL AUTO_INCREMENT,
  `other_fees_cat_id` int(11) NOT NULL,
  `other_fees_subcat_name` varchar(200) NOT NULL,
  `other_fees_subcat_amount` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_subcat_id`),
  KEY `other_fees_cat_id` (`other_fees_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `other_fees_subcat_payment` (
  `other_fees_subcat_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `transaction_id` varchar(20) NOT NULL,
  `other_fees_subcat_id` int(11) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `other_fees_delete` tinyint(4) NOT NULL DEFAULT 0,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`other_fees_subcat_payment_id`),
  KEY `student_id` (`student_id`),
  KEY `other_fees_subcat_id` (`other_fees_subcat_id`),
  KEY `sessions` (`sessions`,`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `other_fees_delete` (`other_fees_delete`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `parent_student_school` (
  `parent_student_school_id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  PRIMARY KEY (`parent_student_school_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `parents` (
  `parent_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_key` varchar(100) DEFAULT NULL,
  `school_id` int(11) NOT NULL,
  `parent_name` varchar(200) NOT NULL,
  `serial_number` varchar(100) NOT NULL,
  `pass` char(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(255) NOT NULL,
  `email` varchar(200) NOT NULL,
  `main_phonenumber` bigint(20) NOT NULL,
  `phone_number2` bigint(20) NOT NULL,
  `phone_number3` bigint(20) NOT NULL,
  `occupation` varchar(200) NOT NULL,
  `home_address` text NOT NULL,
  `office_address` text NOT NULL,
  `state_origin` varchar(200) NOT NULL,
  `religion` varchar(200) NOT NULL,
  `local_govt` varchar(200) NOT NULL,
  `country` varchar(200) NOT NULL,
  `sent_serial_pass_sms` char(3) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `activation` varchar(50) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`parent_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `sent_serial_pass_sms` (`sent_serial_pass_sms`),
  KEY `religion` (`religion`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `plans` (
  `plan_id` int(11) NOT NULL AUTO_INCREMENT,
  `plan_name` varchar(100) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `print_slip_dates` (
  `print_slip_dates_id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(30) NOT NULL,
  `date_printed` date NOT NULL,
  PRIMARY KEY (`print_slip_dates_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `push_subscriptions` (
  `push_subscriptions_id` int(11) NOT NULL AUTO_INCREMENT,
  `endpoint` varchar(500) NOT NULL,
  `p256dh` varchar(500) NOT NULL,
  `auth` varchar(500) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  `user_id` int(11) NOT NULL,
  `school_id` int(11) NOT NULL,
  `table_name` varchar(100) NOT NULL,
  `user_key` varchar(100) NOT NULL,
  `browser_token` char(32) NOT NULL,
  PRIMARY KEY (`push_subscriptions_id`),
  KEY `user_id` (`user_id`),
  KEY `school_id` (`school_id`),
  KEY `table_name` (`table_name`),
  KEY `user_key` (`user_key`),
  KEY `browser_token` (`browser_token`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `question_bank` (
  `question_bank_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_title` varchar(30) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `question_bank_type` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_bank_id`),
  KEY `class_id` (`class_id`),
  KEY `subject_id` (`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `question_lead` (
  `question_lead_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_id` int(11) NOT NULL,
  `question_lead_title` varchar(300) NOT NULL,
  `question_lead_description` text NOT NULL,
  `question_lead_dir` varchar(500) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `question_lead_embed_dir` varchar(300) NOT NULL,
  `question_lead_thumb_dir` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_lead_id`),
  KEY `question_bank_id` (`question_bank_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `question_options` (
  `question_options_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `option_text` varchar(500) NOT NULL,
  `option_dir` varchar(300) NOT NULL,
  `option_embed_dir` varchar(300) NOT NULL,
  `option_thumb_dir` varchar(200) NOT NULL,
  `answer` tinyint(4) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_options_id`),
  KEY `question_id` (`question_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `questions` (
  `question_id` int(11) NOT NULL AUTO_INCREMENT,
  `question_bank_id` int(11) NOT NULL,
  `question_lead_id` int(11) NOT NULL,
  `google_drive_id` varchar(200) NOT NULL,
  `correct_answer` int(11) NOT NULL,
  `incorrect_answer` int(11) NOT NULL,
  `question_type` varchar(30) NOT NULL,
  `question_text` text NOT NULL,
  `question_dir` varchar(500) NOT NULL,
  `question_embed_dir` varchar(200) NOT NULL,
  `question_thumb_dir` varchar(200) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`question_id`),
  KEY `question_bank_id` (`question_bank_id`),
  KEY `question_lead_id` (`question_lead_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `received_students` (
  `received_students_id` int(11) NOT NULL AUTO_INCREMENT,
  `old_student_id` int(11) NOT NULL,
  `new_student_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `student_name` varchar(300) NOT NULL,
  `class_id` int(11) NOT NULL,
  `old_class_name` varchar(100) NOT NULL,
  `new_class_name` varchar(100) NOT NULL,
  `old_serial_number` varchar(30) NOT NULL,
  `new_serial_number` varchar(30) NOT NULL,
  `school_id` int(11) NOT NULL,
  `database_name` varchar(300) NOT NULL,
  `status` varchar(20) NOT NULL,
  `date_created` datetime NOT NULL,
  PRIMARY KEY (`received_students_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result` (
  `remark_result_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_name` varchar(300) NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `terms` varchar(20) NOT NULL,
  `activation` varchar(20) NOT NULL DEFAULT 'activated',
  PRIMARY KEY (`remark_result_id`),
  KEY `class_id` (`class_id`),
  KEY `activation` (`activation`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_cat` (
  `remark_result_cat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_name` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`remark_result_cat_id`),
  KEY `remark_result_id` (`remark_result_id`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_column` (
  `remark_result_column_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_column_name` varchar(300) NOT NULL,
  PRIMARY KEY (`remark_result_column_id`),
  KEY `remark_result_id` (`remark_result_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_mark` (
  `remark_result_mark_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `grade_from` int(11) NOT NULL,
  `grade_to` int(11) NOT NULL,
  `remark_result_mark_name` varchar(300) NOT NULL,
  `remark_result_mark_desc` varchar(500) NOT NULL,
  PRIMARY KEY (`remark_result_mark_id`),
  KEY `remark_result_id` (`remark_result_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_student` (
  `remark_result_student_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(10) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `subclass_id` int(10) unsigned NOT NULL,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_id` int(10) unsigned NOT NULL,
  `remark_result_subcat_id` int(10) unsigned NOT NULL,
  `remark_result_column_id` int(10) unsigned NOT NULL,
  `remark_result_mark_id` int(10) unsigned NOT NULL,
  `class_name` varchar(300) NOT NULL,
  `subclass_name` varchar(300) NOT NULL,
  `remark_result_name` varchar(300) NOT NULL,
  `remark_result_cat_name` varchar(300) NOT NULL,
  `remark_result_subcat_name` varchar(300) NOT NULL,
  `remark_result_column_name` varchar(300) NOT NULL,
  `remark_result_mark_name` varchar(300) NOT NULL,
  `remark_result_mark_desc` varchar(500) NOT NULL,
  `score` int(11) DEFAULT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `principal_name` varchar(200) NOT NULL,
  `principal_comment` text NOT NULL,
  `principal_signature` varchar(400) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `status` varchar(20) NOT NULL,
  `publish_result` varchar(20) NOT NULL DEFAULT 'not_published',
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`remark_result_student_id`),
  KEY `student_id` (`student_id`,`class_id`,`subclass_id`,`remark_result_id`,`remark_result_cat_id`,`remark_result_subcat_id`,`remark_result_column_id`,`remark_result_mark_id`),
  KEY `status` (`status`),
  KEY `publish_result` (`publish_result`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `remark_result_subcat` (
  `remark_result_subcat_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `remark_result_id` int(10) unsigned NOT NULL,
  `remark_result_cat_id` int(10) unsigned NOT NULL,
  `remark_result_subcat_name` varchar(300) NOT NULL,
  PRIMARY KEY (`remark_result_subcat_id`),
  KEY `remark_result_id` (`remark_result_id`,`remark_result_cat_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `result_class` (
  `result_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_name` varchar(30) NOT NULL,
  `generate_result` varchar(30) NOT NULL,
  `skip_result` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_class_id`),
  KEY `class_id` (`class_id`,`generate_result`,`sessions`,`terms`),
  KEY `skip_result` (`skip_result`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO result_class VALUES
("1","1","JSS1","generated","not_skipped","2021/2022","1st Term"),
("2","2","JSS2","generated","not_skipped","2021/2022","1st Term"),
("3","3","JSS3","generated","not_skipped","2021/2022","1st Term"),
("4","4","SSS1","generated","not_skipped","2021/2022","1st Term"),
("5","5","SSS2","generated","not_skipped","2021/2022","1st Term"),
("6","6","SSS3","generated","not_skipped","2021/2022","1st Term"),
("7","1","JSS 1","generated","not_skipped","2021/2022","1st Term"),
("8","2","JSS 2","generated","not_skipped","2021/2022","1st Term"),
("9","3","JSS 3","generated","not_skipped","2021/2022","1st Term"),
("10","4","SS 1","generated","not_skipped","2021/2022","1st Term"),
("11","5","SS 2","generated","not_skipped","2021/2022","1st Term"),
("12","6","SS 3","generated","not_skipped","2021/2022","1st Term"),
("13","1","JSS 1","generated","not_skipped","2021/2022","2nd Term"),
("14","2","JSS 2","generated","not_skipped","2021/2022","2nd Term"),
("15","3","JSS 3","generated","not_skipped","2021/2022","2nd Term"),
("16","4","SS 1","not_generated","not_skipped","2021/2022","2nd Term"),
("17","5","SS 2","not_generated","not_skipped","2021/2022","2nd Term"),
("18","6","SS 3","not_generated","not_skipped","2021/2022","2nd Term");




CREATE TABLE `result_class_score` (
  `result_class_score_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `class_id` int(11) unsigned NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca7_total_score` float NOT NULL,
  `ca8_total_score` float NOT NULL,
  `ca9_total_score` float NOT NULL,
  `ca10_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `total_score` float NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `ca_name_7` varchar(50) NOT NULL,
  `ca_name_8` varchar(50) NOT NULL,
  `ca_name_9` varchar(50) NOT NULL,
  `ca_name_10` varchar(50) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_class_score_id`),
  KEY `class_id` (`class_id`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO result_class_score VALUES
("1","1","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("2","1","1","40","0","0","0","0","0","0","0","0","0","60","100","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","2nd Term"),
("3","1","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("4","2","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("5","2","1","40","0","0","0","0","0","0","0","0","0","60","100","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","2nd Term"),
("6","2","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("7","3","3","20","10","10","0","0","0","0","0","0","0","60","100","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","1st Term"),
("8","3","1","40","0","0","0","0","0","0","0","0","0","60","100","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","EXAM","2nd Term"),
("9","3","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("10","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("11","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("12","4","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("13","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("14","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("15","5","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term"),
("16","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","1st Term"),
("17","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","2nd Term"),
("18","6","1","40","0","0","0","0","0","0","0","0","0","0","0","CA","CA 2","CA 3","CA 4","CA 5","CA 6","","","","","Exam","3rd Term");




CREATE TABLE `result_class_term` (
  `result_class_term` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_class_term`),
  KEY `class_id` (`class_id`,`terms`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=latin1;


INSERT INTO result_class_term VALUES
("1","1","1st Term"),
("2","1","2nd Term"),
("3","1","3rd Term"),
("4","2","1st Term"),
("5","2","2nd Term"),
("6","2","3rd Term"),
("7","3","1st Term"),
("8","3","2nd Term"),
("9","3","3rd Term"),
("10","4","1st Term"),
("11","4","2nd Term"),
("12","4","3rd Term"),
("13","5","1st Term"),
("14","5","2nd Term"),
("15","5","3rd Term"),
("16","6","1st Term"),
("17","6","2nd Term"),
("18","6","3rd Term");




CREATE TABLE `result_main` (
  `result_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `class_name` char(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subclass_name` char(50) NOT NULL,
  `total` float NOT NULL,
  `cumulative_total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `cumu_total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `cumulative_average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `cumulative_position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `cumulative_position_subclass` varchar(20) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `total_student_class` int(10) unsigned NOT NULL,
  `total_student_subclass` int(10) unsigned NOT NULL,
  `cumulative_total_student_class` int(10) unsigned NOT NULL,
  `cumulative_total_student_subclass` int(10) unsigned NOT NULL,
  `handwriting` int(11) NOT NULL,
  `cumulative_handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `cumulative_neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `cumulative_punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `cumulative_attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `cumulative_initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `cumulative_respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `cumulative_obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `cumulative_attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `cumulative_honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `cumulative_creativity` int(11) NOT NULL,
  `behaviour1_name` varchar(100) NOT NULL,
  `behaviour2_name` varchar(100) NOT NULL,
  `behaviour3_name` varchar(100) NOT NULL,
  `behaviour4_name` varchar(100) NOT NULL,
  `behaviour5_name` varchar(100) NOT NULL,
  `behaviour6_name` varchar(100) NOT NULL,
  `behaviour7_name` varchar(100) NOT NULL,
  `behaviour8_name` varchar(100) NOT NULL,
  `behaviour9_name` varchar(100) NOT NULL,
  `behaviour10_name` varchar(100) NOT NULL,
  `promotion` varchar(50) NOT NULL,
  `promotion_class_id` int(11) NOT NULL,
  `promotion_class_name` varchar(50) NOT NULL,
  `promotion_comment` varchar(500) NOT NULL,
  `promotion_subclass_id` int(11) NOT NULL,
  `promotion_subclass_name` varchar(50) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca7_total_score` float NOT NULL,
  `ca8_total_score` float NOT NULL,
  `ca9_total_score` float NOT NULL,
  `ca10_total_score` float NOT NULL,
  `ca_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `ca_name_7` varchar(50) NOT NULL,
  `ca_name_8` varchar(50) NOT NULL,
  `ca_name_9` varchar(50) NOT NULL,
  `ca_name_10` varchar(50) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `student_affairs_comment` text NOT NULL,
  `cumulative_principal_comment` text NOT NULL,
  `cumulative_form_staff_comment` text NOT NULL,
  `principal_signature` varchar(150) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_main_id`),
  KEY `student_id` (`student_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `promotion` (`promotion`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;


INSERT INTO result_main VALUES
("1","1","1","JSS 1","junior","0","","619.4","0","1500","0","41.29","","2nd","","2nd","","112","122","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","YOU HAVE THE POTENTIALS FOR GREATNESS IN YOU, BRING IT OUT. YOU WILL DO BETTER NEXT TIME.","KHALID MUHAMMED","ALMOST THERE, LETS WORK FOR A BETTER RESULT NEXT TERM","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term"),
("2","4","1","JSS 1","junior","0","","1290","0","1500","0","86","","1st","","1st","","114","122","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","1st Term"),
("3","3","2","JSS 2","junior","0","","1295.9","0","1500","0","86.39","","1st","","1st","","110","122","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","VWANDE JOYCE","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","1","2021/2022","1st Term"),
("4","2","3","JSS 3","junior","0","","1298","0","1600","0","81.13","","1st","","1st","","106","122","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-01-11","20","10","10","0","0","0","0","0","0","0","0","60","3","EXAM","CA","CLASS WORK","HOME FUN","CA 4","CA 5","CA 6","CA","CA","CA","CA","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","3","2021/2022","1st Term"),
("5","2","3","JSS 3","junior","0","","1168.5","0","1400","0","83.46","","1st","","1st","","100","112","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-05-10","40","0","0","0","0","0","0","0","0","0","0","60","1","EXAM","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","","OUTSTANDING PERFORMANCE. YOU ARE IN A CLASS OF GOAL GETTERS. WELL DONE! KEEP THE SPIRIT UP.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","2nd Term"),
("6","3","2","JSS 2","junior","0","","1080","0","1400","0","77.14","","1st","","1st","","102","112","1","1","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-05-10","40","0","0","0","0","0","0","0","0","0","0","60","1","EXAM","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","","YOU HAVE RANKED  YOURSELF AMONG THE ACADEMIC GLADIATORS, WELL DONE!  KEEP IT UP. THERE ARE MORE GROUNDS TO CONQUER.","VWANDE JOYCE","VERY GOOD PERFORMANCE","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","2nd Term"),
("7","1","1","JSS 1","junior","0","","803.5","0","1400","0","57.39","","2nd","","2nd","","82","112","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-05-10","40","0","0","0","0","0","0","0","0","0","0","60","1","EXAM","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","","WELL DONE! YOU ARE ABOUT TO FLY, WITH MORE HARD WORK YOU CAN SCALE HIGHER WITH FLYING COLOURS.","KHALID MUHAMMED","GOOD RESULT, PUT IN MORE EFFORT","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","2nd Term"),
("8","4","1","JSS 1","junior","0","","1246","0","1400","0","89","","1st","","1st","","100","112","2","2","0","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","5","0","HANDWRITING","NEATNESS","PUNCTUALITY","ATTENTIVENESS","INITIATIVE","RESPECT","OBEDIENCE","ATTITUDE","HONESTY","CREATIVITY","","0","","","0","","50","","2022-05-10","40","0","0","0","0","0","0","0","0","0","0","60","1","EXAM","CA","CA 2","CA 3","CA 4","CA 5","CA 6","CA","CA","CA","CA","","VERY IMPRESSIVE WORK, WONDERFULLY DONE! YOU HAVE MADE A DIFFERENCE, YOU ARE NOW A REFERENCE POINT.","KHALID MUHAMMED","EXECELLENT RESULT, KEEP IT UP","","","","images/principal_signatures/887704.png","images/principal_signatures/15bddf.png","0","2021/2022","2nd Term");




CREATE TABLE `result_page` (
  `result_page_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `status` char(10) NOT NULL,
  `students` int(11) NOT NULL,
  `t_attendance` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_page_id`),
  KEY `status` (`status`),
  KEY `class_id` (`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=89 DEFAULT CHARSET=latin1;


INSERT INTO result_page VALUES
("1","1","1","0","JSS 1","","MATHEMATICS","submit","2","0","2021/2022","1st Term"),
("2","1","3","0","JSS 3","","MATHEMATICS","submit","1","0","2021/2022","1st Term"),
("3","5","1","0","JSS 1","","BASIC SCIENCE","submit","2","0","2021/2022","1st Term"),
("4","15","1","0","JSS 1","","BUSINESS STUDIES","submit","2","0","2021/2022","1st Term"),
("5","7","1","0","JSS 1","","SOCIAL STUDIES","submit","2","0","2021/2022","1st Term"),
("6","2","1","0","JSS 1","","CIVIC EDUCATION","submit","2","0","2021/2022","1st Term"),
("7","6","1","0","JSS 1","","COMPUTER SCIENCE","submit","2","0","2021/2022","1st Term"),
("8","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","submit","2","0","2021/2022","1st Term"),
("9","8","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","2","0","2021/2022","1st Term"),
("10","16","1","0","JSS 1","","BASIC TECHNOLOGY","submit","2","0","2021/2022","1st Term"),
("11","10","1","0","JSS 1","","FRENCH","submit","2","0","2021/2022","1st Term"),
("12","12","1","0","JSS 1","","HISTORY","submit","2","0","2021/2022","1st Term"),
("13","14","1","0","JSS 1","","HOME ECONOMICS","submit","2","0","2021/2022","1st Term"),
("14","9","1","0","JSS 1","","TECHNICAL DRAWING","submit","2","0","2021/2022","1st Term"),
("15","13","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","submit","2","0","2021/2022","1st Term"),
("16","11","1","0","JSS 1","","LANGUAGE ARTS","submit","2","0","2021/2022","1st Term"),
("17","11","3","0","JSS 3","","LANGUAGE ARTS","submit","1","0","2021/2022","1st Term"),
("18","4","3","0","JSS 3","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","1st Term"),
("19","5","3","0","JSS 3","","BASIC SCIENCE","submit","1","0","2021/2022","1st Term"),
("20","16","3","0","JSS 3","","BASIC TECHNOLOGY","submit","1","0","2021/2022","1st Term"),
("21","15","3","0","JSS 3","","BUSINESS STUDIES","submit","1","0","2021/2022","1st Term"),
("22","13","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","1st Term"),
("23","14","3","0","JSS 3","","HOME ECONOMICS","submit","1","0","2021/2022","1st Term"),
("24","12","3","0","JSS 3","","HISTORY","submit","1","0","2021/2022","1st Term"),
("25","10","3","0","JSS 3","","FRENCH","submit","1","0","2021/2022","1st Term"),
("26","6","3","0","JSS 3","","COMPUTER SCIENCE","submit","1","0","2021/2022","1st Term"),
("27","3","3","0","JSS 3","","HAUSA LANGUAGE","submit","1","0","2021/2022","1st Term"),
("28","2","3","0","JSS 3","","CIVIC EDUCATION","submit","1","0","2021/2022","1st Term"),
("29","8","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","1st Term"),
("30","9","3","0","JSS 3","","TECHNICAL DRAWING","submit","1","0","2021/2022","1st Term"),
("31","7","3","0","JSS 3","","SOCIAL STUDIES","submit","1","0","2021/2022","1st Term"),
("32","4","2","0","JSS 2","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","1st Term"),
("33","5","2","0","JSS 2","","BASIC SCIENCE","submit","1","0","2021/2022","1st Term"),
("34","16","2","0","JSS 2","","BASIC TECHNOLOGY","submit","1","0","2021/2022","1st Term"),
("35","15","2","0","JSS 2","","BUSINESS STUDIES","submit","1","0","2021/2022","1st Term"),
("36","8","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","1st Term"),
("37","2","2","0","JSS 2","","CIVIC EDUCATION","submit","1","0","2021/2022","1st Term"),
("38","6","2","0","JSS 2","","COMPUTER SCIENCE","submit","1","0","2021/2022","1st Term"),
("39","10","2","0","JSS 2","","FRENCH","submit","1","0","2021/2022","1st Term"),
("40","12","2","0","JSS 2","","HISTORY","submit","1","0","2021/2022","1st Term"),
("41","14","2","0","JSS 2","","HOME ECONOMICS","submit","1","0","2021/2022","1st Term"),
("42","9","2","0","JSS 2","","TECHNICAL DRAWING","submit","1","0","2021/2022","1st Term"),
("43","11","2","0","JSS 2","","LANGUAGE ARTS","submit","1","0","2021/2022","1st Term"),
("44","1","2","0","JSS 2","","MATHEMATICS","submit","1","0","2021/2022","1st Term"),
("45","13","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","1st Term"),
("46","7","2","0","JSS 2","","SOCIAL STUDIES","submit","1","0","2021/2022","1st Term"),
("47","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","submit","2","0","2021/2022","2nd Term"),
("48","14","1","0","JSS 1","","HOME ECONOMICS","submit","2","0","2021/2022","2nd Term"),
("49","5","1","0","JSS 1","","BASIC SCIENCE","submit","2","0","2021/2022","2nd Term"),
("50","16","1","0","JSS 1","","BASIC TECHNOLOGY","submit","2","0","2021/2022","2nd Term"),
("51","15","1","0","JSS 1","","BUSINESS STUDIES","submit","2","0","2021/2022","2nd Term"),
("52","8","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","2","0","2021/2022","2nd Term"),
("53","11","1","0","JSS 1","","LANGUAGE ARTS","submit","2","0","2021/2022","2nd Term"),
("54","1","1","0","JSS 1","","MATHEMATICS","submit","2","0","2021/2022","2nd Term"),
("55","2","1","0","JSS 1","","CIVIC EDUCATION","submit","2","0","2021/2022","2nd Term"),
("56","6","1","0","JSS 1","","COMPUTER SCIENCE","submit","2","0","2021/2022","2nd Term"),
("57","10","1","0","JSS 1","","FRENCH","submit","2","0","2021/2022","2nd Term"),
("58","12","1","0","JSS 1","","HISTORY","submit","2","0","2021/2022","2nd Term"),
("59","13","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","submit","2","0","2021/2022","2nd Term"),
("60","7","1","0","JSS 1","","SOCIAL STUDIES","submit","2","0","2021/2022","2nd Term"),
("61","5","3","0","JSS 3","","BASIC SCIENCE","submit","1","0","2021/2022","2nd Term"),
("62","16","3","0","JSS 3","","BASIC TECHNOLOGY","submit","1","0","2021/2022","2nd Term"),
("63","15","3","0","JSS 3","","BUSINESS STUDIES","submit","1","0","2021/2022","2nd Term"),
("64","8","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","2nd Term"),
("65","2","3","0","JSS 3","","CIVIC EDUCATION","submit","1","0","2021/2022","2nd Term"),
("66","10","3","0","JSS 3","","FRENCH","submit","1","0","2021/2022","2nd Term"),
("67","12","3","0","JSS 3","","HISTORY","submit","1","0","2021/2022","2nd Term"),
("68","14","3","0","JSS 3","","HOME ECONOMICS","submit","1","0","2021/2022","2nd Term"),
("69","11","3","0","JSS 3","","LANGUAGE ARTS","submit","1","0","2021/2022","2nd Term"),
("70","13","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","2nd Term"),
("71","7","3","0","JSS 3","","SOCIAL STUDIES","submit","1","0","2021/2022","2nd Term"),
("72","1","3","0","JSS 3","","MATHEMATICS","submit","1","0","2021/2022","2nd Term"),
("73","6","3","0","JSS 3","","COMPUTER SCIENCE","submit","1","0","2021/2022","2nd Term"),
("74","5","2","0","JSS 2","","BASIC SCIENCE","submit","1","0","2021/2022","2nd Term"),
("75","16","2","0","JSS 2","","BASIC TECHNOLOGY","submit","1","0","2021/2022","2nd Term"),
("76","15","2","0","JSS 2","","BUSINESS STUDIES","submit","1","0","2021/2022","2nd Term"),
("77","8","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","submit","1","0","2021/2022","2nd Term"),
("78","2","2","0","JSS 2","","CIVIC EDUCATION","submit","1","0","2021/2022","2nd Term"),
("79","6","2","0","JSS 2","","COMPUTER SCIENCE","submit","1","0","2021/2022","2nd Term"),
("80","10","2","0","JSS 2","","FRENCH","submit","1","0","2021/2022","2nd Term"),
("81","12","2","0","JSS 2","","HISTORY","submit","1","0","2021/2022","2nd Term"),
("82","14","2","0","JSS 2","","HOME ECONOMICS","submit","1","0","2021/2022","2nd Term"),
("83","11","2","0","JSS 2","","LANGUAGE ARTS","submit","1","0","2021/2022","2nd Term"),
("84","1","2","0","JSS 2","","MATHEMATICS","submit","1","0","2021/2022","2nd Term"),
("85","13","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","submit","1","0","2021/2022","2nd Term"),
("86","7","2","0","JSS 2","","SOCIAL STUDIES","submit","1","0","2021/2022","2nd Term"),
("87","4","3","0","JSS 3","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","2nd Term"),
("88","4","2","0","JSS 2","","AGRICULTURAL SCIENCE","submit","1","0","2021/2022","2nd Term");




CREATE TABLE `result_subject` (
  `result_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `ca1` float DEFAULT NULL,
  `ca2` float DEFAULT NULL,
  `ca3` float DEFAULT NULL,
  `ca4` float DEFAULT NULL,
  `ca5` float DEFAULT NULL,
  `ca6` float DEFAULT NULL,
  `ca7` float DEFAULT NULL,
  `ca8` float DEFAULT NULL,
  `ca9` float DEFAULT NULL,
  `ca10` float DEFAULT NULL,
  `ca` float DEFAULT NULL,
  `exam` float DEFAULT NULL,
  `sum_total` float DEFAULT NULL,
  `total` float NOT NULL,
  `cumulative_score` float NOT NULL,
  `cumulative_score_percent` float DEFAULT NULL,
  `cumulative_position` char(10) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `grade` varchar(5) NOT NULL,
  `grade_comment` varchar(50) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `staff_comment` varchar(60) NOT NULL,
  `attendance` int(11) DEFAULT NULL,
  `percent_attendance` varchar(10) DEFAULT NULL,
  `handwriting` int(11) DEFAULT NULL,
  `neatness` int(11) DEFAULT NULL,
  `punctuality` int(11) DEFAULT NULL,
  `attentiveness` int(11) DEFAULT NULL,
  `initiative` int(11) DEFAULT NULL,
  `respect` int(11) DEFAULT NULL,
  `obedience` int(11) DEFAULT NULL,
  `attitude` int(11) DEFAULT NULL,
  `honesty` int(11) DEFAULT NULL,
  `creativity` int(11) DEFAULT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_subject_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `foreign_keys` (`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=118 DEFAULT CHARSET=latin1;


INSERT INTO result_subject VALUES
("1","1","1","0","JSS 1","","MATHEMATICS","1","10","10","10","","","","","","","","30","4","34","34","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("2","4","1","0","JSS 1","","MATHEMATICS","1","16","10","10","","","","","","","","36","48","84","84","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("3","2","3","0","JSS 3","","MATHEMATICS","1","15","10","10","","","","","","","","35","36","71","71","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("4","1","1","0","JSS 1","","BASIC SCIENCE","5","10","0","0","","","","","","","","10","29","39","39","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("5","4","1","0","JSS 1","","BASIC SCIENCE","5","20","5","5","","","","","","","","30","59","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("6","1","1","0","JSS 1","","BUSINESS STUDIES","15","7","0","0","","","","","","","","7","26","33","33","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("7","4","1","0","JSS 1","","BUSINESS STUDIES","15","14","10","10","","","","","","","","34","52","86","86","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("8","1","1","0","JSS 1","","SOCIAL STUDIES","7","8","0","0","","","","","","","","8","17","25","25","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("9","4","1","0","JSS 1","","SOCIAL STUDIES","7","18","10","10","","","","","","","","38","45","83","83","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("10","1","1","0","JSS 1","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","6","46","46","0","","","2nd","D7","POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("11","4","1","0","JSS 1","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","50","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("12","1","1","0","JSS 1","","COMPUTER SCIENCE","6","8","10","10","","","","","","","","28","38","66","66","0","","","2nd","B3","GOOD","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("13","4","1","0","JSS 1","","COMPUTER SCIENCE","6","14","10","10","","","","","","","","34","58","92","92","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("14","1","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","5","10","10","","","","","","","","25","10","35","35","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("15","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","8","10","10","","","","","","","","28","52","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("16","1","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","0","0","0","","","","","","","","","0","0","0","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("17","4","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","10","10","10","","","","","","","","30","50","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("18","1","1","0","JSS 1","","BASIC TECHNOLOGY","16","7","0","0","","","","","","","","7","27","34","34","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("19","4","1","0","JSS 1","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("20","1","1","0","JSS 1","","FRENCH","10","10","10","10","","","","","","","","30","29.4","59.4","59.4","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("21","4","1","0","JSS 1","","FRENCH","10","10","10","10","","","","","","","","30","60","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("22","1","1","0","JSS 1","","HISTORY","12","10","10","10","","","","","","","","30","15","45","45","0","","","2nd","D7","POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("23","4","1","0","JSS 1","","HISTORY","12","10","10","10","","","","","","","","30","50","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("24","1","1","0","JSS 1","","HOME ECONOMICS","14","10","10","10","","","","","","","","30","26","56","56","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("25","4","1","0","JSS 1","","HOME ECONOMICS","14","10","10","10","","","","","","","","30","57","87","87","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("26","1","1","0","JSS 1","","TECHNICAL DRAWING","9","13","10","10","","","","","","","","33","30","63","63","0","","","2nd","C4","CREDIT","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("27","4","1","0","JSS 1","","TECHNICAL DRAWING","9","7","10","10","","","","","","","","27","49","76","76","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("28","1","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","2","10","10","","","","","","","","22","32","54","54","0","","","2nd","C6","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("29","4","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","7","10","10","","","","","","","","27","57","84","84","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("30","1","1","0","JSS 1","","LANGUAGE ARTS","11","8","8","5","","","","","","","","21","9","30","30","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("31","4","1","0","JSS 1","","LANGUAGE ARTS","11","15","10","10","","","","","","","","35","54","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("32","2","3","0","JSS 3","","LANGUAGE ARTS","11","15","10","10","","","","","","","","35","39","74","74","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("33","2","3","0","JSS 3","","AGRICULTURAL SCIENCE","4","11","10","10","","","","","","","","31","49","80","80","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("34","2","3","0","JSS 3","","BASIC SCIENCE","5","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("35","2","3","0","JSS 3","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("36","2","3","0","JSS 3","","BUSINESS STUDIES","15","14","10","10","","","","","","","","34","55","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("37","2","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","13","20","10","10","","","","","","","","40","58","98","98","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("38","2","3","0","JSS 3","","HOME ECONOMICS","14","20","10","10","","","","","","","","40","49","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("39","2","3","0","JSS 3","","HISTORY","12","20","10","10","","","","","","","","40","29","69","69","0","","","1st","B3","GOOD","KHALID MUHAMMED","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("40","2","3","0","JSS 3","","FRENCH","10","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("41","2","3","0","JSS 3","","COMPUTER SCIENCE","6","11","10","10","","","","","","","","31","56","87","87","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("42","2","3","0","JSS 3","","HAUSA LANGUAGE","3","0","0","0","","","","","","","","","0","0","0","0","","","1st","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("43","2","3","0","JSS 3","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","50","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("44","2","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","20","10","10","","","","","","","","40","45","85","85","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("45","2","3","0","JSS 3","","TECHNICAL DRAWING","9","19","10","10","","","","","","","","39","50","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("46","2","3","0","JSS 3","","SOCIAL STUDIES","7","15","10","8","","","","","","","","33","48","81","81","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("47","3","2","0","JSS 2","","AGRICULTURAL SCIENCE","4","12","10","10","","","","","","","","32","60","92","92","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("48","3","2","0","JSS 2","","BASIC SCIENCE","5","18","10","10","","","","","","","","38","46","84","84","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("49","3","2","0","JSS 2","","BASIC TECHNOLOGY","16","20","10","10","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("50","3","2","0","JSS 2","","BUSINESS STUDIES","15","12","10","6","","","","","","","","28","41","69","69","0","","","1st","B3","GOOD","VWANDE JOYCE","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("51","3","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","20","10","10","","","","","","","","40","37","77","77","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("52","3","2","0","JSS 2","","CIVIC EDUCATION","2","20","10","10","","","","","","","","40","40","80","80","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("53","3","2","0","JSS 2","","COMPUTER SCIENCE","6","20","10","10","","","","","","","","40","57","97","97","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("54","3","2","0","JSS 2","","FRENCH","10","20","10","10","","","","","","","","40","50.4","90.4","90.4","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("55","3","2","0","JSS 2","","HISTORY","12","20","10","10","","","","","","","","40","37","77","77","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("56","3","2","0","JSS 2","","HOME ECONOMICS","14","18","10","10","","","","","","","","38","60","98","98","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("57","3","2","0","JSS 2","","TECHNICAL DRAWING","9","17","10","10","","","","","","","","37","45","82","82","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("58","3","2","0","JSS 2","","LANGUAGE ARTS","11","16","10","10","","","","","","","","36","45.5","81.5","81.5","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("59","3","2","0","JSS 2","","MATHEMATICS","1","12","10","10","","","","","","","","32","47","79","79","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("60","3","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","13","20","10","10","","","","","","","","40","57","97","97","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("61","3","2","0","JSS 2","","SOCIAL STUDIES","7","20","10","7","","","","","","","","37","55","92","92","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","1st Term"),
("62","1","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","27","","","","","","","","","","27","49","76","76","0","","","2nd","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("63","4","1","0","JSS 1","","AGRICULTURAL SCIENCE","4","40","","","","","","","","","","40","53","93","93","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("64","1","1","0","JSS 1","","HOME ECONOMICS","14","28","","","","","","","","","","28","46","74","74","0","","","2nd","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("65","4","1","0","JSS 1","","HOME ECONOMICS","14","40","","","","","","","","","","40","60","100","100","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("66","1","1","0","JSS 1","","BASIC SCIENCE","5","24","","","","","","","","","","24","29","53","53","0","","","2nd","C6","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("67","4","1","0","JSS 1","","BASIC SCIENCE","5","37","","","","","","","","","","37","45","82","82","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("68","1","1","0","JSS 1","","BASIC TECHNOLOGY","16","24","","","","","","","","","","24","27","51","51","0","","","2nd","C6","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("69","4","1","0","JSS 1","","BASIC TECHNOLOGY","16","38","","","","","","","","","","38","53","91","91","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("70","1","1","0","JSS 1","","BUSINESS STUDIES","15","17","","","","","","","","","","17","30","47","47","0","","","2nd","D7","POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("71","4","1","0","JSS 1","","BUSINESS STUDIES","15","38","","","","","","","","","","38","48","86","86","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("72","1","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","33","","","","","","","","","","33","40","73","73","0","","","2nd","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("73","4","1","0","JSS 1","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","39","","","","","","","","","","39","50","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("74","1","1","0","JSS 1","","LANGUAGE ARTS","11","22","","","","","","","","","","22","20","42","42","0","","","2nd","E8","VERY POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("75","4","1","0","JSS 1","","LANGUAGE ARTS","11","35","","","","","","","","","","35","56","91","91","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("76","1","1","0","JSS 1","","MATHEMATICS","1","29","","","","","","","","","","29","27","56","56","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("77","4","1","0","JSS 1","","MATHEMATICS","1","36","","","","","","","","","","36","58","94","94","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("78","1","1","0","JSS 1","","CIVIC EDUCATION","2","19","","","","","","","","","","19","17","36","36","0","","","2nd","F9","FAIL","KHALID MUHAMMED","FAIR, YOU CAN DO BETTER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("79","4","1","0","JSS 1","","CIVIC EDUCATION","2","32","","","","","","","","","","32","40","72","72","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("80","1","1","0","JSS 1","","COMPUTER SCIENCE","6","40","","","","","","","","","","40","43","83","83","0","","","2nd","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("81","4","1","0","JSS 1","","COMPUTER SCIENCE","6","40","","","","","","","","","","40","59","99","99","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("82","1","1","0","JSS 1","","FRENCH","10","37","","","","","","","","","","37","33","70","70","0","","","2nd","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("83","4","1","0","JSS 1","","FRENCH","10","40","","","","","","","","","","40","54","94","94","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("84","1","1","0","JSS 1","","HISTORY","12","19","","","","","","","","","","19","23","42","42","0","","","2nd","E8","VERY POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("85","4","1","0","JSS 1","","HISTORY","12","34","","","","","","","","","","34","36","70","70","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("86","1","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","28","","","","","","","","","","28","30","58","58","0","","","2nd","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("87","4","1","0","JSS 1","","PHYSICAL AND HEALTH EDUCATION","13","37","","","","","","","","","","37","55","92","92","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("88","1","1","0","JSS 1","","SOCIAL STUDIES","7","17","","","","","","","","","","17","25.5","42.5","42.5","0","","","2nd","E8","VERY POOR","KHALID MUHAMMED","FAIR, TRY HARDER NEXT TIME","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("89","4","1","0","JSS 1","","SOCIAL STUDIES","7","38","","","","","","","","","","38","55","93","93","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("90","2","3","0","JSS 3","","BASIC SCIENCE","5","32","","","","","","","","","","32","57","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("91","2","3","0","JSS 3","","BASIC TECHNOLOGY","16","32","","","","","","","","","","32","50","82","82","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("92","2","3","0","JSS 3","","BUSINESS STUDIES","15","37","","","","","","","","","","37","47.5","84.5","84.5","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("93","2","3","0","JSS 3","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","38","","","","","","","","","","38","53","91","91","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("94","2","3","0","JSS 3","","CIVIC EDUCATION","2","35","","","","","","","","","","35","47","82","82","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("95","2","3","0","JSS 3","","FRENCH","10","38","","","","","","","","","","38","51","89","89","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("96","2","3","0","JSS 3","","HISTORY","12","27","","","","","","","","","","27","30","57","57","0","","","1st","C5","CREDIT","KHALID MUHAMMED","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("97","2","3","0","JSS 3","","HOME ECONOMICS","14","40","","","","","","","","","","40","47","87","87","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("98","2","3","0","JSS 3","","LANGUAGE ARTS","11","36","","","","","","","","","","36","49","85","85","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("99","2","3","0","JSS 3","","PHYSICAL AND HEALTH EDUCATION","13","33","","","","","","","","","","33","53","86","86","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("100","2","3","0","JSS 3","","SOCIAL STUDIES","7","40","","","","","","","","","","40","55","95","95","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term");
INSERT INTO result_subject VALUES
("101","2","3","0","JSS 3","","MATHEMATICS","1","35","","","","","","","","","","35","40","75","75","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("102","2","3","0","JSS 3","","COMPUTER SCIENCE","6","40","","","","","","","","","","40","50","90","90","0","","","1st","A1","EXCELLENT","KHALID MUHAMMED","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("103","3","2","0","JSS 2","","BASIC SCIENCE","5","30","","","","","","","","","","30","55","85","85","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("104","3","2","0","JSS 2","","BASIC TECHNOLOGY","16","32","","","","","","","","","","32","50","82","82","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("105","3","2","0","JSS 2","","BUSINESS STUDIES","15","39","","","","","","","","","","39","44.5","83.5","83.5","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("106","3","2","0","JSS 2","","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","8","35.5","","","","","","","","","","35.5","50","85.5","85.5","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("107","3","2","0","JSS 2","","CIVIC EDUCATION","2","35","","","","","","","","","","35","47","82","82","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("108","3","2","0","JSS 2","","COMPUTER SCIENCE","6","35","","","","","","","","","","35","32","67","67","0","","","1st","B3","GOOD","VWANDE JOYCE","SATISFACTORY. YOU CAN DO BETTER.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("109","3","2","0","JSS 2","","FRENCH","10","38","","","","","","","","","","38","51","89","89","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("110","3","2","0","JSS 2","","HISTORY","12","28","","","","","","","","","","28","31","59","59","0","","","1st","C5","CREDIT","VWANDE JOYCE","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("111","3","2","0","JSS 2","","HOME ECONOMICS","14","40","","","","","","","","","","40","48","88","88","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCELLENT PERFORMANCE, KEEP IT UP","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("112","3","2","0","JSS 2","","LANGUAGE ARTS","11","31","","","","","","","","","","31","40","71","71","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("113","3","2","0","JSS 2","","MATHEMATICS","1","27","","","","","","","","","","27","24","51","51","0","","","1st","C6","CREDIT","VWANDE JOYCE","GOOD WORK. WORK HARDER","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("114","3","2","0","JSS 2","","PHYSICAL AND HEALTH EDUCATION","13","35","","","","","","","","","","35","59","94","94","0","","","1st","A1","EXCELLENT","VWANDE JOYCE","EXCEPTIONAL WORK. WONDERFULLY DONE.","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("115","3","2","0","JSS 2","","SOCIAL STUDIES","7","25","","","","","","","","","","25","47","72","72","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("116","2","3","0","JSS 3","","AGRICULTURAL SCIENCE","4","40","","","","","","","","","","40","36","76","76","0","","","1st","B2","VERY GOOD","KHALID MUHAMMED","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term"),
("117","3","2","0","JSS 2","","AGRICULTURAL SCIENCE","4","40","","","","","","","","","","40","31","71","71","0","","","1st","B2","VERY GOOD","VWANDE JOYCE","VERY GOOD, WELL DONE","0","100","5","5","5","5","5","5","5","5","5","5","submit","2021/2022","2nd Term");




CREATE TABLE `result_subject_group_assign` (
  `result_subject_group_assign_id` int(11) NOT NULL AUTO_INCREMENT,
  `result_subject_group_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  PRIMARY KEY (`result_subject_group_assign_id`),
  KEY `result_subject_group_id` (`result_subject_group_id`,`subject_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `result_subject_groups` (
  `result_subject_group_id` int(11) NOT NULL AUTO_INCREMENT,
  `result_subject_group_name` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`result_subject_group_id`),
  UNIQUE KEY `result_subject_group_name` (`result_subject_group_name`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_deduct` (
  `salary_deduct_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(400) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_deduct_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `months` (`months`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_info` (
  `salary_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `current_salary` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `current_debt` decimal(15,2) NOT NULL,
  `deduct` decimal(15,2) NOT NULL,
  `appreciation_amount` decimal(15,2) NOT NULL,
  `appreciation_reason` varchar(500) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_info_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `salary_payment` (
  `salary_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`salary_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_fees` (
  `school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` char(20) NOT NULL,
  `student_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `school_fees_payment_mode_id` int(11) NOT NULL,
  `payment_mode` varchar(300) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `payment_no` varchar(20) NOT NULL,
  `payment_date` date NOT NULL,
  `fees_status` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`school_fees_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `school_fees_payment_mode_id` (`school_fees_payment_mode_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_fees_payment_modes` (
  `school_fees_payment_mode_id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_mode` varchar(300) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`school_fees_payment_mode_id`),
  UNIQUE KEY `payment_mode` (`payment_mode`),
  KEY `date_created` (`date_created`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `school_storages` (
  `school_storage_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_storage_title` varchar(200) NOT NULL,
  `school_storage_dir` varchar(500) NOT NULL,
  `school_storage_date` datetime NOT NULL,
  PRIMARY KEY (`school_storage_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `sent_sms` (
  `sent_sms_id` int(11) NOT NULL AUTO_INCREMENT,
  `unit_spent` varchar(300) NOT NULL,
  `message` text NOT NULL,
  `people` text NOT NULL,
  `date_sent` datetime NOT NULL,
  PRIMARY KEY (`sent_sms_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `session_month` (
  `session_month_id` int(11) NOT NULL AUTO_INCREMENT,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`session_month_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `session_term` (
  `session_term_id` int(11) NOT NULL AUTO_INCREMENT,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`session_term_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;


INSERT INTO session_term VALUES
("4","2021/2022","1st Term"),
("5","2021/2022","2nd Term");




CREATE TABLE `sessions` (
  `sid` varchar(40) NOT NULL,
  `expiry` int(10) unsigned NOT NULL,
  `data` text NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`sid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






CREATE TABLE `settings` (
  `settings_id` int(11) NOT NULL AUTO_INCREMENT,
  `setting_name` varchar(300) NOT NULL,
  `setting_value` varchar(300) NOT NULL,
  PRIMARY KEY (`settings_id`),
  KEY `setting_name` (`setting_name`)
) ENGINE=InnoDB AUTO_INCREMENT=97 DEFAULT CHARSET=latin1;


INSERT INTO settings VALUES
("1","total_sms","100"),
("2","school_name","NO NAME"),
("3","school_login_logo","assets/images/logo.png"),
("4","login_attempt","30"),
("5","holiday_project","yes"),
("6","cumulate_test","yes"),
("7","show_test","yes"),
("8","show_waec","yes"),
("9","show_neco","yes"),
("10","lower_ca_score","30"),
("11","lower_exam_score","70"),
("12","school_phonenumber","2340000000000"),
("13","teacher_subclass","yes"),
("14","country","NIGERIA"),
("15","country_code","234"),
("16","phonenumber_length","10"),
("17","full_phonenumber_length","11"),
("18","main_phonenumber_length","13"),
("19","one_sms_amount","3"),
("20","result_cumulative","yes"),
("21","result_school_fees","no"),
("22","school_address","NO ADDRESS"),
("23","principal_finance","no"),
("24","one_card_amount","1000"),
("25","principal_name","SCHOOL HEAD"),
("26","principal_signature","images/principal_signatures/887704.png"),
("27","third_term_lower","no"),
("28","third_term_higher","no"),
("29","allow_finance","no"),
("30","order_class","no"),
("31","online_school_fees_payment","no"),
("32","sms_sender","NO NAME"),
("33","school_email","school@mail.com"),
("34","school_email_password","DÓ¬øÇÍÕ³J©A#ÏÌÏ"),
("35","school_email_name","School Name"),
("36","scratch_card","no"),
("37","higher_ca_score","30"),
("38","higher_exam_score","70"),
("39","class_approval","no"),
("40","allow_hostel","no"),
("41","result_attendance","no"),
("42","second_principal_signature","images/principal_signatures/15bddf.png"),
("43","lower_no_of_ca","1"),
("44","higher_no_of_ca","1"),
("45","lower_ca1","40"),
("46","lower_ca2","0"),
("47","lower_ca3","0"),
("48","lower_ca4","0"),
("49","lower_ca5","0"),
("50","lower_ca6","0"),
("51","higher_ca1","40"),
("52","higher_ca2","0"),
("53","higher_ca3","0"),
("54","higher_ca4","0"),
("55","higher_ca5","0"),
("56","higher_ca6","0"),
("57","lower_ca_name_1","CA"),
("58","lower_ca_name_2","CA 2"),
("59","lower_ca_name_3","CA 3"),
("60","lower_ca_name_4","CA 4"),
("61","lower_ca_name_5","CA 5"),
("62","lower_ca_name_6","CA 6"),
("63","higher_ca_name_1","CA"),
("64","higher_ca_name_2","CA 2"),
("65","higher_ca_name_3","CA 3"),
("66","higher_ca_name_4","CA 4"),
("67","higher_ca_name_5","CA 5"),
("68","higher_ca_name_6","CA 6"),
("69","lower_exam_name","Exam"),
("70","higher_exam_name","Exam"),
("71","main_school_id","1"),
("72","school_id","1"),
("73","school_storage","yes"),
("74","class_storage","yes"),
("75","class_teacher_comment_setting","yes"),
("76","student_affairs","no"),
("77","admission_number","no"),
("78","admission_format",""),
("79","paystack_subaccount","ACCT_t3w6pmnwzvmv2np"),
("80","currency","&#8358;"),
("81","annual_position_for_last_term","yes"),
("82","annual_only_last_subjects","no"),
("83","parent_finance","yes"),
("84","third_term_in_annual","no"),
("85","admin_class_check_result","yes"),
("86","refresh_token","1//050SH4EtODsccCgYIARAAGAUSNwF-L9Irppe_Bv2rl35Mkj_CsbQEnCFFKltUjnWiPalTUqfLeXyBcZNM05DkpzD5NJ3CFyfFfUM"),
("87","folder_id",""),
("88","google_client_id","150277175744-n19rn2vsuio1lt7ot1cirgvfp3ehjp2l.apps.googleusercontent.com"),
("89","google_client_secret","eTWa1cXmNcG-Ky2h32o7bv4n"),
("90","online_class","no"),
("91","payment_warning","no"),
("92","instalmental_payment","yes"),
("93","classroom_materials","no"),
("94","class_activity_name","CLASS ACTIVITY"),
("95","upload_admission_form","yes"),
("96","admit_student_button","yes");




CREATE TABLE `sms_account` (
  `sms_account_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `transaction_id` varchar(20) NOT NULL,
  `unit_bought` int(10) unsigned NOT NULL,
  `amount` varchar(20) NOT NULL,
  `status` varchar(20) NOT NULL,
  `mode` varchar(20) NOT NULL,
  `date_bought` datetime NOT NULL,
  PRIMARY KEY (`sms_account_id`),
  UNIQUE KEY `transaction_id` (`transaction_id`),
  KEY `mode` (`mode`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `staff` (
  `staff_id` int(11) NOT NULL AUTO_INCREMENT,
  `school_id` int(10) unsigned NOT NULL,
  `user_key` varchar(100) DEFAULT NULL,
  `serial_number` varchar(200) NOT NULL,
  `pass` varchar(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(255) NOT NULL,
  `first_name` varchar(200) NOT NULL,
  `other_name` varchar(200) NOT NULL,
  `last_name` varchar(100) NOT NULL,
  `gender` varchar(10) NOT NULL,
  `status` varchar(50) NOT NULL,
  `groups` varchar(20) NOT NULL,
  `position` varchar(200) NOT NULL,
  `student_affairs` varchar(20) NOT NULL,
  `address` varchar(200) NOT NULL,
  `dob` date NOT NULL,
  `phone_number` bigint(20) unsigned NOT NULL,
  `email` varchar(200) NOT NULL,
  `country` varchar(200) NOT NULL,
  `state_origin` varchar(200) NOT NULL,
  `religion` varchar(50) NOT NULL,
  `disability` varchar(300) NOT NULL,
  `passport` varchar(200) NOT NULL,
  `form` varchar(5) NOT NULL,
  `sent_serial_pass_sms` char(3) NOT NULL,
  `forget_token` varchar(200) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `skip` varchar(5) NOT NULL,
  `activation` varchar(50) NOT NULL,
  `year_of_employment` varchar(15) NOT NULL,
  `term_of_employment` varchar(15) NOT NULL,
  PRIMARY KEY (`staff_id`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `serial_number` (`serial_number`),
  KEY `status` (`status`),
  KEY `religion` (`religion`),
  KEY `sent_serial_pass_sms` (`sent_serial_pass_sms`),
  KEY `skip` (`skip`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO staff VALUES
("1","186","11867a94f59f","T/21/0001","$2y$10$ANlAt.xD054hQD3.WOQeCuBUKL3qMTXu/sFaQdL6NioLxriujWrx2","ffstaff","ffstaff","STAFF","","STAFF","male","academic","both","","","NONE","2021-12-06","2349030303033","","NIGERIA","AKWA IBOM","Christianity","","","","","","0","0","","activated","2021/2022","1st Term"),
("2","186","21868942ec7c","T/21/0002","$2y$10$pNfGmUmNmFTZDOQax0mmUOyUigZtY9hyExae8pl3FD2Y39I8uXRLi","idmuhammed","idmuhammed","MUHAMMED","NASIR","KHALID","male","academic","junior","","","BEHIND MOUNTAIN OF FIRE ZONE 8 LUGBE ABUJA","1995-04-25","2347016288112","Muhammedkhalid019@gmail.com","NIGERIA","NIGER","Islam","","","form","","","0","1649074337","","activated","2021/2022","1st Term"),
("3","186","3186164ab7a0","T/21/0003","$2y$10$BJn3/eoiaBkevGZ2tjPLB.otnH7lXcKtd1BwPjKVhoobV0/8Hb9zC","dejoyce","dejoyce","JOYCE","JAH","VWANDE","female","academic","junior","","","GOSA","1981-08-27","2348188262838","Joycejonyeledo@gmail.com","NIGERIA","PLATEAU","Christianity","","","form","","","0","1649074198","","activated","2021/2022","1st Term");




CREATE TABLE `staff_salary` (
  `staff_salary_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  PRIMARY KEY (`staff_salary_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;


INSERT INTO staff_salary VALUES
("1","1","0.00"),
("2","2","0.00"),
("3","3","0.00");




CREATE TABLE `staff_subject` (
  `staff_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  PRIMARY KEY (`staff_subject_id`),
  KEY `staff_subject_class` (`staff_id`,`subject_id`,`class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO staff_subject VALUES
("1","2","1","1"),
("3","2","1","3"),
("11","2","2","1"),
("41","2","2","3"),
("13","2","4","1"),
("43","2","4","3"),
("14","2","5","1"),
("44","2","5","3"),
("15","2","6","1"),
("45","2","6","3"),
("16","2","7","1"),
("46","2","7","3"),
("17","2","8","1"),
("47","2","8","3"),
("4","2","10","1"),
("34","2","10","3"),
("5","2","11","1"),
("35","2","11","3"),
("6","2","12","1"),
("36","2","12","3"),
("7","2","13","1"),
("37","2","13","3"),
("8","2","14","1"),
("38","2","14","3"),
("9","2","15","1"),
("39","2","15","3"),
("10","2","16","1"),
("40","2","16","3"),
("2","3","1","2"),
("26","3","2","2"),
("28","3","4","2"),
("29","3","5","2"),
("30","3","6","2"),
("31","3","7","2"),
("32","3","8","2"),
("19","3","10","2"),
("20","3","11","2"),
("21","3","12","2"),
("22","3","13","2"),
("23","3","14","2"),
("24","3","15","2"),
("25","3","16","2");




CREATE TABLE `staff_subject_subclass` (
  `staff_subject_subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  PRIMARY KEY (`staff_subject_subclass_id`),
  UNIQUE KEY `staff_subject_subclass` (`staff_id`,`subject_id`,`class_id`,`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO staff_subject_subclass VALUES
("1","2","1","1","0"),
("3","2","1","3","0"),
("11","2","2","1","0"),
("41","2","2","3","0"),
("13","2","4","1","0"),
("43","2","4","3","0"),
("14","2","5","1","0"),
("44","2","5","3","0"),
("15","2","6","1","0"),
("45","2","6","3","0"),
("16","2","7","1","0"),
("46","2","7","3","0"),
("17","2","8","1","0"),
("47","2","8","3","0"),
("4","2","10","1","0"),
("34","2","10","3","0"),
("5","2","11","1","0"),
("35","2","11","3","0"),
("6","2","12","1","0"),
("36","2","12","3","0"),
("7","2","13","1","0"),
("37","2","13","3","0"),
("8","2","14","1","0"),
("38","2","14","3","0"),
("9","2","15","1","0"),
("39","2","15","3","0"),
("10","2","16","1","0"),
("40","2","16","3","0"),
("2","3","1","2","0"),
("26","3","2","2","0"),
("28","3","4","2","0"),
("29","3","5","2","0"),
("30","3","6","2","0"),
("31","3","7","2","0"),
("32","3","8","2","0"),
("19","3","10","2","0"),
("20","3","11","2","0"),
("21","3","12","2","0"),
("22","3","13","2","0"),
("23","3","14","2","0"),
("24","3","15","2","0"),
("25","3","16","2","0");




CREATE TABLE `student_plan` (
  `student_plan_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  PRIMARY KEY (`student_plan_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `student_subject` (
  `student_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  PRIMARY KEY (`student_subject_id`),
  KEY `student_subject_status` (`student_id`,`subject_id`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=latin1;


INSERT INTO student_subject VALUES
("1","1","1","doing"),
("12","1","2","doing"),
("14","1","4","doing"),
("15","1","5","doing"),
("16","1","6","doing"),
("17","1","7","doing"),
("18","1","8","doing"),
("5","1","10","doing"),
("6","1","11","doing"),
("7","1","12","doing"),
("8","1","13","doing"),
("9","1","14","doing"),
("10","1","15","doing"),
("11","1","16","doing"),
("2","2","1","doing"),
("57","2","2","doing"),
("59","2","4","doing"),
("60","2","5","doing"),
("61","2","6","doing"),
("62","2","7","doing"),
("63","2","8","doing"),
("50","2","10","doing"),
("51","2","11","doing"),
("52","2","12","doing"),
("53","2","13","doing"),
("54","2","14","doing"),
("55","2","15","doing"),
("56","2","16","doing"),
("3","3","1","doing"),
("42","3","2","doing"),
("44","3","4","doing"),
("45","3","5","doing"),
("46","3","6","doing"),
("47","3","7","doing"),
("48","3","8","doing"),
("35","3","10","doing"),
("36","3","11","doing"),
("37","3","12","doing"),
("38","3","13","doing"),
("39","3","14","doing"),
("40","3","15","doing"),
("41","3","16","doing"),
("4","4","1","doing"),
("27","4","2","doing"),
("29","4","4","doing"),
("30","4","5","doing"),
("31","4","6","doing"),
("32","4","7","doing"),
("33","4","8","doing"),
("20","4","10","doing"),
("21","4","11","doing"),
("22","4","12","doing"),
("23","4","13","doing"),
("24","4","14","doing"),
("25","4","15","doing"),
("26","4","16","doing");




CREATE TABLE `students` (
  `student_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_key` varchar(100) DEFAULT NULL,
  `school_id` int(10) unsigned NOT NULL,
  `parent_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `hostel_id` int(11) NOT NULL,
  `room_id` int(11) NOT NULL,
  `bedspace` int(11) DEFAULT NULL,
  `first_name` varchar(50) NOT NULL,
  `other_name` varchar(50) NOT NULL,
  `last_name` varchar(50) NOT NULL,
  `serial_number` varchar(50) NOT NULL,
  `pass` char(255) NOT NULL,
  `first_password` varchar(200) NOT NULL,
  `new_password` varchar(200) NOT NULL,
  `email` varchar(200) NOT NULL,
  `dob` date NOT NULL,
  `gender` varchar(10) NOT NULL,
  `religion` varchar(50) NOT NULL,
  `reg_no` varchar(20) NOT NULL,
  `adm_no` varchar(60) NOT NULL,
  `graduation_year` varchar(20) NOT NULL,
  `graduation_term` varchar(10) NOT NULL,
  `deactivation_sess` char(20) NOT NULL,
  `deactivation_term` char(10) NOT NULL,
  `disability` varchar(300) NOT NULL,
  `passport` varchar(200) NOT NULL,
  `relationship` varchar(20) NOT NULL,
  `new_student` varchar(20) NOT NULL,
  `new_student_finance` varchar(20) NOT NULL,
  `forget_token` varchar(50) NOT NULL,
  `login_attempt` int(11) NOT NULL,
  `login_last_time` int(11) unsigned NOT NULL,
  `scratch_card_attempt` int(10) unsigned NOT NULL,
  `scratch_card_last_time` int(10) unsigned NOT NULL,
  `transfer` char(20) NOT NULL,
  `transfer_school_id` int(11) NOT NULL,
  `exempt` char(10) NOT NULL,
  `check_result` varchar(20) NOT NULL DEFAULT 'check_result',
  `activation` varchar(20) NOT NULL,
  `date_created` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`student_id`),
  UNIQUE KEY `serial_number` (`serial_number`),
  UNIQUE KEY `user_key` (`user_key`),
  KEY `activation` (`activation`),
  KEY `parent_id` (`parent_id`),
  KEY `plan_id` (`plan_id`),
  KEY `class_subclass` (`class_id`,`subclass_id`,`activation`),
  KEY `exempt` (`exempt`),
  KEY `check_result` (`check_result`),
  KEY `date_created` (`date_created`),
  KEY `school_id` (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;


INSERT INTO students VALUES
("1","11860a75d372","186","79","1","0","0","0","0","","ADAM","SEKURE","AHMAD","S/21/0001","$2y$10$hNKyZLXNQvxwWnqGrXHdpuL8U0ZtWh8QiQVwq7SfHH2SWzLa1yGv2","zeonglobal","zeonglobal","","2010-11-07","male","Islam","","","","","","","","","PARENT","","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:39:26"),
("2","2186f9291be0","186","80","3","0","0","0","0","","CHIOMA","EMERALD","NWEKE","S/21/0002","$2y$10$.uhYnfz4l5nrI.imeZ/4MuxNIwMt9H4F7dVqMpnaeQ4thplqvxaFy","zeonglobal","zeonglobal","","2009-05-21","female","Christianity","","","","","","","","","PARENT","","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:44:53"),
("3","31862216901c","186","65","2","0","0","0","0","","CHIAGOZIEM","EPHRAIM","NWEKE","S/21/0003","$2y$10$wUhKZ2ymfvNo8hr3ptUjsu4dU0xoumyyIX8K5AFNh5qmo0FqB2o/O","kechiagoziem","kechiagoziem","","2011-02-07","male","Christianity","","","","","","","","","PARENT","","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:46:42"),
("4","418604dce526","186","81","1","0","0","0","0","","ZOE-PRAIZE","MAYOWA","EKPERIGIN","S/21/0004","$2y$10$6txL1vk7qfRqZZhH4cnZFu9yHYxMVPOoP1AuGLNHe/QK/C/EL/cUO","zeonglobal","zeonglobal","","2011-10-28","female","Christianity","","","","","","","","","PARENT","","new_student","","0","0","0","0","","0","","check_result","activated","2021-12-07 14:53:49");




CREATE TABLE `subclass` (
  `subclass_id` int(11) NOT NULL AUTO_INCREMENT,
  `subclass_name` varchar(30) NOT NULL,
  PRIMARY KEY (`subclass_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;






CREATE TABLE `subject_class` (
  `subject_class_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  PRIMARY KEY (`subject_class_id`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=latin1;


INSERT INTO subject_class VALUES
("1","1","1"),
("2","1","2"),
("3","1","3"),
("4","10","1"),
("5","11","1"),
("6","12","1"),
("7","13","1"),
("8","14","1"),
("9","15","1"),
("10","16","1"),
("11","2","1"),
("13","4","1"),
("14","5","1"),
("15","6","1"),
("16","7","1"),
("17","8","1"),
("19","10","2"),
("20","11","2"),
("21","12","2"),
("22","13","2"),
("23","14","2"),
("24","15","2"),
("25","16","2"),
("26","2","2"),
("28","4","2"),
("29","5","2"),
("30","6","2"),
("31","7","2"),
("32","8","2"),
("34","10","3"),
("35","11","3"),
("36","12","3"),
("37","13","3"),
("38","14","3"),
("39","15","3"),
("40","16","3"),
("41","2","3"),
("43","4","3"),
("44","5","3"),
("45","6","3"),
("46","7","3"),
("47","8","3");




CREATE TABLE `subjects` (
  `subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_name` varchar(50) NOT NULL,
  `subject_short` varchar(30) NOT NULL,
  `groups` varchar(100) NOT NULL,
  PRIMARY KEY (`subject_id`),
  KEY `groups` (`groups`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1;


INSERT INTO subjects VALUES
("1","MATHEMATICS","MATHS","junior"),
("2","CIVIC EDUCATION","CUVIC","junior"),
("3","HAUSA LANGUAGE","HAUSA","junior"),
("4","AGRICULTURAL SCIENCE","AGRIC","junior"),
("5","BASIC SCIENCE","B.SC","junior"),
("6","COMPUTER SCIENCE","COMPUTER","junior"),
("7","SOCIAL STUDIES","S/S","junior"),
("8","CHRISTIAN/ISLAMIC RELIGIOUS KNOWLEDGE","CRS/IRS","junior"),
("9","TECHNICAL DRAWING","TD","junior"),
("10","FRENCH","FRENCH","junior"),
("11","LANGUAGE ARTS","LANGUAGE ARTS","junior"),
("12","HISTORY","HISTORY","junior"),
("13","PHYSICAL AND HEALTH EDUCATION","PHE","junior"),
("14","HOME ECONOMICS","HOME ECONS","junior"),
("15","BUSINESS STUDIES","B.S","junior"),
("16","BASIC TECHNOLOGY","BASIC TECH","junior");




CREATE TABLE `test` (
  `test_id` int(11) NOT NULL AUTO_INCREMENT,
  `test_page_id` int(11) NOT NULL,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `student_score` float DEFAULT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` char(20) NOT NULL,
  `terms` char(20) NOT NULL,
  PRIMARY KEY (`test_id`),
  KEY `test_page_id` (`test_page_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `student_score` (`student_score`),
  KEY `status` (`status`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `test_page` (
  `test_page_id` int(11) NOT NULL AUTO_INCREMENT,
  `subject_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `test_title` varchar(100) NOT NULL,
  `total_score` float NOT NULL,
  `students` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` char(20) NOT NULL,
  `terms` char(20) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`test_page_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `topic` (
  `topic_id` int(11) NOT NULL AUTO_INCREMENT,
  `topic_name` varchar(200) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `published` varchar(20) NOT NULL DEFAULT 'not_published',
  `discussion_signal` tinyint(4) NOT NULL,
  `sessions` varchar(15) NOT NULL,
  `terms` varchar(15) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`topic_id`),
  KEY `class_id` (`class_id`),
  KEY `subclass_id` (`subclass_id`),
  KEY `subject_id` (`subject_id`),
  KEY `user_id` (`user_id`),
  KEY `published` (`published`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `topic_discussions` (
  `topic_discussions_id` int(11) NOT NULL AUTO_INCREMENT,
  `topic_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `table_name` varchar(20) NOT NULL,
  `discussion` varchar(300) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`topic_discussions_id`),
  KEY `user_id` (`user_id`),
  KEY `topic_id` (`topic_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;






CREATE TABLE `transfer_current_fees_info` (
  `current_fees_info_id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(11) unsigned NOT NULL,
  `class_id` int(10) unsigned NOT NULL,
  `current_school_fees` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `discount` decimal(15,2) NOT NULL,
  `surcharge_amount` decimal(15,2) NOT NULL,
  `surcharge_reason` varchar(500) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `present_owing` decimal(15,2) NOT NULL,
  `class_fee` decimal(15,2) NOT NULL,
  `plan_fee` decimal(15,2) NOT NULL,
  `new_student_fee` decimal(15,2) NOT NULL,
  `room_fee` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`current_fees_info_id`),
  KEY `student_id` (`student_id`),
  KEY `sess_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_fees_discount` (
  `fees_discount_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `reason` varchar(300) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`fees_discount_id`),
  KEY `student_id` (`student_id`),
  KEY `session_term` (`sessions`,`terms`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_result_main` (
  `result_main_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `class_name` char(50) NOT NULL,
  `section` varchar(10) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `subclass_name` char(50) NOT NULL,
  `total` float NOT NULL,
  `cumulative_total` float NOT NULL,
  `total_obtainable` float NOT NULL,
  `cumu_total_obtainable` float NOT NULL,
  `average` varchar(10) NOT NULL,
  `cumulative_average` varchar(10) NOT NULL,
  `position_class` varchar(20) NOT NULL,
  `cumulative_position_class` varchar(20) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `cumulative_position_subclass` varchar(20) NOT NULL,
  `student_attendance` int(11) DEFAULT NULL,
  `total_attendance` int(11) DEFAULT NULL,
  `total_student_class` int(10) unsigned NOT NULL,
  `total_student_subclass` int(10) unsigned NOT NULL,
  `cumulative_total_student_class` int(10) unsigned NOT NULL,
  `cumulative_total_student_subclass` int(10) unsigned NOT NULL,
  `handwriting` int(11) NOT NULL,
  `cumulative_handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `cumulative_neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `cumulative_punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `cumulative_attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `cumulative_initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `cumulative_respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `cumulative_obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `cumulative_attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `cumulative_honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `cumulative_creativity` int(11) NOT NULL,
  `behaviour1_name` varchar(100) NOT NULL,
  `behaviour2_name` varchar(100) NOT NULL,
  `behaviour3_name` varchar(100) NOT NULL,
  `behaviour4_name` varchar(100) NOT NULL,
  `behaviour5_name` varchar(100) NOT NULL,
  `behaviour6_name` varchar(100) NOT NULL,
  `behaviour7_name` varchar(100) NOT NULL,
  `behaviour8_name` varchar(100) NOT NULL,
  `behaviour9_name` varchar(100) NOT NULL,
  `behaviour10_name` varchar(100) NOT NULL,
  `promotion` varchar(50) NOT NULL,
  `promotion_class_id` int(11) NOT NULL,
  `promotion_class_name` varchar(50) NOT NULL,
  `promotion_comment` varchar(500) NOT NULL,
  `promotion_subclass_id` int(11) NOT NULL,
  `promotion_subclass_name` varchar(50) NOT NULL,
  `pass_ave` varchar(5) NOT NULL,
  `scratch_card_number` varchar(16) NOT NULL,
  `next_term_begins` date NOT NULL,
  `ca1_total_score` float NOT NULL,
  `ca2_total_score` float NOT NULL,
  `ca3_total_score` float NOT NULL,
  `ca4_total_score` float NOT NULL,
  `ca5_total_score` float NOT NULL,
  `ca6_total_score` float NOT NULL,
  `ca_total_score` float NOT NULL,
  `exam_total_score` float NOT NULL,
  `no_of_ca` int(11) NOT NULL,
  `exam_name` varchar(50) NOT NULL,
  `ca_name_1` varchar(50) NOT NULL,
  `ca_name_2` varchar(50) NOT NULL,
  `ca_name_3` varchar(50) NOT NULL,
  `ca_name_4` varchar(50) NOT NULL,
  `ca_name_5` varchar(50) NOT NULL,
  `ca_name_6` varchar(50) NOT NULL,
  `principal_name` varchar(100) NOT NULL,
  `principal_comment` text NOT NULL,
  `form_staff_name` varchar(200) NOT NULL,
  `form_staff_comment` text NOT NULL,
  `student_affairs_comment` text NOT NULL,
  `cumulative_principal_comment` text NOT NULL,
  `cumulative_form_staff_comment` text NOT NULL,
  `principal_signature` varchar(150) NOT NULL,
  `second_principal_signature` varchar(60) NOT NULL,
  `visited` int(11) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  PRIMARY KEY (`result_main_id`),
  KEY `student_id` (`student_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `promotion` (`promotion`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_result_subject` (
  `result_subject_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `class_id` int(11) NOT NULL,
  `subclass_id` int(11) NOT NULL,
  `class_name` varchar(50) NOT NULL,
  `subclass_name` varchar(50) NOT NULL,
  `subject_name` varchar(100) NOT NULL,
  `subject_id` int(11) NOT NULL,
  `ca1` float DEFAULT NULL,
  `ca2` float DEFAULT NULL,
  `ca3` float DEFAULT NULL,
  `ca4` float DEFAULT NULL,
  `ca5` float DEFAULT NULL,
  `ca6` float DEFAULT NULL,
  `ca` float DEFAULT NULL,
  `exam` float DEFAULT NULL,
  `sum_total` float DEFAULT NULL,
  `total` float NOT NULL,
  `cumulative_score` float NOT NULL,
  `cumulative_score_percent` float DEFAULT NULL,
  `cumulative_position` char(10) NOT NULL,
  `position_subclass` varchar(20) NOT NULL,
  `grade` varchar(5) NOT NULL,
  `grade_comment` varchar(50) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `staff_comment` varchar(60) NOT NULL,
  `attendance` int(11) DEFAULT NULL,
  `percent_attendance` varchar(10) DEFAULT NULL,
  `handwriting` int(11) NOT NULL,
  `neatness` int(11) NOT NULL,
  `punctuality` int(11) NOT NULL,
  `attentiveness` int(11) NOT NULL,
  `initiative` int(11) NOT NULL,
  `respect` int(11) NOT NULL,
  `obedience` int(11) NOT NULL,
  `attitude` int(11) NOT NULL,
  `honesty` int(11) NOT NULL,
  `creativity` int(11) NOT NULL,
  `status` varchar(10) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  PRIMARY KEY (`result_subject_id`),
  KEY `sess_term` (`sessions`,`terms`),
  KEY `foreign_keys` (`student_id`,`class_id`,`subclass_id`,`subject_id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_salary_info` (
  `salary_info_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `current_salary` decimal(15,2) NOT NULL,
  `past_debt` decimal(15,2) NOT NULL,
  `amount_to_pay` decimal(15,2) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `wave_over` decimal(15,2) NOT NULL,
  `current_debt` decimal(15,2) NOT NULL,
  `deduct` decimal(15,2) NOT NULL,
  `appreciation_amount` decimal(15,2) NOT NULL,
  `appreciation_reason` varchar(500) NOT NULL,
  `owing` decimal(15,2) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  PRIMARY KEY (`salary_info_id`),
  KEY `staff_id` (`staff_id`),
  KEY `sessions` (`sessions`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_salary_payment` (
  `salary_payment_id` int(11) NOT NULL AUTO_INCREMENT,
  `staff_id` int(11) NOT NULL,
  `accountant_id` int(10) unsigned NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(20) NOT NULL,
  `months` varchar(30) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`salary_payment_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transfer_school_fees` (
  `school_fees_id` int(11) NOT NULL AUTO_INCREMENT,
  `transaction_id` char(20) NOT NULL,
  `student_id` int(11) NOT NULL,
  `staff_id` int(11) NOT NULL,
  `plan_id` int(11) NOT NULL,
  `school_fees_payment_mode_id` int(11) NOT NULL,
  `payment_mode` varchar(300) NOT NULL,
  `staff_name` varchar(200) NOT NULL,
  `amount_paid` decimal(15,2) NOT NULL,
  `payment_no` varchar(20) NOT NULL,
  `fees_status` varchar(20) NOT NULL,
  `sessions` varchar(20) NOT NULL,
  `terms` varchar(10) NOT NULL,
  `date_added` datetime NOT NULL,
  PRIMARY KEY (`school_fees_id`),
  KEY `sessions` (`sessions`),
  KEY `terms` (`terms`),
  KEY `transaction_id` (`transaction_id`),
  KEY `school_fees_payment_mode_id` (`school_fees_payment_mode_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `transferred_students` (
  `transferred_student_id` int(11) NOT NULL AUTO_INCREMENT,
  `student_id` int(11) NOT NULL,
  `parent_id` int(11) NOT NULL,
  `student_name` varchar(300) NOT NULL,
  `class_id` int(11) NOT NULL,
  `old_class_name` varchar(100) NOT NULL,
  `new_class_name` varchar(100) NOT NULL,
  `serial_number` varchar(50) NOT NULL,
  `school_id` int(11) NOT NULL,
  `database_name` varchar(100) NOT NULL,
  `status` varchar(30) NOT NULL,
  `date_transferred` datetime NOT NULL,
  PRIMARY KEY (`transferred_student_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;






CREATE TABLE `zoom` (
  `zoom_id` int(11) NOT NULL AUTO_INCREMENT,
  `class_id` int(11) NOT NULL,
  `class_category_id` int(11) NOT NULL,
  `email` varchar(100) NOT NULL,
  `pass` varchar(50) NOT NULL,
  `api_key` varchar(200) NOT NULL,
  `api_secret` varchar(200) NOT NULL,
  `meeting_id` varchar(20) NOT NULL,
  `meeting_password` varchar(30) NOT NULL,
  `meeting_url_pwd` varchar(400) NOT NULL,
  `host_key` varchar(20) NOT NULL,
  `date_added` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`zoom_id`),
  KEY `class_id` (`class_id`),
  KEY `class_category_id` (`class_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;






