--
-- Host: localhost    Database: onlineapplication
-- ------------------------------------------------------


--
-- Table structure for table `academic_year`
--

CREATE TABLE `academic_year` (
  `academic_id` int NOT NULL AUTO_INCREMENT,
  `academic_name` int NOT NULL,
  `academic_from1` date NOT NULL,
  `academic_to1` date NOT NULL,
  `academic_from2` date NOT NULL,
  `academic_to2` date NOT NULL,
  `academic_from3` date DEFAULT NULL,
  `academic_to3` date DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`academic_id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `academic_year`
--

INSERT INTO `academic_year` VALUES (12,2024,'2024-08-01','2024-12-31','2025-01-01','2025-07-31','2025-06-01','2025-07-31','2023-07-14 17:00:32','2025-02-14 16:48:24'),(13,2025,'2025-08-01','2025-12-31','2026-01-01','2026-07-31','2026-06-01','2026-07-31','2023-07-14 17:01:55','2025-02-14 16:48:39'),(14,2026,'2026-08-01','2026-12-31','2027-01-01','2027-07-31','2027-06-01','2027-07-31','2023-07-14 17:03:19','2025-02-14 16:48:52'),(15,2027,'2027-08-01','2027-12-31','2028-01-01','2028-07-31','2028-06-01','2028-07-31','2023-07-14 17:04:37','2025-02-14 16:49:43'),(16,2028,'2028-08-01','2028-12-31','2029-01-01','2029-07-31','2029-06-01','2029-07-31','2023-07-14 17:05:57','2025-02-14 16:50:00'),(17,2029,'2029-08-01','2029-12-31','2030-01-01','2030-07-31','2030-06-01','2030-07-31','2023-07-14 17:07:01','2025-02-14 16:50:09'),(18,2030,'2030-08-01','2030-12-31','2031-01-01','2031-07-31','2031-06-01','2031-07-31','2023-07-14 17:07:43','2025-02-14 16:50:19');

--
-- Table structure for table `access_log`
--

CREATE TABLE `access_log` (
  `access_log_id` int NOT NULL AUTO_INCREMENT,
  `access_log_pk` int NOT NULL,
  `access_log_ip` varchar(255) NOT NULL,
  `access_log_activity` varchar(255) NOT NULL,
  `access_log_loginas` varchar(255) DEFAULT NULL,
  `access_log_time` datetime NOT NULL,
  PRIMARY KEY (`access_log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=214 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `access_log`
--

INSERT INTO `access_log` VALUES (1,1,'192.168.43.127','Login','','2024-05-29 15:19:21'),(2,1,'192.168.43.127','Logout','','2024-05-29 15:21:30'),(3,1,'192.168.43.127','Login','','2024-05-29 15:37:22'),(4,1,'203.131.209.86','Login','','2024-11-14 17:00:01'),(5,1,'192.168.41.109','Login','','2025-01-10 13:37:53'),(6,1,'192.168.41.242','Login','','2025-03-04 14:52:43'),(7,1,'192.168.41.242','SessionTimeOut','','2025-03-05 09:51:05'),(8,1,'192.168.41.242','Login','','2025-03-05 09:51:10'),(9,1,'192.168.41.242','SessionTimeOut','','2025-03-05 13:21:37'),(10,1,'192.168.41.242','Login','','2025-03-05 13:21:42'),(11,1,'192.168.41.242','SessionTimeOut','','2025-03-06 10:00:50'),(12,1,'192.168.41.242','Login','','2025-03-06 10:01:13'),(13,1,'192.168.41.242','Logout','','2025-03-06 10:01:23'),(14,1,'192.168.41.242','Login','','2025-03-06 10:02:12'),(15,1,'203.131.209.86','SessionTimeOut','','2025-03-06 14:42:08'),(16,1,'203.131.209.86','Login','','2025-03-06 14:44:06'),(17,1,'192.168.41.242','Logout','','2025-03-06 16:34:38'),(18,1,'192.168.41.242','Login','','2025-03-06 16:34:45'),(19,1,'192.168.41.242','SessionTimeOut','','2025-03-07 09:58:42'),(20,1,'192.168.41.242','Login','','2025-03-07 09:59:00'),(21,1,'192.168.41.242','Logout','','2025-03-07 10:18:45'),(22,1,'192.168.41.242','Login','','2025-03-07 10:19:00'),(23,1,'192.168.42.19','Login','','2025-03-10 09:50:40'),(24,1,'192.168.42.19','SessionTimeOut','','2025-03-10 15:07:51'),(25,1,'192.168.42.19','Login','','2025-03-10 15:07:56'),(26,1,'192.168.42.39','Login','','2025-03-11 10:04:33'),(27,1,'192.168.42.39','Logout','','2025-03-11 14:49:33'),(28,1,'192.168.42.39','Login','','2025-03-11 14:52:33'),(29,1,'192.168.42.39','Logout','','2025-03-11 14:52:46'),(30,2,'192.168.42.39','Login','','2025-03-11 16:56:05'),(31,2,'192.168.42.39','Logout','','2025-03-11 16:56:22'),(32,1,'192.168.42.39','Login','','2025-03-11 16:56:27'),(33,1,'192.168.42.39','Logout','','2025-03-11 17:19:02'),(34,1,'192.168.42.39','Login','','2025-03-12 10:18:06'),(35,1,'192.168.42.39','SessionTimeOut','','2025-03-12 13:42:24'),(36,1,'192.168.42.39','Login','','2025-03-12 13:43:01'),(37,1,'192.168.42.39','Logout','','2025-03-12 13:50:54'),(38,1,'192.168.42.39','Login','','2025-03-12 14:41:11'),(39,1,'192.168.42.210','Login','','2025-03-17 10:20:25'),(40,1,'192.168.42.210','Logout','','2025-03-17 11:04:24'),(41,2,'192.168.42.210','Login','','2025-03-17 11:04:30'),(42,2,'192.168.42.210','Logout','','2025-03-17 11:09:38'),(43,1,'192.168.42.210','Login','','2025-03-17 11:09:43'),(44,1,'192.168.42.210','LoginAsGo','1','2025-03-17 11:15:12'),(45,1,'192.168.42.210','LoginAsBack','1','2025-03-17 11:15:15'),(46,1,'192.168.42.210','LoginAsGo','1','2025-03-17 11:15:32'),(47,1,'192.168.42.210','LoginAsBack','1','2025-03-17 11:19:43'),(48,1,'192.168.42.210','Logout','','2025-03-17 11:19:44'),(49,1,'192.168.42.210','Login','','2025-03-17 11:19:48'),(50,1,'192.168.42.210','LoginAsGo','2','2025-03-17 11:20:05'),(51,1,'192.168.42.210','LoginAsBack','2','2025-03-17 11:26:01'),(52,1,'192.168.42.210','Logout','','2025-03-17 11:26:48'),(53,1,'192.168.42.210','Login','','2025-03-17 11:28:04'),(54,1,'192.168.42.210','Logout','','2025-03-17 11:28:44'),(55,2,'192.168.42.210','Login','','2025-03-17 11:50:04'),(56,1,'192.168.2.215','Login','','2025-03-17 12:15:56'),(57,2,'192.168.42.210','SessionTimeOut','','2025-03-17 14:11:09'),(58,2,'192.168.42.210','Login','','2025-03-17 14:11:27'),(59,2,'192.168.42.210','Logout','','2025-03-17 14:30:40'),(60,1,'192.168.42.210','Login','','2025-03-17 14:31:55'),(61,1,'192.168.42.210','LoginAsGo','2','2025-03-17 14:32:21'),(62,1,'192.168.42.210','LoginAsBack','2','2025-03-17 15:45:24'),(63,1,'192.168.42.210','Logout','','2025-03-17 15:45:25'),(64,1,'192.168.42.210','Login','','2025-03-17 15:59:16'),(65,1,'192.168.42.210','Logout','','2025-03-17 15:59:19'),(66,1,'192.168.42.210','Login','','2025-03-17 15:59:26'),(67,1,'192.168.2.215','SessionTimeOut','','2025-03-17 16:35:47'),(68,1,'192.168.2.215','Login','','2025-03-17 16:35:55'),(69,1,'192.168.42.210','SessionTimeOut','','2025-03-19 14:13:59'),(70,1,'192.168.42.210','Login','','2025-03-19 14:19:08'),(71,1,'172.16.5.223','Login','','2025-03-21 14:53:26'),(72,1,'203.131.209.86','SessionTimeOut','','2025-03-24 10:05:56'),(73,1,'192.168.43.9','Login','','2025-03-24 10:28:22'),(74,1,'192.168.43.9','SessionTimeOut','','2025-04-08 15:24:21'),(75,1,'203.131.209.86','Login','','2025-04-24 18:28:18'),(76,1,'192.168.43.192','Login','','2025-04-25 18:40:33'),(77,1,'192.168.43.192','SessionTimeOut','','2025-04-26 16:14:39'),(78,1,'192.168.43.192','Login','','2025-04-30 20:17:29'),(79,1,'192.168.43.192','SessionTimeOut','','2025-05-01 09:20:26'),(80,1,'203.131.209.86','SessionTimeOut','','2025-08-05 15:53:47'),(81,1,'172.16.1.198','Login','','2025-08-07 10:12:50'),(82,1,'172.16.1.198','Logout','','2025-08-07 10:14:01'),(83,1,'49.229.124.175','Login','','2025-08-07 14:30:54'),(84,1,'49.229.124.175','Logout','','2025-08-07 14:31:50'),(85,1,'49.229.126.234','Login','','2025-08-08 09:55:45'),(86,1,'49.229.126.234','SessionTimeOut','','2025-08-08 13:22:02'),(87,1,'49.229.126.234','Login','','2025-08-08 13:22:09'),(88,1,'49.229.126.234','SessionTimeOut','','2025-08-08 13:26:21'),(89,1,'192.168.2.251','Login','','2025-09-24 10:01:25'),(90,1,'192.168.2.251','SessionTimeOut','','2025-09-25 11:08:59'),(91,1,'192.168.2.251','Login','','2025-09-25 16:18:12'),(92,1,'192.168.2.251','Logout','','2025-09-25 16:18:26'),(93,1,'192.168.2.251','Login','','2025-09-25 16:18:35'),(94,1,'192.168.3.180','Login','','2025-09-25 16:21:04'),(95,1,'192.168.3.180','Logout','','2025-09-25 16:25:27'),(96,1,'192.168.3.180','Login','','2025-09-25 16:25:31'),(97,1,'192.168.3.180','SessionTimeOut','','2025-09-26 09:52:57'),(98,1,'192.168.3.180','Login','','2025-09-26 13:28:49'),(99,1,'192.168.3.180','SessionTimeOut','','2025-09-29 11:14:04'),(100,1,'192.168.3.180','Login','','2025-09-29 11:14:08'),(101,1,'192.168.3.180','SessionTimeOut','','2025-09-29 13:24:16'),(102,1,'192.168.3.180','Login','','2025-09-29 13:26:02'),(103,1,'192.168.3.180','SessionTimeOut','','2025-09-30 10:15:54'),(104,1,'192.168.3.180','Login','','2025-09-30 10:16:54'),(105,1,'192.168.2.141','Login','','2025-10-14 10:06:54'),(106,1,'192.168.2.141','SessionTimeOut','','2025-10-14 10:34:18'),(107,1,'192.168.2.141','Login','','2025-10-14 10:34:23'),(108,1,'192.168.2.251','SessionTimeOut','','2025-10-14 14:24:37'),(109,1,'192.168.2.251','Login','','2025-10-14 14:24:43'),(110,1,'192.168.2.141','SessionTimeOut','','2025-10-15 10:11:15'),(111,1,'192.168.2.141','Login','','2025-10-15 10:11:18'),(112,1,'192.168.2.141','SessionTimeOut','','2025-10-16 10:21:13'),(113,1,'192.168.2.141','Login','','2025-10-16 10:21:27'),(114,1,'192.168.2.141','SessionTimeOut','','2025-10-16 13:51:55'),(115,1,'192.168.2.141','Login','','2025-10-17 13:09:57'),(116,1,'192.168.2.251','SessionTimeOut','','2025-10-17 13:43:08'),(117,1,'192.168.2.141','SessionTimeOut','','2025-10-20 15:14:51'),(118,1,'172.16.3.115','Login','','2025-10-24 10:56:55'),(119,1,'49.229.124.223','Login','','2025-10-24 11:31:57'),(120,1,'49.229.125.216','Login','','2025-10-27 10:05:13'),(121,1,'172.16.3.115','SessionTimeOut','','2025-10-27 10:43:12'),(122,1,'172.16.3.115','Login','','2025-10-27 10:51:13'),(123,1,'192.168.2.205','Login','','2025-10-28 10:06:22'),(124,1,'192.168.2.205','Logout','','2025-10-28 10:15:38'),(125,1,'192.168.2.205','Login','','2025-10-28 10:15:42'),(126,1,'192.168.2.87','Login','','2025-10-28 10:41:30'),(127,1,'192.168.2.87','SessionTimeOut','','2025-10-28 13:39:03'),(128,1,'192.168.2.87','Login','','2025-10-28 13:47:50'),(129,1,'192.168.2.205','SessionTimeOut','','2025-10-28 14:44:23'),(130,1,'192.168.2.205','Login','','2025-10-28 14:45:15'),(131,1,'192.168.2.205','SessionTimeOut','','2025-10-28 17:24:52'),(132,1,'192.168.2.87','SessionTimeOut','','2025-10-29 14:45:58'),(133,1,'192.168.2.87','Login','','2025-10-29 15:11:02'),(134,1,'49.229.125.65','Login','','2025-10-30 10:27:54'),(135,1,'49.229.124.200','Login','','2025-10-30 13:41:15'),(136,1,'49.229.124.200','Logout','','2025-10-30 13:46:13'),(137,1,'49.229.124.200','Login','','2025-10-30 13:46:20'),(138,1,'49.229.124.33','Login','','2025-11-03 10:19:55'),(139,1,'49.229.127.241','Login','','2025-11-07 10:06:51'),(140,1,'49.229.125.175','Login','','2025-11-11 14:25:52'),(141,1,'49.229.127.87','Login','','2025-11-12 10:20:56'),(142,1,'49.229.126.209','Login','','2025-11-14 13:21:32'),(143,1,'49.229.126.5','Login','','2025-11-17 14:48:10'),(144,1,'183.88.238.30','Login','','2025-11-19 15:56:00'),(145,1,'49.229.125.80','Login','','2025-11-19 16:56:08'),(146,1,'49.229.126.194','Login','','2025-11-20 10:07:18'),(147,1,'49.229.126.194','SessionTimeOut','','2025-11-20 10:33:54'),(148,1,'49.229.126.194','Login','','2025-11-20 10:34:12'),(149,1,'49.229.126.194','SessionTimeOut','','2025-11-20 11:51:55'),(150,1,'49.229.126.194','Login','','2025-11-20 14:10:25'),(151,1,'49.229.126.4','Login','','2025-11-24 14:23:44'),(152,1,'203.131.209.86','Logout','','2025-11-24 15:02:32'),(153,1,'203.131.209.86','Login','','2025-11-24 15:05:02'),(154,1,'192.168.3.64','Login','','2025-11-25 10:09:53'),(155,1,'192.168.3.64','SessionTimeOut','','2025-11-25 13:33:33'),(156,1,'192.168.3.64','Login','','2025-11-25 13:33:38'),(157,1,'192.168.3.64','Logout','','2025-11-25 15:49:41'),(158,1,'192.168.3.64','Login','','2025-11-25 15:52:52'),(159,1,'182.232.60.193','Login','','2025-11-25 15:56:00'),(160,1,'49.229.127.45','Login','','2025-11-26 10:04:49'),(161,1,'49.229.124.210','Login','','2025-11-27 09:59:48'),(162,1,'203.131.209.86','Logout','','2025-11-27 12:39:32'),(163,1,'203.131.209.86','Login','','2025-11-27 12:40:49'),(164,1,'203.131.209.86','Login','','2025-11-27 13:16:54'),(165,1,'49.229.124.210','SessionTimeOut','','2025-11-27 15:24:13'),(166,1,'49.229.124.210','Login','','2025-11-27 15:24:18'),(167,1,'183.88.238.30','SessionTimeOut','','2025-11-28 10:42:29'),(168,1,'183.88.238.30','Login','','2025-11-28 10:43:55'),(169,1,'183.88.238.30','SessionTimeOut','','2025-11-28 10:53:25'),(170,1,'183.88.238.30','Login','','2025-11-28 11:07:28'),(171,1,'183.88.238.30','SessionTimeOut','','2025-11-28 11:16:19'),(172,1,'49.229.127.184','Login','','2025-11-28 11:33:03'),(173,1,'49.229.126.170','Login','','2025-12-01 09:51:15'),(174,1,'49.229.126.170','SessionTimeOut','','2025-12-01 10:13:24'),(175,1,'49.229.126.170','Login','','2025-12-01 10:13:28'),(176,1,'49.237.205.235','Login','','2025-12-01 10:43:01'),(177,1,'49.237.205.243','Login','','2025-12-01 10:45:15'),(178,1,'49.237.205.250','Login','','2025-12-01 10:47:36'),(179,1,'49.229.124.93','Login','','2025-12-01 14:50:06'),(180,1,'172.16.2.43','Login','','2025-12-01 16:35:14'),(181,1,'49.229.126.70','Login','','2025-12-02 10:06:04'),(182,1,'172.16.1.107','Login','','2025-12-02 10:24:43'),(183,1,'192.168.3.208','Login','','2025-12-02 11:04:56'),(184,1,'49.229.125.77','Login','','2025-12-02 14:16:05'),(185,1,'172.16.2.0','Login','','2025-12-03 09:52:58'),(186,1,'172.16.2.0','SessionTimeOut','','2025-12-03 13:36:56'),(187,1,'172.16.2.0','Login','','2025-12-03 13:37:00'),(188,1,'192.168.3.208','SessionTimeOut','','2025-12-04 10:16:56'),(189,1,'192.168.3.208','Login','','2025-12-04 10:17:07'),(190,1,'49.229.127.9','Login','','2025-12-04 13:18:19'),(191,1,'172.16.1.79','Login','','2025-12-08 10:40:50'),(192,7,'192.168.2.235','Login','','2025-12-08 13:31:12'),(193,7,'192.168.2.235','Logout','','2025-12-08 13:31:52'),(194,7,'192.168.2.235','Login','','2025-12-08 13:33:16'),(195,7,'192.168.2.235','SessionTimeOut','','2025-12-08 14:31:32'),(196,8,'192.168.2.235','Login','','2025-12-08 14:31:58'),(197,8,'192.168.2.235','Logout','','2025-12-08 17:05:29'),(198,10,'192.168.2.235','Login','','2025-12-08 17:06:10'),(199,10,'192.168.2.235','Logout','','2025-12-08 17:07:31'),(200,8,'192.168.2.235','Login','','2025-12-08 17:07:46'),(201,8,'192.168.2.235','SessionTimeOut','','2025-12-09 10:05:11'),(202,1,'192.168.2.235','Login','','2025-12-09 10:05:28'),(203,1,'192.168.2.235','SessionTimeOut','','2025-12-09 10:09:58'),(204,8,'192.168.2.235','Login','','2025-12-09 10:11:31'),(205,8,'192.168.2.235','SessionTimeOut','','2025-12-09 16:20:36'),(206,1,'172.16.4.168','Login','','2025-12-15 13:29:22'),(207,1,'172.16.4.168','SessionTimeOut','','2025-12-15 13:31:31'),(208,8,'172.16.4.168','Login','','2025-12-15 13:33:27'),(209,1,'172.16.1.58','Login','','2025-12-16 10:49:42'),(210,1,'172.16.1.58','Logout','','2025-12-16 10:50:01'),(211,1,'172.16.1.58','Login','','2025-12-16 10:50:09'),(212,1,'172.16.1.58','Logout','','2025-12-16 10:50:49'),(213,8,'172.16.1.58','Login','','2025-12-16 10:51:01');

--
-- Table structure for table `advisors`
--

CREATE TABLE `advisors` (
  `advisor_id` int NOT NULL AUTO_INCREMENT,
  `advisor_userid` int DEFAULT NULL,
  `advisor_title` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `advisor_firstname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `advisor_lastname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `advisor_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `advisor_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `advisor_school` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`advisor_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `advisors`
--

INSERT INTO `advisors` VALUES (2,9,'2','Tide','samadatamajiko','Tide samadatamajiko','samadatamajiko@mail.com','1','2025-12-08 16:27:01','2025-12-08 16:27:01');

--
-- Table structure for table `application_progress`
--

CREATE TABLE `application_progress` (
  `application_progress_id` int NOT NULL AUTO_INCREMENT,
  `student_applications_id` int DEFAULT NULL,
  `step` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `remark` text COLLATE utf8mb4_general_ci,
  `updated_by` int DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`application_progress_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `application_progress`
--


--
-- Table structure for table `backup_log`
--

CREATE TABLE `backup_log` (
  `backup_log_id` int NOT NULL AUTO_INCREMENT,
  `backup_log_date_active` varchar(255) NOT NULL,
  `backup_log_date_inactive` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `backup_log_type` varchar(50) NOT NULL,
  `backup_log_folder` varchar(50) NOT NULL,
  `backup_log_status` varchar(50) NOT NULL,
  PRIMARY KEY (`backup_log_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `backup_log`
--


--
-- Table structure for table `log_activity`
--

CREATE TABLE `log_activity` (
  `ID` int NOT NULL AUTO_INCREMENT,
  `USER_ID` int NOT NULL,
  `TYPE` varchar(50) NOT NULL,
  `KEY_ID` int NOT NULL,
  `MODULE` varchar(50) NOT NULL,
  `SOURCE` text,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=109 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `log_activity`
--


--
-- Table structure for table `migrations`
--

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

--
-- Dumping data for table `migrations`
--


--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_permissions`
--

INSERT INTO `model_has_permissions` VALUES (1,'App\\Models\\User',1);

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` int unsigned NOT NULL,
  `model_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint unsigned NOT NULL,
  PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` VALUES (1,'App\\Models\\User',1),(8,'App\\Models\\User',1),(1,'App\\Models\\User',5),(8,'App\\Models\\User',5),(7,'App\\Models\\User',8),(6,'App\\Models\\User',9),(7,'App\\Models\\User',10);

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` VALUES (1,'Nullper','web','2024-11-06 16:00:30','2024-11-06 16:00:30');

--
-- Table structure for table `program`
--

CREATE TABLE `program` (
  `program_id` int NOT NULL AUTO_INCREMENT,
  `program_code` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `program_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `program_shortname` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `program_status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`program_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `program`
--

INSERT INTO `program` VALUES (1,'0001','Chemical Engineering','ChE','active','2025-12-01 15:06:01','2025-12-01 15:06:01'),(2,'0002','Industrial Engineering','IE','active','2025-12-01 15:08:15','2025-12-01 15:08:15'),(3,'0003','Civil Engineering','CE','active','2025-12-01 15:08:51','2025-12-01 15:08:51');

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` int unsigned NOT NULL,
  `role_id` int unsigned NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`),
  KEY `role_has_permissions_role_id_foreign` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_has_permissions`
--

INSERT INTO `role_has_permissions` VALUES (1,1),(1,20);

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` VALUES (1,'Admin','web','2019-11-27 03:25:57','2019-11-27 03:25:57'),(6,'Advisor','web','2025-11-26 11:45:36','2025-11-26 11:45:36'),(7,'Student','web','2025-12-02 10:18:35','2025-12-02 10:18:35'),(8,'AdminConsult','web','2025-12-08 13:57:53','2025-12-08 13:57:53'),(9,'Committee','web','2025-12-08 13:58:36','2025-12-08 13:58:36'),(10,'Head School','web','2025-12-08 13:58:54','2025-12-08 13:58:54');

--
-- Table structure for table `scholarships`
--

CREATE TABLE `scholarships` (
  `id` int NOT NULL AUTO_INCREMENT,
  `name_th` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `name_en` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `shortname` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `description` text COLLATE utf8mb4_general_ci,
  `create_url` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `sponsor` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `cover_pic` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `academic_year_id` int DEFAULT NULL COMMENT 'ปีการศึกษา ดึงมาจาก academic year',
  `semester` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'เทอม',
  `start_date` date DEFAULT NULL,
  `end_date` date DEFAULT NULL,
  `open_time` time DEFAULT NULL COMMENT 'เวลาเปิดทุน',
  `close_time` time DEFAULT NULL COMMENT 'เวลาปิดทุน',
  `sold_out` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `textcontent` text COLLATE utf8mb4_general_ci,
  `field_status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `scholarships`
--

INSERT INTO `scholarships` VALUES (2,'แมนเชสเตอร์ ยูไนเต็ด','Manchester United','United','The theater of dream',NULL,'Liverpool','uploads/uploads_20251120_163812_691ee1849bb5a.png',14,'1','2025-11-01','2026-12-30','10:21:00','22:21:00','1',NULL,NULL,'2025-11-20 16:38:12','2025-12-09 10:21:53'),(3,'ทุนสำหรับนักศึกษาต่างชาติที่มีผลการเรียนดีเยี่ยม – ปริญญาตรี','Excellent Foreign Students Scholarships for Undergraduate Students (EFS-U)','EFS_U','TESTETSETST',NULL,'SIIT','uploads/scholarships_20251120_161608_691edc5821c9d.jpg',12,'1','2025-11-01','2026-07-30','10:22:00','22:22:00','0',NULL,NULL,'2025-11-20 16:16:08','2025-12-09 10:22:21'),(4,'ทุนสำหรับนักศึกษาที่มีผลการเรียนดีและความประพฤติดี','Scholarships for Students with Good Academic Performance and Good Conduct (GAC)','GAC','TESTESTESTEST',NULL,'SIIT','uploads/scholarships_20251120_161539_691edc3b4dd99.jpg',13,'1','2025-11-02','2025-11-29',NULL,NULL,'1',NULL,NULL,'2025-11-20 16:15:39','2025-11-20 16:15:39'),(5,'กองทุนกู้ยืมเพื่อการศึกษาโดยมูลนิธิเทคโนโลยีสิรินธร','SIIT Loan for Education from Sirindhorn Technology Scholarship Fund','LEF','TESTTESTTTESTTEST',NULL,'SIIT','uploads/scholarships_20251120_161551_691edc471711b.jpg',13,'1','2025-11-01','2025-11-20','10:35:00','22:35:00','0',NULL,NULL,'2025-12-01 10:33:40','2025-12-02 11:28:46'),(9,'KhimKhim','KhimKhim','KhimKhim','KhimKhim','KhimKhim','KhimKhim',NULL,13,'2','2025-11-28','2025-12-05',NULL,NULL,'0',NULL,NULL,'2025-11-28 10:47:18','2025-11-28 10:47:18');

--
-- Table structure for table `school`
--

CREATE TABLE `school` (
  `school_id` int NOT NULL AUTO_INCREMENT,
  `school_name` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `school_shortname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`school_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `school`
--

INSERT INTO `school` VALUES (1,'School of Civil Engineering and Technology','BCET','2025-11-25 16:35:17','2025-12-03 11:07:43'),(2,'School of Information, Computer, and Communication Technology','ICT','2025-12-03 11:08:01','2025-12-03 11:08:01');

--
-- Table structure for table `sendemail`
--

CREATE TABLE `sendemail` (
  `sendemail_id` int NOT NULL AUTO_INCREMENT,
  `sendemail_userid` int NOT NULL,
  `sendemail_email` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `sendemail_type` varchar(255) NOT NULL,
  `sendemail_key` varchar(255) NOT NULL,
  `sendemail_status` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL,
  `sendemail_create` varchar(255) NOT NULL,
  `sendemail_update` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`sendemail_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `sendemail`
--

INSERT INTO `sendemail` VALUES (1,4,'5530209232@g.siit.tu.ac.th','StudentRegister','4///95525653032236052','pending','2025-03-17 16:15:40','2025-03-17 16:15:40');

--
-- Table structure for table `student_applications`
--

CREATE TABLE `student_applications` (
  `student_applications_id` int NOT NULL AUTO_INCREMENT,
  `scholarship_id` int DEFAULT NULL,
  `studentlist_id` int DEFAULT NULL,
  `pdpa_consent` int DEFAULT NULL,
  `full_name_snapshot` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `program_id_snapshot` int DEFAULT NULL,
  `advisor_id_snapshot` int DEFAULT NULL,
  `cgpa_snapshot` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_consent` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_personal` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_education` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_activities` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_financial` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `section_document` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `status` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `application_date` date DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_general_ci,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`student_applications_id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `student_applications`
--

INSERT INTO `student_applications` VALUES (5,2,4,0,'kriettipoom srijam',3,2,'3.89','test','test','tset','test','tseet','set','pending','2025-12-08',NULL,'2025-12-08 16:55:33','2025-12-08 16:55:33'),(6,4,5,0,'mojo mojo',1,2,'4','test','test','tset','set','test','test','pending','2025-12-08',NULL,'2025-12-08 17:06:43','2025-12-08 17:06:43'),(7,3,4,0,'kriettipoom srijam',3,2,'3.89','1','1','1','1','1','1','pending','2025-12-16',NULL,'2025-12-16 10:58:53','2025-12-16 10:58:53');

--
-- Table structure for table `studentlist`
--

CREATE TABLE `studentlist` (
  `student_id` int NOT NULL AUTO_INCREMENT,
  `student_userid` int DEFAULT NULL,
  `student_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT 'Student ID',
  `student_firstname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_lastname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_fullname` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_email` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_degree` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_program_id` int DEFAULT NULL,
  `student_advisor_id` int DEFAULT NULL,
  `student_school_id` int DEFAULT NULL,
  `student_ce_credit` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_cgpa` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_rank` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_misconduct` varchar(255) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `student_status` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `remarks` text COLLATE utf8mb4_general_ci,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`student_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `studentlist`
--

INSERT INTO `studentlist` VALUES (4,8,'6299999999','kriettipoom','srijam','kriettipoom srijam','student1@mail.com','Bachelor',3,2,1,'8','3.89','9',NULL,NULL,NULL,'2025-12-08 14:31:29','2025-12-08 14:31:29'),(5,10,'9999999999','mojo','mojo','mojo mojo','StudentTest02@gmail.com','Bachelor',1,2,2,'9','4','8',NULL,NULL,NULL,'2025-12-08 17:05:18','2025-12-08 17:05:18');

--
-- Table structure for table `titles`
--

CREATE TABLE `titles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `title_th_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `title_en_name` varchar(50) COLLATE utf8mb4_general_ci DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `titles`
--

INSERT INTO `titles` VALUES (1,'นาย','Mr.','2025-11-26 10:48:43','2025-11-26 10:48:43'),(2,'ดอกเตอร์','Dr.','2025-11-26 10:49:03','2025-11-26 10:49:03');

--
-- Table structure for table `user_meta`
--

CREATE TABLE `user_meta` (
  `user_id` int unsigned NOT NULL AUTO_INCREMENT,
  `user_userid` int NOT NULL,
  `user_title` varchar(255) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `user_firstname` varchar(255) NOT NULL,
  `user_lastname` varchar(255) NOT NULL,
  `user_division` int DEFAULT NULL,
  `user_role` varchar(255) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`user_id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `user_meta`
--

INSERT INTO `user_meta` VALUES (1,1,NULL,'Consult','Admin',NULL,'[\"Admin\",\"AdminConsult\"]','2023-07-21 11:05:32','2024-11-28 13:56:07'),(2,5,NULL,'kriettipoom','srijam',NULL,'[\"Admin\",\"AdminConsult\"]',NULL,NULL);


