· 6 years ago · Sep 13, 2019, 02:28 PM
1-- MariaDB dump 10.17 Distrib 10.4.7-MariaDB, for Linux (x86_64)
2--
3-- Host: rppsbrasil.ddns.net Database: skadi
4-- ------------------------------------------------------
5-- Server version 10.4.7-MariaDB
6
7/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
8/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
9/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
10/*!40101 SET NAMES utf8 */;
11/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
12/*!40103 SET TIME_ZONE='+00:00' */;
13/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
14/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
15/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
16/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
17
18--
19-- Table structure for table `certificado`
20--
21
22DROP TABLE IF EXISTS `certificado`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `certificado` (
26 `id_certificado` int(11) NOT NULL AUTO_INCREMENT,
27 `id_turma_discente` int(11) NOT NULL,
28 `emitido` int(11) NOT NULL DEFAULT 0,
29 PRIMARY KEY (`id_certificado`),
30 KEY `fk_certificado_2_idx` (`id_turma_discente`),
31 CONSTRAINT `fk_certificado_1` FOREIGN KEY (`id_turma_discente`) REFERENCES `turma_discente` (`id_turma_discente`) ON DELETE NO ACTION ON UPDATE NO ACTION
32) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
33/*!40101 SET character_set_client = @saved_cs_client */;
34
35--
36-- Table structure for table `contato`
37--
38
39DROP TABLE IF EXISTS `contato`;
40/*!40101 SET @saved_cs_client = @@character_set_client */;
41/*!40101 SET character_set_client = utf8 */;
42CREATE TABLE `contato` (
43 `id_contato` int(11) NOT NULL AUTO_INCREMENT,
44 `email` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
45 `telefone` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
46 `logradouro` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
47 `localidade` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
48 `uf` varchar(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
49 `complemento` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
50 `bairro` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
51 `instagram` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
52 `facebook` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
53 `twitter` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
54 PRIMARY KEY (`id_contato`)
55) ENGINE=InnoDB AUTO_INCREMENT=78 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
56/*!40101 SET character_set_client = @saved_cs_client */;
57
58--
59-- Table structure for table `curso`
60--
61
62DROP TABLE IF EXISTS `curso`;
63/*!40101 SET @saved_cs_client = @@character_set_client */;
64/*!40101 SET character_set_client = utf8 */;
65CREATE TABLE `curso` (
66 `id_curso` int(11) NOT NULL AUTO_INCREMENT,
67 `nome` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
68 `descricao` text COLLATE utf8mb4_unicode_ci NOT NULL,
69 `resumo` varchar(200) COLLATE utf8mb4_unicode_ci NOT NULL,
70 `carga_horaria` int(4) NOT NULL,
71 `data_criacao` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
72 `valor` float(7,2) NOT NULL,
73 `frequencia_minima` int(4) NOT NULL,
74 `imagem` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
75 PRIMARY KEY (`id_curso`)
76) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
77/*!40101 SET character_set_client = @saved_cs_client */;
78
79--
80-- Table structure for table `discente`
81--
82
83DROP TABLE IF EXISTS `discente`;
84/*!40101 SET @saved_cs_client = @@character_set_client */;
85/*!40101 SET character_set_client = utf8 */;
86CREATE TABLE `discente` (
87 `id_discente` int(11) NOT NULL AUTO_INCREMENT,
88 `id_pessoa` int(11) NOT NULL,
89 `id_contato` int(11) NOT NULL,
90 `data_criacao` date NOT NULL,
91 `data_edicao` date DEFAULT NULL,
92 PRIMARY KEY (`id_discente`),
93 KEY `fk_discente_1_idx` (`id_contato`),
94 KEY `fk_discente_2_idx` (`id_pessoa`),
95 CONSTRAINT `fk_discente_1` FOREIGN KEY (`id_contato`) REFERENCES `contato` (`id_contato`) ON DELETE NO ACTION ON UPDATE NO ACTION,
96 CONSTRAINT `fk_discente_2` FOREIGN KEY (`id_pessoa`) REFERENCES `pessoa` (`id_pessoa`) ON DELETE NO ACTION ON UPDATE NO ACTION
97) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
98/*!40101 SET character_set_client = @saved_cs_client */;
99
100--
101-- Table structure for table `docente`
102--
103
104DROP TABLE IF EXISTS `docente`;
105/*!40101 SET @saved_cs_client = @@character_set_client */;
106/*!40101 SET character_set_client = utf8 */;
107CREATE TABLE `docente` (
108 `id_docente` int(11) NOT NULL AUTO_INCREMENT,
109 `id_pessoa` int(11) DEFAULT NULL,
110 `id_contato` int(11) NOT NULL,
111 `status` int(1) DEFAULT 1,
112 `formacao` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
113 `especialidade` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
114 `infos_adicionais` varchar(150) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
115 `imagem` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL,
116 PRIMARY KEY (`id_docente`),
117 KEY `fk_docente_1_idx` (`id_contato`),
118 KEY `fk_docente_2_idx` (`id_pessoa`),
119 CONSTRAINT `fk_docente_1` FOREIGN KEY (`id_contato`) REFERENCES `contato` (`id_contato`) ON DELETE NO ACTION ON UPDATE NO ACTION,
120 CONSTRAINT `fk_docente_2` FOREIGN KEY (`id_pessoa`) REFERENCES `pessoa` (`id_pessoa`) ON DELETE NO ACTION ON UPDATE NO ACTION
121) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
122/*!40101 SET character_set_client = @saved_cs_client */;
123
124--
125-- Table structure for table `financeiro`
126--
127
128DROP TABLE IF EXISTS `financeiro`;
129/*!40101 SET @saved_cs_client = @@character_set_client */;
130/*!40101 SET character_set_client = utf8 */;
131CREATE TABLE `financeiro` (
132 `id_financeiro` int(11) NOT NULL AUTO_INCREMENT,
133 `id_pessoa` int(11) NOT NULL,
134 `id_contato` int(11) NOT NULL,
135 PRIMARY KEY (`id_financeiro`),
136 KEY `fk_financeiro_1_idx` (`id_contato`),
137 KEY `fk_financeiro_2_idx` (`id_pessoa`),
138 CONSTRAINT `fk_financeiro_1` FOREIGN KEY (`id_contato`) REFERENCES `contato` (`id_contato`) ON DELETE NO ACTION ON UPDATE NO ACTION,
139 CONSTRAINT `fk_financeiro_2` FOREIGN KEY (`id_pessoa`) REFERENCES `pessoa` (`id_pessoa`) ON DELETE NO ACTION ON UPDATE NO ACTION
140) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
141/*!40101 SET character_set_client = @saved_cs_client */;
142
143--
144-- Table structure for table `pagamento`
145--
146
147DROP TABLE IF EXISTS `pagamento`;
148/*!40101 SET @saved_cs_client = @@character_set_client */;
149/*!40101 SET character_set_client = utf8 */;
150CREATE TABLE `pagamento` (
151 `id_pagamento` int(11) NOT NULL AUTO_INCREMENT,
152 `id_turma_discente` int(11) NOT NULL,
153 `qtd_parcelas` int(11) NOT NULL,
154 `qtd_paga` int(11) NOT NULL DEFAULT 0,
155 PRIMARY KEY (`id_pagamento`),
156 KEY `fk_pagamento_1_idx` (`id_turma_discente`),
157 CONSTRAINT `fk_pagamento_2` FOREIGN KEY (`id_turma_discente`) REFERENCES `turma_discente` (`id_turma_discente`) ON DELETE NO ACTION ON UPDATE NO ACTION
158) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
159/*!40101 SET character_set_client = @saved_cs_client */;
160
161--
162-- Table structure for table `pessoa`
163--
164
165DROP TABLE IF EXISTS `pessoa`;
166/*!40101 SET @saved_cs_client = @@character_set_client */;
167/*!40101 SET character_set_client = utf8 */;
168CREATE TABLE `pessoa` (
169 `id_pessoa` int(11) NOT NULL AUTO_INCREMENT,
170 `nome` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL,
171 `cpf` varchar(11) COLLATE utf8mb4_unicode_ci NOT NULL,
172 PRIMARY KEY (`id_pessoa`),
173 UNIQUE KEY `cpf_UNIQUE` (`cpf`)
174) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
175/*!40101 SET character_set_client = @saved_cs_client */;
176
177--
178-- Table structure for table `template_admin`
179--
180
181DROP TABLE IF EXISTS `template_admin`;
182/*!40101 SET @saved_cs_client = @@character_set_client */;
183/*!40101 SET character_set_client = utf8 */;
184CREATE TABLE `template_admin` (
185 `id_template_admin` int(11) NOT NULL AUTO_INCREMENT,
186 `logradouro` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
187 `cidade` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
188 `estado` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
189 `complemento` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
190 `telefone` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
191 `email` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
192 `instagram` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
193 `facebook` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
194 `twitter` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
195 `titulo_campo_um` varchar(30) COLLATE utf8mb4_unicode_ci NOT NULL,
196 `descricao_campo_um` text COLLATE utf8mb4_unicode_ci NOT NULL,
197 `titulo_campo_dois` varchar(15) COLLATE utf8mb4_unicode_ci NOT NULL,
198 `descricao_campo_dois` text COLLATE utf8mb4_unicode_ci NOT NULL,
199 `cnpj` varchar(14) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
200 `site` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
201 `cep` varchar(10) COLLATE utf8mb4_unicode_ci NOT NULL,
202 `numero` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
203 PRIMARY KEY (`id_template_admin`)
204) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
205/*!40101 SET character_set_client = @saved_cs_client */;
206
207--
208-- Table structure for table `template_email`
209--
210
211DROP TABLE IF EXISTS `template_email`;
212/*!40101 SET @saved_cs_client = @@character_set_client */;
213/*!40101 SET character_set_client = utf8 */;
214CREATE TABLE `template_email` (
215 `id_template` int(11) NOT NULL AUTO_INCREMENT,
216 `titulo` varchar(60) COLLATE utf8mb4_unicode_ci NOT NULL,
217 `corpo` text COLLATE utf8mb4_unicode_ci NOT NULL,
218 `tipo_template` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
219 PRIMARY KEY (`id_template`)
220) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
221/*!40101 SET character_set_client = @saved_cs_client */;
222
223--
224-- Table structure for table `tipo_usuario`
225--
226
227DROP TABLE IF EXISTS `tipo_usuario`;
228/*!40101 SET @saved_cs_client = @@character_set_client */;
229/*!40101 SET character_set_client = utf8 */;
230CREATE TABLE `tipo_usuario` (
231 `id_tipo_usuario` int(11) NOT NULL AUTO_INCREMENT,
232 `descricao` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
233 PRIMARY KEY (`id_tipo_usuario`)
234) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
235/*!40101 SET character_set_client = @saved_cs_client */;
236
237--
238-- Table structure for table `turma`
239--
240
241DROP TABLE IF EXISTS `turma`;
242/*!40101 SET @saved_cs_client = @@character_set_client */;
243/*!40101 SET character_set_client = utf8 */;
244CREATE TABLE `turma` (
245 `id_turma` int(11) NOT NULL AUTO_INCREMENT,
246 `id_curso` int(11) NOT NULL,
247 `nome` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL,
248 `aula_ini` date NOT NULL,
249 `aula_fim` date NOT NULL,
250 `qtd_vagas` int(3) NOT NULL,
251 `inscricao_ini` date NOT NULL,
252 `inscricao_fim` date NOT NULL,
253 PRIMARY KEY (`id_turma`),
254 KEY `fk_turma_curso1_idx` (`id_curso`),
255 CONSTRAINT `fk_turma_curso1` FOREIGN KEY (`id_curso`) REFERENCES `curso` (`id_curso`) ON DELETE NO ACTION ON UPDATE NO ACTION
256) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
257/*!40101 SET character_set_client = @saved_cs_client */;
258
259--
260-- Table structure for table `turma_discente`
261--
262
263DROP TABLE IF EXISTS `turma_discente`;
264/*!40101 SET @saved_cs_client = @@character_set_client */;
265/*!40101 SET character_set_client = utf8 */;
266CREATE TABLE `turma_discente` (
267 `id_turma_discente` int(11) NOT NULL AUTO_INCREMENT,
268 `id_discente` int(11) NOT NULL,
269 `id_turma` int(11) NOT NULL,
270 `frequencia` int(4) NOT NULL DEFAULT 0,
271 `data_ingresso` datetime DEFAULT NULL,
272 PRIMARY KEY (`id_turma_discente`,`id_discente`,`id_turma`),
273 KEY `fk_discente_has_turma_turma1_idx` (`id_turma`),
274 KEY `fk_discente_has_turma_discente1_idx` (`id_discente`),
275 CONSTRAINT `fk_discente_has_turma_discente1` FOREIGN KEY (`id_discente`) REFERENCES `discente` (`id_discente`) ON DELETE NO ACTION ON UPDATE NO ACTION,
276 CONSTRAINT `fk_discente_has_turma_turma1` FOREIGN KEY (`id_turma`) REFERENCES `turma` (`id_turma`) ON DELETE NO ACTION ON UPDATE NO ACTION
277) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
278/*!40101 SET character_set_client = @saved_cs_client */;
279
280--
281-- Table structure for table `turma_docente`
282--
283
284DROP TABLE IF EXISTS `turma_docente`;
285/*!40101 SET @saved_cs_client = @@character_set_client */;
286/*!40101 SET character_set_client = utf8 */;
287CREATE TABLE `turma_docente` (
288 `id_turma_docente` int(11) NOT NULL AUTO_INCREMENT,
289 `id_turma` int(11) NOT NULL,
290 `id_docente` int(11) NOT NULL,
291 PRIMARY KEY (`id_turma_docente`,`id_turma`,`id_docente`),
292 KEY `fk_turma_has_docente_docente1_idx` (`id_docente`),
293 KEY `fk_turma_has_docente_turma_idx` (`id_turma`),
294 CONSTRAINT `fk_turma_has_docente_docente1` FOREIGN KEY (`id_docente`) REFERENCES `docente` (`id_docente`) ON DELETE NO ACTION ON UPDATE NO ACTION,
295 CONSTRAINT `fk_turma_has_docente_turma` FOREIGN KEY (`id_turma`) REFERENCES `turma` (`id_turma`) ON DELETE NO ACTION ON UPDATE NO ACTION
296) ENGINE=InnoDB AUTO_INCREMENT=119 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
297/*!40101 SET character_set_client = @saved_cs_client */;
298
299--
300-- Table structure for table `turma_semana`
301--
302
303DROP TABLE IF EXISTS `turma_semana`;
304/*!40101 SET @saved_cs_client = @@character_set_client */;
305/*!40101 SET character_set_client = utf8 */;
306CREATE TABLE `turma_semana` (
307 `id_turma_semana` int(11) NOT NULL AUTO_INCREMENT,
308 `id_turma` int(11) NOT NULL,
309 `seg` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
310 `ter` varchar(15) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
311 `qua` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
312 `qui` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
313 `sex` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
314 `sab` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
315 `dom` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
316 PRIMARY KEY (`id_turma_semana`),
317 KEY `fk_turma_semana_1_idx` (`id_turma`),
318 CONSTRAINT `fk_turma_semana_1` FOREIGN KEY (`id_turma`) REFERENCES `turma` (`id_turma`) ON DELETE NO ACTION ON UPDATE NO ACTION
319) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
320/*!40101 SET character_set_client = @saved_cs_client */;
321
322--
323-- Table structure for table `usuario`
324--
325
326DROP TABLE IF EXISTS `usuario`;
327/*!40101 SET @saved_cs_client = @@character_set_client */;
328/*!40101 SET character_set_client = utf8 */;
329CREATE TABLE `usuario` (
330 `id_usuario` int(11) NOT NULL AUTO_INCREMENT,
331 `id_pessoa` int(11) NOT NULL,
332 `id_tipo_usuario` int(11) NOT NULL,
333 `login` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
334 `senha` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
335 `data_criacao` datetime NOT NULL,
336 `data_edicao` datetime DEFAULT NULL,
337 PRIMARY KEY (`id_usuario`),
338 UNIQUE KEY `login_UNIQUE` (`login`),
339 KEY `fk_usuario_1_idx` (`id_tipo_usuario`),
340 KEY `fk_usuario_2_idx` (`id_pessoa`),
341 CONSTRAINT `fk_usuario_1` FOREIGN KEY (`id_tipo_usuario`) REFERENCES `tipo_usuario` (`id_tipo_usuario`) ON DELETE NO ACTION ON UPDATE NO ACTION,
342 CONSTRAINT `fk_usuario_2` FOREIGN KEY (`id_pessoa`) REFERENCES `pessoa` (`id_pessoa`) ON DELETE NO ACTION ON UPDATE NO ACTION
343) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
344/*!40101 SET character_set_client = @saved_cs_client */;
345
346--
347-- Temporary table structure for view `view_discente`
348--
349
350DROP TABLE IF EXISTS `view_discente`;
351/*!50001 DROP VIEW IF EXISTS `view_discente`*/;
352SET @saved_cs_client = @@character_set_client;
353SET character_set_client = utf8;
354/*!50001 CREATE TABLE `view_discente` (
355 `id_discente` tinyint NOT NULL,
356 `id_pessoa` tinyint NOT NULL,
357 `id_contato` tinyint NOT NULL,
358 `nome` tinyint NOT NULL,
359 `cpf` tinyint NOT NULL,
360 `login` tinyint NOT NULL,
361 `senha` tinyint NOT NULL,
362 `telefone` tinyint NOT NULL,
363 `email` tinyint NOT NULL,
364 `instagram` tinyint NOT NULL,
365 `facebook` tinyint NOT NULL,
366 `twitter` tinyint NOT NULL,
367 `logradouro` tinyint NOT NULL,
368 `complemento` tinyint NOT NULL,
369 `bairro` tinyint NOT NULL,
370 `localidade` tinyint NOT NULL,
371 `uf` tinyint NOT NULL
372) ENGINE=MyISAM */;
373SET character_set_client = @saved_cs_client;
374
375--
376-- Temporary table structure for view `view_docente`
377--
378
379DROP TABLE IF EXISTS `view_docente`;
380/*!50001 DROP VIEW IF EXISTS `view_docente`*/;
381SET @saved_cs_client = @@character_set_client;
382SET character_set_client = utf8;
383/*!50001 CREATE TABLE `view_docente` (
384 `id_docente` tinyint NOT NULL,
385 `id_contato` tinyint NOT NULL,
386 `id_pessoa` tinyint NOT NULL,
387 `nome` tinyint NOT NULL,
388 `cpf` tinyint NOT NULL,
389 `email` tinyint NOT NULL,
390 `telefone` tinyint NOT NULL,
391 `formacao` tinyint NOT NULL,
392 `especialidade` tinyint NOT NULL,
393 `infos_adicionais` tinyint NOT NULL,
394 `status` tinyint NOT NULL,
395 `imagem` tinyint NOT NULL
396) ENGINE=MyISAM */;
397SET character_set_client = @saved_cs_client;
398
399--
400-- Temporary table structure for view `view_financeiro`
401--
402
403DROP TABLE IF EXISTS `view_financeiro`;
404/*!50001 DROP VIEW IF EXISTS `view_financeiro`*/;
405SET @saved_cs_client = @@character_set_client;
406SET character_set_client = utf8;
407/*!50001 CREATE TABLE `view_financeiro` (
408 `id_financeiro` tinyint NOT NULL,
409 `id_contato` tinyint NOT NULL,
410 `id_pessoa` tinyint NOT NULL,
411 `nome` tinyint NOT NULL,
412 `cpf` tinyint NOT NULL,
413 `email` tinyint NOT NULL,
414 `telefone` tinyint NOT NULL,
415 `id_tipo_usuario` tinyint NOT NULL,
416 `login` tinyint NOT NULL,
417 `senha` tinyint NOT NULL,
418 `data_criacao` tinyint NOT NULL,
419 `data_edicao` tinyint NOT NULL
420) ENGINE=MyISAM */;
421SET character_set_client = @saved_cs_client;
422
423--
424-- Temporary table structure for view `view_pessoa`
425--
426
427DROP TABLE IF EXISTS `view_pessoa`;
428/*!50001 DROP VIEW IF EXISTS `view_pessoa`*/;
429SET @saved_cs_client = @@character_set_client;
430SET character_set_client = utf8;
431/*!50001 CREATE TABLE `view_pessoa` (
432 `id_discente` tinyint NOT NULL,
433 `id_financeiro` tinyint NOT NULL,
434 `id_docente` tinyint NOT NULL,
435 `id_contato` tinyint NOT NULL,
436 `id_pessoa` tinyint NOT NULL,
437 `nome` tinyint NOT NULL,
438 `cpf` tinyint NOT NULL,
439 `telefone` tinyint NOT NULL,
440 `email` tinyint NOT NULL
441) ENGINE=MyISAM */;
442SET character_set_client = @saved_cs_client;
443
444--
445-- Temporary table structure for view `view_turma`
446--
447
448DROP TABLE IF EXISTS `view_turma`;
449/*!50001 DROP VIEW IF EXISTS `view_turma`*/;
450SET @saved_cs_client = @@character_set_client;
451SET character_set_client = utf8;
452/*!50001 CREATE TABLE `view_turma` (
453 `id_turma` tinyint NOT NULL,
454 `id_curso` tinyint NOT NULL,
455 `id_semana` tinyint NOT NULL,
456 `nome` tinyint NOT NULL,
457 `aula_ini` tinyint NOT NULL,
458 `aula_fim` tinyint NOT NULL,
459 `qtd_vagas` tinyint NOT NULL,
460 `inscricao_ini` tinyint NOT NULL,
461 `inscricao_fim` tinyint NOT NULL,
462 `nome_curso` tinyint NOT NULL,
463 `carga_horaria` tinyint NOT NULL,
464 `valor` tinyint NOT NULL,
465 `frequencia_minima` tinyint NOT NULL,
466 `seg` tinyint NOT NULL,
467 `ter` tinyint NOT NULL,
468 `qua` tinyint NOT NULL,
469 `qui` tinyint NOT NULL,
470 `sex` tinyint NOT NULL,
471 `sab` tinyint NOT NULL,
472 `dom` tinyint NOT NULL
473) ENGINE=MyISAM */;
474SET character_set_client = @saved_cs_client;
475
476--
477-- Temporary table structure for view `view_turma_discente`
478--
479
480DROP TABLE IF EXISTS `view_turma_discente`;
481/*!50001 DROP VIEW IF EXISTS `view_turma_discente`*/;
482SET @saved_cs_client = @@character_set_client;
483SET character_set_client = utf8;
484/*!50001 CREATE TABLE `view_turma_discente` (
485 `id_turma_discente` tinyint NOT NULL,
486 `nome` tinyint NOT NULL,
487 `cpf` tinyint NOT NULL,
488 `id_discente` tinyint NOT NULL,
489 `id_turma` tinyint NOT NULL,
490 `qtd_parcelas` tinyint NOT NULL,
491 `qtd_paga` tinyint NOT NULL,
492 `frequencia` tinyint NOT NULL,
493 `frequencia_minima` tinyint NOT NULL,
494 `id_contato` tinyint NOT NULL,
495 `email` tinyint NOT NULL,
496 `telefone` tinyint NOT NULL,
497 `logradouro` tinyint NOT NULL,
498 `localidade` tinyint NOT NULL,
499 `uf` tinyint NOT NULL,
500 `bairro` tinyint NOT NULL,
501 `complemento` tinyint NOT NULL,
502 `instagram` tinyint NOT NULL,
503 `facebook` tinyint NOT NULL,
504 `twitter` tinyint NOT NULL,
505 `nome_curso` tinyint NOT NULL,
506 `valor_curso` tinyint NOT NULL,
507 `carga_horaria` tinyint NOT NULL,
508 `nome_turma` tinyint NOT NULL
509) ENGINE=MyISAM */;
510SET character_set_client = @saved_cs_client;
511
512--
513-- Temporary table structure for view `view_turma_docente`
514--
515
516DROP TABLE IF EXISTS `view_turma_docente`;
517/*!50001 DROP VIEW IF EXISTS `view_turma_docente`*/;
518SET @saved_cs_client = @@character_set_client;
519SET character_set_client = utf8;
520/*!50001 CREATE TABLE `view_turma_docente` (
521 `id_turma_docente` tinyint NOT NULL,
522 `id_curso` tinyint NOT NULL,
523 `id_turma` tinyint NOT NULL,
524 `id_docente` tinyint NOT NULL,
525 `nome_curso` tinyint NOT NULL,
526 `carga_horaria` tinyint NOT NULL,
527 `valor` tinyint NOT NULL,
528 `frequencia_minima` tinyint NOT NULL,
529 `nome_turma` tinyint NOT NULL,
530 `inscricao_ini` tinyint NOT NULL,
531 `inscricao_fim` tinyint NOT NULL,
532 `aula_ini` tinyint NOT NULL,
533 `aula_fim` tinyint NOT NULL,
534 `qtd_vagas` tinyint NOT NULL,
535 `nome_docente` tinyint NOT NULL,
536 `cpf` tinyint NOT NULL,
537 `email` tinyint NOT NULL,
538 `telefone` tinyint NOT NULL,
539 `imagem` tinyint NOT NULL
540) ENGINE=MyISAM */;
541SET character_set_client = @saved_cs_client;
542
543--
544-- Dumping events for database 'skadi'
545--
546
547--
548-- Dumping routines for database 'skadi'
549--
550
551--
552-- Final view structure for view `view_discente`
553--
554
555/*!50001 DROP TABLE IF EXISTS `view_discente`*/;
556/*!50001 DROP VIEW IF EXISTS `view_discente`*/;
557/*!50001 SET @saved_cs_client = @@character_set_client */;
558/*!50001 SET @saved_cs_results = @@character_set_results */;
559/*!50001 SET @saved_col_connection = @@collation_connection */;
560/*!50001 SET character_set_client = utf8mb4 */;
561/*!50001 SET character_set_results = utf8mb4 */;
562/*!50001 SET collation_connection = utf8mb4_general_ci */;
563/*!50001 CREATE ALGORITHM=UNDEFINED */
564/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
565/*!50001 VIEW `view_discente` AS select `disc`.`id_discente` AS `id_discente`,`disc`.`id_pessoa` AS `id_pessoa`,`disc`.`id_contato` AS `id_contato`,`pess`.`nome` AS `nome`,`pess`.`cpf` AS `cpf`,`usua`.`login` AS `login`,`usua`.`senha` AS `senha`,`cont`.`telefone` AS `telefone`,`cont`.`email` AS `email`,`cont`.`instagram` AS `instagram`,`cont`.`facebook` AS `facebook`,`cont`.`twitter` AS `twitter`,`cont`.`logradouro` AS `logradouro`,`cont`.`complemento` AS `complemento`,`cont`.`bairro` AS `bairro`,`cont`.`localidade` AS `localidade`,`cont`.`uf` AS `uf` from (((`discente` `disc` left join `usuario` `usua` on(`disc`.`id_pessoa` = `usua`.`id_pessoa`)) left join `pessoa` `pess` on(`disc`.`id_pessoa` = `pess`.`id_pessoa`)) left join `contato` `cont` on(`disc`.`id_contato` = `cont`.`id_contato`)) */;
566/*!50001 SET character_set_client = @saved_cs_client */;
567/*!50001 SET character_set_results = @saved_cs_results */;
568/*!50001 SET collation_connection = @saved_col_connection */;
569
570--
571-- Final view structure for view `view_docente`
572--
573
574/*!50001 DROP TABLE IF EXISTS `view_docente`*/;
575/*!50001 DROP VIEW IF EXISTS `view_docente`*/;
576/*!50001 SET @saved_cs_client = @@character_set_client */;
577/*!50001 SET @saved_cs_results = @@character_set_results */;
578/*!50001 SET @saved_col_connection = @@collation_connection */;
579/*!50001 SET character_set_client = utf8mb4 */;
580/*!50001 SET character_set_results = utf8mb4 */;
581/*!50001 SET collation_connection = utf8mb4_general_ci */;
582/*!50001 CREATE ALGORITHM=UNDEFINED */
583/*!50013 DEFINER=`devrpps`@`%` SQL SECURITY DEFINER */
584/*!50001 VIEW `view_docente` AS select `dc`.`id_docente` AS `id_docente`,`dc`.`id_contato` AS `id_contato`,`pe`.`id_pessoa` AS `id_pessoa`,`pe`.`nome` AS `nome`,`pe`.`cpf` AS `cpf`,`ct`.`email` AS `email`,`ct`.`telefone` AS `telefone`,`dc`.`formacao` AS `formacao`,`dc`.`especialidade` AS `especialidade`,`dc`.`infos_adicionais` AS `infos_adicionais`,`dc`.`status` AS `status`,`dc`.`imagem` AS `imagem` from ((`docente` `dc` join `pessoa` `pe` on(`dc`.`id_pessoa` = `pe`.`id_pessoa`)) join `contato` `ct` on(`dc`.`id_contato` = `ct`.`id_contato`)) */;
585/*!50001 SET character_set_client = @saved_cs_client */;
586/*!50001 SET character_set_results = @saved_cs_results */;
587/*!50001 SET collation_connection = @saved_col_connection */;
588
589--
590-- Final view structure for view `view_financeiro`
591--
592
593/*!50001 DROP TABLE IF EXISTS `view_financeiro`*/;
594/*!50001 DROP VIEW IF EXISTS `view_financeiro`*/;
595/*!50001 SET @saved_cs_client = @@character_set_client */;
596/*!50001 SET @saved_cs_results = @@character_set_results */;
597/*!50001 SET @saved_col_connection = @@collation_connection */;
598/*!50001 SET character_set_client = utf8mb4 */;
599/*!50001 SET character_set_results = utf8mb4 */;
600/*!50001 SET collation_connection = utf8mb4_general_ci */;
601/*!50001 CREATE ALGORITHM=UNDEFINED */
602/*!50013 DEFINER=`devrpps`@`%` SQL SECURITY DEFINER */
603/*!50001 VIEW `view_financeiro` AS select `fi`.`id_financeiro` AS `id_financeiro`,`fi`.`id_contato` AS `id_contato`,`pe`.`id_pessoa` AS `id_pessoa`,`pe`.`nome` AS `nome`,`pe`.`cpf` AS `cpf`,`ct`.`email` AS `email`,`ct`.`telefone` AS `telefone`,`us`.`id_tipo_usuario` AS `id_tipo_usuario`,`us`.`login` AS `login`,`us`.`senha` AS `senha`,`us`.`data_criacao` AS `data_criacao`,`us`.`data_edicao` AS `data_edicao` from (((`financeiro` `fi` join `pessoa` `pe` on(`fi`.`id_pessoa` = `pe`.`id_pessoa`)) join `contato` `ct` on(`fi`.`id_contato` = `ct`.`id_contato`)) left join `usuario` `us` on(`us`.`id_pessoa` = `fi`.`id_pessoa` and `us`.`id_tipo_usuario` = 2)) */;
604/*!50001 SET character_set_client = @saved_cs_client */;
605/*!50001 SET character_set_results = @saved_cs_results */;
606/*!50001 SET collation_connection = @saved_col_connection */;
607
608--
609-- Final view structure for view `view_pessoa`
610--
611
612/*!50001 DROP TABLE IF EXISTS `view_pessoa`*/;
613/*!50001 DROP VIEW IF EXISTS `view_pessoa`*/;
614/*!50001 SET @saved_cs_client = @@character_set_client */;
615/*!50001 SET @saved_cs_results = @@character_set_results */;
616/*!50001 SET @saved_col_connection = @@collation_connection */;
617/*!50001 SET character_set_client = utf8mb4 */;
618/*!50001 SET character_set_results = utf8mb4 */;
619/*!50001 SET collation_connection = utf8mb4_general_ci */;
620/*!50001 CREATE ALGORITHM=UNDEFINED */
621/*!50013 DEFINER=`devrpps`@`%` SQL SECURITY DEFINER */
622/*!50001 VIEW `view_pessoa` AS select `dis`.`id_discente` AS `id_discente`,`fin`.`id_financeiro` AS `id_financeiro`,`doc`.`id_docente` AS `id_docente`,`ct`.`id_contato` AS `id_contato`,`pe`.`id_pessoa` AS `id_pessoa`,`pe`.`nome` AS `nome`,`pe`.`cpf` AS `cpf`,`ct`.`telefone` AS `telefone`,`ct`.`email` AS `email` from ((((`pessoa` `pe` left join `discente` `dis` on(`dis`.`id_pessoa` = `pe`.`id_pessoa`)) left join `financeiro` `fin` on(`fin`.`id_pessoa` = `pe`.`id_pessoa`)) left join `docente` `doc` on(`doc`.`id_pessoa` = `pe`.`id_pessoa`)) left join `contato` `ct` on(`ct`.`id_contato` = `doc`.`id_contato` or `ct`.`id_contato` = `dis`.`id_contato` or `ct`.`id_contato` = `fin`.`id_contato`)) */;
623/*!50001 SET character_set_client = @saved_cs_client */;
624/*!50001 SET character_set_results = @saved_cs_results */;
625/*!50001 SET collation_connection = @saved_col_connection */;
626
627--
628-- Final view structure for view `view_turma`
629--
630
631/*!50001 DROP TABLE IF EXISTS `view_turma`*/;
632/*!50001 DROP VIEW IF EXISTS `view_turma`*/;
633/*!50001 SET @saved_cs_client = @@character_set_client */;
634/*!50001 SET @saved_cs_results = @@character_set_results */;
635/*!50001 SET @saved_col_connection = @@collation_connection */;
636/*!50001 SET character_set_client = utf8mb4 */;
637/*!50001 SET character_set_results = utf8mb4 */;
638/*!50001 SET collation_connection = utf8mb4_general_ci */;
639/*!50001 CREATE ALGORITHM=UNDEFINED */
640/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
641/*!50001 VIEW `view_turma` AS select `tur`.`id_turma` AS `id_turma`,`tur`.`id_curso` AS `id_curso`,`sem`.`id_turma_semana` AS `id_semana`,`tur`.`nome` AS `nome`,`tur`.`aula_ini` AS `aula_ini`,`tur`.`aula_fim` AS `aula_fim`,`tur`.`qtd_vagas` AS `qtd_vagas`,`tur`.`inscricao_ini` AS `inscricao_ini`,`tur`.`inscricao_fim` AS `inscricao_fim`,`cur`.`nome` AS `nome_curso`,`cur`.`carga_horaria` AS `carga_horaria`,`cur`.`valor` AS `valor`,`cur`.`frequencia_minima` AS `frequencia_minima`,`sem`.`seg` AS `seg`,`sem`.`ter` AS `ter`,`sem`.`qua` AS `qua`,`sem`.`qui` AS `qui`,`sem`.`sex` AS `sex`,`sem`.`sab` AS `sab`,`sem`.`dom` AS `dom` from ((`turma` `tur` left join `turma_semana` `sem` on(`sem`.`id_turma` = `tur`.`id_turma`)) left join `curso` `cur` on(`tur`.`id_curso` = `cur`.`id_curso`)) */;
642/*!50001 SET character_set_client = @saved_cs_client */;
643/*!50001 SET character_set_results = @saved_cs_results */;
644/*!50001 SET collation_connection = @saved_col_connection */;
645
646--
647-- Final view structure for view `view_turma_discente`
648--
649
650/*!50001 DROP TABLE IF EXISTS `view_turma_discente`*/;
651/*!50001 DROP VIEW IF EXISTS `view_turma_discente`*/;
652/*!50001 SET @saved_cs_client = @@character_set_client */;
653/*!50001 SET @saved_cs_results = @@character_set_results */;
654/*!50001 SET @saved_col_connection = @@collation_connection */;
655/*!50001 SET character_set_client = utf8mb4 */;
656/*!50001 SET character_set_results = utf8mb4 */;
657/*!50001 SET collation_connection = utf8mb4_general_ci */;
658/*!50001 CREATE ALGORITHM=UNDEFINED */
659/*!50013 DEFINER=`devrpps`@`%` SQL SECURITY DEFINER */
660/*!50001 VIEW `view_turma_discente` AS select `tdc`.`id_turma_discente` AS `id_turma_discente`,`pe`.`nome` AS `nome`,`pe`.`cpf` AS `cpf`,`tdc`.`id_discente` AS `id_discente`,`tdc`.`id_turma` AS `id_turma`,`pag`.`qtd_parcelas` AS `qtd_parcelas`,`pag`.`qtd_paga` AS `qtd_paga`,`tdc`.`frequencia` AS `frequencia`,`crs`.`frequencia_minima` AS `frequencia_minima`,`ct`.`id_contato` AS `id_contato`,`ct`.`email` AS `email`,`ct`.`telefone` AS `telefone`,`ct`.`logradouro` AS `logradouro`,`ct`.`localidade` AS `localidade`,`ct`.`uf` AS `uf`,`ct`.`bairro` AS `bairro`,`ct`.`complemento` AS `complemento`,`ct`.`instagram` AS `instagram`,`ct`.`facebook` AS `facebook`,`ct`.`twitter` AS `twitter`,`crs`.`nome` AS `nome_curso`,`crs`.`valor` AS `valor_curso`,`crs`.`carga_horaria` AS `carga_horaria`,`trm`.`nome` AS `nome_turma` from ((((((`pagamento` `pag` join `turma_discente` `tdc` on(`tdc`.`id_turma_discente` = `pag`.`id_turma_discente`)) join `discente` `dc` on(`tdc`.`id_discente` = `dc`.`id_discente`)) join `turma` `trm` on(`tdc`.`id_turma` = `trm`.`id_turma`)) join `curso` `crs` on(`trm`.`id_curso` = `crs`.`id_curso`)) join `pessoa` `pe` on(`dc`.`id_pessoa` = `pe`.`id_pessoa`)) join `contato` `ct` on(`dc`.`id_contato` = `ct`.`id_contato`)) */;
661/*!50001 SET character_set_client = @saved_cs_client */;
662/*!50001 SET character_set_results = @saved_cs_results */;
663/*!50001 SET collation_connection = @saved_col_connection */;
664
665--
666-- Final view structure for view `view_turma_docente`
667--
668
669/*!50001 DROP TABLE IF EXISTS `view_turma_docente`*/;
670/*!50001 DROP VIEW IF EXISTS `view_turma_docente`*/;
671/*!50001 SET @saved_cs_client = @@character_set_client */;
672/*!50001 SET @saved_cs_results = @@character_set_results */;
673/*!50001 SET @saved_col_connection = @@collation_connection */;
674/*!50001 SET character_set_client = utf8mb4 */;
675/*!50001 SET character_set_results = utf8mb4 */;
676/*!50001 SET collation_connection = utf8mb4_general_ci */;
677/*!50001 CREATE ALGORITHM=UNDEFINED */
678/*!50013 DEFINER=`devrpps`@`%` SQL SECURITY DEFINER */
679/*!50001 VIEW `view_turma_docente` AS select `tdoc`.`id_turma_docente` AS `id_turma_docente`,`cur`.`id_curso` AS `id_curso`,`tur`.`id_turma` AS `id_turma`,`doc`.`id_docente` AS `id_docente`,`cur`.`nome` AS `nome_curso`,`cur`.`carga_horaria` AS `carga_horaria`,`cur`.`valor` AS `valor`,`cur`.`frequencia_minima` AS `frequencia_minima`,`tur`.`nome` AS `nome_turma`,`tur`.`inscricao_ini` AS `inscricao_ini`,`tur`.`inscricao_fim` AS `inscricao_fim`,`tur`.`aula_ini` AS `aula_ini`,`tur`.`aula_fim` AS `aula_fim`,`tur`.`qtd_vagas` AS `qtd_vagas`,`pes`.`nome` AS `nome_docente`,`pes`.`cpf` AS `cpf`,`con`.`email` AS `email`,`con`.`telefone` AS `telefone`,`cur`.`imagem` AS `imagem` from (((((`turma_docente` `tdoc` join `turma` `tur` on(`tdoc`.`id_turma` = `tur`.`id_turma`)) left join `curso` `cur` on(`cur`.`id_curso` = `tur`.`id_curso`)) join `docente` `doc` on(`doc`.`id_docente` = `tdoc`.`id_docente`)) join `pessoa` `pes` on(`pes`.`id_pessoa` = `doc`.`id_pessoa`)) join `contato` `con` on(`con`.`id_contato` = `doc`.`id_contato`)) */;
680/*!50001 SET character_set_client = @saved_cs_client */;
681/*!50001 SET character_set_results = @saved_cs_results */;
682/*!50001 SET collation_connection = @saved_col_connection */;
683/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
684
685/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
686/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
687/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
688/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
689/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
690/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
691/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
692
693-- Dump completed on 2019-09-12 11:01:43