--
-- Host: localhost    Database: tms_live
-- ------------------------------------------------------


--
-- 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=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `acreditor_criterias` VALUES (1,'1','1','15','2023-07-17 07:44:54','2023-07-17 07:44:54'),(2,'2','2','15','2023-07-17 07:47:09','2023-07-17 07:47:09');

--
-- 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=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `assign_certificates` VALUES (1,24,35,NULL,NULL,'2023-01-26 04:41:59','2023-01-26 04:41:59'),(2,13,10,22,15,'2023-06-22 09:41:16','2023-06-22 09:41:16'),(3,25,8,10,26,'2023-06-22 09:43:31','2023-06-22 09:43:31'),(4,22,8,NULL,NULL,'2023-07-25 05:47:57','2023-07-25 05:47:57'),(5,25,9,21,NULL,'2023-07-25 05:48:39','2023-07-25 05:48:39'),(6,23,27,NULL,NULL,'2023-07-25 05:56:56','2023-07-25 05:56:56');

--
-- 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=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `attendances` VALUES (1,47,3,3,'2023-01-26','2023-01-26 04:43:27','2023-01-26 04:43:27'),(2,39,6,13,'2023-03-23','2023-06-22 09:47:25','2023-06-22 09:47:25'),(3,39,44,13,'2023-07-24','2023-07-24 07:14:09','2023-07-24 07:14:09'),(4,39,6,13,'2023-07-24','2023-07-24 07:27:04','2023-07-24 07:27:04');

--
-- 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=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `candidate_attendances` VALUES (1,1,1,'ATTENDED',NULL,'63d22f41cac88.png','2023-01-26 04:43:27','2023-01-26 04:44:01'),(2,1,2,'ATTENDED',NULL,'63d22f4d7ce81.png','2023-01-26 04:43:27','2023-01-26 04:44:13'),(3,2,15,'ATTENDED',NULL,'64be52bc0eacb.png','2023-06-22 09:47:25','2023-07-24 07:30:20'),(4,3,12,'ATTENDED',NULL,'64be4f79ded21.png','2023-07-24 07:14:09','2023-07-24 07:16:26'),(5,3,12,'0',NULL,NULL,'2023-07-24 07:14:09','2023-07-24 07:14:09'),(6,3,13,'0',NULL,NULL,'2023-07-24 07:14:09','2023-07-24 07:14:09'),(7,3,13,'0',NULL,NULL,'2023-07-24 07:14:09','2023-07-24 07:14:09'),(8,3,14,'0',NULL,NULL,'2023-07-24 07:14:09','2023-07-24 07:14:09'),(9,3,14,'0',NULL,NULL,'2023-07-24 07:14:09','2023-07-24 07:14:09'),(10,4,15,'0',NULL,NULL,'2023-07-24 07:27:04','2023-07-24 07:27:04');

--
-- 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=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `candidates` VALUES (1,'MCT-00001','Kaijage','Kabyemela','M','kabyk95@gmail.com','0738069145',NULL,'1',NULL,NULL,'Visual Impairment',NULL,'2023-01-26 04:40:38','2023-01-26 04:40:38'),(3,NULL,'Festus','Mwilenga','M','festusflowin@gmail.com','656121885',NULL,NULL,NULL,NULL,'NONE',NULL,'2023-02-16 04:15:44','2023-02-16 04:15:44'),(5,NULL,'Derick','Kabyemela','M','kabydee@gmail.com','0789132456','Real Time Solutions',NULL,NULL,NULL,'NONE',NULL,'2023-02-16 11:43:10','2023-02-16 11:43:10'),(8,NULL,'Derick','Kabyemela','M','kabycom2021@gmail.com','0738069145','Real Time Solutions',NULL,NULL,NULL,'NONE',NULL,'2023-03-22 00:29:12','2023-03-22 00:29:12'),(9,NULL,'Dorian','Black','M','dorianblack255@gmail.com','0692463122','Real Time Solutions',NULL,NULL,NULL,'NONE',NULL,'2023-03-22 00:29:12','2023-03-22 00:29:12'),(10,NULL,'Gina','Ginah','F','regina.monyemangene@ccbrt.org','0782133206','Spark Helath Centre',NULL,NULL,NULL,'NONE',NULL,'2023-05-11 06:44:57','2023-05-11 06:44:57'),(11,NULL,'Febdays','Minja','F','febdaysminja@gmail.com','0622059625',NULL,NULL,NULL,NULL,'NONE',NULL,'2023-05-17 09:46:44','2023-05-17 09:46:44'),(12,NULL,'Edwin','Kashangaki','M','edwin.kashangaki@ccbrt.org','+255718069395','Tanesco',NULL,NULL,NULL,'Visual Impairment',NULL,'2023-06-22 06:14:57','2023-06-22 06:14:57'),(13,NULL,'Febdays','Minja','F','febdays.minja@ccbrt.org','+255784345453','Airtel',NULL,NULL,NULL,'Visual Impairment',NULL,'2023-06-22 06:57:32','2023-06-22 06:57:32'),(14,NULL,'Anastasia','Melis','F','melis.ann@gmail.com','+255713431125',NULL,NULL,NULL,NULL,'NONE',NULL,'2023-06-22 06:57:32','2023-06-22 06:57:32'),(15,NULL,'Michael','Masanja','M','michael.masanja@ccbrt.org','+2557181291991','CCBRT',NULL,NULL,NULL,'Speech Impairment',NULL,'2023-06-22 07:19:06','2023-06-22 07:19:06'),(16,'12','Priscilla','John','F','priscilla.john@gmail.com','+2557189981200','CCBRT','Social Services','Head','Social Worker','Visual Impairment',NULL,'2023-06-22 07:36:13','2023-06-22 07:50:10'),(17,'TSTAC001','Steven','Peter','M','stevens.general.business.supplies@gmail.com','+255789099345','Truebits','Department of Gender Studies','Director',NULL,'None',NULL,'2023-07-10 03:20:49','2023-07-10 03:20:49'),(18,'CHVT-0092','Kaijage','Kabyemela','M','kabydee@gmail.com','+255692463122',NULL,'4',NULL,NULL,'NONE',NULL,'2023-07-10 04:23:27','2023-07-10 04:23:27'),(19,NULL,'DJ','Silencer','M','djsilencer2022@gmail.com','0758451003','TrueBits Organization',NULL,NULL,NULL,'NONE',NULL,'2023-07-10 04:30:07','2023-07-10 04:30:07'),(20,NULL,'Kaby','K','M','kabyk95@gmail.com','0692463122','TrueBits Organization',NULL,NULL,NULL,'NONE',NULL,'2023-07-10 04:30:07','2023-07-10 04:30:07'),(21,NULL,'Edwin','Muganyizi','M','eddiehenrico06@gmail.com','0718069395','CCBRT',NULL,NULL,NULL,'Visual Impairment',NULL,'2023-07-27 07:43:34','2023-07-27 07:43:34'),(22,NULL,'Edwin','Kashangaki','M','eddiehenrico06@gmail.com','0718069395','CCBRT',NULL,NULL,NULL,'NONE',NULL,'2023-07-27 08:09:29','2023-07-27 08:09:29'),(23,NULL,'Derick','Kaijage','M','kabyk95@gmail.com','0692463122',NULL,'2',NULL,NULL,'NONE',NULL,'2023-08-02 08:18:27','2023-08-02 08:18:27');

--
-- 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=26 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></p><p></p></p>\n',NULL,NULL,NULL,'2022-09-18 04:45:01','2023-08-02 08:26:59'),(14,'Test Template','Test Template 2','template.pdf','<p><img style=\"width: 210.031px; height: 105.016px;\" data-filename=\"signature.png\" src=\"/upload/16636701720.png\"><br></p>\n',NULL,NULL,NULL,'2022-09-20 07:36:12','2022-09-20 07:36:12'),(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, 69716 characters]