--
-- Host: localhost    Database: tms_db
-- ------------------------------------------------------


--
-- Table structure for table `acreditor_criterias`
--

CREATE TABLE `acreditor_criterias` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `scholarship_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `criteria_id` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `acreditor_id` varchar(191) 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=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `acreditor_criterias`
--

INSERT INTO `acreditor_criterias` VALUES (8,'2','2','7','2023-03-06 12:33:49','2023-03-06 12:33:49'),(9,'2','2','8','2023-03-06 12:33:49','2023-03-06 12:33:49'),(10,'2','2','9','2023-03-06 12:33:49','2023-03-06 12:33:49'),(20,'1','1','7','2023-03-06 12:43:01','2023-03-06 12:43:01'),(21,'1','1','8','2023-03-06 12:43:01','2023-03-06 12:43:01'),(22,'1','1','9','2023-03-06 12:43:01','2023-03-06 12:43:01');

--
-- Table structure for table `assign_certificates`
--

CREATE TABLE `assign_certificates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `certificate_template_id` bigint(20) unsigned DEFAULT NULL,
  `course_id` bigint(20) unsigned DEFAULT NULL,
  `module_id` bigint(20) unsigned DEFAULT NULL,
  `session_id` bigint(20) unsigned DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `assign_certificates_certificate_template_id_foreign` (`certificate_template_id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `assign_certificates`
--

INSERT INTO `assign_certificates` VALUES (1,13,10,22,NULL,'2023-01-23 11:10:34','2023-01-23 11:10:34'),(2,13,NULL,NULL,NULL,'2023-01-23 11:14:00','2023-01-23 11:14:00'),(3,18,9,21,NULL,'2023-01-23 11:20:10','2023-01-23 11:20:10'),(6,32,34,NULL,NULL,'2023-01-27 04:59:20','2023-01-27 04:59:20'),(7,32,34,NULL,NULL,'2023-01-27 04:59:34','2023-01-27 04:59:34'),(8,32,43,NULL,NULL,'2023-01-27 09:37:45','2023-01-27 09:37:45');

--
-- Table structure for table `attendances`
--

CREATE TABLE `attendances` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `course_module_id` int(11) DEFAULT NULL,
  `module_session_id` int(11) DEFAULT NULL,
  `presenter_id` int(11) DEFAULT NULL,
  `attendance_date` date DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `attendances`
--

INSERT INTO `attendances` VALUES (1,49,1,2,'2023-01-23','2023-01-25 14:17:53','2023-01-25 14:17:53'),(2,53,3,5,'2023-01-27','2023-01-27 04:55:42','2023-01-27 04:55:42'),(3,58,4,3,'2023-02-02','2023-02-02 12:26:34','2023-02-02 12:26:34');

--
-- Table structure for table `candidate_attendances`
--

CREATE TABLE `candidate_attendances` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `attendance_sheet_id` int(11) NOT NULL,
  `candidate_id` int(11) DEFAULT NULL,
  `status` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `cadre` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `signature` varchar(191) 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=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `candidate_attendances`
--

INSERT INTO `candidate_attendances` VALUES (1,1,1,'ATTENDED',NULL,'63d1674dd612b.png','2023-01-25 14:17:54','2023-01-25 14:30:54'),(2,1,2,'ATTENDED',NULL,'63d1677bb6ca9.png','2023-01-25 14:17:54','2023-01-25 14:31:40'),(3,1,3,'ATTENDED',NULL,'63d1678e01596.png','2023-01-25 14:17:54','2023-01-25 14:31:59'),(4,2,6,'ATTENDED',NULL,'63d3839a93ea6.png','2023-01-27 04:55:42','2023-01-27 04:56:11'),(5,2,7,'ATTENDED',NULL,'63d383ab01f1e.png','2023-01-27 04:55:42','2023-01-27 04:56:27'),(6,3,8,'ATTENDED',NULL,'63dbd63f5aacf.png','2023-02-02 12:26:34','2023-02-02 12:26:56'),(7,3,9,'ATTENDED',NULL,'63dbd65001958.png','2023-02-02 12:26:35','2023-02-02 12:27:12');

--
-- Table structure for table `candidates`
--

CREATE TABLE `candidates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `candidate_no` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `first_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `gender` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `organisation` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `department` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `position` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `category` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `type_of_disability` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `complete_profile_key` varchar(191) 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=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `candidates`
--

INSERT INTO `candidates` VALUES (1,'TSTAC01-00001','Derick','Kabyemela','M','kabyk95@gmail.com','+255738069145','Real Time Solutions','7','null','null','null',NULL,'2023-01-23 06:29:06','2023-01-27 07:02:57'),(2,'TSTAC02-0001','DJ','Silencer','M','djsilencer2022@gmail.com','0692463122','NONE','7',NULL,NULL,'Visual Impairment',NULL,'2023-01-23 06:44:58','2023-01-23 06:44:58'),(3,'TSTAC02-0002','Kaby','Com','M','kabycom2021@gmail.com','0718527660','NONE','8',NULL,NULL,'Speech Impairment',NULL,'2023-01-23 06:44:58','2023-01-23 06:44:58'),(4,NULL,'Festus','Mwilenga','M','festusflowin@gmail.com','0692463122',NULL,'7',NULL,NULL,NULL,NULL,'2023-01-24 08:22:13','2023-01-24 08:22:13'),(5,'9998','festus','mwilenga','M','flowinfestus@gmail.com','flowin','TIGO','7',NULL,NULL,NULL,NULL,'2023-01-24 09:08:24','2023-01-24 09:08:24'),(6,'TCTAC01-0001','Derick','Kabyemela','M','kabyk95@gmail.com','0718527660',NULL,'7',NULL,NULL,'Speech Impairment',NULL,'2023-01-27 04:47:51','2023-01-27 04:47:51'),(7,'TCTAC02-0001','Kaby','Com','M','kabycom2021@gmail.com','0784560921',NULL,'8',NULL,NULL,NULL,NULL,'2023-01-27 04:47:51','2023-01-27 04:47:51'),(8,'TSTAC01-0003','Edwin','Kashangaki','M','edwin.kashangaki@ccbrt.org','0692463122',NULL,'7',NULL,NULL,NULL,NULL,'2023-01-27 08:56:07','2023-01-27 08:56:07'),(9,'TSTAC02-0004','Derick','Kabyemela','M','djsilencer2022@gmail.com','0789132456',NULL,'8',NULL,NULL,NULL,NULL,'2023-01-27 08:56:07','2023-01-27 08:56:07'),(10,'TSTAC01-00042','Derick','Kaijage','M','kabyk95@gmail.com','0718527660',NULL,'7',NULL,NULL,NULL,NULL,'2023-02-02 11:53:12','2023-02-02 11:53:12'),(11,'TSTAC02-00054','FX','Kaby','M','fxkabydee@gmail.com','0783102192',NULL,'8',NULL,NULL,NULL,NULL,'2023-02-02 11:53:13','2023-02-02 11:53:13'),(12,'TSTAC03-0023','Kaby','Com','M','kabycom2021@gmail.com','0738069145',NULL,'9',NULL,NULL,'Mental health condition',NULL,'2023-03-06 12:19:49','2023-03-06 12:19:49'),(13,'TSTAC01-0021','Derick','Kabyemela','F','kabyk95@gmail.com','0692463122',NULL,'7',NULL,NULL,NULL,NULL,'2023-03-06 12:19:50','2023-03-06 12:19:50'),(14,NULL,'Asha','Nyoso','F','dorianblack255@gmail.com','0738069146','Truebits Technologies','7',NULL,NULL,'Intellectual Disability',NULL,'2023-03-06 12:27:29','2023-03-06 12:27:29'),(15,'TSTAC03-0009','Anitha','Bosco','M','stevens.general.business.supplies@gmail.com','0692463122','TrueBits Organization','9',NULL,NULL,NULL,NULL,'2023-03-06 12:35:12','2023-03-06 12:35:12'),(16,'TSTAC03-0012','DJ','Silencer','M','djsilencer2022@gmail.com','0969443332','Real Time Solutions','9',NULL,NULL,'Mental health condition',NULL,'2023-03-06 12:38:07','2023-03-06 12:38:07'),(17,'TSTAC03-0089','Deodatha','Museveni','F','fxkabydee@gmail.com','0738069146','TrueBits Organization','9',NULL,NULL,NULL,NULL,'2023-03-06 12:44:54','2023-03-06 12:44:54'),(18,'TSTAC-00100','DJ','Silencer','M','djsilencer2022@gmail.com','0692463122',NULL,'7',NULL,NULL,'Visual Impairment',NULL,'2023-07-04 14:19:34','2023-07-04 14:19:34'),(19,'TSTAC03-0145','Kaby','Dee','M','kabydee@gmail.com','0754805757',NULL,'9',NULL,NULL,'NONE',NULL,'2023-07-04 14:19:34','2023-07-04 14:19:34');

--
-- Table structure for table `certificate_signatures`
--

CREATE TABLE `certificate_signatures` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `certificate_template_id` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `hr` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `hr_signature` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facilitator` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facilitator_signature` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `certificate_signatures`
--


--
-- Table structure for table `certificate_templates`
--

CREATE TABLE `certificate_templates` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `certificate_file` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `template` longtext COLLATE utf8mb4_unicode_ci,
  `hr_signature` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `facillitator_signature` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `certificate_flag` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `certificate_templates`
--

INSERT INTO `certificate_templates` VALUES (1,'certificate.of.membership','Certificate of membership',NULL,NULL,NULL,NULL,NULL,'2021-10-25 21:00:00',NULL),(2,'certificate.of.completion','Certificate of completion',NULL,NULL,NULL,NULL,NULL,'2021-10-25 21:00:00',NULL),(3,'certificate.of.achievement','Certificate of achievement',NULL,NULL,NULL,NULL,NULL,'2021-10-25 21:00:00',NULL),(4,'certification.certificate','Certification certificate',NULL,NULL,NULL,NULL,NULL,'2021-10-25 21:00:00',NULL),(13,'Lean Management Template','Lean Management Template','template.pdf','<p style=\"text-align: center; \"><img src=\"data:image/png;base64,[encoded data, 23680 characters]\" style=\"width: 170px;\" data-filename=\"logo_ccbrt.png\"><p style=\"text-align: center; \"><br></p><h3 style=\"text-align: center; \"><span style=\"font-family: Helvetica;\"><b>CERTIFICATE OF COMPLETION TO</b></span></h3><h3 style=\"text-align: center; \"><span style=\"font-family: Helvetica;\"><b><br></b></span></h3><h4 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>{{$name}}</b></span></h4><h4 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b><br></b></span></h4><h4 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>FOR COMPLETION OF COURSE</b></span></h4><h4 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b><br></b></span></h4><h4 style=\"text-align: center; \"><b><span style=\"font-family: Verdana;\">{{$course}}</span></b></h4><h4 style=\"text-align: center; \"><b><span style=\"font-family: Verdana;\"><br></span><span style=\"font-family: Verdana;\">FOR THE YEAR 2022</span></b></h4><h4 style=\"text-align: center; \"><b><span style=\"font-family: Verdana;\"><br></span><span style=\"font-family: Verdana;\">CHIEF EXECUTIVE OFFICER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;REGISTRAR</span></b></h4><h4 style=\"text-align: left;\"><img src=\"data:image/png;base64,[encoded data, 10140 characters]\" style=\"width: 136px;\" data-filename=\"image.png\">&nbsp;<img src=\"data:image/png;base64,[encoded data, 10140 characters]\" style=\"width: 136px; float: right;\" data-filename=\"image.png\" class=\"note-float-right\"><b><span style=\"font-family: Verdana;\"><br></span></b></h4><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p></p>\n',NULL,NULL,NULL,'2022-09-18 04:45:01','2022-10-06 12:10:03'),(18,'Life Support Template','Life Support','Certificate Template.pdf','<p><span style=\"font-size: 1rem;\"><br></span><p><span style=\"font-size: 1rem;\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;</span></p><p><img src=\"data:image/png;base64,[encoded data, 64040 characters]\" style=\"width: 170px;\" data-filename=\"mct.png\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<img src=\"data:image/png;base64,[encoded data, 23680 characters]\" style=\"width: 170px;\" data-filename=\"logo_ccbrt.png\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<img src=\"data:image/png;base64,[encoded data, 21892 characters]\" style=\"width: 170px;\" data-filename=\"TNMC.png\"> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br></p><p><br></p><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>CERTIFICATE OF PARTICIPATION TO </b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>{{$name}} </b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>MEMBER OF {{$accreditor}} REGISTRATION NUMBER {{$candidate_accreditation_no}}&nbsp;</b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>AND AWARDED {{$point}} POINTS </b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b>FOR COMPLETION OF COURSE {{$course}}</b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b><br></b></span></h5><h5 style=\"text-align: center; \"><span style=\"font-family: Verdana;\"><b><br></b></span></h5><h5 style=\"text-align: left;\"><span style=\"font-family: Verdana;\"><b>CHIEF EXECUTIVE OFFICER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REGISTRAR</b></span></h5><h5 style=\"text-align: left;\"><img src=\"data:image/png;base64,[encoded data, 96496 characters]\" style=\"width: 190px;\" data-filename=\"signature.png\"><img src=\"data:image/png;base64,[encoded data, 96496 characters]\" style=\"width: 190px; float: right;\" data-filename=\"signature.png\" class=\"note-float-right\"><span style=\"font-family: Verdana;\"><b><br></b></span></h5><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p><p></p></p>\n',NULL,NULL,NULL,'2022-09-22 06:45:34','2022-09-26 02:29:43'),(19,'Collaboration Template','Collaboration Template','Certificate Template.pdf','<p><img src=\"data:image/png;base64,[encoded data, 23680 characters]\" data-filename=\"logo_ccbrt.png\" style=\"font-size: 1rem; width: 169.994px;\"><br><p><img src=\"data:image/png;base64,[encoded data, 64040 characters]\" style=\"width: 169.994px; float: right;\" data-filename=\"mct.png\" class=\"note-float-right\"><br></p><p><br></p><h4 style=\"text-align: center; \">CERTIFICATE OF COMPLETION TO&nbsp;</h4><h4 style=\"text-align: center; \"><b>{{$name}}</b></h4><h4 style=\"text-align: center; \">..........................................................</h4><h4 style=\"text-align: center; \"><u> </u></h4><h4 style=\"text-align: center; \">MEMBER OF&nbsp;{{$accreditor}} REEGISTRATION NUMBER&nbsp;<b>{{$candidate_accreditation_no}} </b></h4><h4 style=\"text-align: center; \">FOR COMPLETING COURSE&nbsp;<span style=\'font-family: \"Arial Black\";\'>{{$course}}</span> AND AWARDED&nbsp;<span style=\"font-family: Verdana;\">{{$point}}</span> POINTS</h4><p><br></p><p><br></p><p><br></p><h4 style=\"text-align: center; \">CHIEF EXECUTIVE OFFICER&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; REGISTRAR</h4><p style=\"text-align: center;\"><img src=\"data:image/png;base64,[encoded data, 69960 characters]