· 10 years ago · Apr 01, 2016, 03:15 AM
1-- MySQL dump 10.13 Distrib 5.5.46, for Linux (x86_64)
2--
3-- Host: localhost Database: gfmtz
4-- ------------------------------------------------------
5-- Server version 5.5.46
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 `ativo`
20--
21
22DROP TABLE IF EXISTS `ativo`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `ativo` (
26 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
27 `nome` varchar(255) DEFAULT '',
28 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
29 `descricao` varchar(255) DEFAULT '',
30 `caracteristicas` text,
31 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
32 `ativo` tinyint(3) unsigned DEFAULT NULL,
33 `dt_compra` date DEFAULT NULL,
34 `vl_compra` decimal(12,4) DEFAULT '0.0000',
35 `dt_venda` date DEFAULT NULL,
36 `vl_venda` decimal(12,4) DEFAULT '0.0000',
37 `dt_fipe` date DEFAULT NULL,
38 `vl_fipe` decimal(12,4) DEFAULT '0.0000',
39 PRIMARY KEY (`id`)
40) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 PACK_KEYS=0;
41/*!40101 SET character_set_client = @saved_cs_client */;
42
43--
44-- Table structure for table `ativo_tipo`
45--
46
47DROP TABLE IF EXISTS `ativo_tipo`;
48CREATE TABLE `ativo_tipo` (
49 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
50 `nome` varchar(255) DEFAULT '',
51 PRIMARY KEY (`id`)
52) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 PACK_KEYS=0;
53
54--
55-- Dumping data for table `ativo`
56--
57
58LOCK TABLES `ativo_tipo` WRITE;
59/*!40000 ALTER TABLE `ativo_tipo` DISABLE KEYS */;
60INSERT INTO ativo_tipo ( id, nome ) VALUES ( 1, 'Móvel' ), ( 2, 'Imóvel' );
61/*!40000 ALTER TABLE `ativo_tipo` ENABLE KEYS */;
62UNLOCK TABLES;
63
64--
65-- Dumping data for table `ativo`
66--
67
68LOCK TABLES `ativo` WRITE;
69/*!40000 ALTER TABLE `ativo` DISABLE KEYS */;
70INSERT INTO `ativo` VALUES (1,'Casa de Praia',1,'Teste','Teste','2016-02-14 12:26:00',1,'2016-03-12',0.0000,'2016-07-13',0.0000,'2016-05-11',0.0000),(3,'Casa de Praia 2',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(4,'Casa de Praia 3',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(5,'Casa de Praia 4',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(6,'Casa de Praia 5',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(7,'Casa de Praia 6',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(8,'Casa de Praia 7',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(9,'Casa de Praia 8',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(10,'Casa de Praia 9',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000),(11,'Casa de Praia 10',1,'Teste','Teste','2016-03-12 18:45:32',1,NULL,0.0000,NULL,0.0000,NULL,0.0000);
71/*!40000 ALTER TABLE `ativo` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `banco`
76--
77
78DROP TABLE IF EXISTS `banco`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `banco` (
82 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
83 `nome` varchar(255) DEFAULT '',
84 `descricao` varchar(255) DEFAULT '',
85 `codigo` int(5) DEFAULT '1',
86 `agencia` varchar(10) DEFAULT '',
87 `conta` varchar(25) DEFAULT '',
88 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
89 `ativo` tinyint(3) unsigned DEFAULT NULL,
90 PRIMARY KEY (`id`)
91) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 PACK_KEYS=0;
92/*!40101 SET character_set_client = @saved_cs_client */;
93
94--
95-- Dumping data for table `banco`
96--
97
98LOCK TABLES `banco` WRITE;
99/*!40000 ALTER TABLE `banco` DISABLE KEYS */;
100INSERT INTO `banco` VALUES (1,'Itaú','',341,'0109','649301','2016-02-14 12:26:00',1),(2,'Bradesco','',345,'0109','643980','2016-02-14 12:26:00',1),(3,'Santander','',567,'0109','643980','2016-02-14 12:26:00',1);
101/*!40000 ALTER TABLE `banco` ENABLE KEYS */;
102UNLOCK TABLES;
103
104--
105-- Table structure for table `configuracao`
106--
107
108DROP TABLE IF EXISTS `configuracao`;
109/*!40101 SET @saved_cs_client = @@character_set_client */;
110/*!40101 SET character_set_client = utf8 */;
111CREATE TABLE `configuracao` (
112 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
113 `chave` varchar(80) DEFAULT NULL,
114 `valor` varchar(512) DEFAULT NULL,
115 PRIMARY KEY (`id`)
116) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 PACK_KEYS=0;
117/*!40101 SET character_set_client = @saved_cs_client */;
118
119--
120-- Dumping data for table `configuracao`
121--
122
123LOCK TABLES `configuracao` WRITE;
124/*!40000 ALTER TABLE `configuracao` DISABLE KEYS */;
125INSERT INTO `configuracao` VALUES (1,'taxa_base','5'),(2,'cpmf_fisica','0.002'),(3,'cpmf_juridica','0.002'),(4,'iof_base_fisica','0.000082'),(5,'iof_base_juridica','0.000041'),(6,'iof_adicional_fisica','0.0038'),(7,'iof_adicional_juridica','0.0038'),(8,'taxa_adm','8.5');
126/*!40000 ALTER TABLE `configuracao` ENABLE KEYS */;
127UNLOCK TABLES;
128
129--
130-- Table structure for table `credito_situacao`
131--
132
133DROP TABLE IF EXISTS `credito_situacao`;
134/*!40101 SET @saved_cs_client = @@character_set_client */;
135/*!40101 SET character_set_client = utf8 */;
136CREATE TABLE `credito_situacao` (
137 `id` int(11) unsigned NOT NULL,
138 `nome` varchar(255) DEFAULT '',
139 PRIMARY KEY (`id`)
140) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
141/*!40101 SET character_set_client = @saved_cs_client */;
142
143--
144-- Dumping data for table `credito_situacao`
145--
146
147LOCK TABLES `credito_situacao` WRITE;
148/*!40000 ALTER TABLE `credito_situacao` DISABLE KEYS */;
149INSERT INTO `credito_situacao` VALUES (0,'Pendente'),(1,'Em Análise'),(2,'Analisado');
150/*!40000 ALTER TABLE `credito_situacao` ENABLE KEYS */;
151UNLOCK TABLES;
152
153--
154-- Table structure for table `delegado`
155--
156
157DROP TABLE IF EXISTS `delegado`;
158/*!40101 SET @saved_cs_client = @@character_set_client */;
159/*!40101 SET character_set_client = utf8 */;
160CREATE TABLE `delegado` (
161 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
162 `gestor_id` int(11) unsigned NOT NULL,
163 `user_id` int(11) unsigned NOT NULL,
164 `delegado_id` int(11) unsigned NOT NULL,
165 `dt_inicio` datetime DEFAULT NULL,
166 `dt_fim` datetime DEFAULT NULL,
167 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
168 `ativo` tinyint(3) unsigned DEFAULT NULL,
169 PRIMARY KEY (`id`),
170 KEY `fk_delegado_gestor_id_idx` (`gestor_id`),
171 KEY `fk_delegado_user_id_idx` (`user_id`),
172 KEY `fk_delegado_delegado_id_idx` (`delegado_id`),
173 CONSTRAINT `fk_delegado_delegado_id` FOREIGN KEY (`delegado_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
174 CONSTRAINT `fk_delegado_gestor_id` FOREIGN KEY (`gestor_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
175 CONSTRAINT `fk_delegado_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
176) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
177/*!40101 SET character_set_client = @saved_cs_client */;
178
179--
180-- Dumping data for table `delegado`
181--
182
183LOCK TABLES `delegado` WRITE;
184/*!40000 ALTER TABLE `delegado` DISABLE KEYS */;
185/*!40000 ALTER TABLE `delegado` ENABLE KEYS */;
186UNLOCK TABLES;
187
188--
189-- Table structure for table `email_queue`
190--
191
192DROP TABLE IF EXISTS `email_queue`;
193/*!40101 SET @saved_cs_client = @@character_set_client */;
194/*!40101 SET character_set_client = utf8 */;
195CREATE TABLE `email_queue` (
196 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
197 `subject` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
198 `content` text COLLATE utf8_unicode_ci,
199 `toname` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
200 `toemail` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
201 PRIMARY KEY (`id`)
202) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
203/*!40101 SET character_set_client = @saved_cs_client */;
204
205--
206-- Dumping data for table `email_queue`
207--
208
209LOCK TABLES `email_queue` WRITE;
210/*!40000 ALTER TABLE `email_queue` DISABLE KEYS */;
211/*!40000 ALTER TABLE `email_queue` ENABLE KEYS */;
212UNLOCK TABLES;
213
214--
215-- Table structure for table `estado`
216--
217
218DROP TABLE IF EXISTS `estado`;
219/*!40101 SET @saved_cs_client = @@character_set_client */;
220/*!40101 SET character_set_client = utf8 */;
221CREATE TABLE `estado` (
222 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
223 `nome` varchar(80) DEFAULT NULL,
224 `uf` varchar(2) DEFAULT NULL,
225 PRIMARY KEY (`id`)
226) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 PACK_KEYS=0;
227/*!40101 SET character_set_client = @saved_cs_client */;
228
229--
230-- Dumping data for table `estado`
231--
232
233LOCK TABLES `estado` WRITE;
234/*!40000 ALTER TABLE `estado` DISABLE KEYS */;
235INSERT INTO `estado` VALUES (1,'Acre','AC'),(2,'Alagoas','AL'),(3,'Amazonas','AM'),(4,'Amapá','AP'),(5,'Bahia','BA'),(6,'Ceará','CE'),(7,'Distrito Federal','DF'),(8,'EspÃrito Santo','ES'),(9,'Goiás','GO'),(10,'Maranhão','MA'),(11,'Minas Gerais','MG'),(12,'Mato Grosso do Sul','MS'),(13,'Mato Grosso','MT'),(14,'Pará','PA'),(15,'ParaÃba','PB'),(16,'Pernambuco','PE'),(17,'PiauÃ','PI'),(18,'Paraná','PR'),(19,'Rio de Janeiro','RJ'),(20,'Rio Grande do Norte','RN'),(21,'Rondônia','RO'),(22,'Roraima','RR'),(23,'Rio Grande do Sul','RS'),(24,'Santa Catarina','SC'),(25,'Sergipe','SE'),(26,'São Paulo','SP'),(27,'Tocantins','TO');
236/*!40000 ALTER TABLE `estado` ENABLE KEYS */;
237UNLOCK TABLES;
238
239--
240-- Table structure for table `estado_civil`
241--
242
243DROP TABLE IF EXISTS `estado_civil`;
244/*!40101 SET @saved_cs_client = @@character_set_client */;
245/*!40101 SET character_set_client = utf8 */;
246CREATE TABLE `estado_civil` (
247 `id` int(11) unsigned NOT NULL,
248 `nome` varchar(255) DEFAULT '',
249 PRIMARY KEY (`id`)
250) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
251/*!40101 SET character_set_client = @saved_cs_client */;
252
253--
254-- Dumping data for table `estado_civil`
255--
256
257LOCK TABLES `estado_civil` WRITE;
258/*!40000 ALTER TABLE `estado_civil` DISABLE KEYS */;
259INSERT INTO `estado_civil` VALUES (0,'Solteiro(a)'),(1,'Casado(a)'),(2,'Divorciado(a)'),(3,'Viúvo(a)'),(4,'Separado(a)'),(5,'Companheiro(a)');
260/*!40000 ALTER TABLE `estado_civil` ENABLE KEYS */;
261UNLOCK TABLES;
262
263--
264-- Table structure for table `fila`
265--
266
267DROP TABLE IF EXISTS `fila`;
268/*!40101 SET @saved_cs_client = @@character_set_client */;
269/*!40101 SET character_set_client = utf8 */;
270CREATE TABLE `fila` (
271 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
272 `group` varchar(25) DEFAULT NULL,
273 `name` varchar(255) DEFAULT NULL,
274 `email` varchar(150) DEFAULT NULL,
275 `texto` text,
276 `dt_create` datetime DEFAULT '0000-00-00 00:00:00',
277 `published` tinyint(1) DEFAULT '0',
278 PRIMARY KEY (`id`)
279) ENGINE=InnoDB DEFAULT CHARSET=latin1;
280/*!40101 SET character_set_client = @saved_cs_client */;
281
282--
283-- Dumping data for table `fila`
284--
285
286LOCK TABLES `fila` WRITE;
287/*!40000 ALTER TABLE `fila` DISABLE KEYS */;
288/*!40000 ALTER TABLE `fila` ENABLE KEYS */;
289UNLOCK TABLES;
290
291--
292-- Table structure for table `financeiro`
293--
294
295DROP TABLE IF EXISTS `financeiro`;
296/*!40101 SET @saved_cs_client = @@character_set_client */;
297/*!40101 SET character_set_client = utf8 */;
298CREATE TABLE `financeiro` (
299 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
300 `user_id` int(11) unsigned NOT NULL,
301 `plano_id` int(11) unsigned NOT NULL,
302 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
303 `ativo` tinyint(3) unsigned DEFAULT NULL,
304 `situacao` tinyint(3) unsigned DEFAULT NULL,
305 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
306 `pessoa_id` int(11) unsigned NOT NULL,
307 `dt_emissao` datetime DEFAULT NULL,
308 `negociacao_id` int(11) unsigned DEFAULT NULL,
309 `numero` varchar(50) DEFAULT '',
310 `dt_vencimento` datetime DEFAULT NULL,
311 `dt_baixa` datetime DEFAULT NULL,
312 `vl_financeiro` decimal(12,4) DEFAULT '0.0000',
313 `vl_total` decimal(12,4) DEFAULT '0.0000',
314 `descricao` varchar(255) DEFAULT '',
315 `qt_dias_antecipado` int(5) DEFAULT '1',
316 `qt_dias_atraso` int(5) DEFAULT '1',
317 PRIMARY KEY (`id`),
318 KEY `fk_financeiro_pessoa_id_idx` (`pessoa_id`),
319 KEY `fk_financeiro_negociacao_id_idx` (`negociacao_id`),
320 KEY `fk_financeiro_user_id_idx` (`user_id`),
321 KEY `fk_financeiro_plano_id_idx` (`plano_id`),
322 CONSTRAINT `fk_financeiro_negociacao_id` FOREIGN KEY (`negociacao_id`) REFERENCES `negociacao` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
323 CONSTRAINT `fk_financeiro_pessoa_id` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
324 CONSTRAINT `fk_financeiro_plano_id` FOREIGN KEY (`plano_id`) REFERENCES `plano_conta` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
325 CONSTRAINT `fk_financeiro_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
326) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8 PACK_KEYS=0;
327/*!40101 SET character_set_client = @saved_cs_client */;
328
329--
330-- Table structure for table `financeiro_historico`
331--
332
333DROP TABLE IF EXISTS `financeiro_historico`;
334/*!40101 SET @saved_cs_client = @@character_set_client */;
335/*!40101 SET character_set_client = utf8 */;
336CREATE TABLE `financeiro_historico` (
337 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
338 `financeiro_parcela_id` int(11) unsigned NOT NULL,
339 `user_id` int(11) unsigned NOT NULL,
340 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
341 `situacao` tinyint(3) unsigned DEFAULT NULL,
342 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
343 `acao` varchar(255) DEFAULT '',
344 `hash_dados` text,
345 PRIMARY KEY (`id`),
346 KEY `fk_financeiro_historico_user_id_idx` (`user_id`),
347 KEY `fk_financeiro_historico_financeiro_parcela_id_idx` (`financeiro_parcela_id`),
348 CONSTRAINT `fk_financeiro_historico_financeiro_parcela_id` FOREIGN KEY (`financeiro_parcela_id`) REFERENCES `financeiro_parcela` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
349 CONSTRAINT `fk_financeiro_historico_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
350) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 PACK_KEYS=0;
351/*!40101 SET character_set_client = @saved_cs_client */;
352
353--
354-- Table structure for table `financeiro_parcela`
355--
356
357DROP TABLE IF EXISTS `financeiro_parcela`;
358/*!40101 SET @saved_cs_client = @@character_set_client */;
359/*!40101 SET character_set_client = utf8 */;
360CREATE TABLE `financeiro_parcela` (
361 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
362 `financeiro_id` int(11) unsigned NOT NULL,
363 `user_id` int(11) unsigned NOT NULL,
364 `banco_id` int(11) unsigned DEFAULT NULL,
365 `cheque` varchar(25) DEFAULT '',
366 `pagamento_id` tinyint(3) unsigned DEFAULT NULL,
367 `ordem` int(5) DEFAULT '1',
368 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
369 `dt_baixa` date DEFAULT NULL,
370 `dt_emprestimo` date DEFAULT NULL,
371 `dt_pagamento` date DEFAULT NULL,
372 `qt_prazo_dias` int(5) DEFAULT '1',
373 `vl_parcela` decimal(12,4) DEFAULT '0.0000',
374 `vl_juros` decimal(12,4) DEFAULT '0.0000',
375 `vl_cpmf` decimal(12,4) DEFAULT '0.0000',
376 `vl_iof` decimal(12,4) DEFAULT '0.0000',
377 `vl_total` decimal(12,4) DEFAULT '0.0000',
378 `vl_prazo_comp` decimal(12,4) DEFAULT '0.0000',
379 `descricao` varchar(255) DEFAULT '',
380 `status` tinyint(3) unsigned DEFAULT NULL,
381 `ativo` tinyint(3) unsigned DEFAULT NULL,
382 `cheque_compensar` tinyint(3) unsigned DEFAULT NULL,
383 `vl_desconto` decimal(12,4) DEFAULT '0.0000',
384 `vl_multa` decimal(12,4) DEFAULT '0.0000',
385 `dt_vencimento` date DEFAULT NULL,
386 `vl_despesas_adm` decimal(12,4) DEFAULT '0.0000',
387 PRIMARY KEY (`id`),
388 KEY `fk_financeiro_parcela_user_id_idx` (`user_id`),
389 KEY `fk_financeiro_parcela_financeiro_id_idx` (`financeiro_id`),
390 KEY `fk_financeiro_parcela_banco_id_idx` (`banco_id`),
391 CONSTRAINT `fk_financeiro_parcela_banco_id` FOREIGN KEY (`banco_id`) REFERENCES `banco` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
392 CONSTRAINT `fk_financeiro_parcela_financeiro_id` FOREIGN KEY (`financeiro_id`) REFERENCES `financeiro` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
393 CONSTRAINT `fk_financeiro_parcela_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
394) ENGINE=InnoDB AUTO_INCREMENT=191 DEFAULT CHARSET=utf8 PACK_KEYS=0;
395/*!40101 SET character_set_client = @saved_cs_client */;
396
397--
398-- Table structure for table `financeiro_status`
399--
400
401DROP TABLE IF EXISTS `financeiro_status`;
402/*!40101 SET @saved_cs_client = @@character_set_client */;
403/*!40101 SET character_set_client = utf8 */;
404CREATE TABLE `financeiro_status` (
405 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
406 `nome` varchar(255) DEFAULT '',
407 PRIMARY KEY (`id`)
408) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 PACK_KEYS=0;
409/*!40101 SET character_set_client = @saved_cs_client */;
410
411--
412-- Dumping data for table `financeiro_status`
413--
414
415LOCK TABLES `financeiro_status` WRITE;
416/*!40000 ALTER TABLE `financeiro_status` DISABLE KEYS */;
417INSERT INTO `financeiro_status` VALUES (1,'Em Aberto'),(2,'Baixada');
418/*!40000 ALTER TABLE `financeiro_status` ENABLE KEYS */;
419UNLOCK TABLES;
420
421--
422-- Table structure for table `financeiro_tipo`
423--
424
425DROP TABLE IF EXISTS `financeiro_tipo`;
426/*!40101 SET @saved_cs_client = @@character_set_client */;
427/*!40101 SET character_set_client = utf8 */;
428CREATE TABLE `financeiro_tipo` (
429 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
430 `nome` varchar(255) DEFAULT '',
431 PRIMARY KEY (`id`)
432) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 PACK_KEYS=0;
433/*!40101 SET character_set_client = @saved_cs_client */;
434
435--
436-- Dumping data for table `financeiro_tipo`
437--
438
439LOCK TABLES `financeiro_tipo` WRITE;
440/*!40000 ALTER TABLE `financeiro_tipo` DISABLE KEYS */;
441INSERT INTO `financeiro_tipo` VALUES (1,'Ã Pagar'),(2,'Ã Receber');
442/*!40000 ALTER TABLE `financeiro_tipo` ENABLE KEYS */;
443UNLOCK TABLES;
444
445--
446-- Table structure for table `menu`
447--
448
449DROP TABLE IF EXISTS `menu`;
450/*!40101 SET @saved_cs_client = @@character_set_client */;
451/*!40101 SET character_set_client = utf8 */;
452CREATE TABLE `menu` (
453 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
454 `nome` varchar(255) DEFAULT '',
455 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
456 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
457 `ativo` tinyint(3) unsigned DEFAULT NULL,
458 `caminho` varchar(255) DEFAULT '',
459 PRIMARY KEY (`id`)
460) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 PACK_KEYS=0;
461/*!40101 SET character_set_client = @saved_cs_client */;
462
463--
464-- Dumping data for table `menu`
465--
466
467LOCK TABLES `menu` WRITE;
468/*!40000 ALTER TABLE `menu` DISABLE KEYS */;
469INSERT INTO `menu` VALUES (1,'Alarmes',1,'2016-03-12 18:26:08',1,'alarme/lista'),(2,'Negociações',1,'2016-03-12 18:26:08',1,'negociacao/lista'),(3,'Nova negociação',1,'2016-03-12 18:26:08',1,'negociacao/seleciona'),(4,'Cliente/Fornecedor',2,'2016-03-12 18:26:08',1,'pessoa/lista'),(5,'Financeiro',2,'2016-03-12 18:26:08',1,'financeiro/lista'),(6,'Novo financeiro',2,'2016-03-12 18:26:08',1,'financeiro/seleciona'),(7,'Ativos',2,'2016-03-12 18:26:08',1,'ativo/lista'),(8,'Simuladores',2,'2016-03-12 18:26:08',1,'simulador/lista'),(9,'Bancos',2,'2016-03-12 18:26:08',1,'banco/lista'),(10,'Plano de Contas',2,'2016-03-12 18:26:08',1,'planoconta/lista'),(11,'Usuários',3,'2016-03-12 18:26:08',1,'usuario/lista'),(12,'Configurações',3,'2016-03-12 18:26:08',1,'configuracao/lista'),(13,'Patrimônio',4,'2016-03-12 18:26:08',1,'reports/filtro'),(14,'Cash Flow',4,'2016-03-12 18:26:08',1,'reports/cash-flow'),(15,'Cash Flow Anual',4,'2016-03-12 18:26:08',1,'reports/cash-flow-anual'),(16,'Finances',4,'2016-03-12 18:26:08',1,'reports/finances'),(17,'AnalÃtico',4,'2016-03-27 00:00:00',1,'reports/analitico'),(18,'Sintético Financeiro',4,'2016-03-27 00:00:00',1,'reports/sintetico-financeiro');
470/*!40000 ALTER TABLE `menu` ENABLE KEYS */;
471UNLOCK TABLES;
472
473--
474-- Table structure for table `menu_tipo`
475--
476
477DROP TABLE IF EXISTS `menu_tipo`;
478/*!40101 SET @saved_cs_client = @@character_set_client */;
479/*!40101 SET character_set_client = utf8 */;
480CREATE TABLE `menu_tipo` (
481 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
482 `nome` varchar(255) DEFAULT '',
483 `icone` varchar(255) DEFAULT '',
484 PRIMARY KEY (`id`)
485) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 PACK_KEYS=0;
486/*!40101 SET character_set_client = @saved_cs_client */;
487
488--
489-- Dumping data for table `menu_tipo`
490--
491
492LOCK TABLES `menu_tipo` WRITE;
493/*!40000 ALTER TABLE `menu_tipo` DISABLE KEYS */;
494INSERT INTO `menu_tipo` VALUES (1,'Simuladores','mdi-editor-border-all'),(2,'Cadastros','mdi-editor-insert-comment'),(3,'Administração','mdi-image-palette'),(4,'Relatórios','mdi-action-print');
495/*!40000 ALTER TABLE `menu_tipo` ENABLE KEYS */;
496UNLOCK TABLES;
497
498--
499-- Table structure for table `migrations`
500--
501
502DROP TABLE IF EXISTS `migrations`;
503/*!40101 SET @saved_cs_client = @@character_set_client */;
504/*!40101 SET character_set_client = utf8 */;
505CREATE TABLE `migrations` (
506 `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
507 `batch` int(11) NOT NULL
508) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
509/*!40101 SET character_set_client = @saved_cs_client */;
510
511--
512-- Dumping data for table `migrations`
513--
514
515LOCK TABLES `migrations` WRITE;
516/*!40000 ALTER TABLE `migrations` DISABLE KEYS */;
517INSERT INTO `migrations` VALUES ('2014_10_12_000000_create_users_table',1),('2014_10_12_100000_create_password_resets_table',1),('2015_01_01_000001_create_oauth_scopes_table',2),('2015_01_01_000002_create_oauth_grants_table',2),('2015_01_01_000003_create_oauth_grant_scopes_table',2),('2015_01_01_000004_create_oauth_clients_table',2),('2015_01_01_000005_create_oauth_client_endpoints_table',2),('2015_01_01_000006_create_oauth_client_scopes_table',2),('2015_01_01_000007_create_oauth_client_grants_table',2),('2015_01_01_000008_create_oauth_sessions_table',2),('2015_01_01_000009_create_oauth_session_scopes_table',2),('2015_01_01_000010_create_oauth_auth_codes_table',2),('2015_01_01_000011_create_oauth_auth_code_scopes_table',2),('2015_01_01_000012_create_oauth_access_tokens_table',2),('2015_01_01_000013_create_oauth_access_token_scopes_table',2),('2015_01_01_000014_create_oauth_refresh_tokens_table',2);
518/*!40000 ALTER TABLE `migrations` ENABLE KEYS */;
519UNLOCK TABLES;
520
521--
522-- Table structure for table `negociacao`
523--
524
525DROP TABLE IF EXISTS `negociacao`;
526/*!40101 SET @saved_cs_client = @@character_set_client */;
527/*!40101 SET character_set_client = utf8 */;
528CREATE TABLE `negociacao` (
529 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
530 `simulador_id` int(11) unsigned NOT NULL,
531 `user_id` int(11) unsigned NOT NULL,
532 `pessoa_id` int(11) unsigned NOT NULL,
533 `dt_criacao` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
534 `dt_contrato` date DEFAULT NULL,
535 `dt_pagamento` date DEFAULT NULL,
536 `qt_parcelas` int(5) DEFAULT '1',
537 `status` tinyint(3) unsigned DEFAULT NULL,
538 `ativo` tinyint(3) unsigned DEFAULT NULL,
539 `vl_contrato` decimal(12,4) DEFAULT '0.0000',
540 `vl_taxa_juros_mes` decimal(12,4) DEFAULT '0.0000',
541 `vl_capital` decimal(12,4) DEFAULT '0.0000',
542 `vl_calculado` decimal(12,4) DEFAULT '0.0000',
543 `dia_vencimento` int(5) DEFAULT '1',
544 `vl_taxa_adm` decimal(12,4) DEFAULT NULL,
545 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
546 `vl_cet` decimal(12,4) DEFAULT '0.0000',
547 `vl_cpmf` decimal(12,4) DEFAULT '0.0000',
548 `vl_iof` decimal(12,4) DEFAULT '0.0000',
549 PRIMARY KEY (`id`),
550 KEY `fk_negociacao_simulador_id_idx` (`simulador_id`),
551 KEY `fk_negociacao_user_id_idx` (`user_id`),
552 KEY `fk_negociacao_pessoa_id_idx` (`pessoa_id`),
553 CONSTRAINT `fk_negociacao_pessoa_id` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
554 CONSTRAINT `fk_negociacao_simulador_id` FOREIGN KEY (`simulador_id`) REFERENCES `simulador` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
555 CONSTRAINT `fk_negociacao_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
556) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8 PACK_KEYS=0;
557/*!40101 SET character_set_client = @saved_cs_client */;
558
559--
560-- Table structure for table `negociacao_parcela`
561--
562
563DROP TABLE IF EXISTS `negociacao_parcela`;
564/*!40101 SET @saved_cs_client = @@character_set_client */;
565/*!40101 SET character_set_client = utf8 */;
566CREATE TABLE `negociacao_parcela` (
567 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
568 `negociacao_id` int(11) unsigned NOT NULL,
569 `banco_id` int(11) unsigned DEFAULT NULL,
570 `cheque` varchar(25) DEFAULT '',
571 `ordem` int(5) DEFAULT '1',
572 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
573 `dt_emprestimo` date DEFAULT NULL,
574 `dt_pagamento` date DEFAULT NULL,
575 `qt_prazo_dias` int(5) DEFAULT '1',
576 `vl_parcela` decimal(12,4) DEFAULT '0.0000',
577 `vl_juros` decimal(12,4) DEFAULT '0.0000',
578 `vl_cpmf` decimal(12,4) DEFAULT '0.0000',
579 `vl_iof` decimal(12,4) DEFAULT '0.0000',
580 `vl_total` decimal(12,4) DEFAULT '0.0000',
581 `vl_prazo_comp` decimal(12,4) DEFAULT '0.0000',
582 `status` tinyint(3) unsigned DEFAULT NULL,
583 `ativo` tinyint(3) unsigned DEFAULT NULL,
584 `vl_juros_calc` decimal(12,4) DEFAULT NULL,
585 `vl_saldo_calc` decimal(12,4) DEFAULT NULL,
586 `vl_amortizacao_calc` decimal(12,4) DEFAULT NULL,
587 PRIMARY KEY (`id`),
588 KEY `fk_negociacao_parcela_negociacao_id_idx` (`negociacao_id`),
589 KEY `fk_negociacao_parcela_banco_id_idx` (`banco_id`),
590 CONSTRAINT `fk_negociacao_parcela_banco_id` FOREIGN KEY (`banco_id`) REFERENCES `banco` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
591 CONSTRAINT `fk_negociacao_parcela_negociacao_id` FOREIGN KEY (`negociacao_id`) REFERENCES `negociacao` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
592) ENGINE=InnoDB AUTO_INCREMENT=421 DEFAULT CHARSET=utf8 PACK_KEYS=0;
593/*!40101 SET character_set_client = @saved_cs_client */;
594
595--
596-- Table structure for table `negociacao_tipo`
597--
598
599DROP TABLE IF EXISTS `negociacao_tipo`;
600/*!40101 SET @saved_cs_client = @@character_set_client */;
601/*!40101 SET character_set_client = utf8 */;
602CREATE TABLE `negociacao_tipo` (
603 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
604 `nome` varchar(255) DEFAULT '',
605 PRIMARY KEY (`id`)
606) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 PACK_KEYS=0;
607/*!40101 SET character_set_client = @saved_cs_client */;
608
609--
610-- Dumping data for table `negociacao_tipo`
611--
612
613LOCK TABLES `negociacao_tipo` WRITE;
614/*!40000 ALTER TABLE `negociacao_tipo` DISABLE KEYS */;
615INSERT INTO `negociacao_tipo` VALUES (1,'Emprestimo'),(2,'Financiamento'),(3,'Cheque Próprio'),(4,'Cheque Terceiro');
616/*!40000 ALTER TABLE `negociacao_tipo` ENABLE KEYS */;
617UNLOCK TABLES;
618
619--
620-- Table structure for table `oauth_access_token_scopes`
621--
622
623DROP TABLE IF EXISTS `oauth_access_token_scopes`;
624/*!40101 SET @saved_cs_client = @@character_set_client */;
625/*!40101 SET character_set_client = utf8 */;
626CREATE TABLE `oauth_access_token_scopes` (
627 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
628 `access_token_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
629 `scope_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
630 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
631 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
632 PRIMARY KEY (`id`),
633 KEY `oauth_access_token_scopes_access_token_id_index` (`access_token_id`),
634 KEY `oauth_access_token_scopes_scope_id_index` (`scope_id`),
635 CONSTRAINT `oauth_access_token_scopes_access_token_id_foreign` FOREIGN KEY (`access_token_id`) REFERENCES `oauth_access_tokens` (`id`) ON DELETE CASCADE,
636 CONSTRAINT `oauth_access_token_scopes_scope_id_foreign` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE
637) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
638/*!40101 SET character_set_client = @saved_cs_client */;
639
640--
641-- Dumping data for table `oauth_access_token_scopes`
642--
643
644LOCK TABLES `oauth_access_token_scopes` WRITE;
645/*!40000 ALTER TABLE `oauth_access_token_scopes` DISABLE KEYS */;
646/*!40000 ALTER TABLE `oauth_access_token_scopes` ENABLE KEYS */;
647UNLOCK TABLES;
648
649--
650-- Table structure for table `oauth_access_tokens`
651--
652
653DROP TABLE IF EXISTS `oauth_access_tokens`;
654/*!40101 SET @saved_cs_client = @@character_set_client */;
655/*!40101 SET character_set_client = utf8 */;
656CREATE TABLE `oauth_access_tokens` (
657 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
658 `session_id` int(10) unsigned NOT NULL,
659 `expire_time` int(11) NOT NULL,
660 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
661 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
662 PRIMARY KEY (`id`),
663 UNIQUE KEY `oauth_access_tokens_id_session_id_unique` (`id`,`session_id`),
664 KEY `oauth_access_tokens_session_id_index` (`session_id`),
665 CONSTRAINT `oauth_access_tokens_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE
666) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
667/*!40101 SET character_set_client = @saved_cs_client */;
668
669--
670-- Dumping data for table `oauth_access_tokens`
671--
672
673LOCK TABLES `oauth_access_tokens` WRITE;
674/*!40000 ALTER TABLE `oauth_access_tokens` DISABLE KEYS */;
675INSERT INTO `oauth_access_tokens` VALUES ('0cmMKuRkSSbIQs8z5jlxGF4rgP4I9OXdFQr7cSk4',1,1443708930,'2015-10-01 19:15:30','2015-10-01 19:15:30'),('1sOjErinPTJ3TL1hthfbDUbUkkrhySpvNhFTTgBT',24,1443750239,'2015-10-02 06:43:59','2015-10-02 06:43:59'),('52S82mG8SQ8HSJgkXcVqiknE1SrlJQ73mQZHqfdi',25,1443750341,'2015-10-02 06:45:41','2015-10-02 06:45:41'),('5LVN1wqDc1DtHNlfx6fSLnG0ZhUCqwUrlLPB3jkq',16,1443749987,'2015-10-02 06:39:47','2015-10-02 06:39:47'),('6asdJ8OQ6kjVRJLntiUauugALGDsBEoOFlW2jGR2',8,1443748182,'2015-10-02 06:09:42','2015-10-02 06:09:42'),('9TmxvE6BGJZzKv7v0VORv2031bUOAJ6TWcAcPq11',15,1443749962,'2015-10-02 06:39:22','2015-10-02 06:39:22'),('AXXEtZUaBmuHUlisDnhQHB4cqzM0zK6pqcm3c3nn',13,1443749718,'2015-10-02 06:35:19','2015-10-02 06:35:19'),('beHrXI3d2X16P1GnwvINrnn03RgO9PUolJ0ojpMh',9,1443748251,'2015-10-02 06:10:51','2015-10-02 06:10:51'),('biiDCegy0xzZ8TKYXs7EQC6cmW8MKcfkl568hZQB',17,1443750105,'2015-10-02 06:41:45','2015-10-02 06:41:45'),('BJOCyntw4fB8zclE28vhlntCxwysEpja8XqdvztQ',27,1443750608,'2015-10-02 06:50:08','2015-10-02 06:50:08'),('bnizluCzARtl7bIj1SqUoPcfUZMzQOzwEblGu1JB',5,1443710297,'2015-10-01 19:38:17','2015-10-01 19:38:17'),('cFGT7IIIEz0A5in6sPPYTZq2T2JzNOywDSxN4xAw',19,1443750189,'2015-10-02 06:43:09','2015-10-02 06:43:09'),('CwtMTQIsTfmSuYecKgsZn3Nxk3tPbOm3rJ8YqKFg',18,1443750175,'2015-10-02 06:42:55','2015-10-02 06:42:55'),('dFNBJ9tY5VxM1EiIOPhPHy9EYOA1tUQGdzb1SroI',3,1443709395,'2015-10-01 19:23:15','2015-10-01 19:23:15'),('dGSd9KkLe4RoNBjTf0Z9qnENZzW3PR2wfqD9O3wi',4,1443709639,'2015-10-01 19:27:19','2015-10-01 19:27:19'),('GVBFy4ZGuZQtsFGFg1ddo68xSkh5PxgT36HUHBPg',21,1443750204,'2015-10-02 06:43:24','2015-10-02 06:43:24'),('HhYao0OPbwvootClPlIoFveHOoraFrlAFw0AeH4h',36,1450964710,'2015-12-24 12:45:10','2015-12-24 12:45:10'),('iC6UybjtkpNrb35ZBAmsRQkEoC5xMVv928u43zLy',33,1443911721,'2015-10-04 03:35:21','2015-10-04 03:35:21'),('kprzyIkZA7f2pAKQqZvH0FQN9PYZu9INyeM3yuzd',6,1443712920,'2015-10-01 20:22:00','2015-10-01 20:22:00'),('KyrOj5HBbodRS2GtAakcEZIyYgcNkGMtT1ikfKKJ',23,1443750226,'2015-10-02 06:43:46','2015-10-02 06:43:46'),('LpBvdpb4pxldEvQIAMwsLuBwAoksPO3tNdp19laM',11,1443749700,'2015-10-02 06:35:00','2015-10-02 06:35:00'),('mAMlnAapcwlC7vQ0cChzT6QI0L0PVwNkPEIqJ5oZ',32,1443794083,'2015-10-02 18:54:44','2015-10-02 18:54:44'),('n1p8Xo3awV6k7ntHzRehFuGj5Aejzeys4JqvSVHH',31,1443750710,'2015-10-02 06:51:50','2015-10-02 06:51:50'),('NrnBg3Jghg2e2zkDINHJlpvPq8Teapzh4jMg13og',30,1443750701,'2015-10-02 06:51:41','2015-10-02 06:51:41'),('OZBsCOs7rVeSyqKAyXfgpa8MK79BWShm0nDeQIDv',34,1444011649,'2015-10-05 07:20:49','2015-10-05 07:20:49'),('ppkzDiJOiGuWrkoeD4aGttTHpNrBXnF2MrwCN237',22,1443750207,'2015-10-02 06:43:28','2015-10-02 06:43:28'),('Q4SiRNT908VUzAqpCTRyLHr5cZThut4gnn4A64eQ',7,1443747698,'2015-10-02 06:01:38','2015-10-02 06:01:38'),('QgONKf1TabYgw9e6iJcsxMmrJvgta5UHUuFyLjI2',12,1443749706,'2015-10-02 06:35:07','2015-10-02 06:35:07'),('R4J7ZKRjfHsgfyE6sNz6eFwBwVicXAmlBPPyK5l6',14,1443749917,'2015-10-02 06:38:37','2015-10-02 06:38:37'),('R7QWmnrH3rTK13Js2TVGb2wJxYkz4gyqVHoJR94c',29,1443750684,'2015-10-02 06:51:24','2015-10-02 06:51:24'),('U1zJH2sZfZX1ZAuBUfXS5rnx8zn1JSESm6aK69QT',20,1443750201,'2015-10-02 06:43:21','2015-10-02 06:43:21'),('UCSp0t4foh6dg9WbsG2epXB9IVMMLtzhVLKrbkwa',10,1443748259,'2015-10-02 06:10:59','2015-10-02 06:10:59'),('vxDy8Ut5PMCOu1x2mN3S6SWauwOvrJrOfvvXZJfr',28,1443750675,'2015-10-02 06:51:15','2015-10-02 06:51:15'),('W6LsvXcFKaYruVMmZhDOu7VqoSRkvCNmEX5gy1XA',26,1443750418,'2015-10-02 06:46:58','2015-10-02 06:46:58'),('w7LLo8qxlopPo671vLxUl8nUS2xemd3ILsyQkHe5',35,1450964558,'2015-12-24 12:42:38','2015-12-24 12:42:38'),('y3EfCBJmR7wT5jZCNGcxKA5a4f7kXTr1DMBOVwk8',2,1443709120,'2015-10-01 19:18:40','2015-10-01 19:18:40');
676/*!40000 ALTER TABLE `oauth_access_tokens` ENABLE KEYS */;
677UNLOCK TABLES;
678
679--
680-- Table structure for table `oauth_auth_code_scopes`
681--
682
683DROP TABLE IF EXISTS `oauth_auth_code_scopes`;
684/*!40101 SET @saved_cs_client = @@character_set_client */;
685/*!40101 SET character_set_client = utf8 */;
686CREATE TABLE `oauth_auth_code_scopes` (
687 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
688 `auth_code_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
689 `scope_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
690 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
691 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
692 PRIMARY KEY (`id`),
693 KEY `oauth_auth_code_scopes_auth_code_id_index` (`auth_code_id`),
694 KEY `oauth_auth_code_scopes_scope_id_index` (`scope_id`),
695 CONSTRAINT `oauth_auth_code_scopes_auth_code_id_foreign` FOREIGN KEY (`auth_code_id`) REFERENCES `oauth_auth_codes` (`id`) ON DELETE CASCADE,
696 CONSTRAINT `oauth_auth_code_scopes_scope_id_foreign` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE
697) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
698/*!40101 SET character_set_client = @saved_cs_client */;
699
700--
701-- Dumping data for table `oauth_auth_code_scopes`
702--
703
704LOCK TABLES `oauth_auth_code_scopes` WRITE;
705/*!40000 ALTER TABLE `oauth_auth_code_scopes` DISABLE KEYS */;
706/*!40000 ALTER TABLE `oauth_auth_code_scopes` ENABLE KEYS */;
707UNLOCK TABLES;
708
709--
710-- Table structure for table `oauth_auth_codes`
711--
712
713DROP TABLE IF EXISTS `oauth_auth_codes`;
714/*!40101 SET @saved_cs_client = @@character_set_client */;
715/*!40101 SET character_set_client = utf8 */;
716CREATE TABLE `oauth_auth_codes` (
717 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
718 `session_id` int(10) unsigned NOT NULL,
719 `redirect_uri` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
720 `expire_time` int(11) NOT NULL,
721 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
722 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
723 PRIMARY KEY (`id`),
724 KEY `oauth_auth_codes_session_id_index` (`session_id`),
725 CONSTRAINT `oauth_auth_codes_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE
726) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
727/*!40101 SET character_set_client = @saved_cs_client */;
728
729--
730-- Dumping data for table `oauth_auth_codes`
731--
732
733LOCK TABLES `oauth_auth_codes` WRITE;
734/*!40000 ALTER TABLE `oauth_auth_codes` DISABLE KEYS */;
735/*!40000 ALTER TABLE `oauth_auth_codes` ENABLE KEYS */;
736UNLOCK TABLES;
737
738--
739-- Table structure for table `oauth_client_endpoints`
740--
741
742DROP TABLE IF EXISTS `oauth_client_endpoints`;
743/*!40101 SET @saved_cs_client = @@character_set_client */;
744/*!40101 SET character_set_client = utf8 */;
745CREATE TABLE `oauth_client_endpoints` (
746 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
747 `client_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
748 `redirect_uri` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
749 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
750 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
751 PRIMARY KEY (`id`),
752 UNIQUE KEY `oauth_client_endpoints_client_id_redirect_uri_unique` (`client_id`,`redirect_uri`),
753 CONSTRAINT `oauth_client_endpoints_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
754) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
755/*!40101 SET character_set_client = @saved_cs_client */;
756
757--
758-- Dumping data for table `oauth_client_endpoints`
759--
760
761LOCK TABLES `oauth_client_endpoints` WRITE;
762/*!40000 ALTER TABLE `oauth_client_endpoints` DISABLE KEYS */;
763/*!40000 ALTER TABLE `oauth_client_endpoints` ENABLE KEYS */;
764UNLOCK TABLES;
765
766--
767-- Table structure for table `oauth_client_grants`
768--
769
770DROP TABLE IF EXISTS `oauth_client_grants`;
771/*!40101 SET @saved_cs_client = @@character_set_client */;
772/*!40101 SET character_set_client = utf8 */;
773CREATE TABLE `oauth_client_grants` (
774 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
775 `client_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
776 `grant_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
777 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
778 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
779 PRIMARY KEY (`id`),
780 KEY `oauth_client_grants_client_id_index` (`client_id`),
781 KEY `oauth_client_grants_grant_id_index` (`grant_id`),
782 CONSTRAINT `oauth_client_grants_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION,
783 CONSTRAINT `oauth_client_grants_grant_id_foreign` FOREIGN KEY (`grant_id`) REFERENCES `oauth_grants` (`id`) ON DELETE CASCADE ON UPDATE NO ACTION
784) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
785/*!40101 SET character_set_client = @saved_cs_client */;
786
787--
788-- Dumping data for table `oauth_client_grants`
789--
790
791LOCK TABLES `oauth_client_grants` WRITE;
792/*!40000 ALTER TABLE `oauth_client_grants` DISABLE KEYS */;
793/*!40000 ALTER TABLE `oauth_client_grants` ENABLE KEYS */;
794UNLOCK TABLES;
795
796--
797-- Table structure for table `oauth_client_scopes`
798--
799
800DROP TABLE IF EXISTS `oauth_client_scopes`;
801/*!40101 SET @saved_cs_client = @@character_set_client */;
802/*!40101 SET character_set_client = utf8 */;
803CREATE TABLE `oauth_client_scopes` (
804 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
805 `client_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
806 `scope_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
807 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
808 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
809 PRIMARY KEY (`id`),
810 KEY `oauth_client_scopes_client_id_index` (`client_id`),
811 KEY `oauth_client_scopes_scope_id_index` (`scope_id`),
812 CONSTRAINT `oauth_client_scopes_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE,
813 CONSTRAINT `oauth_client_scopes_scope_id_foreign` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE
814) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
815/*!40101 SET character_set_client = @saved_cs_client */;
816
817--
818-- Dumping data for table `oauth_client_scopes`
819--
820
821LOCK TABLES `oauth_client_scopes` WRITE;
822/*!40000 ALTER TABLE `oauth_client_scopes` DISABLE KEYS */;
823/*!40000 ALTER TABLE `oauth_client_scopes` ENABLE KEYS */;
824UNLOCK TABLES;
825
826--
827-- Table structure for table `oauth_clients`
828--
829
830DROP TABLE IF EXISTS `oauth_clients`;
831/*!40101 SET @saved_cs_client = @@character_set_client */;
832/*!40101 SET character_set_client = utf8 */;
833CREATE TABLE `oauth_clients` (
834 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
835 `secret` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
836 `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
837 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
838 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
839 PRIMARY KEY (`id`),
840 UNIQUE KEY `oauth_clients_id_secret_unique` (`id`,`secret`)
841) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
842/*!40101 SET character_set_client = @saved_cs_client */;
843
844--
845-- Dumping data for table `oauth_clients`
846--
847
848LOCK TABLES `oauth_clients` WRITE;
849/*!40000 ALTER TABLE `oauth_clients` DISABLE KEYS */;
850INSERT INTO `oauth_clients` VALUES ('app1','secret','client1','2015-10-01 14:45:00','2015-10-01 14:45:00');
851/*!40000 ALTER TABLE `oauth_clients` ENABLE KEYS */;
852UNLOCK TABLES;
853
854--
855-- Table structure for table `oauth_grant_scopes`
856--
857
858DROP TABLE IF EXISTS `oauth_grant_scopes`;
859/*!40101 SET @saved_cs_client = @@character_set_client */;
860/*!40101 SET character_set_client = utf8 */;
861CREATE TABLE `oauth_grant_scopes` (
862 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
863 `grant_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
864 `scope_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
865 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
866 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
867 PRIMARY KEY (`id`),
868 KEY `oauth_grant_scopes_grant_id_index` (`grant_id`),
869 KEY `oauth_grant_scopes_scope_id_index` (`scope_id`),
870 CONSTRAINT `oauth_grant_scopes_grant_id_foreign` FOREIGN KEY (`grant_id`) REFERENCES `oauth_grants` (`id`) ON DELETE CASCADE,
871 CONSTRAINT `oauth_grant_scopes_scope_id_foreign` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE
872) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
873/*!40101 SET character_set_client = @saved_cs_client */;
874
875--
876-- Dumping data for table `oauth_grant_scopes`
877--
878
879LOCK TABLES `oauth_grant_scopes` WRITE;
880/*!40000 ALTER TABLE `oauth_grant_scopes` DISABLE KEYS */;
881/*!40000 ALTER TABLE `oauth_grant_scopes` ENABLE KEYS */;
882UNLOCK TABLES;
883
884--
885-- Table structure for table `oauth_grants`
886--
887
888DROP TABLE IF EXISTS `oauth_grants`;
889/*!40101 SET @saved_cs_client = @@character_set_client */;
890/*!40101 SET character_set_client = utf8 */;
891CREATE TABLE `oauth_grants` (
892 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
893 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
894 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
895 PRIMARY KEY (`id`)
896) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
897/*!40101 SET character_set_client = @saved_cs_client */;
898
899--
900-- Dumping data for table `oauth_grants`
901--
902
903LOCK TABLES `oauth_grants` WRITE;
904/*!40000 ALTER TABLE `oauth_grants` DISABLE KEYS */;
905/*!40000 ALTER TABLE `oauth_grants` ENABLE KEYS */;
906UNLOCK TABLES;
907
908--
909-- Table structure for table `oauth_refresh_tokens`
910--
911
912DROP TABLE IF EXISTS `oauth_refresh_tokens`;
913/*!40101 SET @saved_cs_client = @@character_set_client */;
914/*!40101 SET character_set_client = utf8 */;
915CREATE TABLE `oauth_refresh_tokens` (
916 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
917 `access_token_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
918 `expire_time` int(11) NOT NULL,
919 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
920 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
921 PRIMARY KEY (`access_token_id`),
922 UNIQUE KEY `oauth_refresh_tokens_id_unique` (`id`),
923 CONSTRAINT `oauth_refresh_tokens_access_token_id_foreign` FOREIGN KEY (`access_token_id`) REFERENCES `oauth_access_tokens` (`id`) ON DELETE CASCADE
924) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
925/*!40101 SET character_set_client = @saved_cs_client */;
926
927--
928-- Dumping data for table `oauth_refresh_tokens`
929--
930
931LOCK TABLES `oauth_refresh_tokens` WRITE;
932/*!40000 ALTER TABLE `oauth_refresh_tokens` DISABLE KEYS */;
933/*!40000 ALTER TABLE `oauth_refresh_tokens` ENABLE KEYS */;
934UNLOCK TABLES;
935
936--
937-- Table structure for table `oauth_scopes`
938--
939
940DROP TABLE IF EXISTS `oauth_scopes`;
941/*!40101 SET @saved_cs_client = @@character_set_client */;
942/*!40101 SET character_set_client = utf8 */;
943CREATE TABLE `oauth_scopes` (
944 `id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
945 `description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
946 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
947 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
948 PRIMARY KEY (`id`)
949) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
950/*!40101 SET character_set_client = @saved_cs_client */;
951
952--
953-- Dumping data for table `oauth_scopes`
954--
955
956LOCK TABLES `oauth_scopes` WRITE;
957/*!40000 ALTER TABLE `oauth_scopes` DISABLE KEYS */;
958/*!40000 ALTER TABLE `oauth_scopes` ENABLE KEYS */;
959UNLOCK TABLES;
960
961--
962-- Table structure for table `oauth_session_scopes`
963--
964
965DROP TABLE IF EXISTS `oauth_session_scopes`;
966/*!40101 SET @saved_cs_client = @@character_set_client */;
967/*!40101 SET character_set_client = utf8 */;
968CREATE TABLE `oauth_session_scopes` (
969 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
970 `session_id` int(10) unsigned NOT NULL,
971 `scope_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
972 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
973 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
974 PRIMARY KEY (`id`),
975 KEY `oauth_session_scopes_session_id_index` (`session_id`),
976 KEY `oauth_session_scopes_scope_id_index` (`scope_id`),
977 CONSTRAINT `oauth_session_scopes_scope_id_foreign` FOREIGN KEY (`scope_id`) REFERENCES `oauth_scopes` (`id`) ON DELETE CASCADE,
978 CONSTRAINT `oauth_session_scopes_session_id_foreign` FOREIGN KEY (`session_id`) REFERENCES `oauth_sessions` (`id`) ON DELETE CASCADE
979) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
980/*!40101 SET character_set_client = @saved_cs_client */;
981
982--
983-- Dumping data for table `oauth_session_scopes`
984--
985
986LOCK TABLES `oauth_session_scopes` WRITE;
987/*!40000 ALTER TABLE `oauth_session_scopes` DISABLE KEYS */;
988/*!40000 ALTER TABLE `oauth_session_scopes` ENABLE KEYS */;
989UNLOCK TABLES;
990
991--
992-- Table structure for table `oauth_sessions`
993--
994
995DROP TABLE IF EXISTS `oauth_sessions`;
996/*!40101 SET @saved_cs_client = @@character_set_client */;
997/*!40101 SET character_set_client = utf8 */;
998CREATE TABLE `oauth_sessions` (
999 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1000 `client_id` varchar(40) COLLATE utf8_unicode_ci NOT NULL,
1001 `owner_type` enum('client','user') COLLATE utf8_unicode_ci NOT NULL DEFAULT 'user',
1002 `owner_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
1003 `client_redirect_uri` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
1004 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1005 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1006 PRIMARY KEY (`id`),
1007 KEY `oauth_sessions_client_id_owner_type_owner_id_index` (`client_id`,`owner_type`,`owner_id`),
1008 CONSTRAINT `oauth_sessions_client_id_foreign` FOREIGN KEY (`client_id`) REFERENCES `oauth_clients` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1009) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
1010/*!40101 SET character_set_client = @saved_cs_client */;
1011
1012--
1013-- Dumping data for table `oauth_sessions`
1014--
1015
1016LOCK TABLES `oauth_sessions` WRITE;
1017/*!40000 ALTER TABLE `oauth_sessions` DISABLE KEYS */;
1018INSERT INTO `oauth_sessions` VALUES (1,'app1','user','4',NULL,'2015-10-01 19:15:30','2015-10-01 19:15:30'),(2,'app1','user','4',NULL,'2015-10-01 19:18:40','2015-10-01 19:18:40'),(3,'app1','user','4',NULL,'2015-10-01 19:23:15','2015-10-01 19:23:15'),(4,'app1','user','4',NULL,'2015-10-01 19:27:19','2015-10-01 19:27:19'),(5,'app1','user','4',NULL,'2015-10-01 19:38:17','2015-10-01 19:38:17'),(6,'app1','user','4',NULL,'2015-10-01 20:22:00','2015-10-01 20:22:00'),(7,'app1','user','4',NULL,'2015-10-02 06:01:38','2015-10-02 06:01:38'),(8,'app1','user','4',NULL,'2015-10-02 06:09:42','2015-10-02 06:09:42'),(9,'app1','user','4',NULL,'2015-10-02 06:10:51','2015-10-02 06:10:51'),(10,'app1','user','4',NULL,'2015-10-02 06:10:59','2015-10-02 06:10:59'),(11,'app1','user','4',NULL,'2015-10-02 06:35:00','2015-10-02 06:35:00'),(12,'app1','user','4',NULL,'2015-10-02 06:35:06','2015-10-02 06:35:06'),(13,'app1','user','4',NULL,'2015-10-02 06:35:18','2015-10-02 06:35:18'),(14,'app1','user','4',NULL,'2015-10-02 06:38:37','2015-10-02 06:38:37'),(15,'app1','user','4',NULL,'2015-10-02 06:39:22','2015-10-02 06:39:22'),(16,'app1','user','4',NULL,'2015-10-02 06:39:47','2015-10-02 06:39:47'),(17,'app1','user','4',NULL,'2015-10-02 06:41:45','2015-10-02 06:41:45'),(18,'app1','user','4',NULL,'2015-10-02 06:42:55','2015-10-02 06:42:55'),(19,'app1','user','4',NULL,'2015-10-02 06:43:09','2015-10-02 06:43:09'),(20,'app1','user','4',NULL,'2015-10-02 06:43:21','2015-10-02 06:43:21'),(21,'app1','user','4',NULL,'2015-10-02 06:43:24','2015-10-02 06:43:24'),(22,'app1','user','4',NULL,'2015-10-02 06:43:27','2015-10-02 06:43:27'),(23,'app1','user','4',NULL,'2015-10-02 06:43:46','2015-10-02 06:43:46'),(24,'app1','user','4',NULL,'2015-10-02 06:43:59','2015-10-02 06:43:59'),(25,'app1','user','4',NULL,'2015-10-02 06:45:41','2015-10-02 06:45:41'),(26,'app1','user','4',NULL,'2015-10-02 06:46:58','2015-10-02 06:46:58'),(27,'app1','user','4',NULL,'2015-10-02 06:50:08','2015-10-02 06:50:08'),(28,'app1','user','4',NULL,'2015-10-02 06:51:15','2015-10-02 06:51:15'),(29,'app1','user','4',NULL,'2015-10-02 06:51:24','2015-10-02 06:51:24'),(30,'app1','user','4',NULL,'2015-10-02 06:51:41','2015-10-02 06:51:41'),(31,'app1','user','4',NULL,'2015-10-02 06:51:50','2015-10-02 06:51:50'),(32,'app1','user','4',NULL,'2015-10-02 18:54:44','2015-10-02 18:54:44'),(33,'app1','user','4',NULL,'2015-10-04 03:35:21','2015-10-04 03:35:21'),(34,'app1','user','4',NULL,'2015-10-05 07:20:49','2015-10-05 07:20:49'),(35,'app1','user','1',NULL,'2015-12-24 12:42:38','2015-12-24 12:42:38'),(36,'app1','user','1',NULL,'2015-12-24 12:45:10','2015-12-24 12:45:10');
1019/*!40000 ALTER TABLE `oauth_sessions` ENABLE KEYS */;
1020UNLOCK TABLES;
1021
1022--
1023-- Table structure for table `password_resets`
1024--
1025
1026DROP TABLE IF EXISTS `password_resets`;
1027/*!40101 SET @saved_cs_client = @@character_set_client */;
1028/*!40101 SET character_set_client = utf8 */;
1029CREATE TABLE `password_resets` (
1030 `email` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
1031 `token` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
1032 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1033 KEY `password_resets_email_index` (`email`),
1034 KEY `password_resets_token_index` (`token`)
1035) ENGINE=InnoDB DEFAULT CHARSET=latin1;
1036/*!40101 SET character_set_client = @saved_cs_client */;
1037
1038--
1039-- Dumping data for table `password_resets`
1040--
1041
1042LOCK TABLES `password_resets` WRITE;
1043/*!40000 ALTER TABLE `password_resets` DISABLE KEYS */;
1044/*!40000 ALTER TABLE `password_resets` ENABLE KEYS */;
1045UNLOCK TABLES;
1046
1047--
1048-- Table structure for table `permissao`
1049--
1050
1051DROP TABLE IF EXISTS `permissao`;
1052/*!40101 SET @saved_cs_client = @@character_set_client */;
1053/*!40101 SET character_set_client = utf8 */;
1054CREATE TABLE `permissao` (
1055 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1056 `user_id` int(11) unsigned NOT NULL,
1057 `menu_id` int(11) unsigned NOT NULL,
1058 `tipo` tinyint(3) unsigned DEFAULT NULL,
1059 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1060 `ativo` tinyint(3) unsigned DEFAULT NULL,
1061 PRIMARY KEY (`id`),
1062 KEY `fk_permissao_user_id_idx` (`user_id`),
1063 KEY `fk_permissao_menu_id_idx` (`menu_id`),
1064 CONSTRAINT `fk_permissao_menu_id` FOREIGN KEY (`menu_id`) REFERENCES `menu` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
1065 CONSTRAINT `fk_permissao_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1066) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
1067/*!40101 SET character_set_client = @saved_cs_client */;
1068
1069--
1070-- Dumping data for table `permissao`
1071--
1072
1073LOCK TABLES `permissao` WRITE;
1074/*!40000 ALTER TABLE `permissao` DISABLE KEYS */;
1075/*!40000 ALTER TABLE `permissao` ENABLE KEYS */;
1076UNLOCK TABLES;
1077
1078--
1079-- Table structure for table `pessoa`
1080--
1081
1082DROP TABLE IF EXISTS `pessoa`;
1083/*!40101 SET @saved_cs_client = @@character_set_client */;
1084/*!40101 SET character_set_client = utf8 */;
1085CREATE TABLE `pessoa` (
1086 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1087 `user_id` int(11) unsigned NOT NULL,
1088 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
1089 `tipo_pessoa_id` tinyint(3) unsigned DEFAULT NULL,
1090 `codigo` varchar(60) DEFAULT '',
1091 `nome` varchar(255) NOT NULL,
1092 `email` varchar(255) DEFAULT '',
1093 `nome_reduzido` varchar(100) DEFAULT '',
1094 `telefone1` varchar(15) DEFAULT '',
1095 `telefone2` varchar(15) DEFAULT '',
1096 `fax` varchar(15) DEFAULT '',
1097 `contato` varchar(255) DEFAULT '',
1098 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1099 `status` tinyint(3) unsigned DEFAULT NULL,
1100 `dt_cadastro` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1101 `dt_ultimo_ctr` date DEFAULT NULL,
1102 `dt_atualizado` date DEFAULT NULL,
1103 `dt_nascimento` date DEFAULT NULL,
1104 `documento` varchar(20) DEFAULT '',
1105 `registro` varchar(20) DEFAULT '',
1106 `registro_estado_uf` varchar(2) DEFAULT '',
1107 `inscricao_municipal` varchar(20) DEFAULT '',
1108 `estado_civil` tinyint(3) unsigned DEFAULT NULL,
1109 `estrangeiro` tinyint(3) unsigned DEFAULT NULL,
1110 `passaporte` varchar(50) DEFAULT '',
1111 `passaporte_validade` date DEFAULT NULL,
1112 `endereco_transito` varchar(255) DEFAULT '',
1113 `nacionalidade` varchar(150) DEFAULT '',
1114 `cnh` varchar(50) DEFAULT '',
1115 `cnh_emissao` date DEFAULT NULL,
1116 `validade` date DEFAULT NULL,
1117 `prontuario` varchar(255) DEFAULT '',
1118 `categoria` varchar(255) DEFAULT '',
1119 `data_lista_alerta` date DEFAULT NULL,
1120 `motivo` varchar(255) DEFAULT '',
1121 `particularidades` tinyint(3) unsigned DEFAULT NULL,
1122 `fixa` varchar(255) DEFAULT '',
1123 `site` varchar(255) DEFAULT '',
1124 `observacao` varchar(255) DEFAULT '',
1125 `endereco` varchar(255) DEFAULT '',
1126 `numero` varchar(25) DEFAULT '',
1127 `complemento` varchar(50) DEFAULT '',
1128 `bairro` varchar(255) DEFAULT '',
1129 `cidade` varchar(255) DEFAULT '',
1130 `estado_uf` varchar(2) DEFAULT '',
1131 `cep` varchar(10) DEFAULT '',
1132 `ativo` tinyint(3) unsigned DEFAULT NULL,
1133 `cobranca_endereco` varchar(255) DEFAULT '',
1134 `cobranca_numero` varchar(25) DEFAULT '',
1135 `cobranca_complemento` varchar(50) DEFAULT '',
1136 `cobranca_bairro` varchar(255) DEFAULT '',
1137 `cobranca_cidade` varchar(255) DEFAULT '',
1138 `cobranca_estado_uf` varchar(2) DEFAULT '',
1139 `cobranca_cep` varchar(10) DEFAULT '',
1140 `cobranca_telefone` varchar(15) DEFAULT '',
1141 `credito_situacao` tinyint(3) unsigned DEFAULT NULL,
1142 `credito_dt_atualizado` date DEFAULT NULL,
1143 `credito_vl_limite_faturamento` decimal(12,4) DEFAULT '0.0000',
1144 `credito_vl_comprometimento` decimal(12,4) DEFAULT '0.0000',
1145 `credito_comprometimento` varchar(255) DEFAULT '',
1146 `credito_vl_faturamento_mensal` decimal(12,4) DEFAULT '0.0000',
1147 `credito_vl_patrimonio_liquido` decimal(12,4) DEFAULT '0.0000',
1148 `credito_regime_tributario` varchar(255) DEFAULT '',
1149 `credito_dt_ultimo_balanco` date DEFAULT NULL,
1150 `credito_dt_consulta_serasa` date DEFAULT NULL,
1151 `credito_dt_restricao_credito` date DEFAULT NULL,
1152 `credito_historico_cliente` varchar(512) DEFAULT '',
1153 `credito_user_id` int(11) unsigned NOT NULL,
1154 `taxa_base` decimal(12,4) DEFAULT '0.0000',
1155 PRIMARY KEY (`id`),
1156 KEY `fk_pessoa_user_id_idx` (`user_id`),
1157 CONSTRAINT `fk_pessoa_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1158) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1159/*!40101 SET character_set_client = @saved_cs_client */;
1160
1161--
1162-- Dumping data for table `pessoa`
1163--
1164
1165LOCK TABLES `pessoa` WRITE;
1166/*!40000 ALTER TABLE `pessoa` DISABLE KEYS */;
1167INSERT INTO `pessoa` VALUES (2,1,1,0,'PD0001','Pedro Brasileiro','pedro@uol.com.br','Pedro','33043314','99578877','4333043314','Hernando','2016-01-08 10:46:39',0,'2016-01-08 10:46:39','2016-01-10','2016-01-08','2016-01-08','73102679901','12345678901','PR','123456778901',1,1,'12345678901','2016-01-08','Rua Santos 248','Brasileiro','12345678901','2011-03-03','2016-01-08','prontuario','Tipo A','2016-01-28','motivo',1,'fixa','http://www.uol.com.br','observacao','Rua Santos','248','Ap 302','Centro','Londrina','PR','86020040',0,'','','Ap 504','Vila Siam','Londrina','PR','86039370','43 33043317',1,'2016-03-23',100000.0000,50000.0000,'--comprometimento--',80000.0000,500000.0000,'--regime--','2016-01-10','2016-01-10','2016-01-10','',1,3.5000),(3,1,1,0,'RD0002','Rosana','rosana@uol.com.br','Rosana','4333212020','4399578877','4333727000','Rosana','2016-01-08 19:21:36',1,'2016-01-08 19:21:36','2016-01-08','2016-01-08','2016-01-08','73102679900','','AC','',1,0,'','2016-01-08','','','','2016-01-08','2016-01-08','','','2016-01-08','',0,'','','','Rua Santos','248','Ap 302','Centro','Londrina','PR','86020040',1,'','','','','','AC','','',0,'2015-07-15',1.0000,2.0000,'gsdfgsdf',3.0000,4.0000,'gsdfgsdf','1899-11-09','1899-11-18','1899-11-11','TRANQUILO',1,3.5000),(4,1,2,1,'HPB009','Hernando de Paula Brasileiro','hpbrasileiro@hotmail.com','Hernando','4399578877','4333043314','4333729000','Hernando','0000-00-00 00:00:00',1,'0000-00-00 00:00:00','2016-01-08','0000-00-00','2016-01-08','73102679900','','AC','',1,0,'','2016-01-08','','','','2016-01-08','2016-01-08','','','2016-01-08','',0,'','','','Rua Santos','248','Ap 302','Centro','Londrina','PR','8602040',1,'','','','','','AC','','',2,'2015-11-01',100000.0000,50000.0000,'--comprometimento--',80000.0000,500000.0000,'--regime--','2016-01-10','2016-01-10','2016-01-10','',1,5.0000),(5,1,1,0,'RB0019','Rogerio Brasileiro','brasileiro@exactus.com.br','Rogerio','43 33230661','43 99578877','43 33727000','Sirlaine','0000-00-00 00:00:00',1,'0000-00-00 00:00:00','2016-01-10','0000-00-00','2016-01-10','73102679900','','AC','',1,0,'','2016-01-10','','','','2016-01-10','2016-01-10','','','2016-01-10','',0,'','','','Rua Santos','248','Ap 302','Centro','Londrina','PR','86020040',1,'','','','','','AC','','',2,'2016-01-12',15000.0000,50000.0000,'',3000000.0000,1500000.0000,'','0000-00-00','0000-00-00','0000-00-00','',1,5.0000),(9,1,1,1,'RD0002','Teste','teste@uol.com.br','Teste','','','','','0000-00-00 00:00:00',1,'0000-00-00 00:00:00','2016-02-17','0000-00-00','2016-02-17','73102679907','','AC','',1,0,'','2016-02-17','','','','2016-02-17','2016-02-17','','','2016-02-17','',0,'','','','Rua Catarina de Bora','123','Ap','Centro','Londrina','AC','860020040',1,'','','','','','AC','','',2,'0000-00-00',10000.0000,50000.0000,'',0.0000,0.0000,'','0000-00-00','0000-00-00','0000-00-00','',0,4.0000);
1168/*!40000 ALTER TABLE `pessoa` ENABLE KEYS */;
1169UNLOCK TABLES;
1170
1171--
1172-- Table structure for table `pessoa_alerta`
1173--
1174
1175DROP TABLE IF EXISTS `pessoa_alerta`;
1176/*!40101 SET @saved_cs_client = @@character_set_client */;
1177/*!40101 SET character_set_client = utf8 */;
1178CREATE TABLE `pessoa_alerta` (
1179 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1180 `user_id` int(11) unsigned NOT NULL,
1181 `aprovador_id` int(11) unsigned DEFAULT NULL,
1182 `pessoa_id` int(11) unsigned NOT NULL,
1183 `tipo_id` tinyint(3) unsigned DEFAULT NULL,
1184 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1185 `dt_aprovacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1186 `descricao` varchar(255) DEFAULT '',
1187 `ativo` tinyint(3) unsigned DEFAULT NULL,
1188 PRIMARY KEY (`id`),
1189 KEY `fk_pessoa_alerta_user_id_idx` (`user_id`),
1190 KEY `fk_pessoa_alerta_aprovador_id_idx` (`aprovador_id`),
1191 KEY `fk_pessoa_alerta_pessoa_id_idx` (`pessoa_id`),
1192 CONSTRAINT `fk_pessoa_alerta_aprovador_id` FOREIGN KEY (`aprovador_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
1193 CONSTRAINT `fk_pessoa_alerta_pessoa_id` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
1194 CONSTRAINT `fk_pessoa_alerta_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1195) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1196/*!40101 SET character_set_client = @saved_cs_client */;
1197
1198--
1199-- Dumping data for table `pessoa_alerta`
1200--
1201
1202LOCK TABLES `pessoa_alerta` WRITE;
1203/*!40000 ALTER TABLE `pessoa_alerta` DISABLE KEYS */;
1204INSERT INTO `pessoa_alerta` VALUES (2,1,1,3,0,'2016-01-12 20:13:05','2016-01-12 20:13:57','',0),(3,1,1,3,1,'2016-01-12 20:13:29','2016-01-12 20:14:22','',0),(4,1,NULL,3,0,'2016-01-12 20:14:54','0000-00-00 00:00:00','',0),(5,1,NULL,3,0,'2016-01-12 20:17:21','0000-00-00 00:00:00','',0),(6,1,1,5,1,'2016-01-13 12:05:14','2016-01-13 16:24:36','',0),(7,1,1,5,1,'2016-01-15 12:10:14','2016-01-15 12:11:07','',0),(8,1,1,3,0,'2016-01-15 12:16:44','2016-01-15 12:17:13','',0),(9,1,1,3,0,'2016-01-15 12:18:05','2016-02-02 19:57:35','',0),(10,1,1,3,0,'2016-01-15 12:20:06','2016-02-02 19:57:35','',0),(11,1,1,3,0,'2016-01-24 18:46:58','2016-02-02 19:57:35','',0),(12,1,1,3,0,'2016-01-25 21:49:10','2016-02-02 19:57:35','',0),(13,1,NULL,3,0,'2016-02-18 22:28:29','0000-00-00 00:00:00','',1),(14,1,NULL,3,0,'2016-02-25 19:33:02','0000-00-00 00:00:00','',1),(15,1,NULL,3,0,'2016-02-26 00:21:49','0000-00-00 00:00:00','',1),(16,1,NULL,3,0,'2016-02-26 16:31:46','0000-00-00 00:00:00','',1),(17,1,NULL,9,0,'2016-02-29 09:54:49','0000-00-00 00:00:00','',1),(18,1,NULL,3,0,'2016-02-29 09:57:43','0000-00-00 00:00:00','',1),(19,1,NULL,3,0,'2016-02-29 11:05:17','0000-00-00 00:00:00','',1),(20,1,NULL,3,0,'2016-02-29 22:31:26','0000-00-00 00:00:00','',1),(21,1,NULL,9,0,'2016-03-06 15:11:42','0000-00-00 00:00:00','',1),(22,1,NULL,9,0,'2016-03-06 15:13:30','0000-00-00 00:00:00','',1),(23,1,NULL,3,0,'2016-03-07 22:35:10','0000-00-00 00:00:00','',1),(24,1,NULL,9,0,'2016-03-08 14:50:48','0000-00-00 00:00:00','',1),(25,1,NULL,3,0,'2016-03-13 08:33:19','0000-00-00 00:00:00','',1),(26,9,NULL,3,0,'2016-03-22 22:54:11','0000-00-00 00:00:00','',1),(27,6,NULL,2,0,'2016-03-28 22:59:33','0000-00-00 00:00:00','',1);
1205/*!40000 ALTER TABLE `pessoa_alerta` ENABLE KEYS */;
1206UNLOCK TABLES;
1207
1208--
1209-- Table structure for table `pessoa_banco`
1210--
1211
1212DROP TABLE IF EXISTS `pessoa_banco`;
1213/*!40101 SET @saved_cs_client = @@character_set_client */;
1214/*!40101 SET character_set_client = utf8 */;
1215CREATE TABLE `pessoa_banco` (
1216 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1217 `pessoa_id` int(11) unsigned NOT NULL,
1218 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1219 `ativo` tinyint(3) unsigned DEFAULT NULL,
1220 `padrao` tinyint(3) unsigned DEFAULT NULL,
1221 `banco` int(5) DEFAULT '1',
1222 `agencia` varchar(10) DEFAULT '',
1223 `conta` varchar(25) DEFAULT '',
1224 PRIMARY KEY (`id`),
1225 KEY `fk_pessoa_banco_pessoa_id_idx` (`pessoa_id`),
1226 CONSTRAINT `fk_pessoa_banco_pessoa_id` FOREIGN KEY (`pessoa_id`) REFERENCES `pessoa` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1227) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1228/*!40101 SET character_set_client = @saved_cs_client */;
1229
1230--
1231-- Dumping data for table `pessoa_banco`
1232--
1233
1234LOCK TABLES `pessoa_banco` WRITE;
1235/*!40000 ALTER TABLE `pessoa_banco` DISABLE KEYS */;
1236INSERT INTO `pessoa_banco` VALUES (2,3,'0000-00-00 00:00:00',NULL,0,0,'5670','67890'),(5,2,'0000-00-00 00:00:00',NULL,0,0,'fasdf','fasdfasd');
1237/*!40000 ALTER TABLE `pessoa_banco` ENABLE KEYS */;
1238UNLOCK TABLES;
1239
1240--
1241-- Table structure for table `pessoa_tipo`
1242--
1243
1244DROP TABLE IF EXISTS `pessoa_tipo`;
1245/*!40101 SET @saved_cs_client = @@character_set_client */;
1246/*!40101 SET character_set_client = utf8 */;
1247CREATE TABLE `pessoa_tipo` (
1248 `id` int(11) unsigned NOT NULL,
1249 `nome` varchar(255) DEFAULT '',
1250 PRIMARY KEY (`id`)
1251) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
1252/*!40101 SET character_set_client = @saved_cs_client */;
1253
1254--
1255-- Dumping data for table `pessoa_tipo`
1256--
1257
1258LOCK TABLES `pessoa_tipo` WRITE;
1259/*!40000 ALTER TABLE `pessoa_tipo` DISABLE KEYS */;
1260INSERT INTO `pessoa_tipo` VALUES (0,'Ambos'),(1,'Cliente'),(2,'Fornecedor');
1261/*!40000 ALTER TABLE `pessoa_tipo` ENABLE KEYS */;
1262UNLOCK TABLES;
1263
1264--
1265-- Table structure for table `plano_conta_tipo`
1266--
1267
1268DROP TABLE IF EXISTS `plano_conta_tipo`;
1269CREATE TABLE `plano_conta_tipo` (
1270 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1271 `nome` varchar(255) DEFAULT '',
1272 `descricao` varchar(255) DEFAULT '',
1273 `ordem` int(5) DEFAULT '1',
1274 `ativo` tinyint(3) unsigned DEFAULT NULL,
1275 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1276 PRIMARY KEY (`id`)
1277) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1278
1279--
1280-- Dumping data for table `plano_conta_tipo`
1281--
1282
1283LOCK TABLES `plano_conta_tipo` WRITE;
1284/*!40000 ALTER TABLE `plano_conta_tipo` DISABLE KEYS */;
1285INSERT INTO `plano_conta_tipo` (
1286 `id`,
1287 `nome`,
1288 `descricao`,
1289 `ordem`,
1290 `ativo`,
1291 `dt_criacao`
1292) VALUES
1293( 3, 'Receitas Operacionais','',0,1,NOW() ),
1294( 4, 'Despesas Operacionais','',0,1,NOW() ),
1295( 5, 'Despesas Administrativas','',0,1,NOW() ),
1296( 6, 'Impostos à Recolher','',0,1,NOW() ),
1297( 7, 'Investimentos','',0,1,NOW() );
1298/*!40000 ALTER TABLE `plano_conta_tipo` ENABLE KEYS */;
1299UNLOCK TABLES;
1300
1301--
1302-- Table structure for table `plano_conta`
1303--
1304
1305DROP TABLE IF EXISTS `plano_conta`;
1306/*!40101 SET @saved_cs_client = @@character_set_client */;
1307/*!40101 SET character_set_client = utf8 */;
1308CREATE TABLE `plano_conta` (
1309 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1310 `nome` varchar(255) DEFAULT '',
1311 `descricao` varchar(255) DEFAULT '',
1312 `dt_criacao` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1313 `tipo_id` int(11) unsigned DEFAULT NULL,
1314 `ativo` tinyint(3) unsigned DEFAULT NULL,
1315 PRIMARY KEY (`id`),
1316 KEY `fk_plano_conta_tipo_id_idx` (`tipo_id`),
1317 CONSTRAINT `fk_plano_conta_tipo_id` FOREIGN KEY (`tipo_id`) REFERENCES `plano_conta_tipo` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1318) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1319/*!40101 SET character_set_client = @saved_cs_client */;
1320
1321--
1322-- Dumping data for table `plano_conta`
1323--
1324
1325LOCK TABLES `plano_conta` WRITE;
1326/*!40000 ALTER TABLE `plano_conta` DISABLE KEYS */;
1327
1328INSERT INTO `plano_conta` (
1329 `nome`,
1330 `descricao`,
1331 `dt_criacao`,
1332 `ativo`,
1333 `tipo_id`
1334) VALUES
1335( 'Aplicações Financeiras', '', NOW(), 1, 3 ),
1336( 'Cheques Próprios e/ou Duplicatas', '', NOW(), 1, 3 ),
1337( 'Cheques Terceiros', '', NOW(), 1, 3 ),
1338( 'Crédito Bancário', '', NOW(), 1, 3 ),
1339( 'Empréstimos', '', NOW(), 1, 3 ),
1340( 'Financiamentos', '', NOW(), 1, 3 ),
1341( 'Inv. Capital Próprio', '', NOW(), 1, 3 ),
1342( 'Inv. Capital Terceiros', '', NOW(), 1, 3 ),
1343( 'Locação', '', NOW(), 1, 3 ),
1344( 'Outros', '', NOW(), 1, 3 );
1345
1346INSERT INTO `plano_conta` (
1347 `nome`,
1348 `descricao`,
1349 `dt_criacao`,
1350 `ativo`,
1351 `tipo_id`
1352) VALUES
1353( 'CombustÃvel', '', NOW(), 1, 4 ),
1354( 'Comissões', '', NOW(), 1, 4 ),
1355( 'Consórcios', '', NOW(), 1, 4 ),
1356( 'Estacionamento', '', NOW(), 1, 4 ),
1357( 'Financiamentos', '', NOW(), 1, 4 ),
1358( 'Juros - Capital Próprio', '', NOW(), 1, 4 ),
1359( 'Juros - Capital Terceiro', '', NOW(), 1, 4 ),
1360( 'Serviços Cons. Financeira - Serasa', '', NOW(), 1, 4 ),
1361( 'Serviços de Despachantes', '', NOW(), 1, 4 ),
1362( 'Serviços de Tabelionato', '', NOW(), 1, 4 ),
1363( 'Tarifas Bancárias', '', NOW(), 1, 4 );
1364
1365INSERT INTO `plano_conta` (
1366 `nome`,
1367 `descricao`,
1368 `dt_criacao`,
1369 `ativo`,
1370 `tipo_id`
1371) VALUES
1372( '13º Salário', '', NOW(), 1, 5 ),
1373( 'Ãgua e Esgoto', '', NOW(), 1, 5 ),
1374( 'Aluguel de Imóvel', '', NOW(), 1, 5 ),
1375( 'Aluguel de Máquinas e Equipamentos', '', NOW(), 1, 5 ),
1376( 'Aluguel de VeÃculos', '', NOW(), 1, 5 ),
1377( 'Antecipação de Lucros', '', NOW(), 1, 5 ),
1378( 'Assistência Contábil', '', NOW(), 1, 5 ),
1379( 'Assistência JurÃdica', '', NOW(), 1, 5 ),
1380( 'Assistência Médica e Social', '', NOW(), 1, 5 ),
1381( 'Contribuição Assistencial', '', NOW(), 1, 5 ),
1382( 'Contribuição Assossiativa', '', NOW(), 1, 5 ),
1383( 'Contribuição Confederativa', '', NOW(), 1, 5 ),
1384( 'Contribuição Sindical', '', NOW(), 1, 5 ),
1385( 'Energia Elétrica', '', NOW(), 1, 5 ),
1386( 'Férias ', '', NOW(), 1, 5 ),
1387( 'FGTS', '', NOW(), 1, 5 ),
1388( 'INSS', '', NOW(), 1, 5 ),
1389( 'IR (sobre folha de pagamento)', '', NOW(), 1, 5 ),
1390( 'Livros, Jornais e Revistas', '', NOW(), 1, 5 ),
1391( 'Material de Escritório', '', NOW(), 1, 5 ),
1392( 'Material de Higiene e Limpeza', '', NOW(), 1, 5 ),
1393( 'Pró Labore', '', NOW(), 1, 5 ),
1394( 'Rescisão Trabalhista', '', NOW(), 1, 5 ),
1395( 'Salários', '', NOW(), 1, 5 ),
1396( 'Serv. Limpeza e Conservação', '', NOW(), 1, 5 ),
1397( 'Serv. Manutenção Predial', '', NOW(), 1, 5 ),
1398( 'Serv. Postal e Telegráfico', '', NOW(), 1, 5 ),
1399( 'Serv. Tabelionato', '', NOW(), 1, 5 ),
1400( 'Serv. Tecnologia e Informação (T.I)', '', NOW(), 1, 5 ),
1401( 'Telefonia Fixa + Serv. Internet', '', NOW(), 1, 5 ),
1402( 'Telefonia Móvel', '', NOW(), 1, 5 ),
1403( 'Vale Refeição', '', NOW(), 1, 5 ),
1404( 'Vale Transporte', '', NOW(), 1, 5 );
1405
1406INSERT INTO `plano_conta` (
1407 `nome`,
1408 `descricao`,
1409 `dt_criacao`,
1410 `ativo`,
1411 `tipo_id`
1412) VALUES
1413( 'Cofins à recolher', '', NOW(), 1, 6 ),
1414( 'CRF Ã recolher', '', NOW(), 1, 6 ),
1415( 'CSLL Ã recolher', '', NOW(), 1, 6 ),
1416( 'FIA Ã recolher', '', NOW(), 1, 6 ),
1417( 'Funrejus', '', NOW(), 1, 6 ),
1418( 'FUNRURAL Ã recolher', '', NOW(), 1, 6 ),
1419( 'ICMS Ã recolher', '', NOW(), 1, 6 ),
1420( 'IRPJ Ã recolher', '', NOW(), 1, 6 ),
1421( 'IRRF Ã recolher', '', NOW(), 1, 6 ),
1422( 'ISS Ã recolher', '', NOW(), 1, 6 ),
1423( 'ITBI', '', NOW(), 1, 6 ),
1424( 'PIS Ã recolher', '', NOW(), 1, 6 ),
1425( 'REFIS Ã recolher', '', NOW(), 1, 6 ),
1426( 'Subst. Tributária à recolher', '', NOW(), 1, 6 );
1427
1428INSERT INTO `plano_conta` (
1429 `nome`,
1430 `descricao`,
1431 `dt_criacao`,
1432 `ativo`,
1433 `tipo_id`
1434) VALUES
1435( 'Aplicações Financeiras', '', NOW(), 1, 7 ),
1436( 'Consórcios', '', NOW(), 1, 7 );
1437
1438/*!40000 ALTER TABLE `plano_conta` ENABLE KEYS */;
1439UNLOCK TABLES;
1440
1441--
1442-- Table structure for table `simulador`
1443--
1444
1445DROP TABLE IF EXISTS `simulador`;
1446/*!40101 SET @saved_cs_client = @@character_set_client */;
1447/*!40101 SET character_set_client = utf8 */;
1448CREATE TABLE `simulador` (
1449 `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
1450 `user_id` int(11) unsigned NOT NULL,
1451 `plano_receber_id` int(11) unsigned NOT NULL,
1452 `plano_pagar_id` int(11) unsigned NOT NULL,
1453 `nome` varchar(255) DEFAULT '',
1454 `dt_criacao` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
1455 `dt_atualizado` timestamp NULL DEFAULT NULL,
1456 `situacao` tinyint(3) unsigned DEFAULT NULL,
1457 `ativo` tinyint(1) DEFAULT '1',
1458 PRIMARY KEY (`id`),
1459 KEY `fk_simulador_user_id_idx` (`user_id`),
1460 KEY `fk_simulador_plano_receber_id_idx` (`plano_receber_id`),
1461 KEY `fk_simulador_plano_pagar_id_idx` (`plano_pagar_id`),
1462 CONSTRAINT `fk_simulador_plano_pagar_id` FOREIGN KEY (`plano_pagar_id`) REFERENCES `plano_conta` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
1463 CONSTRAINT `fk_simulador_plano_receber_id` FOREIGN KEY (`plano_receber_id`) REFERENCES `plano_conta` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
1464 CONSTRAINT `fk_simulador_user_id` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
1465) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1466/*!40101 SET character_set_client = @saved_cs_client */;
1467
1468--
1469-- Dumping data for table `simulador`
1470--
1471
1472LOCK TABLES `simulador` WRITE;
1473/*!40000 ALTER TABLE `simulador` DISABLE KEYS */;
1474INSERT INTO `simulador` VALUES
1475(1,1,2,1,'Valor Parcela','2016-02-18 23:09:49','2016-02-18 23:09:56',NULL,1),
1476(2,1,2,1,'Quantidade de Parcelas','2016-02-18 23:11:35','2016-02-18 23:11:39',NULL,1),
1477(3,1,2,1,'Valor Financiado','2016-02-18 23:12:34','2016-02-18 23:12:39',NULL,1),
1478(4,1,2,1,'Taxa de Juros','2016-02-18 23:13:19','2016-02-18 23:13:34',NULL,1),
1479(5,1,2,1,'Cheque Próprio','2016-02-18 23:13:19','2016-02-18 23:13:34',NULL,1),
1480(6,1,2,1,'Cheque Terceiro','2016-02-18 23:13:19','2016-02-18 23:13:34',NULL,1);
1481/*!40000 ALTER TABLE `simulador` ENABLE KEYS */;
1482UNLOCK TABLES;
1483
1484--
1485-- Table structure for table `tipo_pessoa`
1486--
1487
1488DROP TABLE IF EXISTS `tipo_pessoa`;
1489/*!40101 SET @saved_cs_client = @@character_set_client */;
1490/*!40101 SET character_set_client = utf8 */;
1491CREATE TABLE `tipo_pessoa` (
1492 `id` int(11) unsigned NOT NULL,
1493 `nome` varchar(255) DEFAULT '',
1494 `abrev` varchar(5) DEFAULT '',
1495 PRIMARY KEY (`id`)
1496) ENGINE=InnoDB DEFAULT CHARSET=utf8 PACK_KEYS=0;
1497/*!40101 SET character_set_client = @saved_cs_client */;
1498
1499--
1500-- Dumping data for table `tipo_pessoa`
1501--
1502
1503LOCK TABLES `tipo_pessoa` WRITE;
1504/*!40000 ALTER TABLE `tipo_pessoa` DISABLE KEYS */;
1505INSERT INTO `tipo_pessoa` VALUES (0,'Pessoa FÃsica','PF'),(1,'Pessoa JurÃdica','PJ');
1506/*!40000 ALTER TABLE `tipo_pessoa` ENABLE KEYS */;
1507UNLOCK TABLES;
1508
1509--
1510-- Table structure for table `users`
1511--
1512
1513DROP TABLE IF EXISTS `users`;
1514/*!40101 SET @saved_cs_client = @@character_set_client */;
1515/*!40101 SET character_set_client = utf8 */;
1516CREATE TABLE `users` (
1517 `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
1518 `name` varchar(255) NOT NULL,
1519 `email` varchar(255) NOT NULL,
1520 `password` varchar(60) NOT NULL,
1521 `remember_token` varchar(100) DEFAULT NULL,
1522 `created_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1523 `updated_at` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
1524 `tipo_id` int(1) DEFAULT '0' COMMENT 'user operador = 0 ou gerente = 1 ou admin = 2\n',
1525 `ativo` int(1) DEFAULT '1' COMMENT 'user está ativo = 1 ou desativado = 0\n',
1526 `reset_token` varchar(100) DEFAULT '',
1527 PRIMARY KEY (`id`),
1528 UNIQUE KEY `users_email_unique` (`email`)
1529) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 PACK_KEYS=0;
1530/*!40101 SET character_set_client = @saved_cs_client */;
1531
1532--
1533-- Dumping data for table `users`
1534--
1535
1536LOCK TABLES `users` WRITE;
1537/*!40000 ALTER TABLE `users` DISABLE KEYS */;
1538INSERT INTO `users` VALUES (1,'Administrador','hpbrasileiro@hotmail.com','$2y$10$ZwUzFsRNDDDh6uu/qD9ZruegyG83CZPHBBD8WoV8aKVgUmrEaOGl.','HGj4pqNHGMJCRkIvFKJJbjKdrZQGxchqGEd8qi8x9z9AbA58NcNEXgF7Myhl','2015-12-24 07:52:00','2016-03-28 10:47:33',1,1,''),(6,'Denis Bernardo','denis@nerdly.com.br','$2y$10$frckHEvRFqZFdT6SmLYTAeENpUQOcYjy4W/lUZAhPCxq85ciCXafm','3OlwMeX3cc3hIyavsNimuVCRJ0a5eWMVMlJQhxZJSpKB18bwCsBOUkSdItmg','2016-02-03 23:26:18','2016-03-28 23:42:40',1,1,''),(9,'Gerente','hpbrasileiro@gmail.com','$2y$10$N9a9tbRTG8Niht1k3CuVjueGOAeHcb4AWyxgxeOJfQf.q6ZP4DAjm','sQ1uBcFzK81jrGcWNsAB6i77F5umWd2OL6mQtETjmrqcOphXUElc1qnzLnBZ','2016-02-25 20:07:24','2016-03-22 23:00:59',1,1,''),(10,'Denis Operador','denis302010@gmail.com','$2y$10$99AYGY1qRZwGXK.KdtwXyOesHqx3HsBnsHRf2tygd6poDTjAnWQ.W','QksNpp3k6udHzKKUWVFJzWC6DSf6jNWR8Kw5WqLTa0EqaRF8Zu3DjTCySWzs','2016-03-22 02:14:19','2016-03-28 10:49:04',0,1,'');
1539/*!40000 ALTER TABLE `users` ENABLE KEYS */;
1540UNLOCK TABLES;
1541/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
1542
1543/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
1544/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
1545/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
1546/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
1547/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
1548/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
1549/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
1550
1551-- Dump completed on 2016-03-31 3:12:05