-- --------------------------------------------------------
-- Anfitrião:                    localhost
-- Versão do servidor:           5.7.24 - MySQL Community Server (GPL)
-- Server OS:                    Win64
-- HeidiSQL Versão:              10.2.0.5599
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;

-- Dumping structure for table escola8demarco.ano_lectivos
DROP TABLE IF EXISTS `ano_lectivos`;
CREATE TABLE IF NOT EXISTS `ano_lectivos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.boletins
DROP TABLE IF EXISTS `boletins`;
CREATE TABLE IF NOT EXISTS `boletins` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.cadernetas
DROP TABLE IF EXISTS `cadernetas`;
CREATE TABLE IF NOT EXISTS `cadernetas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `classe` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estudante_id` int(10) unsigned NOT NULL,
  `nomeAluno` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `trimestre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `semana` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `notaLP1` int(11) DEFAULT '0',
  `notaLP2` int(11) DEFAULT '0',
  `notaLP3` int(11) DEFAULT '0',
  `notaLP4` int(11) DEFAULT '0',
  `notaLP5` int(11) DEFAULT '0',
  `notaMat1` int(11) DEFAULT '0',
  `notaMat2` int(11) DEFAULT '0',
  `notaMat3` int(11) DEFAULT '0',
  `notaMat4` int(11) DEFAULT '0',
  `notaMat5` int(11) DEFAULT '0',
  `notaEMeio1` int(11) DEFAULT '0',
  `notaEMeio2` int(11) DEFAULT '0',
  `notaEMeio3` int(11) DEFAULT '0',
  `notaEMeio4` int(11) DEFAULT '0',
  `notaEMeio5` int(11) DEFAULT '0',
  `notaEMP1` int(11) DEFAULT '0',
  `notaEMP2` int(11) DEFAULT '0',
  `notaEMP3` int(11) DEFAULT '0',
  `notaEMP4` int(11) DEFAULT '0',
  `notaEMP5` int(11) DEFAULT '0',
  `notaEMusical1` int(11) DEFAULT '0',
  `notaEMusical2` int(11) DEFAULT '0',
  `notaEMusical3` int(11) DEFAULT '0',
  `notaEMusical4` int(11) DEFAULT '0',
  `notaEMusical5` int(11) DEFAULT '0',
  `notaEF1` int(11) DEFAULT '0',
  `notaEF2` int(11) DEFAULT '0',
  `notaEF3` int(11) DEFAULT '0',
  `notaEF4` int(11) DEFAULT '0',
  `notaEF5` int(11) DEFAULT '0',
  `MediaLP` int(11) NOT NULL DEFAULT '0',
  `MediaMat` int(11) NOT NULL DEFAULT '0',
  `MediaEMeio` int(11) NOT NULL DEFAULT '0',
  `MediaEMP` int(11) NOT NULL DEFAULT '0',
  `MediaEMusical` int(11) NOT NULL DEFAULT '0',
  `MediaEF` int(11) NOT NULL DEFAULT '0',
  `informacao` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `cadernetas_estudante_id_foreign` (`estudante_id`),
  CONSTRAINT `cadernetas_estudante_id_foreign` FOREIGN KEY (`estudante_id`) REFERENCES `estudantes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.classes
DROP TABLE IF EXISTS `classes`;
CREATE TABLE IF NOT EXISTS `classes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.disciplinas
DROP TABLE IF EXISTS `disciplinas`;
CREATE TABLE IF NOT EXISTS `disciplinas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `professor_id` int(10) unsigned NOT NULL,
  `valorFinal` int(11) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `disciplinas_classe_id_foreign` (`classe_id`),
  KEY `disciplinas_professor_id_foreign` (`professor_id`),
  CONSTRAINT `disciplinas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `disciplinas_professor_id_foreign` FOREIGN KEY (`professor_id`) REFERENCES `professores` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.estatisticas
DROP TABLE IF EXISTS `estatisticas`;
CREATE TABLE IF NOT EXISTS `estatisticas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `anoLectivo_id` int(10) unsigned NOT NULL,
  `AlMatriculados_M` int(11) DEFAULT NULL,
  `AlMatriculados_F` int(11) DEFAULT NULL,
  `AlMatriculados_T` int(11) DEFAULT NULL,
  `AlAvaliados_M` int(11) DEFAULT NULL,
  `AlAvaliados_F` int(11) DEFAULT NULL,
  `AlAvaliados_T` int(11) DEFAULT NULL,
  `AlSemAvaliacao_M` int(11) DEFAULT NULL,
  `AlSemAvaliacao_F` int(11) DEFAULT NULL,
  `AlSemAvaliacao_T` int(11) DEFAULT NULL,
  `Positivas_M` int(11) DEFAULT NULL,
  `Positivas_F` int(11) DEFAULT NULL,
  `Positivas_T` int(11) DEFAULT NULL,
  `Negativas_M` int(11) DEFAULT NULL,
  `Negativas_F` int(11) DEFAULT NULL,
  `Negativas_T` int(11) DEFAULT NULL,
  `AlTransferidos_M` int(11) DEFAULT NULL,
  `AlTransferidos_F` int(11) DEFAULT NULL,
  `AlTransferidos_T` int(11) DEFAULT NULL,
  `OutrosAlunos_M` int(11) DEFAULT NULL,
  `OutrosAlunos_F` int(11) DEFAULT NULL,
  `OutrosAlunos_T` int(11) DEFAULT NULL,
  `PercPositivas_M` int(11) DEFAULT NULL,
  `PercPositivas_F` int(11) DEFAULT NULL,
  `PercPositivas_T` int(11) DEFAULT NULL,
  `PercNegativas_M` int(11) DEFAULT NULL,
  `PercNegativas_F` int(11) DEFAULT NULL,
  `PercNegativas_T` int(11) DEFAULT NULL,
  `Total` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `estatisticas_anolectivo_id_foreign` (`anoLectivo_id`),
  CONSTRAINT `estatisticas_anolectivo_id_foreign` FOREIGN KEY (`anoLectivo_id`) REFERENCES `ano_lectivos` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.estudantes
DROP TABLE IF EXISTS `estudantes`;
CREATE TABLE IF NOT EXISTS `estudantes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `foto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'foto',
  `dataNascimento` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `provinciaNascimento` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `municipioNascimento` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `naturalidade` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numeroBilhete` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dataEmissaoBilhete` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Masculino',
  `morada` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Lubango',
  `bairro` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nomeEncarregado` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nomePai` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nomeMae` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `relacaoComEncarregado` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pai',
  `numeroEncarregado` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classeActual` int(11) NOT NULL DEFAULT '0',
  `turmaActual` int(11) NOT NULL DEFAULT '0',
  `matriculado` tinyint(1) NOT NULL DEFAULT '0',
  `pagouPropina` tinyint(1) NOT NULL DEFAULT '0',
  `propinasEmAtraso` tinyint(1) NOT NULL DEFAULT '0',
  `avaliado` tinyint(1) NOT NULL DEFAULT '0',
  `aprovado` tinyint(1) NOT NULL DEFAULT '0',
  `transferido` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.failed_jobs
DROP TABLE IF EXISTS `failed_jobs`;
CREATE TABLE IF NOT EXISTS `failed_jobs` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.funcao_users
DROP TABLE IF EXISTS `funcao_users`;
CREATE TABLE IF NOT EXISTS `funcao_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `funcao_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `funcao_users_user_id_foreign` (`user_id`),
  KEY `funcao_users_funcao_id_foreign` (`funcao_id`),
  CONSTRAINT `funcao_users_funcao_id_foreign` FOREIGN KEY (`funcao_id`) REFERENCES `funcoes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `funcao_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.funcoes
DROP TABLE IF EXISTS `funcoes`;
CREATE TABLE IF NOT EXISTS `funcoes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.mapas
DROP TABLE IF EXISTS `mapas`;
CREATE TABLE IF NOT EXISTS `mapas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `trimestre` int(11) NOT NULL,
  `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `anoLectivo_id` int(10) unsigned NOT NULL,
  `turma_id` int(10) unsigned NOT NULL,
  `nomeAluno` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MAC` int(11) DEFAULT NULL,
  `NPP` int(11) DEFAULT NULL,
  `NPT` int(11) DEFAULT NULL,
  `MT` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mapas_classe_id_foreign` (`classe_id`),
  KEY `mapas_anolectivo_id_foreign` (`anoLectivo_id`),
  KEY `mapas_turma_id_foreign` (`turma_id`),
  CONSTRAINT `mapas_anolectivo_id_foreign` FOREIGN KEY (`anoLectivo_id`) REFERENCES `ano_lectivos` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mapas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mapas_turma_id_foreign` FOREIGN KEY (`turma_id`) REFERENCES `turmas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.mapa_finals
DROP TABLE IF EXISTS `mapa_finals`;
CREATE TABLE IF NOT EXISTS `mapa_finals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `anoLectivo_id` int(10) unsigned NOT NULL,
  `turma_id` int(10) unsigned NOT NULL,
  `nomeAluno` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MT1` int(11) DEFAULT NULL,
  `MT2` int(11) DEFAULT NULL,
  `MT3` int(11) DEFAULT NULL,
  `MFD` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mapa_finals_classe_id_foreign` (`classe_id`),
  KEY `mapa_finals_anolectivo_id_foreign` (`anoLectivo_id`),
  KEY `mapa_finals_turma_id_foreign` (`turma_id`),
  CONSTRAINT `mapa_finals_anolectivo_id_foreign` FOREIGN KEY (`anoLectivo_id`) REFERENCES `ano_lectivos` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mapa_finals_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `mapa_finals_turma_id_foreign` FOREIGN KEY (`turma_id`) REFERENCES `turmas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.matriculas
DROP TABLE IF EXISTS `matriculas`;
CREATE TABLE IF NOT EXISTS `matriculas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `estudante_id` int(10) unsigned NOT NULL,
  `nomeEstudante` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `turma_id` int(10) unsigned NOT NULL,
  `foto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'foto',
  `periodo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'laboral',
  `turno` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'manha',
  `Sala` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '1ª Classe',
  `numeroEstudante` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `anoLectivo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `matriculas_estudante_id_foreign` (`estudante_id`),
  KEY `matriculas_classe_id_foreign` (`classe_id`),
  KEY `matriculas_turma_id_foreign` (`turma_id`),
  CONSTRAINT `matriculas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `matriculas_estudante_id_foreign` FOREIGN KEY (`estudante_id`) REFERENCES `estudantes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `matriculas_turma_id_foreign` FOREIGN KEY (`turma_id`) REFERENCES `turmas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.media_finals
DROP TABLE IF EXISTS `media_finals`;
CREATE TABLE IF NOT EXISTS `media_finals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `estudante_id` int(10) unsigned NOT NULL,
  `disciplina_id` int(10) unsigned NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `media` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `media_finals_estudante_id_foreign` (`estudante_id`),
  KEY `media_finals_disciplina_id_foreign` (`disciplina_id`),
  KEY `media_finals_classe_id_foreign` (`classe_id`),
  CONSTRAINT `media_finals_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `media_finals_disciplina_id_foreign` FOREIGN KEY (`disciplina_id`) REFERENCES `disciplinas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `media_finals_estudante_id_foreign` FOREIGN KEY (`estudante_id`) REFERENCES `estudantes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.migrations
DROP TABLE IF EXISTS `migrations`;
CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.minipautas
DROP TABLE IF EXISTS `minipautas`;
CREATE TABLE IF NOT EXISTS `minipautas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `pauta_id` int(10) unsigned NOT NULL,
  `disciplina_id` int(10) unsigned NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `anoLectivo_id` int(10) unsigned NOT NULL,
  `turma_id` int(10) unsigned NOT NULL,
  `nomeAluno` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `MAC_T1` int(11) DEFAULT NULL,
  `CPP_T1` int(11) DEFAULT NULL,
  `CT_T1` int(11) DEFAULT NULL,
  `MAC_T2` int(11) DEFAULT NULL,
  `CPP_T2` int(11) DEFAULT NULL,
  `CT_T2` int(11) DEFAULT NULL,
  `MAC_T3` int(11) DEFAULT NULL,
  `CPP_T3` int(11) DEFAULT NULL,
  `CT_T3` int(11) DEFAULT NULL,
  `CAP` int(11) DEFAULT NULL,
  `CPE` int(11) DEFAULT NULL,
  `CF` int(11) DEFAULT NULL,
  `Recurso` tinyint(1) DEFAULT NULL,
  `Observacao` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `minipautas_disciplina_id_foreign` (`disciplina_id`),
  KEY `minipautas_classe_id_foreign` (`classe_id`),
  KEY `minipautas_anolectivo_id_foreign` (`anoLectivo_id`),
  KEY `minipautas_turma_id_foreign` (`turma_id`),
  KEY `minipautas_pauta_id_foreign` (`pauta_id`),
  CONSTRAINT `minipautas_anolectivo_id_foreign` FOREIGN KEY (`anoLectivo_id`) REFERENCES `ano_lectivos` (`id`) ON DELETE CASCADE,
  CONSTRAINT `minipautas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `minipautas_disciplina_id_foreign` FOREIGN KEY (`disciplina_id`) REFERENCES `disciplinas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `minipautas_pauta_id_foreign` FOREIGN KEY (`pauta_id`) REFERENCES `pautas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `minipautas_turma_id_foreign` FOREIGN KEY (`turma_id`) REFERENCES `turmas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.notas
DROP TABLE IF EXISTS `notas`;
CREATE TABLE IF NOT EXISTS `notas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `estudante_id` int(10) unsigned NOT NULL,
  `disciplina_id` int(10) unsigned NOT NULL,
  `descricao` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `trimestre` int(11) NOT NULL,
  `disciplinas` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `valor` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `notas_estudante_id_foreign` (`estudante_id`),
  KEY `notas_disciplina_id_foreign` (`disciplina_id`),
  CONSTRAINT `notas_disciplina_id_foreign` FOREIGN KEY (`disciplina_id`) REFERENCES `disciplinas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `notas_estudante_id_foreign` FOREIGN KEY (`estudante_id`) REFERENCES `estudantes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.pagamento_propinas
DROP TABLE IF EXISTS `pagamento_propinas`;
CREATE TABLE IF NOT EXISTS `pagamento_propinas` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `estudante_id` int(10) unsigned NOT NULL,
  `mes` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `modoDePagamento` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `valorPago` int(11) NOT NULL,
  `desconto` int(11) NOT NULL,
  `iva` int(11) NOT NULL,
  `valorRestante` int(11) NOT NULL,
  `multa` tinyint(1) NOT NULL DEFAULT '0',
  `imagemComprovativo` int(11) NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.password_resets
DROP TABLE IF EXISTS `password_resets`;
CREATE TABLE IF NOT EXISTS `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  KEY `password_resets_email_index` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.pautas
DROP TABLE IF EXISTS `pautas`;
CREATE TABLE IF NOT EXISTS `pautas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `anoLectivo_id` int(10) unsigned NOT NULL,
  `turma_id` int(10) unsigned NOT NULL,
  `nomeAluno` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `CAP` int(11) DEFAULT NULL,
  `CPE` int(11) DEFAULT NULL,
  `CF` int(11) DEFAULT NULL,
  `Rec` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `pautas_classe_id_foreign` (`classe_id`),
  KEY `pautas_anolectivo_id_foreign` (`anoLectivo_id`),
  KEY `pautas_turma_id_foreign` (`turma_id`),
  CONSTRAINT `pautas_anolectivo_id_foreign` FOREIGN KEY (`anoLectivo_id`) REFERENCES `ano_lectivos` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pautas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `pautas_turma_id_foreign` FOREIGN KEY (`turma_id`) REFERENCES `turmas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.permissoes
DROP TABLE IF EXISTS `permissoes`;
CREATE TABLE IF NOT EXISTS `permissoes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.permissoes_roles
DROP TABLE IF EXISTS `permissoes_roles`;
CREATE TABLE IF NOT EXISTS `permissoes_roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `permissao_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `permissoes_roles_permissao_id_foreign` (`permissao_id`),
  KEY `permissoes_roles_role_id_foreign` (`role_id`),
  CONSTRAINT `permissoes_roles_permissao_id_foreign` FOREIGN KEY (`permissao_id`) REFERENCES `permissoes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `permissoes_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.professores
DROP TABLE IF EXISTS `professores`;
CREATE TABLE IF NOT EXISTS `professores` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `foto` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numeroAgente` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `dataNascimento` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `localNascimento` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `numeroBilhete` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `estadoCivil` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'solteiro',
  `sexo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'masculino',
  `morada` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'lubango',
  `nivelAcademico` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nivel',
  `bairro` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'arco íris',
  `funcao_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `professores_funcao_id_foreign` (`funcao_id`),
  CONSTRAINT `professores_funcao_id_foreign` FOREIGN KEY (`funcao_id`) REFERENCES `funcoes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.publicacoes
DROP TABLE IF EXISTS `publicacoes`;
CREATE TABLE IF NOT EXISTS `publicacoes` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `conteudo` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `destaque` tinyint(1) NOT NULL DEFAULT '0',
  `visivel` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.roles
DROP TABLE IF EXISTS `roles`;
CREATE TABLE IF NOT EXISTS `roles` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descricao` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.roles_users
DROP TABLE IF EXISTS `roles_users`;
CREATE TABLE IF NOT EXISTS `roles_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `role_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `roles_users_user_id_foreign` (`user_id`),
  KEY `roles_users_role_id_foreign` (`role_id`),
  CONSTRAINT `roles_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `roles_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.role_users
DROP TABLE IF EXISTS `role_users`;
CREATE TABLE IF NOT EXISTS `role_users` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `role_id` int(11) NOT 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;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.termos
DROP TABLE IF EXISTS `termos`;
CREATE TABLE IF NOT EXISTS `termos` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `estudante_id` int(10) unsigned NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `dados` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `termos_estudante_id_foreign` (`estudante_id`),
  KEY `termos_classe_id_foreign` (`classe_id`),
  CONSTRAINT `termos_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `termos_estudante_id_foreign` FOREIGN KEY (`estudante_id`) REFERENCES `estudantes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.turmas
DROP TABLE IF EXISTS `turmas`;
CREATE TABLE IF NOT EXISTS `turmas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nome` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `classe_id` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `turmas_classe_id_foreign` (`classe_id`),
  CONSTRAINT `turmas_classe_id_foreign` FOREIGN KEY (`classe_id`) REFERENCES `classes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

-- Dumping structure for table escola8demarco.users
DROP TABLE IF EXISTS `users`;
CREATE TABLE IF NOT EXISTS `users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Data exporting was unselected.

/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IF(@OLD_FOREIGN_KEY_CHECKS IS NULL, 1, @OLD_FOREIGN_KEY_CHECKS) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
