--
-- Host: localhost    Database: test
-- ------------------------------------------------------


--
-- Table structure for table `SequelizeMeta`
--

CREATE TABLE `SequelizeMeta` (
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  PRIMARY KEY (`name`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `SequelizeMeta`
--

INSERT INTO `SequelizeMeta` VALUES ('20181227115256-create-user.js'),('20181228045715-create-attack-type.js'),('20181228051504-create-sub-attack-type.js'),('20181228053245-create-template.js'),('20181228054804-create-sender.js'),('20181228055337-create-page.js'),('20181228061803-create-target.js'),('20181228062106-create-group.js'),('20181228062652-create-campaign.js'),('20181228063200-create-group-target.js'),('20181228073025-create-campaign-group.js'),('20181228083359-create-threatcop-access.js'),('20181228084024-create-quiz.js'),('20181228084324-create-simulation.js'),('20181228084424-create-evs.js'),('20181228085537-create-evs-detail.js'),('20181228085755-create-event.js'),('20181228092833-create-header.js'),('20181228093329-create-attachment.js'),('20181228094011-create-result.js'),('20181228101521-create-simulation-error.js'),('20181228140010-create-metadata.js'),('20190111120257-create-lms-quiz.js'),('20190111120258-create-lms-course.js'),('20190111120906-create-lms-course-section.js'),('20190111121457-create-lms-course-lecture.js'),('20190111121750-create-lms-lecture-tracking.js'),('20190111121906-create-lms-target-course.js'),('20190112133222-create-lms-quiz-question.js'),('20190112133546-create-lms-quiz-question-option.js'),('20190112144214-create-lms-quiz-answer.js'),('20190113084203-login_to_targets.js'),('20190121085902-create-simulation-targets.js'),('20190121113618-create-report.js'),('20190125122146-add-sub-attack-type-add.js'),('20190125123146-add-update-user-column.js'),('20190207120437-create-sms-gateway.js'),('20190208062241-add-gatewayid-senders.js'),('20190301092009-add-report-column.js'),('20190305102127-create-reported-attachment.js'),('20190308100803-fix-metadata-deleted-at.js'),('20190319132052-change-html-type.js'),('20190327114808-add-column-awarenessId.js'),('20190405043317-create-company.js'),('20190405043653-add_user_table_company_logo.js'),('20190409094515-addnamecolumnattachment.js'),('20190410051223-add-type-column-attacktype.js'),('20190415124926-add-column-deletedat.js'),('20190417051229-create-ransomware-victim.js'),('20190417052302-add_two_columns_results.js'),('20190418084845-add_identifier_column_simulations.js'),('20190418102835-reportedemail.js'),('20190515121119-add-courseId.js'),('20190617093254-add-column-courseId-in-campaign.js'),('20190618125624-add-column-simulationId-in-lms-target-course.js'),('20190619050617-add-column-errorCode-in-lms-target-course.js'),('20190622094903-add-column-key-and-alias-in-company.js'),('20190622101557-create-company-user.js'),('20190622101756-create-action.js'),('20190622101824-create-policy.js'),('20190622101916-create-policy-action.js'),('20190625110649-create-user-policy.js'),('20190704051753-add-column-sid-and-appid.js'),('20190711123508-create-voice-gateway.js'),('20190722095319-add-detail-column-in-ransomware.js'),('20190807063708-create-lms-course-target.js'),('20190823070011-encrypt-password.js'),('20190911071910-add-column-filename-simulation.js'),('20191024134244-add_thumbnail_template.js'),('20191025052531-add_thumbnail_pages.js'),('20191025112030-add_thumbnail_advisory:.js'),('20191101052154-add-column-status-in-groups.js'),('20191113110808-create-employee.js'),('20191114081058-add-column-lmsPercentage-in-simulation.js'),('20191118110830-create-service.js'),('20191119093932-change-userId-to-companyId.js'),('20191127101657-add-user-data-in-company-table.js'),('20191206082406-encryption-metadata-password.js'),('20191211094957-add-column-type-in-campaign.js');

--
-- Table structure for table `actions`
--

CREATE TABLE `actions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=90 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `actions`
--

INSERT INTO `actions` VALUES (1,'campaign-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(2,'campaign-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(3,'campaign-result-s1','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(4,'campaign-result-knowledge-imparting','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(5,'campaign-result-quiz','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(6,'campaign-result-s2','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(7,'campaign-create-s1-phishing','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(8,'campaign-create-s1-smishing','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(9,'campaign-create-s1-ransomware','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(10,'campaign-create-s2-ransomware','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(11,'campaign-create-s1-vishing','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(12,'campaign-create-s2-vishing','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(13,'campaign-create-knowledge-imparting','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(14,'campaign-create-quiz','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(15,'campaign-create-s2-phishing','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(16,'campaign-create-s1-phishing-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(17,'campaign-create-s1-smishing-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(18,'campaign-create-s1-ransomware-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(19,'campaign-create-s2-ransomware-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(20,'campaign-create-s1-vishing-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(21,'campaign-create-s2-vishing-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(22,'campaign-create-knowledge-imparting-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(23,'campaign-create-quiz-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(24,'campaign-create-s2-phishing-4-eye','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(25,'campaign-csv-download','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(26,'campaign-event-csv-download','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(27,'campaign-ransomware-csv-download','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(28,'campaign-complete-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(29,'campaign-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(30,'hack-record-result','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(31,'evs-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(32,'evs-result','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(33,'evs-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(34,'reported-email-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(35,'reported-email-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(36,'reported-email-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(37,'reported-email-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(38,'reported-email-approve','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(39,'reported-email-decilne','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(40,'approved-email-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(41,'approved-email-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(42,'approved-email-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(43,'approved-email-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(44,'user-and-department-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(45,'user-and-department-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(46,'user-and-department-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(47,'user-and-department-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(48,'attacker-profile-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(49,'attacker-profile-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(50,'attacker-profile-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(51,'attacker-profile-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(52,'email-template-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(53,'email-template-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(54,'email-template-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(55,'email-template-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(56,'sms-template-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(57,'sms-template-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(58,'sms-template-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(59,'sms-template-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(60,'smsgateway-list','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(61,'smsgateway-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(62,'metadata-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(63,'metadata-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(64,'metadata-days-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(65,'metadata-days-write','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(66,'metadata-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(67,'overview-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(68,'landing-page-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(69,'landing-page-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(70,'landing-page-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(71,'landing-page-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(72,'attack-type-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(73,'user-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(74,'user-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(75,'user-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(76,'user-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(77,'user-policy-assign','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(78,'user-policy-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(79,'user-policy-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(80,'user-policy-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(81,'lms-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57'),(82,'lms-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(83,'lms-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(84,'lms-run','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(85,'lms-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(86,'awareness-module-list','list','2020-01-21 09:16:57','2020-01-21 09:16:57'),(87,'awareness-module-delete','delete','2020-01-21 09:16:57','2020-01-21 09:16:57'),(88,'awareness-module-write','write','2020-01-21 09:16:57','2020-01-21 09:16:57'),(89,'awareness-module-read','read','2020-01-21 09:16:57','2020-01-21 09:16:57');

--
-- Table structure for table `attachments`
--

CREATE TABLE `attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `templateId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `mime` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `templateId` (`templateId`),
  CONSTRAINT `attachments_ibfk_1` FOREIGN KEY (`templateId`) REFERENCES `templates` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attachments`
--


--
-- Table structure for table `attack_types`
--

CREATE TABLE `attack_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `attack_types`
--

INSERT INTO `attack_types` VALUES (1,'Phishing',NULL,'EMAIL'),(2,'Smishing',NULL,'SMS'),(3,'Ransomware',NULL,'EMAIL'),(4,'Vishing',NULL,'CALL');

--
-- Table structure for table `campaign_groups`
--

CREATE TABLE `campaign_groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `campaignId` int(11) DEFAULT NULL,
  `groupId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `campaignId` (`campaignId`),
  KEY `groupId` (`groupId`),
  CONSTRAINT `campaign_groups_ibfk_1` FOREIGN KEY (`campaignId`) REFERENCES `campaigns` (`id`),
  CONSTRAINT `campaign_groups_ibfk_2` FOREIGN KEY (`groupId`) REFERENCES `groups` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `campaign_groups`
--


--
-- Table structure for table `campaigns`
--

CREATE TABLE `campaigns` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `subAttackTypeId` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `completedAt` datetime DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `awarenessId` varchar(255) DEFAULT NULL,
  `courseId` int(11) DEFAULT NULL,
  `type` enum('live','test') DEFAULT 'live',
  PRIMARY KEY (`id`),
  KEY `subAttackTypeId` (`subAttackTypeId`),
  KEY `campaigns_ibfk_1` (`companyId`),
  CONSTRAINT `campaigns_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `campaigns_ibfk_2` FOREIGN KEY (`subAttackTypeId`) REFERENCES `sub_attack_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `campaigns`
--


--
-- Table structure for table `companies`
--

CREATE TABLE `companies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `key` text,
  `alias` text,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `companies`
--


--
-- Table structure for table `companyUsers`
--

CREATE TABLE `companyUsers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `userId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `companyUsers`
--


--
-- Table structure for table `employees`
--

CREATE TABLE `employees` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `username` text,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `last_login` datetime DEFAULT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `valid` int(11) DEFAULT '0',
  `verf_key` varchar(255) DEFAULT NULL,
  `companyId` int(11) DEFAULT NULL,
  `attempt` int(11) DEFAULT NULL,
  `resetPassword` int(11) DEFAULT NULL,
  `otp` varchar(255) DEFAULT NULL,
  `otpExpiry` datetime DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `loggedOutAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `employees`
--


--
-- Table structure for table `events`
--

CREATE TABLE `events` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `simulationId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `message` varchar(255) DEFAULT NULL,
  `details` text,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `simulationId` (`simulationId`),
  KEY `targetId` (`targetId`),
  CONSTRAINT `events_ibfk_1` FOREIGN KEY (`simulationId`) REFERENCES `simulations` (`id`),
  CONSTRAINT `events_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `events`
--


--
-- Table structure for table `evs`
--

CREATE TABLE `evs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `percent` decimal(10,2) DEFAULT NULL,
  `maximum` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `targetId` (`targetId`),
  KEY `evs_ibfk_1` (`companyId`),
  CONSTRAINT `evs_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `evs_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `evs`
--


--
-- Table structure for table `evs_details`
--

CREATE TABLE `evs_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `simulationId` int(11) DEFAULT NULL,
  `evsId` int(11) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `maximum` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `simulationId` (`simulationId`),
  KEY `evsId` (`evsId`),
  CONSTRAINT `evs_details_ibfk_1` FOREIGN KEY (`simulationId`) REFERENCES `simulations` (`id`),
  CONSTRAINT `evs_details_ibfk_2` FOREIGN KEY (`evsId`) REFERENCES `evs` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `evs_details`
--


--
-- Table structure for table `group_targets`
--

CREATE TABLE `group_targets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `groupId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `groupId` (`groupId`),
  KEY `targetId` (`targetId`),
  CONSTRAINT `group_targets_ibfk_1` FOREIGN KEY (`groupId`) REFERENCES `groups` (`id`),
  CONSTRAINT `group_targets_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `group_targets`
--


--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `status` enum('pending','failed','completed') DEFAULT 'pending',
  `errorFile` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `groups_ibfk_1` (`companyId`),
  CONSTRAINT `groups_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `groups`
--


--
-- Table structure for table `headers`
--

CREATE TABLE `headers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `senderId` int(11) DEFAULT NULL,
  `key` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `senderId` (`senderId`),
  CONSTRAINT `headers_ibfk_1` FOREIGN KEY (`senderId`) REFERENCES `senders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `headers`
--


--
-- Table structure for table `lms_course_lectures`
--

CREATE TABLE `lms_course_lectures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sectionId` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `mime` varchar(255) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL,
  `path` varchar(255) DEFAULT NULL,
  `quizId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sectionId` (`sectionId`),
  KEY `quizId` (`quizId`),
  CONSTRAINT `lms_course_lectures_ibfk_1` FOREIGN KEY (`sectionId`) REFERENCES `lms_course_sections` (`id`),
  CONSTRAINT `lms_course_lectures_ibfk_2` FOREIGN KEY (`quizId`) REFERENCES `lms_quizzes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_course_lectures`
--


--
-- Table structure for table `lms_course_sections`
--

CREATE TABLE `lms_course_sections` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `courseId` int(11) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `sequence` int(11) NOT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `courseId` (`courseId`),
  CONSTRAINT `lms_course_sections_ibfk_1` FOREIGN KEY (`courseId`) REFERENCES `lms_courses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_course_sections`
--


--
-- Table structure for table `lms_course_targets`
--

CREATE TABLE `lms_course_targets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `courseId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `simulationId` int(11) DEFAULT NULL,
  `errorCode` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_course_targets`
--


--
-- Table structure for table `lms_courses`
--

CREATE TABLE `lms_courses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `campaignId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL,
  `thumbnail` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `campaignId` (`campaignId`),
  KEY `lms_courses_ibfk_1` (`companyId`),
  CONSTRAINT `lms_courses_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `lms_courses_ibfk_2` FOREIGN KEY (`campaignId`) REFERENCES `campaigns` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_courses`
--


--
-- Table structure for table `lms_lecture_trackings`
--

CREATE TABLE `lms_lecture_trackings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `targetId` int(11) DEFAULT NULL,
  `lectureId` int(11) DEFAULT NULL,
  `duration` int(11) DEFAULT NULL,
  `done` tinyint(1) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `targetId` (`targetId`),
  KEY `lectureId` (`lectureId`),
  CONSTRAINT `lms_lecture_trackings_ibfk_1` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`),
  CONSTRAINT `lms_lecture_trackings_ibfk_2` FOREIGN KEY (`lectureId`) REFERENCES `lms_course_lectures` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_lecture_trackings`
--


--
-- Table structure for table `lms_quiz_answers`
--

CREATE TABLE `lms_quiz_answers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `targetCourseId` int(11) DEFAULT NULL,
  `quizId` int(11) DEFAULT NULL,
  `quizQuestionId` int(11) DEFAULT NULL,
  `quizQuestionOptionId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `targetCourseId` (`targetCourseId`),
  KEY `quizId` (`quizId`),
  KEY `quizQuestionId` (`quizQuestionId`),
  KEY `quizQuestionOptionId` (`quizQuestionOptionId`),
  CONSTRAINT `lms_quiz_answers_ibfk_1` FOREIGN KEY (`targetCourseId`) REFERENCES `lms_target_courses` (`id`),
  CONSTRAINT `lms_quiz_answers_ibfk_2` FOREIGN KEY (`quizId`) REFERENCES `lms_quizzes` (`id`),
  CONSTRAINT `lms_quiz_answers_ibfk_3` FOREIGN KEY (`quizQuestionId`) REFERENCES `lms_quiz_questions` (`id`),
  CONSTRAINT `lms_quiz_answers_ibfk_4` FOREIGN KEY (`quizQuestionOptionId`) REFERENCES `lms_quiz_question_options` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_quiz_answers`
--


--
-- Table structure for table `lms_quiz_question_options`
--

CREATE TABLE `lms_quiz_question_options` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `quizQuestionId` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `isCorrect` tinyint(1) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `quizQuestionId` (`quizQuestionId`),
  CONSTRAINT `lms_quiz_question_options_ibfk_1` FOREIGN KEY (`quizQuestionId`) REFERENCES `lms_quiz_questions` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_quiz_question_options`
--


--
-- Table structure for table `lms_quiz_questions`
--

CREATE TABLE `lms_quiz_questions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `quizId` int(11) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `marks` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `quizId` (`quizId`),
  CONSTRAINT `lms_quiz_questions_ibfk_1` FOREIGN KEY (`quizId`) REFERENCES `lms_quizzes` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_quiz_questions`
--


--
-- Table structure for table `lms_quizzes`
--

CREATE TABLE `lms_quizzes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `courseId` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_quizzes`
--


--
-- Table structure for table `lms_target_courses`
--

CREATE TABLE `lms_target_courses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `courseId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `simulationId` int(11) DEFAULT NULL,
  `errorCode` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `userId` (`companyId`),
  KEY `targetId` (`targetId`),
  KEY `courseId` (`courseId`),
  CONSTRAINT `lms_target_courses_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `users` (`id`),
  CONSTRAINT `lms_target_courses_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`),
  CONSTRAINT `lms_target_courses_ibfk_3` FOREIGN KEY (`courseId`) REFERENCES `lms_courses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `lms_target_courses`
--


--
-- Table structure for table `metadata`
--

CREATE TABLE `metadata` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `key` varchar(255) DEFAULT NULL,
  `value` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `metadata_ibfk_1` (`companyId`),
  CONSTRAINT `metadata_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `metadata`
--


--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `html` mediumtext,
  `capture_credentials` int(11) DEFAULT NULL,
  `capture_passwords` int(11) DEFAULT NULL,
  `redirect_url` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `subAttackTypeId` int(11) DEFAULT NULL,
  `thumbnail` varchar(255) DEFAULT NULL,
  `thumbnail_advisory` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pages_subAttackTypeId_foreign_idx` (`subAttackTypeId`),
  KEY `pages_ibfk_1` (`companyId`),
  CONSTRAINT `pages_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `pages_subAttackTypeId_foreign_idx` FOREIGN KEY (`subAttackTypeId`) REFERENCES `sub_attack_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `pages`
--


--
-- Table structure for table `policies`
--

CREATE TABLE `policies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `key` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `companyId` int(11) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `policies`
--

INSERT INTO `policies` VALUES (1,'administration-full-access','TdMaAVu0yJd7m9uwQHaXWlHaeNm9lmDzQOwxzKXpilrLXvnhkZ','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(2,'campaign-write-access-4-eye','NUJTPTZNtR6ArvnrbeFWhRACmXahbZny08NBQ38GHRRe8dOzPO','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(3,'campaign-full-access','1py2TOpwDHE0yUDKui5qOnkdZ9NyIi5SCzRyaxQYeX1jDr3N0G','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(4,'campaign-list-access','wRFxmK66o0ERzyZC9FpQP8lBegINOeN8dfAWR6GGPi3BgnMIir','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(5,'campaign-result-access','2csW4u82Ogsbx7EdCfnNLtXJb2SUK4CAaWl8WgjBtRGzT9rzvB','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(6,'campaign-write-access','TJKKKtl6aFj7Wz8oxvMAv0Q55YPgY23G6Y8K4qScuknK2qZHq6','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(7,'campaign-delete-access','ssoIBnegMZZGeHT7O2ubi6Zj3T1xOvgbr1ohmDwvTmTaidCKiY','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(8,'evs-full-access','u8ELPDlxSM9NDE4VlapuFX2Wz7HC5V32z0VqNtGKhLoaIOpJRo','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(9,'evs-list-access','TerNxoHiplVULi2RLRG4dCKNSkhicwLIxPQdn4pGDXv5vMAp92','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(10,'evs-read-access','nk5pRWzIy8YnGG5qEnMmyV7Gvr5hJ0K9SoeXIW3AJkmMtgDtIR','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(11,'hack-record-result-access','OElhj2Q1PscFWvygqaDXnJVqjqWRdmMp3sx4uvdtHYmAz1B6sg','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(12,'reported-email-full-access','SF0frqQutyorSpQPLD6cFqWrP05lXmpPtdsVupxxRl6qJvcpOt','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(13,'reported-email-list-access','163GoAm6nKmaXI3dt5LCal3qCookBQ1uj9Oj5ooEFS3xTSW2nH','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(14,'reported-email-read-access','WYP4SKfJcltv3heOV3R1xRl1ShEarc2vSQuXDjG7DaiSErdhjS','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(15,'reported-email-write-access','NdjFKTStN6JJ5SI3WBXMh0LC4DHw1xgTmb04zmAZ61nyDbJVaF','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(16,'reported-email-delete-access','GMWvqFohf6fM16r7KgwUfHSjLPWvqCgDp6OEsdjru4uWsMag0n','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(17,'approve-email-full-access','Ua7RD5kF15ldSqJtCtz1mcdQ1IwIMobyA1MzqbifornLNNcWzE','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(18,'approve-email-list-access','1bfMDRwFNLajKWM3zdyiiPjld0mgy7D6OUX420q2Oecv5ySTZF','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(19,'approve-email-read-access','SqlVQUTK8lSEXgynA9MaBz04G1iujJjHXaxYbDc3k123RfxB4Y','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(20,'approve-email-write-access','G5UH2dl4zEEdWNLIqs7qtQP0YTs8Wu9oWPNb1o666qOMjZsCgJ','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(21,'approve-email-delete-access','bqPDFfjjvK20RfaWqzUaxkbtJO8X0KG0OiebWFZFYmE5N0Y5pt','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(22,'attacker-profile-full-access','umoXtdCTIL08JxoZvPHkzQ9SoV0xYFKKnqt8VXCUvDMs7pqaCz','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(23,'attacker-profile-list-access','ERFWmrUZzoYzNKI9cv1c71WL1ShXIYcOUqWAd1vWhy80Y7glxt','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(24,'attacker-profile-read-access','YrAIg55vdhhWFenY2sqGOPT1cImcxeRvyVJRxvSQvsy3YQPmnM','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(25,'attacker-profile-write-access','T8si3BZbqhXF5bDifVia04S0DTagsBXXhPDBokHhFHPKem0FrO','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(26,'attacker-profile-delete-access','MWmjjdsB7EDu2ZuQBv3EJ09An40tKL3mo8aIsMbJudQUezWuoI','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(27,'email-template-full-access','kwsGAO0OisispP0RHtil1V068Q7I7ry1GpWDLU3pfQfX4r7MI9','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(28,'email-template-list-access','bQPut1404YBpnuqyWWx0dthSgC0m0cZ0gPV1yJBDEU9wHDNrqP','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(29,'email-template-read-access','9S0wLyePbAHei1VakRuWPdyDiXKyn28WZsoAb8ilCXR1Gv3heO','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(30,'email-template-write-access','AKitnGeRW8PdhfawmOoNsDKMQUOVOwst0TX7n1pyRjhBCfwais','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(31,'email-template-delete-access','VpvEwkr7koPVyXFKIpI8PnAfOix94qO3OgQGRJrCq71KM0hoKJ','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(32,'sms-template-full-access','nNH3aKsc9NIXIWgOlyr7AhLzZXNdIzR6OLCjI6m5rTPlrenBwd','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(33,'sms-template-list-access','9gRN1aknbWGHA2s7soYugK4Mpegfk6C6tlzBJjRYmG1VadY10B','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(34,'sms-template-read-access','WrB1EnCNX7qHhHiXFUC7N7LhKt3ENkSE6MLSdrsc7ciWmDHckn','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(35,'sms-template-write-access','2T8Um10xNUQdMJb2NEetKylKGNZeJcpEukOmXAZwWN6gQt6jl4','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(36,'sms-template-delete-access','XIZZCzLuHk2ysVAIZizktxKTSaBDKfut3JJxfcrq3ZpghXbbty','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(37,'smsgateway-full-access','zkDxNY5PeAhpbsEdiwooscBmPeTQvfwjbM1fznY0gvan1VhF8r','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(38,'smsgateway-list-access','FwEq0Pzy0BRHKl3Q0pM5JUIjKkIcsZMS17P6nSZwg07lJ3mW1P','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(39,'smsgateway-write-access','o1JuV51P2cNCU9QWwOoIucu20TBM0m4MLyj0lUsPzXfRXEwsXa','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(40,'metadata-full-access','ugTa8rMzoP8Zn78gYkDXKdfgDLOqlJjLqNYAacmPcs9K5561gt','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(41,'metadata-list-access','RUAqNTf5OY1RjBc574KscOcRwgFFgt8lxhBqCpxWkICNy20VKz','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(42,'metadata-read-access','ROTBIu7p7UnbXmu8Y4P37VH4XsR9kQX7Bc3GwbEPzzuPYyOCET','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(43,'metadata-write-access','BjKgGDZKh1CRMnpAiOdvqkAGUYNJev45S8NVsf6aQMOhJ4of14','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(44,'overview-full-access','hN1DBjqdCKu8ZCJt0x2mUMfsGgAKjEHr7ROBMQ6Ek3NnZjEpcA','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(45,'landing-template-full-access','HsO4SFtsh6WSB18AAt1EAyPmDPag4RGhII56SRaBbAkAYCaRPl','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(46,'landing-template-list-access','JszhBEb56pZu4U2V2jnqXwnXrRwnoROi1gCTbwwM5a13vNChCV','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(47,'landing-template-read-access','wPAgNMYVhwHn6OG3y7TO1SThUksRrdgZx9jYDgzWtOdsuZbiHV','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(48,'landing-template-write-access','5WHcJWfuxlr2W8DdpPOjvRmGcVzRuRwBH5lwXEwhaWlNRF44SJ','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(49,'landing-template-delete-access','IbqxGbtIkgMpOFZQeqRZoV0pOHl2XQsiYYmx74hNwL7jgrr5vF','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(50,'attack-type-read-access','KP0VJugmveVE0kfQIMsR7uI3yooA6vof6ePPNDyFjPmi4dUmcU','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(51,'user-and-department-full-access','W3uhwy7d2DH1SFnaRrLYPci0hpHziKc34yMf0a1TthVNlyQqE2','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(52,'user-and-department-list-access','v3ltS46d2jHkJJkiLpBizY77YHEbCB6X3lU2dtUD9oSxoMte2S','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(53,'user-and-department-read-access','hXfEuk5nDmClMo85CO030AsAJbPbtSvGBkxNRKyqQPegJqQtaD','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(54,'user-and-department-write-access','dBnU8idlixDG0ZdErKfsrbxtxOqpPmf6UGFvyNIGkKwnt4KiG5','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(55,'user-and-department-delete-access','UwHwCh21wmglIi2QKvc1rEakXVbngA9zOxizMEpRrBGj7BdCUH','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(56,'awareness-module-full-access','Nb4Se7QCbY1nqD4grubhQkJDZkWo4hKk6c7ItjJ2TpzCb6defH','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(57,'awareness-module-list-access','7vrHciWOKSzvVxK8xqHdWB8vVkdOvcpXtSR6fiyUpks7HlzODY','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(58,'awareness-module-read-access','BUz8NLlyECXyNGMqsXyKYOPy6llId2G96uponHTWsGBC8x7LYt','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(59,'awareness-module-write-access','S8Ym9f202fqlVCXMRJOpC7YBqBriPfAfLBwrSQ0SsNaGviiBiE','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(60,'awareness-module-delete-access','x6tQMjVDCEJR5q8l6yKCokUNnRbLdQQUA0HSyaO8aDb69SYucf','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(61,'policy-full-access','F0u4pskagOvB3O3f3m6bPyMwTivvx1qzs3zB6eDZWCcY4qK41N','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(62,'policy-read-access','g7khy3tTFuRJE7hk7FTBOX7iPSmcy0fpLPLgtVpJmmpj5Y57y8','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(63,'policy-delete-access','QRvWV5pMESVMDkVFMz9BNS2T044AA5g9PSz8vlxDzO5DN4DiVe','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(64,'user-full-access','nfPn7Wv2Zvd56q6d6oTlnDOkv6wVvPmf7h4aOsBWnKmSnOwr14','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(65,'user-read-access','JsH8xZCqFe6YboBrpisdZfQi6SUn4y1R6cPaJ5NIZJyxV2BgWs','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(66,'user-delete-access','IdplFFelr31yr2kvrCeFfhQ4nRezolHp5dTaozLpntfSGQPE0D','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(67,'user-policy-full-access','vznmuakesLeVj94RRP4vrBliAhsH8mj946XivsoU7hSHYoI7Wo','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(68,'user-policy-read-access','KItPKDWWBCKZtw0jChhmwR3YbOGPDifEOxCDgr8vkir6Xx0p52','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(69,'lms-full-access','WOUpwgckL10sLdEDCv3CPAtCdVgcXpeXMWDkSne0Eui0L6EH9Q','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(70,'lms-list-access','wIGQJt1RKb4Vw1BNgIlG81amo9eVXwiuOzSCU1PnSAuNfwAV2A','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(71,'lms-read-access','nRola5n8cIbfPMRVxilZpiS1jorbxBNPAFK1SOOr1IuBdDc4ct','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(72,'lms-write-access','Ge7A60jbaHVgRtn26hx1LJXhO2d7pQdeOt5LJWLvtSuWj99xSr','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(73,'lms-run-access','0MxMgC22u1nF9seKnu5dTH7yhdTzpG079Y55ww1uUPf1Ixjp4m','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL),(74,'lms-delete-access','q109UWajuXtSvRw3hX4xNkokRpwuKc0WroAsdRZeH2tpozYdRo','managed',NULL,NULL,'2020-01-21 09:16:57','2020-01-21 09:16:57',NULL);

--
-- Table structure for table `policyActions`
--

CREATE TABLE `policyActions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `policyId` int(11) DEFAULT NULL,
  `actionId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=177 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `policyActions`
--

INSERT INTO `policyActions` VALUES (1,3,1,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(2,3,3,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(3,3,4,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(4,3,5,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(5,3,6,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(6,3,7,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(7,3,8,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(8,3,9,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(9,3,13,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(10,3,14,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(11,3,25,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(12,3,26,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(13,3,27,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(14,3,29,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(15,3,44,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(16,3,45,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(17,3,48,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(18,3,49,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(19,3,52,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(20,3,53,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(21,3,56,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(22,3,57,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(23,3,68,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(24,3,69,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(25,4,1,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(26,9,31,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(27,2,16,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(28,2,17,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(29,2,18,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(30,2,22,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(31,2,23,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(32,5,3,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(33,5,4,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(34,5,5,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(35,5,6,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(36,5,25,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(37,5,26,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(38,5,27,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(39,10,31,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(40,10,32,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(41,8,31,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(42,8,32,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(43,6,7,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(44,6,8,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(45,6,9,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(46,6,13,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(47,6,14,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(48,12,34,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(49,12,35,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(50,12,36,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(51,12,37,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(52,12,38,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(53,12,39,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(54,13,34,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(55,14,34,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(56,7,29,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(57,16,37,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(58,17,40,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(59,17,41,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(60,17,42,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(61,17,43,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(62,18,40,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(63,11,30,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(64,20,40,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(65,20,41,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(66,20,42,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(67,21,43,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(68,22,48,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(69,22,49,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(70,22,50,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(71,22,51,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(72,15,34,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(73,15,36,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(74,15,38,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(75,15,39,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(76,24,48,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(77,24,49,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(78,25,48,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(79,25,49,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(80,25,50,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(81,26,51,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(82,19,40,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(83,19,41,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(84,28,52,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(85,29,52,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(86,29,53,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(87,30,52,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(88,30,53,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(89,30,54,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(90,23,48,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(91,32,56,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(92,32,57,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(93,32,58,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(94,32,59,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(95,33,56,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(96,34,56,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(97,34,57,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(98,27,52,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(99,27,53,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(100,27,54,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(101,27,55,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(102,36,59,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(103,37,60,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(104,37,61,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(105,38,60,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(106,31,55,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(107,45,68,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(108,45,69,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(109,45,70,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(110,45,71,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(111,46,68,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(112,47,68,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(113,47,69,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(114,35,56,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(115,35,57,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(116,35,58,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(117,49,71,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(118,40,62,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(119,40,63,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(120,40,64,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(121,40,65,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(122,40,66,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(123,41,62,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(124,39,60,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(125,39,61,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(126,43,62,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(127,43,63,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(128,43,64,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(129,43,65,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(130,43,66,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(131,44,67,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(132,50,72,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(133,48,68,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(134,48,69,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(135,48,70,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(136,52,44,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(137,53,44,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(138,53,45,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(139,54,44,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(140,54,45,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(141,54,46,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(142,42,62,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(143,42,63,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(144,42,64,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(145,69,81,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(146,69,82,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(147,69,83,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(148,69,84,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(149,69,85,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(150,70,82,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(151,71,81,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(152,71,82,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(153,51,44,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(154,51,45,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(155,51,46,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(156,51,47,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(157,74,85,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(158,73,81,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(159,73,82,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(160,73,83,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(161,73,84,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(162,56,86,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(163,56,87,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(164,56,88,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(165,56,89,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(166,55,47,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(167,58,86,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(168,58,89,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(169,59,86,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(170,59,88,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(171,59,89,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(172,60,87,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(173,72,81,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(174,72,82,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(175,72,83,'2020-01-21 09:16:57','2020-01-21 09:16:57'),(176,57,86,'2020-01-21 09:16:57','2020-01-21 09:16:57');

--
-- Table structure for table `quizzes`
--

CREATE TABLE `quizzes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `threatcopAccessId` int(11) DEFAULT NULL,
  `score` int(11) DEFAULT NULL,
  `total` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `threatcopAccessId` (`threatcopAccessId`),
  CONSTRAINT `quizzes_ibfk_1` FOREIGN KEY (`threatcopAccessId`) REFERENCES `threatcop_accesses` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `quizzes`
--


--
-- Table structure for table `ransomware_victims`
--

CREATE TABLE `ransomware_victims` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `systemName` varchar(255) DEFAULT NULL,
  `resultId` int(11) DEFAULT NULL,
  `simulationId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `localIP` varchar(255) DEFAULT NULL,
  `publicIP` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `resultId` (`resultId`),
  KEY `simulationId` (`simulationId`),
  CONSTRAINT `ransomware_victims_ibfk_1` FOREIGN KEY (`resultId`) REFERENCES `results` (`id`),
  CONSTRAINT `ransomware_victims_ibfk_2` FOREIGN KEY (`simulationId`) REFERENCES `simulations` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `ransomware_victims`
--


--
-- Table structure for table `report_attachments`
--

CREATE TABLE `report_attachments` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reportId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `report_attachments`
--


--
-- Table structure for table `reports`
--

CREATE TABLE `reports` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `body` text,
  `header` text,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `from` text,
  `subject` text,
  `to` text,
  `approve` int(11) DEFAULT NULL,
  `approvedAt` datetime DEFAULT NULL,
  `byCompanyId` int(11) DEFAULT NULL,
  `token` varchar(255) DEFAULT NULL,
  `attachment` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `reports_byUserId_foreign_idx` (`byCompanyId`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `reports`
--


--
-- Table structure for table `results`
--

CREATE TABLE `results` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `simulationId` int(11) DEFAULT NULL,
  `rId` varchar(255) DEFAULT NULL,
  `smsId` varchar(255) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `ip` varchar(255) DEFAULT NULL,
  `latitude` decimal(10,7) DEFAULT NULL,
  `longitude` decimal(10,7) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `localIP` text,
  `publicIP` text,
  PRIMARY KEY (`id`),
  KEY `simulationId` (`simulationId`),
  KEY `targetId` (`targetId`),
  KEY `results_ibfk_1` (`companyId`),
  CONSTRAINT `results_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `results_ibfk_2` FOREIGN KEY (`simulationId`) REFERENCES `simulations` (`id`),
  CONSTRAINT `results_ibfk_3` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `results`
--


--
-- Table structure for table `senders`
--

CREATE TABLE `senders` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `host` varchar(255) DEFAULT NULL,
  `username` text,
  `password` varchar(255) DEFAULT NULL,
  `from_address` varchar(255) DEFAULT NULL,
  `ignore_cert_errors` int(11) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `subAttackTypeId` int(11) DEFAULT NULL,
  `smsGatewayId` int(11) DEFAULT NULL,
  `callerId` text,
  PRIMARY KEY (`id`),
  KEY `senders_subAttackTypeId_foreign_idx` (`subAttackTypeId`),
  KEY `senders_smsGatewayId_foreign_idx` (`smsGatewayId`),
  KEY `senders_ibfk_1` (`companyId`),
  CONSTRAINT `senders_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `senders_smsGatewayId_foreign_idx` FOREIGN KEY (`smsGatewayId`) REFERENCES `sms_gateways` (`id`),
  CONSTRAINT `senders_subAttackTypeId_foreign_idx` FOREIGN KEY (`subAttackTypeId`) REFERENCES `sub_attack_types` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `senders`
--


--
-- Table structure for table `services`
--

CREATE TABLE `services` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `employeeId` int(11) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `status` varchar(255) DEFAULT NULL,
  `assignBy` int(11) DEFAULT NULL,
  `approvedBy` int(11) DEFAULT NULL,
  `value` text,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `companyId` (`companyId`),
  KEY `employeeId` (`employeeId`),
  CONSTRAINT `services_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `services_ibfk_2` FOREIGN KEY (`employeeId`) REFERENCES `employees` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `services`
--


--
-- Table structure for table `simulation_errors`
--

CREATE TABLE `simulation_errors` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `simulationId` int(11) DEFAULT NULL,
  `message` text,
  `createdAt` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `simulationId` (`simulationId`),
  CONSTRAINT `simulation_errors_ibfk_1` FOREIGN KEY (`simulationId`) REFERENCES `simulations` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `simulation_errors`
--


--
-- Table structure for table `simulation_targets`
--

CREATE TABLE `simulation_targets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `simulationId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `simulation_targets`
--


--
-- Table structure for table `simulations`
--

CREATE TABLE `simulations` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `campaignId` int(11) DEFAULT NULL,
  `templateId` int(11) DEFAULT NULL,
  `pageId` int(11) DEFAULT NULL,
  `senderId` int(11) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `isScheduled` int(11) DEFAULT NULL,
  `scheduledAt` datetime DEFAULT NULL,
  `launchedAt` datetime DEFAULT NULL,
  `executedAt` datetime DEFAULT NULL,
  `completedAt` datetime DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `identifier` varchar(255) DEFAULT NULL,
  `file` varchar(255) DEFAULT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `lmsPercentage` int(11) DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `campaignId` (`campaignId`),
  KEY `templateId` (`templateId`),
  KEY `pageId` (`pageId`),
  KEY `senderId` (`senderId`),
  CONSTRAINT `simulations_ibfk_1` FOREIGN KEY (`campaignId`) REFERENCES `campaigns` (`id`),
  CONSTRAINT `simulations_ibfk_2` FOREIGN KEY (`templateId`) REFERENCES `templates` (`id`),
  CONSTRAINT `simulations_ibfk_3` FOREIGN KEY (`pageId`) REFERENCES `pages` (`id`),
  CONSTRAINT `simulations_ibfk_4` FOREIGN KEY (`senderId`) REFERENCES `senders` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `simulations`
--


--
-- Table structure for table `sms_gateways`
--

CREATE TABLE `sms_gateways` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `callBackUrl` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sms_gateways`
--

INSERT INTO `sms_gateways` VALUES (1,'Exotel','https://{{.username}}:{{.password}}@api.exotel.com/v1/Accounts/{{.username}}/Sms/send.json','/api/smsgateway/exotel','2020-01-21 09:16:56','2020-01-21 09:16:56',NULL),(2,'TextGuru','https://www.txtguru.in/imobile/api.php?username={{.username}}&password={{.password}}&source={{.sender}}','/api/smsgateway/textguru','2020-01-21 09:16:56','2020-01-21 09:16:56',NULL),(3,'TextLocal','https://api.textlocal.in/send/?apiKey={{.apikey}}&sender={{.sender}}','/api/smsgateway/textlocal','2020-01-21 09:16:57','2020-01-21 09:16:57',NULL);

--
-- Table structure for table `sub_attack_types`
--

CREATE TABLE `sub_attack_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `attackTypeId` int(11) DEFAULT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `attackTypeId` (`attackTypeId`),
  CONSTRAINT `sub_attack_types_ibfk_1` FOREIGN KEY (`attackTypeId`) REFERENCES `attack_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sub_attack_types`
--

INSERT INTO `sub_attack_types` VALUES (1,'General',1,NULL),(2,'General',2,NULL),(3,'General',3,NULL),(4,'General',4,NULL);

--
-- Table structure for table `targets`
--

CREATE TABLE `targets` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(255) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `loggedinAt` datetime DEFAULT NULL,
  `verfKey` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `targets`
--


--
-- Table structure for table `templates`
--

CREATE TABLE `templates` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `companyId` int(11) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `html` mediumtext,
  `subAttackTypeId` int(11) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `thumbnail` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `subAttackTypeId` (`subAttackTypeId`),
  KEY `templates_ibfk_1` (`companyId`),
  CONSTRAINT `templates_ibfk_1` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`),
  CONSTRAINT `templates_ibfk_2` FOREIGN KEY (`subAttackTypeId`) REFERENCES `sub_attack_types` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `templates`
--

INSERT INTO `templates` VALUES (1,NULL,'__knowledge_template__','Let\'s Stay Safe from Cyber Attacks','<html> <head> <title></title> </head> <body> <div dir=\"ltr\"> <div class=\"gmail_quote\"> <div dir=\"ltr\"> <div class=\"gmail_quote\">&nbsp; <div> <div id=\"m_2848591953723454914m_-7329556301286512649body_style\" style=\"margin-top:10px\"> <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"m_2848591953723454914m_-7329556301286512649table\" width=\"602\"> <tbody> <tr> <td style=\"border:10px solid #25537b; font-family:Arial; padding: 16px;\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> <tbody> <tr> <td valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important; \" > <tbody> <tr> <td valign=\"top\" width=\"3%\">&nbsp;</td> <td valign=\"top\" width=\"94%\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> <tbody> <tr> <center><img src=\"http://169.61.12.124/threatcop_logo.png\"></center> </tr> <tr> <td style=\"color:#18517F; font-family:Arial;text-align:center;font-size:20px;padding:10px; text-transform: capitalize;\"><strong>How to identify {{.name}}?</strong></td> </tr> <tr> <td style=\"text-align: center;\"> <img  width=\"40%\" src=\"  http://169.61.12.124/phishing.png\"> </td> </tr> <tr> <td height=\"20\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;color:#000000;font-size:1.1em\">Hello There,</td> </tr> <tr> <td height=\"10\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;color:#000000;font-size:1.1em\">Trust you are doing great.</td> </tr> <tr> <td> <p style=\"font-size:14px;line-height:21px; margin-top: 20px; margin-bottom: 40px;\">We want you and your data to be secure from any {{.name}}. We have shared our world class content on <a href=\"{{.URL}}\" style=\"color:#24537B;font-weight:600\" target=\"_blank\"> How to identify {{.name}} and protect yourself from it? </a> with interactive videos, advisories, and presentations</p> </td> </tr> <tr> <td style=\"text-align: center;\"> <a style=\"background: #24537B; color:white; text-decoration: none; padding: 8px 16px; border-radius: 7px; letter-spacing: 1px;\" href=\"{{.URL}}\" target=\"_blank\">Click Here </a> <p> To learn and protect yourself from {{.name}}.</p> </td> </tr> <tr> <td height=\"10\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;font-size:12px;color:#000000\" valign=\"top\">Happy Learning,<br /> <br /> <strong>Team Kratikal</strong></td> </tr> <tr> <td height=\"15\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;font-size:12px;color:#004b8d\" valign=\"bottom\"><em><strong>Your Digital Security Friend</strong></em></td> </tr> <tr> <td height=\"15\">&nbsp;</td> </tr> </tbody> </table> </td> <td valign=\"top\" width=\"3%\">&nbsp;</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style=\"padding:12.5px 5px 12.5px 25px\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> </table> </td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">Have an issue? Please mail us at <a href=\"{{.URL}}\" target=\"_blank\">support@kratikal.com</a></td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">You are receiving this email because you registered at <a href=\"{{.URL}}\" target=\"_blank\">www.threatcop.ai</a></td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">&reg; ThreatCop | Kratikal, 2019</td> </tr> </tbody> </table> </div> <img alt=\"\" border=\"0\" height=\"1\" src=\"https://ci3.googleusercontent.com/proxy/XzfjUuUov5V6Tp_95_7N-d8_JQsjDNCQm6MqFlrioriYmUB84fu-0eLXW97WABJx9fTaDPLmNdGtjoKklwkuze3HuQLw1ZPHhKKRCOJzu7dgWBrv61usd70xJWEun8tNZ7pcXD5Q64n6VUxLt23SDZ5sMBCivu1VwYQaOoUFEsCjiEaeg7CmbSqL1pUwLEmaUYhLHcxEvokSpYNx1xuDoL7edJPP7KlSkZGY0K5wZfnzYmmDWAU6YYNK-VBjUAxP3haBBT_QB9LpdXw5F81OHao3bgme_39_4-pBSIwV3xCrgec4mCp5Z5e18Y6GSA9K0DJlEVcyvnlaa9N4dazu7HAkk_bpm0BYIJ-Eszo4QDbgT7gTTl8YQEnSjr3S-Zeb61HRIkfAwDpO7OL_-jLEV0IybXr2=s0-d-e1-ft#https://u7623503.ct.sendgrid.net/wf/open?upn=znGNdiyAneJeDqtaAGBuqmhWmBuimKQOP7qXPcQJjxOBCMjS17VhfX3GqEVPzIQa5qzDXWe0nQDujdqSDc97JEUNxmfg-2Bky7QLhbME6IFWojhnTfrxsA9azzzl-2F7PB7s1Rm6xZehqB6X9bcLVaznQqLN2aAm1rJgbxhryi3525rsxat3DVQrgyH1WGBjVE8xrAbb5pjMUpS9STcb9CnwXxhF-2B2P5xiirkEos8M9OBEM-3D\" style=\"height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important\" width=\"1\" /></div> </div> </div> </div> </div><p>{{.tracker}}</p> </body> </html>',NULL,NULL,'2020-01-21 09:16:56','2020-01-21 09:16:56',NULL,NULL),(2,NULL,'__quiz_template__','Let\'s Test How Safe are you from Cyber Attacks','<html> <head> <title></title> </head> <body> <div dir=\"ltr\"> <div class=\"gmail_quote\"> <div dir=\"ltr\"> <div class=\"gmail_quote\">&nbsp; <div> <div id=\"m_2848591953723454914m_-7329556301286512649body_style\" style=\"margin-top:10px\"> <table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" class=\"m_2848591953723454914m_-7329556301286512649table\" width=\"602\"> <tbody> <tr> <td style=\"border:10px solid #25537b; font-family:Arial; padding: 16px;\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> <tbody> <tr> <td valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important; \" > <tbody> <tr> <td valign=\"top\" width=\"3%\">&nbsp;</td> <td valign=\"top\" width=\"94%\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> <tbody> <tr> <center><img src=\"http://169.61.12.124/threatcop_logo.png\"></center> </tr> <tr> <td style=\"color:#18517F; font-family:Arial;text-align:center;font-size:20px;padding:10px; text-transform: capitalize;\"><strong>Get to know how aware you are !</strong></td> </tr> <tr> <td style=\"text-align: center;\"> <img  width=\"40%\" src=\"  http://169.61.12.124/phishing.png\"> </td> </tr> <tr> <td height=\"20\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;color:#000000;font-size:1.1em\">Hello There,</td> </tr> <tr> <td height=\"10\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;color:#000000;font-size:1.1em\">Trust you are doing great.</td> </tr> <tr> <td> <p style=\"font-size:14px;line-height:21px; margin-top: 20px; margin-bottom: 40px;\">We want you and your data to be secure from any Cyber Attack. We have created a quiz to know how aware you are.</p> </td> </tr> <tr> <td style=\"text-align: center;\"> <a style=\"background: #24537B; color:white; text-decoration: none; padding: 8px 16px; border-radius: 7px; letter-spacing: 1px;\" href=\"{{.URL}}\" target=\"_blank\">Click Here </a> <p> To start the quiz</p> </td> </tr> <tr> <td height=\"10\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;font-size:12px;color:#000000\" valign=\"top\">Happy Learning,<br /> <br /> <strong>Team Kratikal</strong></td> </tr> <tr> <td height=\"15\">&nbsp;</td> </tr> <tr> <td style=\"font-family:Arial;font-size:12px;color:#004b8d\" valign=\"bottom\"><em><strong>Your Digital Security Friend</strong></em></td> </tr> <tr> <td height=\"15\">&nbsp;</td> </tr> </tbody> </table> </td> <td valign=\"top\" width=\"3%\">&nbsp;</td> </tr> </tbody> </table> </td> </tr> </tbody> </table> </td> </tr> <tr> <td style=\"padding:12.5px 5px 12.5px 25px\" valign=\"top\"> <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"width:100%!important\" width=\"100%\"> </table> </td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">Have an issue? Please mail us at <a href=\"{{.URL}}\" target=\"_blank\">support@kratikal.com</a></td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">You are receiving this email because you registered at <a href=\"{{.URL}}\" target=\"_blank\">www.threatcop.ai</a></td> </tr> <tr> <td height=\"10\" style=\"font-family:Arial;text-align:center;font-size:12px;line-height:14px;padding:10px 0 5px 25px;color:#000000\">&reg; ThreatCop | Kratikal, 2019</td> </tr> </tbody> </table> </div> <img alt=\"\" border=\"0\" height=\"1\" src=\"https://ci3.googleusercontent.com/proxy/XzfjUuUov5V6Tp_95_7N-d8_JQsjDNCQm6MqFlrioriYmUB84fu-0eLXW97WABJx9fTaDPLmNdGtjoKklwkuze3HuQLw1ZPHhKKRCOJzu7dgWBrv61usd70xJWEun8tNZ7pcXD5Q64n6VUxLt23SDZ5sMBCivu1VwYQaOoUFEsCjiEaeg7CmbSqL1pUwLEmaUYhLHcxEvokSpYNx1xuDoL7edJPP7KlSkZGY0K5wZfnzYmmDWAU6YYNK-VBjUAxP3haBBT_QB9LpdXw5F81OHao3bgme_39_4-pBSIwV3xCrgec4mCp5Z5e18Y6GSA9K0DJlEVcyvnlaa9N4dazu7HAkk_bpm0BYIJ-Eszo4QDbgT7gTTl8YQEnSjr3S-Zeb61HRIkfAwDpO7OL_-jLEV0IybXr2=s0-d-e1-ft#https://u7623503.ct.sendgrid.net/wf/open?upn=znGNdiyAneJeDqtaAGBuqmhWmBuimKQOP7qXPcQJjxOBCMjS17VhfX3GqEVPzIQa5qzDXWe0nQDujdqSDc97JEUNxmfg-2Bky7QLhbME6IFWojhnTfrxsA9azzzl-2F7PB7s1Rm6xZehqB6X9bcLVaznQqLN2aAm1rJgbxhryi3525rsxat3DVQrgyH1WGBjVE8xrAbb5pjMUpS9STcb9CnwXxhF-2B2P5xiirkEos8M9OBEM-3D\" style=\"height:1px!important;width:1px!important;border-width:0!important;margin-top:0!important;margin-bottom:0!important;margin-right:0!important;margin-left:0!important;padding-top:0!important;padding-bottom:0!important;padding-right:0!important;padding-left:0!important\" width=\"1\" /></div> </div> </div> </div> </div> <p>{{.tracker}}</p></body> </html>',NULL,NULL,'2020-01-21 09:16:56','2020-01-21 09:16:56',NULL,NULL),(3,NULL,'__lms_reminder__','Reminder to finish your video lecture','<html>\n<head>\n	<title></title>\n</head>\n<body data-gramm=\"true\" data-gramm_editor=\"true\" data-gramm_id=\"8bb7a884-c1e4-0abe-18c0-9dbdaee3b7ba\">\n<p>Continue to video lectures - {{.url}}</p>\n\n{{.tracker}}\n</body>\n</html>\n',NULL,NULL,'2020-01-21 09:16:56','2020-01-21 09:16:56',NULL,NULL);

--
-- Table structure for table `threatcop_accesses`
--

CREATE TABLE `threatcop_accesses` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `campaignId` int(11) DEFAULT NULL,
  `targetId` int(11) DEFAULT NULL,
  `accessToken` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `campaignId` (`campaignId`),
  KEY `targetId` (`targetId`),
  CONSTRAINT `threatcop_accesses_ibfk_1` FOREIGN KEY (`campaignId`) REFERENCES `campaigns` (`id`),
  CONSTRAINT `threatcop_accesses_ibfk_2` FOREIGN KEY (`targetId`) REFERENCES `targets` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `threatcop_accesses`
--


--
-- Table structure for table `userPolicies`
--

CREATE TABLE `userPolicies` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `policyId` int(11) DEFAULT NULL,
  `userId` int(11) DEFAULT NULL,
  `companyId` int(11) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `userPolicies`
--


--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `firstname` varchar(255) DEFAULT NULL,
  `lastname` varchar(255) DEFAULT NULL,
  `username` text,
  `email` varchar(255) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `status` enum('active','inactive') DEFAULT 'active',
  `valid` int(11) DEFAULT '0',
  `verf_key` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  `attempt` int(11) DEFAULT NULL,
  `loggedOutAt` datetime DEFAULT NULL,
  `companyId` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `users_companyId_foreign_idx` (`companyId`),
  CONSTRAINT `users_companyId_foreign_idx` FOREIGN KEY (`companyId`) REFERENCES `companies` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `users`
--


--
-- Table structure for table `voice_gateways`
--

CREATE TABLE `voice_gateways` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `callBackUrl` varchar(255) DEFAULT NULL,
  `createdAt` datetime NOT NULL,
  `updatedAt` datetime NOT NULL,
  `deletedAt` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `voice_gateways`
--

INSERT INTO `voice_gateways` VALUES (1,'Exotel','https://{{.apiKey}}:{{.apiToken}}@api.in.exotel.com/v1/Accounts/{{.sId}}/Calls/connect','/api/voice/calldetails','2020-01-21 09:16:59','2020-01-21 09:16:59',NULL);


