✏️ 正在编辑: install.sql
路径:
/srv/systems_dir/yuppiecred/data/database/install.sql
提示:
您可以编辑任何文件(包括二进制文件),但请注意不当修改可能导致文件损坏。
CREATE TABLE IF NOT EXISTS `tab_temp` ( `linhas` text COLLATE utf8_unicode_ci ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS `tab_temp2` ( `linhas` text ) ENGINE=MyISAM DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `tb_acessos` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `tipo_acesso` int(2) unsigned NOT NULL, `usuario_id` int(11) NOT NULL, `ip` varchar(16) COLLATE utf8_unicode_ci NOT NULL, `datahora` datetime NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `UNIQUE` (`tipo_acesso`,`usuario_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_arquivos_importados` ( `id` int(11) NOT NULL AUTO_INCREMENT, `arquivo` varchar(255) NOT NULL, `data_importacao` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `arquivo` (`arquivo`), KEY `data_importacao` (`data_importacao`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bancos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) NOT NULL, `dias_refin` int(11) NOT NULL DEFAULT '0', `imposto` decimal(15,2) NOT NULL DEFAULT '0.00', `ativo` tinyint(4) DEFAULT '1', `excluido` tinyint(4) NOT NULL, `codigo` varchar(10) DEFAULT NULL, PRIMARY KEY (`id`), KEY `excluido` (`excluido`,`ativo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bancos_febraban` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `codigo` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `taxa_transf` decimal(15,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `codigo` (`codigo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bonificacao` ( `id` int(11) NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `descricao` varchar(150) COLLATE utf8_unicode_ci NOT NULL, `frequencia` int(2) NOT NULL, `percentual` decimal(15,2) NOT NULL, `data_inicial` date NOT NULL, `data_final` date NOT NULL, `excluido` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `banco_id` (`banco_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bonificacao_convenio` ( `id` int(11) NOT NULL AUTO_INCREMENT, `bonificacao_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `excluido` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bonus` ( `id` int(11) NOT NULL AUTO_INCREMENT, `tabela_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `prazo` int(11) DEFAULT NULL, `bonus` decimal(15,2) DEFAULT NULL, `data_validade` date DEFAULT NULL, `produto` int(11) DEFAULT NULL, `intervalo_parcelas_de` decimal(15,2) DEFAULT NULL, `intervalo_parcelas_a` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `tabela_id` (`tabela_id`,`convenio_id`,`prazo`,`produto`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_bonus_percentual` ( `id` int(11) NOT NULL AUTO_INCREMENT, `bonus_id` int(11) NOT NULL, `percentual` decimal(15,2) NOT NULL, `data_inicial` date DEFAULT NULL, `data_final` date DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `bonus_id` (`bonus_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_atendimentos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) NOT NULL, `cliente_id` int(11) NOT NULL, `data_atendimento` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `usuario` int(11) NOT NULL, `status_atendimento` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `comentario` text COLLATE utf8_unicode_ci NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `ignorar` int(1) NOT NULL DEFAULT '0' COMMENT 'Ignorar como atendido por callcenter na planilha de pagamento', PRIMARY KEY (`id`), KEY `usuario` (`usuario`), KEY `excluido` (`excluido`), KEY `cliente_id` (`cliente_id`), KEY `campanha_id` (`campanha_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_base` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) DEFAULT NULL, `nome` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `matricula` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `cpf` varchar(14) COLLATE utf8_unicode_ci NOT NULL, `data_nascimento` date DEFAULT NULL, `endereco` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `numero` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `complemento` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `bairro` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `cidade` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `uf` char(2) COLLATE utf8_unicode_ci DEFAULT NULL, `obs_endereco` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `cep` varchar(8) COLLATE utf8_unicode_ci DEFAULT NULL, `email` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `telefone1` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `telefone2` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `telefone3` varchar(14) COLLATE utf8_unicode_ci DEFAULT NULL, `status_atendimento` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `data_ultimo_atendimento` datetime DEFAULT NULL, `usuario_ultimo_atendimento` int(11) DEFAULT NULL, `agendado_para` date DEFAULT NULL, `hora_agendada` varchar(5) COLLATE utf8_unicode_ci DEFAULT NULL, `loja_finalizar` int(11) DEFAULT NULL, `ativo` tinyint(4) NOT NULL DEFAULT '0', `margem_livre` decimal(15,2) DEFAULT NULL, `comentario` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `margem_cartao` decimal(15,2) DEFAULT NULL, `valor_saque` decimal(15,2) DEFAULT NULL, `senha_contra_cheque` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `orgao` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `sigla_upg` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL, `secretaria` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `campanha_id` (`campanha_id`), KEY `cpf` (`cpf`), KEY `status_atendimento` (`status_atendimento`), KEY `usuario_ultimo_atendimento` (`usuario_ultimo_atendimento`), KEY `agendado_para` (`agendado_para`), KEY `loja_finalizar` (`loja_finalizar`), KEY `ativo` (`ativo`), KEY `hora_agendado` (`hora_agendada`), KEY `orgao` (`orgao`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_beneficios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cpf_cliente` varchar(14) NOT NULL, `beneficio` varchar(20) NOT NULL, `margem_livre` decimal(15,2) DEFAULT NULL, `data_consulta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `origem` varchar(15) NOT NULL, `competencia` varchar(7) NOT NULL, `especie` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `cpf_cliente` (`cpf_cliente`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_campanhas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `codigo` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `data_inicial` date DEFAULT NULL, `data_final` date DEFAULT NULL, `situacao` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `nome` (`nome`,`situacao`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_campanha_operadores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) NOT NULL, `operador_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `campanha_id` (`campanha_id`), KEY `operador_id` (`operador_id`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_campanha_supervisores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `supervisor_id` int(11) NOT NULL, `campanha_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `supervisor_id` (`supervisor_id`), KEY `campanha_id` (`campanha_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_emprestimos_clientes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cpf_cliente` varchar(14) COLLATE utf8_unicode_ci NOT NULL, `beneficio` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `banco` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `qtd_parcelas` int(11) NOT NULL, `valor_parcela` decimal(15,2) NOT NULL, `quitacao` decimal(15,2) DEFAULT NULL, `mes` varchar(2) COLLATE utf8_unicode_ci DEFAULT NULL, `ano` varchar(4) COLLATE utf8_unicode_ci DEFAULT NULL, `parcelas_pagas` int(11) DEFAULT NULL, `numero_contrato` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `numero_banco` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `tipo_operacao` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `margem_livre` decimal(15,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `cliente_id` (`cpf_cliente`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='armazena os emprestimos dos clientes em outros bancos' AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_enderecos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cpf_cliente` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `logradouro` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `numero` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `complemento` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `bairro` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `cidade` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `uf` char(2) COLLATE utf8_unicode_ci NOT NULL, `obs_endereco` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `cep` varchar(8) COLLATE utf8_unicode_ci NOT NULL, `excluido` tinyint(2) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `cpf_cliente` (`cpf_cliente`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_propostas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cliente_id` int(11) NOT NULL, `campanha_id` int(11) NOT NULL, `corretor_id` int(11) NOT NULL, `tabela_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `banco_id` int(11) NOT NULL, `prazo` int(11) DEFAULT NULL, `data_emissao` date NOT NULL, `produto` int(11) DEFAULT NULL, `numero_beneficio` int(11) DEFAULT NULL, `valor_bruto` decimal(15,2) DEFAULT NULL, `valor_liquido` decimal(15,2) DEFAULT NULL, `valor_parcela` decimal(15,2) DEFAULT NULL, `banco_beneficiado` int(11) DEFAULT NULL, `agencia_beneficiado` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `conta_beneficiado` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `operacao_beneficiado` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `cliente_id` (`cliente_id`), KEY `corretor_id` (`corretor_id`), KEY `tabela_id` (`tabela_id`), KEY `banco_id` (`banco_id`), KEY `campanha_id` (`campanha_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_callcenter_telefones` ( `id` int(11) NOT NULL AUTO_INCREMENT, `cliente_id` int(11) NOT NULL, `fone` varchar(15) COLLATE utf8_unicode_ci NOT NULL, `cpf_cliente` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `origem` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, `nao_perturbe` tinyint(4) NOT NULL DEFAULT '0', `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `cliente_id` (`cliente_id`), KEY `nao_perturbe` (`nao_perturbe`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_campanhas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `descricao` varchar(255) NOT NULL, `data_inicial` date NOT NULL, `data_final` date NOT NULL, `valor_ponto` decimal(15,2) NOT NULL, `prazo_resgate` int(11) DEFAULT '0', `excluido` tinyint(4) NOT NULL DEFAULT '0', `producao_media` decimal(15,2) NOT NULL, `protocolo_fisico` tinyint(4) NOT NULL DEFAULT '0', `frequencia_resgate` int(11) DEFAULT NULL, `acrescimo_ultimo_resgate` int(11) DEFAULT NULL, `periodo_sem_producao` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `data_inicial` (`data_inicial`,`data_final`,`prazo_resgate`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_campanhas_convenios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_campanhas_resgates` ( `id` int(11) NOT NULL AUTO_INCREMENT, `corretor_id` int(11) NOT NULL, `campanha_id` int(11) NOT NULL, `data_resgate` date NOT NULL, `valor_resgate` decimal(15,2) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_campanhas_status` ( `id` int(11) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) NOT NULL, `status_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_campanhas_tabelas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `campanha_id` int(11) NOT NULL, `tabela_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_categorias` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) NOT NULL, `categoria_pai` int(11) NOT NULL DEFAULT '0', `excluido` tinyint(4) NOT NULL, `extra_id` int(11) DEFAULT NULL, PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `categoria_pai` (`categoria_pai`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_clientes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `empresa_id` int(11) NOT NULL, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `nome` varchar(100) NOT NULL, `cpf` varchar(14) NOT NULL, `rg` varchar(20) DEFAULT NULL, `orgao_expedidor` varchar(20) DEFAULT NULL, `uf_expedidor` char(2) DEFAULT NULL, `data_expedicao` date DEFAULT NULL, `data_nascimento` date DEFAULT NULL, `nome_pai` varchar(100) DEFAULT NULL, `nome_mae` varchar(100) DEFAULT NULL, `estado_civil` varchar(20) DEFAULT NULL, `sexo` char(1) DEFAULT NULL, `conjuge` varchar(100) DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `fone` varchar(14) DEFAULT NULL, `telefone_comercial` varchar(14) DEFAULT NULL, `obs` text, `naturalidade` varchar(20) DEFAULT NULL, `tipo_registro` tinyint(4) NOT NULL DEFAULT '1', `senha_contracheque` varchar(20) DEFAULT NULL, `renda` decimal(15,2) DEFAULT NULL, `anexo_cpf` varchar(255) NOT NULL, `anexo_rg` varchar(255) NOT NULL, `anexo_contra_cheque` varchar(255) NOT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `empresa_id` (`empresa_id`), KEY `cpf` (`cpf`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento` ( `id` int(11) NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `empresa_id` int(11) NOT NULL, `tabela_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `produto` varchar(10) COLLATE utf8_unicode_ci NOT NULL, `prazo` int(11) NOT NULL, `valor_de` decimal(15,2) DEFAULT NULL, `valor_a` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `empresa_id` (`empresa_id`,`prazo`), KEY `produto` (`produto`), KEY `excluido` (`excluido`), KEY `banco_id` (`banco_id`), KEY `convenio_id` (`convenio_id`), KEY `tabela_id` (`tabela_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento_corretor` ( `id` int(11) NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `corretor_id` int(11) NOT NULL, `tabela_id` int(11) DEFAULT NULL, `convenio_id` int(11) NOT NULL, `produto` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `prazo` int(11) NOT NULL, `bonus` decimal(15,2) DEFAULT NULL, `valor_de` decimal(15,2) DEFAULT NULL, `valor_a` decimal(15,2) DEFAULT NULL, `excluido` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `corretor_id` (`corretor_id`,`prazo`), KEY `produto` (`produto`), KEY `excluido` (`excluido`), KEY `banco_id` (`banco_id`), KEY `convenio_id` (`convenio_id`), KEY `tabela_id` (`tabela_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento_corretor_percentual` ( `id` int(11) NOT NULL AUTO_INCREMENT, `comissionamento_id` int(11) NOT NULL, `data_inicial` date NOT NULL, `data_final` date DEFAULT NULL, `comissao` decimal(15,2) NOT NULL, `bonus` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL, `diferimento` decimal(15,2) NOT NULL, PRIMARY KEY (`id`), KEY `comissionamento_id` (`comissionamento_id`), KEY `index1` (`data_inicial`,`data_final`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento_grupo` ( `id` int(11) NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `grupo_id` int(11) NOT NULL, `tabela_id` int(11) DEFAULT NULL, `convenio_id` int(11) NOT NULL, `produto` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL, `prazo` int(11) NOT NULL, `valor_de` decimal(15,2) DEFAULT NULL, `valor_a` decimal(15,2) DEFAULT NULL, `excluido` tinyint(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `grupo_id` (`grupo_id`,`prazo`), KEY `produto` (`produto`), KEY `excluido` (`excluido`), KEY `banco_id` (`banco_id`), KEY `convenio_id` (`convenio_id`), KEY `tabela_id` (`tabela_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento_grupo_percentual` ( `id` int(11) NOT NULL AUTO_INCREMENT, `comissionamento_id` int(11) NOT NULL, `data_inicial` date NOT NULL, `data_final` date DEFAULT NULL, `comissao` decimal(15,2) NOT NULL, `bonus` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL, `diferimento` decimal(15,2) NOT NULL, PRIMARY KEY (`id`), KEY `comissionamento_id` (`comissionamento_id`), KEY `index1` (`data_inicial`,`data_final`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissionamento_percentual` ( `id` int(11) NOT NULL AUTO_INCREMENT, `comissionamento_id` int(11) NOT NULL, `data_inicial` date NOT NULL, `data_final` date DEFAULT NULL, `comissao` decimal(15,2) NOT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `index1` (`data_inicial`,`data_final`,`excluido`), KEY `comissionamento_id` (`comissionamento_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_comissoes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `empresa_id` int(11) NOT NULL, `corretor_id` int(11) NOT NULL, `contrato_id` int(11) NOT NULL, `data_pagamento` date NOT NULL, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `obs` text, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `empresa_id` (`empresa_id`,`corretor_id`,`excluido`,`data_pagamento`), KEY `contrato_id` (`contrato_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_consultas_multibr` ( `id` int(11) NOT NULL AUTO_INCREMENT, `beneficio` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `corretor_id` int(11) NOT NULL, `data_hora_consulta` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `tipo` char(1) COLLATE utf8_unicode_ci DEFAULT NULL, `empresa_id` int(11) DEFAULT NULL, `origem` varchar(15) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`), KEY `corretor_id` (`corretor_id`,`data_hora_consulta`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_contratos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `empresa_id` int(11) NOT NULL, `cliente_id` int(11) NOT NULL, `banco_id` int(11) NOT NULL, `tabela_id` int(11) DEFAULT NULL, `convenio_id` int(11) DEFAULT NULL, `corretor_id` int(11) DEFAULT NULL, `subestabelecido_id` int(11) DEFAULT NULL, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `numero_contrato` varchar(20) DEFAULT NULL, `tipo` varchar(20) DEFAULT 'NOVO', `data_emissao` date DEFAULT NULL, `prazo` int(11) DEFAULT NULL, `forma_liberacao` varchar(20) DEFAULT NULL, `produto` varchar(20) DEFAULT NULL, `status_proposta` varchar(100) DEFAULT NULL, `digitador` varchar(100) DEFAULT NULL, `data_recebimento_comissao` date DEFAULT NULL, `numero_beneficio` varchar(20) DEFAULT NULL, `data_liberacao` date DEFAULT NULL, `data_quitacao` date DEFAULT NULL, `valor_tac` decimal(15,2) DEFAULT NULL, `valor_liberado` decimal(15,2) DEFAULT NULL, `valor_beneficio` decimal(15,2) DEFAULT NULL, `valor_seguro` decimal(15,2) DEFAULT NULL, `valor_financiado` decimal(15,2) DEFAULT NULL, `valor_iof` decimal(15,2) DEFAULT NULL, `valor_prestacao` decimal(15,2) DEFAULT NULL, `data_primeiro_vencimento` date DEFAULT NULL, `valor_liquido` decimal(15,2) DEFAULT NULL, `valor_bruto` decimal(15,2) DEFAULT NULL, `comissao_empresa` decimal(15,2) DEFAULT '0.00', `comissao_corretor` decimal(15,2) DEFAULT NULL, `comissao_gerente` decimal(15,2) DEFAULT NULL, `bonus_corretor` decimal(15,2) DEFAULT NULL, `bonus_empresa` decimal(15,2) DEFAULT '0.00', `banco_beneficiado` varchar(10) DEFAULT NULL, `agencia_beneficiado` varchar(20) DEFAULT NULL, `conta_beneficiado` varchar(20) DEFAULT NULL, `obs` varchar(255) DEFAULT NULL, `descricao_pendencia` varchar(255) DEFAULT NULL, `data_recebimento_fisico` date DEFAULT NULL, `obs_recebimento_fisico` text, `data_envio_fisico` date DEFAULT NULL, `obs_envio_fisico` text, `numero_proposta` varchar(20) DEFAULT NULL, `matricula` varchar(20) DEFAULT NULL, `data_recebimento_bonus` date DEFAULT NULL, `bonus_recebido` decimal(15,2) DEFAULT NULL, `protocolo_pagamento_id` int(11) DEFAULT NULL, `tipo_registro` tinyint(4) NOT NULL DEFAULT '1', `cod_loja` varchar(20) DEFAULT NULL, `cep` char(8) DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `usuario_efetivacao` varchar(50) DEFAULT NULL, `data_efetivacao` date DEFAULT NULL, `anexo_cpf` varchar(255) DEFAULT NULL, `anexo_rg` varchar(255) DEFAULT NULL, `anexo_contra_cheque` varchar(255) DEFAULT NULL, `anexo_ficha_cadastral` varchar(255) DEFAULT NULL, `anexo_beneficio` varchar(255) DEFAULT NULL, `bordero_newspace` varchar(20) DEFAULT NULL, `numero_envelope` varchar(20) DEFAULT NULL, `operacao_beneficiado` varchar(10) DEFAULT NULL, `protocolo_recebimento_fisico` varchar(50) DEFAULT NULL, `cobranca_banco` tinyint(4) NOT NULL DEFAULT '0', `anterior_numero` varchar(20) DEFAULT NULL, `anterior_prazo` int(11) DEFAULT NULL, `anterior_parcelas_pagas` int(11) DEFAULT NULL, `anterior_sequencial_compra` varchar(20) DEFAULT NULL, `anterior_tipo_quitacao` varchar(50) DEFAULT NULL, `protocolo_envio_fisico` varchar(50) DEFAULT NULL, `numero_ade` varchar(20) DEFAULT NULL, `usuario_formalizacao` int(11) DEFAULT NULL, `previa_recebimento` tinyint(4) DEFAULT '0', `excluido` tinyint(4) NOT NULL DEFAULT '0', `seguranca` varchar(32) DEFAULT NULL, `especie` int(10) unsigned DEFAULT NULL, `digitado_banco` tinyint(1) DEFAULT '0', `estornado` tinyint(1) DEFAULT '0', `data_ted_devolvida` date DEFAULT NULL, `data_op_sacada` date DEFAULT NULL, `data_impressao` datetime DEFAULT NULL, `usuario_impressao` varchar(50) DEFAULT NULL, `diferimento_corretor` decimal(15,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `cliente_id` (`cliente_id`), KEY `banco_id` (`banco_id`), KEY `tabela_id` (`tabela_id`), KEY `convenio_id` (`convenio_id`), KEY `corretor_id` (`corretor_id`), KEY `protocolo_pagamento_id` (`protocolo_pagamento_id`), KEY `tipo_registro` (`tipo_registro`), KEY `numero_contrato` (`numero_contrato`), KEY `excluido` (`excluido`), KEY `subestabelecido_id` (`subestabelecido_id`), KEY `bordero_newspace` (`bordero_newspace`,`numero_envelope`), KEY `protocolo_recebimento_fisico` (`protocolo_recebimento_fisico`), KEY `status_proposta` (`status_proposta`), KEY `empresa_id` (`empresa_id`), KEY `protocolo_envio_fisico` (`protocolo_envio_fisico`), KEY `usuario_formalizacao` (`usuario_formalizacao`), KEY `forma_liberacao` (`forma_liberacao`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_convenios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) NOT NULL, `parent_id` int(11) DEFAULT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `nome` (`nome`), KEY `parent_id` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_corretores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `empresa_id` int(11) NOT NULL, `tipo` int(11) NOT NULL, `rota_id` int(11) NOT NULL, `nome` varchar(100) NOT NULL, `cpf` varchar(14) DEFAULT NULL, `rg` varchar(20) DEFAULT NULL, `orgao_expedidor` varchar(20) DEFAULT NULL, `data_nascimento` date DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `banco` varchar(20) DEFAULT NULL, `agencia` varchar(20) DEFAULT NULL, `conta` varchar(20) DEFAULT NULL, `titular` varchar(100) DEFAULT NULL, `cpf_titular` varchar(14) DEFAULT NULL, `tipo_conta` char(2) DEFAULT NULL, `obs` text NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `apelido` varchar(100) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `site` varchar(255) DEFAULT NULL, `telefone_residencial` varchar(14) DEFAULT NULL, `telefone_comercial` varchar(14) DEFAULT NULL, `twitter` varchar(100) DEFAULT NULL, `grupo_comissao` int(11) DEFAULT NULL, `login` varchar(100) DEFAULT NULL, `senha` varchar(100) DEFAULT NULL, `prazo_fisico` int(11) DEFAULT '15', `bloquear_pagamento` tinyint(1) NOT NULL DEFAULT '0', `motivo` varchar(255) DEFAULT NULL, `corretor_desativado` int(1) DEFAULT NULL, PRIMARY KEY (`id`), KEY `grupo_comissao` (`grupo_comissao`), KEY `rota_id` (`rota_id`), KEY `excluido` (`excluido`), KEY `empresa_id` (`empresa_id`), KEY `nome` (`nome`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_corretores_creditos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `corretor_id` int(11) NOT NULL, `data_credito` date NOT NULL, `pacote_id` int(10) unsigned NOT NULL, `credito` decimal(15,2) NOT NULL, `usuario` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `corretor_id` (`corretor_id`,`excluido`), KEY `pacote_id` (`pacote_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_corretores_documentos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `corretor_id` int(11) NOT NULL, `descricao` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `anexo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `corretor_id` (`corretor_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_corretores_senhas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `corretor_id` int(11) NOT NULL, `senha` varchar(20) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `corretor_id` (`corretor_id`,`senha`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_empresas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(255) NOT NULL, `razao_social` varchar(255) DEFAULT NULL, `cnpj` varchar(19) DEFAULT NULL, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `responsavel` varchar(100) DEFAULT NULL, `cpf_responsavel` varchar(14) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `fone` varchar(14) DEFAULT NULL, `obs` text, `tipo` varchar(50) NOT NULL DEFAULT 'EMPRESA', `performance` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_empresas_ftps` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `codigo_promotora` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `host` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `login` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL, `senha` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `empresa_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `empresa_id` (`empresa_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_extratos` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `conta_id` int(11) NOT NULL, `data_importacao` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `trn_type` varchar(50) COLLATE utf8_unicode_ci NOT NULL, `dt_posted` date NOT NULL, `trn_amt` decimal(15,2) NOT NULL, `fit_id` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `check_num` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `payeeid` int(11) NOT NULL DEFAULT '0', `memo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `importado` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_fornecedores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(255) NOT NULL, `razao_social` varchar(255) DEFAULT NULL, `cnpj` varchar(19) DEFAULT NULL, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `responsavel` varchar(100) DEFAULT NULL, `cpf_responsavel` varchar(14) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `email` varchar(255) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `fone` varchar(14) DEFAULT NULL, `obs` text, `banco` varchar(10) DEFAULT NULL, `agencia` varchar(20) DEFAULT NULL, `conta` varchar(20) DEFAULT NULL, `titular` varchar(255) DEFAULT NULL, `cpf_titular` varchar(14) DEFAULT NULL, `tipo_conta` char(2) DEFAULT NULL, `tipo` varchar(30) NOT NULL, `data_nascimento` date DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_gerentes` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `empresa_id` int(11) DEFAULT NULL, `tipo` varchar(50) NOT NULL DEFAULT 'EMPRESA', `nome` varchar(100) NOT NULL, `cpf` varchar(14) DEFAULT NULL, `rg` varchar(10) DEFAULT NULL, `orgao_expedidor` varchar(20) DEFAULT NULL, `data_nascimento` date DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `banco` varchar(100) DEFAULT NULL, `agencia` varchar(10) DEFAULT NULL, `conta` varchar(10) DEFAULT NULL, `titular` varchar(100) DEFAULT NULL, `cpf_titular` varchar(14) DEFAULT NULL, `tipo_conta` char(2) DEFAULT NULL, `obs` text NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `apelido` varchar(100) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `site` varchar(255) DEFAULT NULL, `fone` varchar(14) DEFAULT NULL, `telefone_comercial` varchar(14) DEFAULT NULL, `twitter` varchar(100) DEFAULT NULL, `login` varchar(100) DEFAULT NULL, `senha` varchar(100) DEFAULT NULL, `valor_comissao` decimal(15,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `tipo` (`tipo`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_gerentes_convenios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `gerente_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `codigo` varchar(20) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `gerente_id` (`gerente_id`,`convenio_id`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_gerentes_metas` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `gerente_id` int(11) DEFAULT NULL, `gerente_rota_id` int(11) DEFAULT NULL, `data_inicial` date NOT NULL, `data_final` date NOT NULL, `meta` decimal(15,2) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `gerente_id` (`gerente_id`), KEY `gerente_rota_id` (`gerente_rota_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_gerente_rota` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data_cadastro` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `gerente_id` int(11) NOT NULL, `empresa_id` int(11) NOT NULL, `nome` varchar(100) NOT NULL, `cpf` varchar(14) DEFAULT NULL, `rg` varchar(10) DEFAULT NULL, `orgao_expedidor` varchar(20) DEFAULT NULL, `data_nascimento` date DEFAULT NULL, `endereco` varchar(255) DEFAULT NULL, `complemento` varchar(255) DEFAULT NULL, `bairro` varchar(100) DEFAULT NULL, `cidade` varchar(100) DEFAULT NULL, `uf` char(2) DEFAULT NULL, `cep` varchar(8) DEFAULT NULL, `banco` varchar(100) DEFAULT NULL, `agencia` varchar(10) DEFAULT NULL, `conta` varchar(10) DEFAULT NULL, `titular` varchar(100) DEFAULT NULL, `cpf_titular` varchar(14) DEFAULT NULL, `tipo_conta` char(2) DEFAULT NULL, `obs` text NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `apelido` varchar(100) DEFAULT NULL, `celular` varchar(14) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `fax` varchar(14) DEFAULT NULL, `site` varchar(255) DEFAULT NULL, `fone` varchar(14) DEFAULT NULL, `telefone_comercial` varchar(14) DEFAULT NULL, `login` varchar(100) DEFAULT NULL, `senha` varchar(100) DEFAULT NULL, `valor_comissao` decimal(15,2) DEFAULT NULL, PRIMARY KEY (`id`), KEY `gerente_id` (`gerente_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_grupos_usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `nome` (`nome`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_lancamentos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `empresa_id` int(11) NOT NULL, `categoria_id` int(11) NOT NULL, `conta_id` int(11) NOT NULL, `forma_pagamento_id` int(11) DEFAULT NULL, `fornecedor_id` int(11) DEFAULT NULL, `corretor_id` int(11) DEFAULT NULL, `funcionario_id` int(11) DEFAULT NULL, `rota_id` int(11) DEFAULT NULL, `data_lancamento` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `descricao` varchar(100) NOT NULL, `valor` decimal(15,2) DEFAULT NULL, `data_vencimento` date DEFAULT NULL, `valor_pago` decimal(15,2) DEFAULT NULL, `data_pagamento` date DEFAULT NULL, `obs` text, `usuario_baixa` varchar(100) DEFAULT NULL, `data_baixa` datetime DEFAULT NULL, `tipo` varchar(20) NOT NULL, `compor_saldo` tinyint(4) DEFAULT '1', `numero_documento` varchar(50) DEFAULT NULL, `id_pai` int(11) DEFAULT NULL, `setor` varchar(100) DEFAULT NULL, `subsetor` varchar(100) DEFAULT NULL, `transferencia` tinyint(2) DEFAULT '0', `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `empresa_id` (`empresa_id`), KEY `categoria_id` (`categoria_id`), KEY `conta_id` (`conta_id`), KEY `forma_pagamento_id` (`forma_pagamento_id`), KEY `fornecedor_id` (`fornecedor_id`), KEY `corretor_id` (`corretor_id`), KEY `data_vencimento` (`data_vencimento`), KEY `data_pagamento` (`data_pagamento`), KEY `compor_saldo` (`compor_saldo`), KEY `tipo` (`tipo`), KEY `excluido` (`excluido`), KEY `setor` (`setor`), KEY `subsetor` (`subsetor`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_log` ( `id` int(11) NOT NULL AUTO_INCREMENT, `data_mudanca` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `nome_usuario` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `campo` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `tabela` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `chave` int(11) DEFAULT NULL, `alteracao` text COLLATE utf8_unicode_ci NOT NULL, `clausula_where` varchar(100) COLLATE utf8_unicode_ci NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_mensagens` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `remetente_id` int(11) NOT NULL, `destinatario_id` int(11) DEFAULT NULL, `mensagem` text COLLATE utf8_unicode_ci NOT NULL, `data_envio` datetime NOT NULL, `data_final` date NOT NULL, `excluido` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `remetente_id` (`remetente_id`,`destinatario_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_pacotes_multibr` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `nome` varchar(30) COLLATE utf8_unicode_ci NOT NULL, `valor` decimal(15,2) NOT NULL, `creditos` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `creditos` (`creditos`), UNIQUE KEY `nome` (`nome`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_performance` ( `id` int(11) NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `percentual` decimal(15,0) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `banco` (`banco_id`,`convenio_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_permissoes` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `resource_id` int(11) NOT NULL, `grupo_id` int(11) NOT NULL, `allow` tinyint(1) NOT NULL DEFAULT '0', `excluido` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `resource_id` (`resource_id`,`grupo_id`), KEY `grupo_id` (`grupo_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_produtos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `codigo` varchar(20) COLLATE utf8_unicode_ci NOT NULL, `descricao` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `tipo` varchar(20) COLLATE utf8_unicode_ci DEFAULT 'NOVO', `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `codigo` (`codigo`,`descricao`,`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_prospectos_contatos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `prospecto_id` int(11) NOT NULL, `usuario_id` int(11) NOT NULL, `data_ocorrencia` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `classificacao` int(11) NOT NULL, `data_retorno` date DEFAULT NULL, `motivo` varchar(255) COLLATE utf8_unicode_ci NOT NULL, `comentario` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `cliente_id` (`prospecto_id`,`data_ocorrencia`,`classificacao`,`data_retorno`,`excluido`,`usuario_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_contrato` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `protocolo_id` int(11) NOT NULL, `contrato_id` int(11) NOT NULL, `valor` decimal(15,2) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `percentual` decimal(15,2) NOT NULL, PRIMARY KEY (`id`), KEY `protocolo_id` (`protocolo_id`,`contrato_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_pagamento` ( `id` int(11) NOT NULL AUTO_INCREMENT, `corretor_id` int(11) NOT NULL, `data_baixa` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `data_pagamento` date NOT NULL, `comentario` text, `desconto` decimal(15,2) DEFAULT NULL, `acrescimo` decimal(15,2) DEFAULT NULL, `forma_pagamento_id` int(11) DEFAULT NULL, `data_quitacao` date DEFAULT NULL, `comprovante_pagamento` varchar(255) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `corretor_id` (`corretor_id`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_pagamento_gerente` ( `id` int(11) NOT NULL AUTO_INCREMENT, `gerente_id` int(11) NOT NULL, `data_baixa` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `data_pagamento` date NOT NULL, `comentario` text, `desconto` decimal(15,2) DEFAULT NULL, `acrescimo` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `gerente_id` (`gerente_id`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_pagamento_gerente_itens` ( `id` int(11) NOT NULL AUTO_INCREMENT, `protocolo_id` int(11) NOT NULL, `contrato_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `protocolo_id` (`protocolo_id`), KEY `contrato_id` (`contrato_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_pagamento_supervisor` ( `id` int(11) NOT NULL AUTO_INCREMENT, `supervisor_id` int(11) NOT NULL, `data_baixa` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, `data_pagamento` date NOT NULL, `comentario` text, `desconto` decimal(15,2) DEFAULT NULL, `acrescimo` decimal(15,2) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `supervisor_id` (`supervisor_id`), KEY `excluido` (`excluido`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_protocolo_pagamento_supervisor_itens` ( `id` int(11) NOT NULL AUTO_INCREMENT, `protocolo_id` int(11) NOT NULL, `contrato_id` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `protocolo_id` (`protocolo_id`), KEY `contrato_id` (`contrato_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_resources` ( `id` int(11) NOT NULL AUTO_INCREMENT, `descricao` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `resource` varchar(45) COLLATE utf8_unicode_ci NOT NULL, `privilege` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', `extra` tinyint(1) NOT NULL DEFAULT '0' COMMENT 'Não corresponde a um controller/action', PRIMARY KEY (`id`), UNIQUE KEY `UNIQUE` (`resource`,`privilege`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_rotas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) NOT NULL, `gerente_id` int(11) NOT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `gerente_id` (`gerente_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_setores` ( `id` int(11) NOT NULL AUTO_INCREMENT, `nome` varchar(100) COLLATE utf8_unicode_ci NOT NULL, `setor_pai` int(11) NOT NULL DEFAULT '0', `excluido` tinyint(4) NOT NULL, PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `setor_pai` (`setor_pai`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_tabelas` ( `id` int(11) NOT NULL AUTO_INCREMENT, `parent_id` int(11) DEFAULT NULL, `convenio_id` int(11) DEFAULT NULL, `codigo` varchar(20) DEFAULT NULL, `nome` varchar(100) NOT NULL, `campanha` tinyint(4) DEFAULT '0', `produto` varchar(20) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `nome` (`nome`,`excluido`), KEY `convenio_id` (`convenio_id`), KEY `produto` (`produto`), KEY `parent_id` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_tabelas_fatores` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `banco_id` int(11) NOT NULL, `tabela_id` int(11) NOT NULL, `convenio_id` int(11) NOT NULL, `prazo` int(10) unsigned NOT NULL, `fator` double NOT NULL, `dia` int(10) unsigned DEFAULT NULL, `excluido` int(1) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_tipos` ( `id` int(11) NOT NULL AUTO_INCREMENT, `descricao` varchar(100) NOT NULL, `tipo` varchar(50) NOT NULL, `codigo` int(11) DEFAULT NULL, `parent_id` int(11) DEFAULT NULL, `excluido` tinyint(4) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `excluido` (`excluido`), KEY `codigo` (`codigo`), KEY `descricao` (`descricao`,`tipo`), KEY `parent_id` (`parent_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; CREATE TABLE IF NOT EXISTS `tb_usuarios` ( `id` int(11) NOT NULL AUTO_INCREMENT, `grupo_id` int(11) NOT NULL, `empresa_id` int(11) NOT NULL, `corretor_id` int(11) DEFAULT NULL, `nome` varchar(100) DEFAULT NULL, `email` varchar(100) DEFAULT NULL, `login` varchar(50) NOT NULL, `senha` varchar(100) NOT NULL, `ramal_login` varchar(20) DEFAULT NULL, `ramal_senha` varchar(20) DEFAULT NULL, `excluido` int(11) NOT NULL, `hora_inicio` varchar(5) NOT NULL DEFAULT '08:00', `hora_fim` varchar(5) NOT NULL DEFAULT '18:00', `dias` varchar(13) NOT NULL, PRIMARY KEY (`id`), KEY `login` (`login`,`senha`,`excluido`,`grupo_id`,`empresa_id`,`corretor_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; DROP VIEW IF EXISTS `vw_clientes`; CREATE VIEW `vw_clientes` AS select `tb_clientes`.`id` AS `id`,`tb_clientes`.`empresa_id` AS `empresa_id`,`tb_clientes`.`nome` AS `nome`,`tb_clientes`.`cpf` AS `cpf`,`tb_clientes`.`rg` AS `rg`,`tb_clientes`.`orgao_expedidor` AS `orgao_expedidor`,`tb_clientes`.`data_nascimento` AS `data_nascimento`,`tb_clientes`.`nome_pai` AS `nome_pai`,`tb_clientes`.`nome_mae` AS `nome_mae`,`tb_clientes`.`conjuge` AS `conjuge`,`tb_clientes`.`endereco` AS `endereco`,`tb_clientes`.`complemento` AS `complemento`,`tb_clientes`.`bairro` AS `bairro`,`tb_clientes`.`cidade` AS `cidade`,`tb_clientes`.`uf` AS `uf`,`tb_clientes`.`cep` AS `cep`,`tb_clientes`.`email` AS `email`,`tb_clientes`.`celular` AS `celular`,`tb_clientes`.`fax` AS `fax`,`tb_clientes`.`fone` AS `fone`,`tb_clientes`.`telefone_comercial` AS `telefone_comercial`,`tb_clientes`.`obs` AS `obs`,`tb_clientes`.`excluido` AS `excluido` from `tb_clientes` where (`tb_clientes`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_comissoes`; CREATE VIEW `vw_comissoes` AS select `tb_comissoes`.`id` AS `id`,`tb_comissoes`.`empresa_id` AS `empresa_id`,`tb_comissoes`.`corretor_id` AS `corretor_id`,`tb_comissoes`.`contrato_id` AS `contrato_id`,`tb_comissoes`.`data_pagamento` AS `data_pagamento`,`tb_comissoes`.`data_cadastro` AS `data_cadastro`,`tb_comissoes`.`obs` AS `obs`,`tb_comissoes`.`excluido` AS `excluido` from `tb_comissoes` where (`tb_comissoes`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_contratos`; CREATE VIEW `vw_contratos` AS select `tb_contratos`.`id` AS `id`,`tb_contratos`.`cliente_id` AS `cliente_id`,`tb_contratos`.`banco_id` AS `banco_id`,`tb_contratos`.`tabela_id` AS `tabela_id`,`tb_contratos`.`convenio_id` AS `convenio_id`,`tb_contratos`.`corretor_id` AS `corretor_id`,`tb_contratos`.`subestabelecido_id` AS `subestabelecido_id`,`tb_contratos`.`data_cadastro` AS `data_cadastro`,`tb_contratos`.`numero_contrato` AS `numero_contrato`,`tb_contratos`.`tipo` AS `tipo`,`tb_contratos`.`data_emissao` AS `data_emissao`,`tb_contratos`.`prazo` AS `prazo`,`tb_contratos`.`forma_liberacao` AS `forma_liberacao`,`tb_contratos`.`produto` AS `produto`,`tb_contratos`.`status_proposta` AS `status_proposta`,`tb_contratos`.`digitador` AS `digitador`,`tb_contratos`.`data_recebimento_comissao` AS `data_recebimento_comissao`,`tb_contratos`.`numero_beneficio` AS `numero_beneficio`,`tb_contratos`.`data_liberacao` AS `data_liberacao`,`tb_contratos`.`data_quitacao` AS `data_quitacao`,`tb_contratos`.`valor_tac` AS `valor_tac`,`tb_contratos`.`valor_liberado` AS `valor_liberado`,`tb_contratos`.`valor_beneficio` AS `valor_beneficio`,`tb_contratos`.`valor_seguro` AS `valor_seguro`,`tb_contratos`.`valor_financiado` AS `valor_financiado`,`tb_contratos`.`valor_iof` AS `valor_iof`,`tb_contratos`.`valor_prestacao` AS `valor_prestacao`,`tb_contratos`.`data_primeiro_vencimento` AS `data_primeiro_vencimento`,`tb_contratos`.`valor_liquido` AS `valor_liquido`,`tb_contratos`.`valor_bruto` AS `valor_bruto`,`tb_contratos`.`comissao_empresa` AS `comissao_empresa`,`tb_contratos`.`comissao_corretor` AS `comissao_corretor`,`tb_contratos`.`comissao_gerente` AS `comissao_gerente`,`tb_contratos`.`bonus_corretor` AS `bonus_corretor`,`tb_contratos`.`bonus_empresa` AS `bonus_empresa`,`tb_contratos`.`banco_beneficiado` AS `banco_beneficiado`,`tb_contratos`.`agencia_beneficiado` AS `agencia_beneficiado`,`tb_contratos`.`conta_beneficiado` AS `conta_beneficiado`,`tb_contratos`.`obs` AS `obs`,`tb_contratos`.`descricao_pendencia` AS `descricao_pendencia`,`tb_contratos`.`data_recebimento_fisico` AS `data_recebimento_fisico`,`tb_contratos`.`obs_recebimento_fisico` AS `obs_recebimento_fisico`,`tb_contratos`.`data_envio_fisico` AS `data_envio_fisico`,`tb_contratos`.`obs_envio_fisico` AS `obs_envio_fisico`,`tb_contratos`.`numero_proposta` AS `numero_proposta`,`tb_contratos`.`matricula` AS `matricula`,`tb_contratos`.`data_recebimento_bonus` AS `data_recebimento_bonus`,`tb_contratos`.`bonus_recebido` AS `bonus_recebido`,`tb_contratos`.`protocolo_pagamento_id` AS `protocolo_pagamento_id`,`tb_contratos`.`tipo_registro` AS `tipo_registro`,`tb_contratos`.`cod_loja` AS `cod_loja`,`tb_contratos`.`cep` AS `cep`,`tb_contratos`.`endereco` AS `endereco`,`tb_contratos`.`complemento` AS `complemento`,`tb_contratos`.`bairro` AS `bairro`,`tb_contratos`.`cidade` AS `cidade`,`tb_contratos`.`uf` AS `uf`,`tb_contratos`.`usuario_efetivacao` AS `usuario_efetivacao`,`tb_contratos`.`data_efetivacao` AS `data_efetivacao`,`tb_contratos`.`anexo_cpf` AS `anexo_cpf`,`tb_contratos`.`anexo_rg` AS `anexo_RG`,`tb_contratos`.`anexo_contra_cheque` AS `anexo_contra_cheque`,`tb_contratos`.`anexo_ficha_cadastral` AS `anexo_ficha_cadastral`,`tb_contratos`.`anexo_beneficio` AS `anexo_beneficio`,`tb_contratos`.`bordero_newspace` AS `bordero_newspace`,`tb_contratos`.`numero_envelope` AS `numero_envelope`,`tb_contratos`.`excluido` AS `excluido` from `tb_contratos` where (`tb_contratos`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_convenios`; CREATE VIEW `vw_convenios` AS select `tb_convenios`.`id` AS `id`,`tb_convenios`.`nome` AS `nome`,`tb_convenios`.`excluido` AS `excluido` from `tb_convenios` where (`tb_convenios`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_corretores`; CREATE VIEW `vw_corretores` AS select `tb_corretores`.`id` AS `id`,`tb_corretores`.`data_cadastro` AS `data_cadastro`,`tb_corretores`.`empresa_id` AS `empresa_id`,`tb_corretores`.`tipo` AS `tipo`,`tb_corretores`.`rota_id` AS `rota_id`,`tb_corretores`.`nome` AS `nome`,`tb_corretores`.`cpf` AS `cpf`,`tb_corretores`.`rg` AS `rg`,`tb_corretores`.`orgao_expedidor` AS `orgao_expedidor`,`tb_corretores`.`data_nascimento` AS `data_nascimento`,`tb_corretores`.`endereco` AS `endereco`,`tb_corretores`.`complemento` AS `complemento`,`tb_corretores`.`bairro` AS `bairro`,`tb_corretores`.`cidade` AS `cidade`,`tb_corretores`.`uf` AS `uf`,`tb_corretores`.`cep` AS `cep`,`tb_corretores`.`banco` AS `banco`,`tb_corretores`.`agencia` AS `agencia`,`tb_corretores`.`conta` AS `conta`,`tb_corretores`.`titular` AS `titular`,`tb_corretores`.`cpf_titular` AS `cpf_titular`,`tb_corretores`.`tipo_conta` AS `tipo_conta`,`tb_corretores`.`obs` AS `obs`,`tb_corretores`.`excluido` AS `excluido`,`tb_corretores`.`apelido` AS `apelido`,`tb_corretores`.`celular` AS `celular`,`tb_corretores`.`email` AS `email`,`tb_corretores`.`fax` AS `fax`,`tb_corretores`.`site` AS `site`,`tb_corretores`.`telefone_residencial` AS `telefone_residencial`,`tb_corretores`.`telefone_comercial` AS `telefone_comercial`,`tb_corretores`.`twitter` AS `twitter`,`tb_corretores`.`login` AS `login` from `tb_corretores` where (`tb_corretores`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_empresas`; CREATE VIEW `vw_empresas` AS select `tb_empresas`.`id` AS `id`,`tb_empresas`.`nome` AS `nome`,`tb_empresas`.`razao_social` AS `razao_social`,`tb_empresas`.`cnpj` AS `cnpj`,`tb_empresas`.`data_cadastro` AS `data_cadastro`,`tb_empresas`.`responsavel` AS `responsavel`,`tb_empresas`.`cpf_responsavel` AS `cpf_responsavel`,`tb_empresas`.`cep` AS `cep`,`tb_empresas`.`endereco` AS `endereco`,`tb_empresas`.`bairro` AS `bairro`,`tb_empresas`.`cidade` AS `cidade`,`tb_empresas`.`uf` AS `uf`,`tb_empresas`.`complemento` AS `complemento`,`tb_empresas`.`email` AS `email`,`tb_empresas`.`celular` AS `celular`,`tb_empresas`.`fax` AS `fax`,`tb_empresas`.`fone` AS `fone`,`tb_empresas`.`obs` AS `obs`,`tb_empresas`.`excluido` AS `excluido` from `tb_empresas` where (`tb_empresas`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_fornecedores`; CREATE VIEW `vw_fornecedores` AS select `tb_fornecedores`.`id` AS `id`,`tb_fornecedores`.`nome` AS `nome`,`tb_fornecedores`.`razao_social` AS `razao_social`,`tb_fornecedores`.`cnpj` AS `cnpj`,`tb_fornecedores`.`data_cadastro` AS `data_cadastro`,`tb_fornecedores`.`responsavel` AS `responsavel`,`tb_fornecedores`.`cpf_responsavel` AS `cpf_responsavel`,`tb_fornecedores`.`cep` AS `cep`,`tb_fornecedores`.`endereco` AS `endereco`,`tb_fornecedores`.`bairro` AS `bairro`,`tb_fornecedores`.`cidade` AS `cidade`,`tb_fornecedores`.`uf` AS `uf`,`tb_fornecedores`.`complemento` AS `complemento`,`tb_fornecedores`.`email` AS `email`,`tb_fornecedores`.`celular` AS `celular`,`tb_fornecedores`.`fax` AS `fax`,`tb_fornecedores`.`fone` AS `fone`,`tb_fornecedores`.`obs` AS `obs`,`tb_fornecedores`.`excluido` AS `excluido` from `tb_fornecedores` where (`tb_fornecedores`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_lancamentos`; CREATE VIEW `vw_lancamentos` AS select `tb_lancamentos`.`id` AS `id`,`tb_lancamentos`.`empresa_id` AS `empresa_id`,`tb_lancamentos`.`categoria_id` AS `categoria_id`,`tb_lancamentos`.`conta_id` AS `conta_id`,`tb_lancamentos`.`forma_pagamento_id` AS `forma_pagamento_id`,`tb_lancamentos`.`fornecedor_id` AS `fornecedor_id`,`tb_lancamentos`.`corretor_id` AS `corretor_id`,`tb_lancamentos`.`funcionario_id` AS `funcionario_id`,`tb_lancamentos`.`data_lancamento` AS `data_lancamento`,`tb_lancamentos`.`descricao` AS `descricao`,`tb_lancamentos`.`valor` AS `valor`,`tb_lancamentos`.`data_vencimento` AS `data_vencimento`,`tb_lancamentos`.`valor_pago` AS `valor_pago`,`tb_lancamentos`.`data_pagamento` AS `data_pagamento`,`tb_lancamentos`.`obs` AS `obs`,`tb_lancamentos`.`usuario_baixa` AS `usuario_baixa`,`tb_lancamentos`.`data_baixa` AS `data_baixa`,`tb_lancamentos`.`tipo` AS `tipo`,`tb_lancamentos`.`excluido` AS `excluido` from `tb_lancamentos` where (`tb_lancamentos`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_protocolos_pagamento`; CREATE VIEW `vw_protocolos_pagamento` AS select `tb_protocolo_pagamento`.`id` AS `id`,`tb_protocolo_pagamento`.`corretor_id` AS `corretor_id`,`tb_protocolo_pagamento`.`data_baixa` AS `data_baixa`,`tb_protocolo_pagamento`.`data_pagamento` AS `data_pagamento`,`tb_protocolo_pagamento`.`comentario` AS `comentario`,`tb_protocolo_pagamento`.`desconto` AS `desconto`,`tb_protocolo_pagamento`.`acrescimo` AS `acrescimo`,`tb_protocolo_pagamento`.`excluido` AS `excluido` from `tb_protocolo_pagamento` where (`tb_protocolo_pagamento`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_rotas`; CREATE VIEW `vw_rotas` AS select `tb_rotas`.`id` AS `id`,`tb_rotas`.`nome` AS `nome`,`tb_rotas`.`gerente_id` AS `gerente_id`,`tb_rotas`.`excluido` AS `excluido` from `tb_rotas` where (`tb_rotas`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_tabelas`; CREATE VIEW `vw_tabelas` AS select `tb_tabelas`.`id` AS `id`,`tb_tabelas`.`nome` AS `nome`,`tb_tabelas`.`campanha` AS `campanha`,`tb_tabelas`.`excluido` AS `excluido` from `tb_tabelas` where (`tb_tabelas`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_teste_contratos`; CREATE VIEW `vw_teste_contratos` AS select `contratos`.`id` AS `id`,`contratos`.`cliente_id` AS `cliente_id`,`contratos`.`banco_id` AS `banco_id`,`contratos`.`tabela_id` AS `tabela_id`,`contratos`.`convenio_id` AS `convenio_id`,`contratos`.`corretor_id` AS `corretor_id`,`contratos`.`subestabelecido_id` AS `subestabelecido_id`,`contratos`.`data_cadastro` AS `data_cadastro`,`contratos`.`numero_contrato` AS `numero_contrato`,`contratos`.`tipo` AS `tipo`,`contratos`.`data_emissao` AS `data_emissao`,`contratos`.`prazo` AS `prazo`,`contratos`.`forma_liberacao` AS `forma_liberacao`,`contratos`.`produto` AS `produto`,`contratos`.`status_proposta` AS `status_proposta`,`contratos`.`digitador` AS `digitador`,`contratos`.`data_recebimento_comissao` AS `data_recebimento_comissao`,`contratos`.`numero_beneficio` AS `numero_beneficio`,`contratos`.`data_liberacao` AS `data_liberacao`,`contratos`.`data_quitacao` AS `data_quitacao`,`contratos`.`valor_tac` AS `valor_tac`,`contratos`.`valor_liberado` AS `valor_liberado`,`contratos`.`valor_beneficio` AS `valor_beneficio`,`contratos`.`valor_seguro` AS `valor_seguro`,`contratos`.`valor_financiado` AS `valor_financiado`,`contratos`.`valor_iof` AS `valor_iof`,`contratos`.`valor_prestacao` AS `valor_prestacao`,`contratos`.`data_primeiro_vencimento` AS `data_primeiro_vencimento`,`contratos`.`valor_liquido` AS `valor_liquido`,`contratos`.`valor_bruto` AS `valor_bruto`,`contratos`.`comissao_empresa` AS `comissao_empresa`,`contratos`.`comissao_corretor` AS `comissao_corretor`,`contratos`.`comissao_gerente` AS `comissao_gerente`,`contratos`.`bonus_corretor` AS `bonus_corretor`,`contratos`.`bonus_empresa` AS `bonus_empresa`,`contratos`.`banco_beneficiado` AS `banco_beneficiado`,`contratos`.`agencia_beneficiado` AS `agencia_beneficiado`,`contratos`.`conta_beneficiado` AS `conta_beneficiado`,`contratos`.`obs` AS `obs`,`contratos`.`descricao_pendencia` AS `descricao_pendencia`,`contratos`.`data_recebimento_fisico` AS `data_recebimento_fisico`,`contratos`.`obs_recebimento_fisico` AS `obs_recebimento_fisico`,`contratos`.`data_envio_fisico` AS `data_envio_fisico`,`contratos`.`obs_envio_fisico` AS `obs_envio_fisico`,`contratos`.`numero_proposta` AS `numero_proposta`,`contratos`.`matricula` AS `matricula`,`contratos`.`data_recebimento_bonus` AS `data_recebimento_bonus`,`contratos`.`bonus_recebido` AS `bonus_recebido`,`contratos`.`protocolo_pagamento_id` AS `protocolo_pagamento_id`,`contratos`.`tipo_registro` AS `tipo_registro`,`contratos`.`cod_loja` AS `cod_loja`,`contratos`.`cep` AS `cep`,`contratos`.`endereco` AS `endereco`,`contratos`.`complemento` AS `complemento`,`contratos`.`bairro` AS `bairro`,`contratos`.`cidade` AS `cidade`,`contratos`.`uf` AS `uf`,`contratos`.`usuario_efetivacao` AS `usuario_efetivacao`,`contratos`.`data_efetivacao` AS `data_efetivacao`,`contratos`.`anexo_cpf` AS `anexo_cpf`,`contratos`.`anexo_rg` AS `anexo_rg`,`contratos`.`anexo_contra_cheque` AS `anexo_contra_cheque`,`contratos`.`anexo_ficha_cadastral` AS `anexo_ficha_cadastral`,`contratos`.`anexo_beneficio` AS `anexo_beneficio`,`contratos`.`bordero_newspace` AS `bordero_newspace`,`contratos`.`numero_envelope` AS `numero_envelope`,`contratos`.`operacao_beneficiado` AS `operacao_beneficiado`,`contratos`.`protocolo_recebimento_fisico` AS `protocolo_recebimento_fisico`,`contratos`.`excluido` AS `excluido`,`clientes`.`nome` AS `cliente`,`clientes`.`cpf` AS `cpf`,`corretores`.`nome` AS `corretor`,`rotas`.`nome` AS `rota`,`empresas`.`nome` AS `empresa`,`convenios`.`nome` AS `convenio`,`tabelas`.`nome` AS `tabela`,`bancos`.`nome` AS `banco`,`status_propostas`.`descricao` AS `status_proposta_nome`,`protocolos_pagamentos`.`data_pagamento` AS `data_pagamento` from (((((((((`tb_contratos` `contratos` join `tb_clientes` `clientes` on((`contratos`.`cliente_id` = `clientes`.`id`))) left join `tb_corretores` `corretores` on((`contratos`.`corretor_id` = `corretores`.`id`))) left join `tb_rotas` `rotas` on((`corretores`.`rota_id` = `rotas`.`id`))) left join `tb_empresas` `empresas` on((`clientes`.`empresa_id` = `empresas`.`id`))) left join `tb_convenios` `convenios` on((`contratos`.`convenio_id` = `convenios`.`id`))) left join `tb_tabelas` `tabelas` on((`contratos`.`tabela_id` = `tabelas`.`id`))) left join `tb_bancos` `bancos` on((`contratos`.`banco_id` = `bancos`.`id`))) left join `tb_tipos` `status_propostas` on((`contratos`.`status_proposta` = `status_propostas`.`id`))) left join `tb_protocolo_pagamento` `protocolos_pagamentos` on((`contratos`.`protocolo_pagamento_id` = `protocolos_pagamentos`.`id`))) where ((`contratos`.`excluido` <> 1) and (`contratos`.`tipo_registro` = 'CONTRATO')) order by `contratos`.`data_emissao`; DROP VIEW IF EXISTS `vw_tipos`; CREATE VIEW `vw_tipos` AS select `tb_tipos`.`id` AS `id`,`tb_tipos`.`descricao` AS `descricao`,`tb_tipos`.`tipo` AS `tipo`,`tb_tipos`.`codigo` AS `codigo`,`tb_tipos`.`excluido` AS `excluido` from `tb_tipos` where (`tb_tipos`.`excluido` <> 1); DROP VIEW IF EXISTS `vw_usuarios`; CREATE VIEW `vw_usuarios` AS select `u`.`id` AS `id`,`u`.`grupo_id` AS `grupo_id`,`u`.`empresa_id` AS `empresa_id`,`u`.`corretor_id` AS `corretor_id`,`u`.`nome` AS `nome`,`u`.`email` AS `email`,`u`.`login` AS `login`,`u`.`senha` AS `senha`,`u`.`ramal_login` AS `ramal_login`,`u`.`ramal_senha` AS `ramal_senha`,`u`.`excluido` AS `excluido`,`u`.`hora_inicio` AS `hora_inicio`,`u`.`hora_fim` AS `hora_fim`,`u`.`dias` AS `dias`,`gu`.`nome` AS `grupo` from (`tb_usuarios` `u` join `tb_grupos_usuarios` `gu` on((`gu`.`id` = `u`.`grupo_id`))) where ((`gu`.`excluido` <> 1) and (`u`.`excluido` <> 1)); ALTER TABLE `tb_clientes` ADD CONSTRAINT `tb_clientes_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `tb_empresas` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_comissionamento_corretor_percentual` ADD CONSTRAINT `tb_comissionamento_corretor_percentual_ibfk_2` FOREIGN KEY (`comissionamento_id`) REFERENCES `tb_comissionamento_corretor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_comissionamento_grupo_percentual` ADD CONSTRAINT `tb_comissionamento_grupo_percentual_ibfk_2` FOREIGN KEY (`comissionamento_id`) REFERENCES `tb_comissionamento_grupo` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_comissionamento_percentual` ADD CONSTRAINT `tb_comissionamento_percentual_ibfk_2` FOREIGN KEY (`comissionamento_id`) REFERENCES `tb_comissionamento` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_contratos` ADD CONSTRAINT `tb_contratos_ibfk_2` FOREIGN KEY (`banco_id`) REFERENCES `tb_bancos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `tb_contratos_ibfk_5` FOREIGN KEY (`cliente_id`) REFERENCES `tb_clientes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_permissoes` ADD CONSTRAINT `tb_permissoes_ibfk_1` FOREIGN KEY (`resource_id`) REFERENCES `tb_resources` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `tb_permissoes_ibfk_2` FOREIGN KEY (`grupo_id`) REFERENCES `tb_grupos_usuarios` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_protocolo_pagamento_gerente_itens` ADD CONSTRAINT `tb_protocolo_pagamento_gerente_itens_ibfk_1` FOREIGN KEY (`protocolo_id`) REFERENCES `tb_protocolo_pagamento_gerente` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `tb_protocolo_pagamento_gerente_itens_ibfk_2` FOREIGN KEY (`contrato_id`) REFERENCES `tb_contratos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; ALTER TABLE `tb_protocolo_pagamento_supervisor_itens` ADD CONSTRAINT `tb_protocolo_pagamento_supervisor_itens_ibfk_1` FOREIGN KEY (`protocolo_id`) REFERENCES `tb_protocolo_pagamento_supervisor` (`id`) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT `tb_protocolo_pagamento_supervisor_itens_ibfk_2` FOREIGN KEY (`contrato_id`) REFERENCES `tb_contratos` (`id`) ON DELETE CASCADE ON UPDATE CASCADE; INSERT INTO `tb_bancos` (`id`, `nome`, `dias_refin`, `imposto`, `ativo`, `excluido`, `codigo`) VALUES (2, 'BMG', 0, 0.00, 1, 0, NULL), (3, 'MATONE', 0, 0.00, 1, 0, NULL), (4, 'MERCANTIL', 0, 0.00, 0, 0, NULL), (5, 'FIBRA', 0, 0.00, 1, 0, NULL), (7, 'BRADESCO PROMOTORA', 0, 0.00, 1, 0, NULL), (11, 'BANCO DO BRASIL', 0, 0.00, 1, 0, '001'), (13, 'CAIXA ECONOMICA', 0, 0.00, 1, 0, '104'), (14, 'ITAU', 0, 0.00, 1, 1, '341'), (15, 'REAL', 0, 0.00, 1, 0, '356'), (17, 'BV', 0, 0.00, 1, 0, '655'), (18, 'BGN', 0, 0.00, 1, 0, '739'), (19, 'BONSUCESSO', 0, 0.00, 1, 0, '218'), (20, 'BCV', 0, 0.00, 1, 0, '250'), (23, 'DAYCOVAL', 0, 0.00, 1, 0, '707'), (28, 'SABEMI', 0, 0.00, 1, 0, '8869'), (30, 'BANRISUL', 0, 0.00, 1, 0, NULL), (31, 'PAN', 0, 0.00, 1, 0, NULL); INSERT INTO `tb_bancos_febraban` (`id`, `nome`, `codigo`, `taxa_transf`) VALUES (1, 'Banco ABC Brasil S.A.', '246', 7.50), (2, 'Banco ABN AMRO Real S.A.', '356', 7.50), (3, 'Banco Alfa S.A.', '025', 7.50), (4, 'Banco Alvorada S.A.', '641', 7.50), (5, 'Banco Banerj S.A.', '029', 7.50), (6, 'Banco Banestado S.A.', '038', 7.50), (7, 'Banco Barclays S.A.', '740', 7.50), (8, 'Banco BBM S.A.', '107', 7.50), (9, 'Banco Beg S.A.', '031', 7.50), (10, 'Banco Bem S.A.', '036', 7.50), (11, 'Banco BM&F de Serviços de Liquidação e Custódia S.A', '096', 7.50), (12, 'Banco BMC S.A.', '394', 7.50), (13, 'Banco BMG S.A.', '318', 7.50), (14, 'Banco BNP Paribas Brasil S.A.', '752', 7.50), (15, 'Banco Boavista Interatlântico S.A.', '248', 7.50), (16, 'Banco Bradesco S.A.', '237', 0.00), (17, 'Banco Brascan S.A.', '225', 7.50), (18, 'Banco Cacique S.A.', '263', 7.50), (19, 'Banco Calyon Brasil S.A.', '222', 7.50), (20, 'Banco Cargill S.A.', '040', 7.50), (21, 'Banco Citibank S.A.', '745', 7.50), (22, 'Banco Comercial e de Investimento Sudameris S.A.', '215', 7.50), (23, 'Banco Cooperativo do Brasil S.A. – BANCOOB', '756', 7.50), (24, 'Banco Cooperativo Sicredi S.A. – BANSICREDI', '748', 7.50), (25, 'Banco Credit Suisse (Brasil) S.A.', '505', 7.50), (26, 'Banco Cruzeiro do Sul S.A.', '229', 7.50), (27, 'Banco da Amazônia S.A.', '003', 7.50), (28, 'Banco Daycoval S.A.', '707', 7.50), (29, 'Banco de Pernambuco S.A. – BANDEPE', '024', 7.50), (30, 'Banco de Tokyo-Mitsubishi UFJ Brasil S.A.', '456', 7.50), (31, 'Banco Dibens S.A.', '214', 7.50), (32, 'Banco do Brasil S.A.', '001', 7.50), (33, 'Banco do Estado de Santa Catarina S.A.', '027', 7.50), (34, 'Banco do Estado de Sergipe S.A.', '047', 7.50), (35, 'Banco do Estado do Pará S.A.', '037', 7.50), (36, 'Banco do Estado do Rio Grande do Sul S.A.', '041', 7.50), (37, 'Banco do Nordeste do Brasil S.A.', '004', 7.50), (38, 'Banco Fator S.A.', '265', 7.50), (39, 'Banco Fibra S.A.', '224', 7.50), (40, 'Banco Finasa S.A.', '175', 7.50), (41, 'Banco Fininvest S.A.', '252', 7.50), (42, 'Banco GE Capital S.A.', '233', 7.50), (43, 'Banco Gerdau S.A.', '734', 7.50), (44, 'Banco Guanabara S.A.', '612', 7.50), (45, 'Banco Ibi S.A. Banco Múltiplo', '063', 7.50), (46, 'Banco Industrial do Brasil S.A.', '604', 7.50), (47, 'Banco Industrial e Comercial S.A.', '320', 7.50), (48, 'Banco Indusval S.A.', '653', 7.50), (49, 'Banco Intercap S.A.', '630', 7.50), (50, 'Banco Investcred Unibanco S.A.', '249', 7.50), (51, 'Banco Itaú BBA S.A.', '184-8', 7.50), (52, 'Banco Itaú Holding Financeira S.A.', '652', 7.50), (53, 'Banco Itaú S.A.', '341', 7.50), (54, 'Banco ItaúBank S.A', '479', 7.50), (55, 'Banco J. P. Morgan S.A.', '376', 7.50), (56, 'Banco J. Safra S.A.', '074', 7.50), (57, 'Banco Luso Brasileiro S.A.', '600', 7.50), (58, 'Banco Mercantil de São Paulo S.A.', '392', 7.50), (59, 'Banco Mercantil do Brasil S.A.', '389', 7.50), (60, 'Banco Merrill Lynch de Investimentos S.A.', '755', 7.50), (61, 'Banco Nossa Caixa S.A.', '151', 7.50), (62, 'Banco Opportunity S.A.', '045', 7.50), (63, 'Banco Panamericano S.A.', '623', 7.50), (64, 'Banco Paulista S.A.', '611', 7.50), (65, 'Banco Pine S.A.', '643', 7.50), (66, 'Banco Prosper S.A.', '638', 7.50), (67, 'Banco Rabobank International Brasil S.A.', '747', 7.50), (68, 'Banco Rendimento S.A.', '633', 7.50), (69, 'Banco Rural Mais S.A.', '072', 7.50), (70, 'Banco Rural S.A.', '453', 7.50), (71, 'Banco Safra S.A.', '422', 7.50), (72, 'Banco Santander Banespa S.A.', '008', 7.50), (73, 'Banco Schahin S.A.', '250', 7.50), (74, 'Banco Simples S.A.', '749', 7.50), (75, 'Banco Société Générale Brasil S.A.', '366', 7.50), (76, 'Banco Sofisa S.A.', '637', 7.50), (77, 'Banco Sudameris Brasil S.A.', '347', 7.50), (78, 'Banco Sumitomo Mitsui Brasileiro S.A.', '464', 7.50), (79, 'Banco Triângulo S.A.', '634', 7.50), (80, 'Banco UBS Pactual S.A.', '208', 7.50), (81, 'Banco UBS S.A.', '247', 7.50), (82, 'Banco Único S.A.', '116', 7.50), (83, 'Banco Votorantim S.A.', '655', 7.50), (84, 'Banco VR S.A.', '610', 7.50), (85, 'Banco WestLB do Brasil S.A.', '370', 7.50), (86, 'BANESTES S.A. Banco do Estado do Espírito Santo', '021', 7.50), (87, 'Banif-Banco Internacional do Funchal (Brasil)S.A.', '719', 7.50), (88, 'Bankpar Banco Multiplo S.A.', '204', 7.50), (89, 'BB Banco Popular do Brasil S.A.', '073-6', 7.50), (90, 'BPN Brasil Banco Mútiplo S.A.', '069-8', 7.50), (91, 'BRB – Banco de Brasília S.A.', '070', 7.50), (92, 'Caixa Econômica Federal', '104', 7.50), (93, 'Citibank N.A.', '477', 7.50), (94, 'Deutsche Bank S.A. – Banco Alemão', '487', 7.50), (95, 'Dresdner Bank Brasil S.A. – Banco Múltiplo', '751', 7.50), (96, 'Dresdner Bank Lateinamerika Aktiengesellschaft', '210', 7.50), (97, 'Hipercard Banco Múltiplo S.A.', '062', 7.50), (98, 'HSBC Bank Brasil S.A. – Banco Múltiplo', '399', 7.50), (99, 'ING Bank N.V.', '492', 7.50), (100, 'JPMorgan Chase Bank', '488', 7.50), (101, 'Lemon Bank Banco Múltiplo S.A.', '065', 7.50), (102, 'UNIBANCO – União de Bancos Brasileiros S.A.', '409', 7.50), (103, 'Unicard Banco Múltiplo S.A.', '230', 7.50); INSERT INTO `tb_empresas` (`id`, `nome`, `razao_social`, `cnpj`, `data_cadastro`, `responsavel`, `cpf_responsavel`, `cep`, `endereco`, `bairro`, `cidade`, `uf`, `complemento`, `email`, `celular`, `fax`, `fone`, `obs`, `tipo`, `performance`, `excluido`) VALUES (1, 'MATRIZ', NULL, NULL, current_timestamp, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'EMPRESA', NULL, 0); INSERT INTO `tb_grupos_usuarios` (`id`, `nome`, `excluido`) VALUES (1, 'Administradores', 0), (14, 'Backoffice', 0), (13, 'Backoffice Matriz', 0), (17, 'Bonus', 0), (5, 'Callcenter', 0), (9, 'Callcenter Gerente', 0), (10, 'Callcenter Supervisor', 0), (4, 'Consulta', 0), (12, 'Consulta Matriz', 0), (19, 'Corretor', 0), (11, 'Digitador', 0), (21, 'Diretoria', 0), (3, 'Financeiro', 0), (15, 'Formalizacao', 0), (8, 'Formalizacao Matriz', 0), (7, 'Gerencia', 0), (20, 'Gerente Loja', 0), (18, 'Gerente Regional', 0), (6, 'Pagamento de Planilha', 0), (16, 'Supervisor', 0); INSERT INTO `tb_resources` (`id`, `descricao`, `resource`, `privilege`, `excluido`, `extra`) VALUES (1, 'Conta', 'conta', NULL, 0, 0), (3, 'Save', 'conta', 'save', 0, 0), (4, 'Delete', 'conta', 'delete', 0, 0), (5, 'Corretor', 'corretor', NULL, 0, 0), (6, 'Index', 'corretor', 'index', 0, 0), (7, 'Save', 'corretor', 'save', 0, 0), (8, 'Delete', 'corretor', 'delete', 0, 0), (9, 'Add Documento', 'corretor', 'add-documento', 0, 0), (10, 'Delete Documento', 'corretor', 'delete-documento', 0, 0), (11, 'Add Senha', 'corretor', 'add-senha', 0, 0), (12, 'Delete Senha', 'corretor', 'delete-senha', 0, 0), (13, 'Meus Protocolos', 'corretor', 'meus-protocolos', 0, 0), (14, 'Detalhar Protocolo', 'corretor', 'detalhar-protocolo', 0, 0), (15, 'Meus Contratos', 'corretor', 'meus-contratos', 0, 0), (16, 'Meus Pontos', 'corretor', 'meus-pontos', 0, 0), (17, 'View', 'corretor', 'view', 0, 0), (18, 'Add Credito', 'corretor', 'add-credito', 0, 0), (19, 'Delete Credito', 'corretor', 'delete-credito', 0, 0), (20, 'Listar', 'corretor', 'listar', 0, 0), (21, 'Get Cidades', 'corretor', 'get-cidades', 0, 0), (22, 'Minhas Pendencias Fisico', 'corretor', 'minhas-pendencias-fisico', 0, 0), (23, 'Simulador', 'corretor', 'simulador', 0, 0), (24, 'Calcular Fator', 'corretor', 'calcular-fator', 0, 0), (25, 'Tabela Fatores', 'corretor', 'tabela-fatores', 0, 0), (26, 'Index', 'index', NULL, 0, 0), (27, 'Index', 'index', 'index', 0, 0), (28, 'Manutencao', 'index', 'manutencao', 0, 0), (29, 'Sem Permissao', 'index', 'sem-permissao', 0, 0), (30, 'Menu Opcoes', 'index', 'menu-opcoes', 0, 0), (31, 'Receita', 'receita', NULL, 0, 0), (32, 'Index', 'receita', 'index', 0, 0), (33, 'Add', 'receita', 'add', 0, 0), (34, 'Update', 'receita', 'update', 0, 0), (35, 'Delete', 'receita', 'delete', 0, 0), (36, 'Grupo Comissao', 'grupo-comissao', NULL, 0, 0), (37, 'Index', 'grupo-comissao', 'index', 0, 0), (38, 'Save', 'grupo-comissao', 'save', 0, 0), (39, 'Delete', 'grupo-comissao', 'delete', 0, 0), (40, 'Consulta', 'consulta', NULL, 0, 0), (41, 'Index', 'consulta', 'index', 0, 0), (42, 'Por Beneficio', 'consulta', 'por-beneficio', 0, 0), (43, 'Por Cpf', 'consulta', 'por-cpf', 0, 0), (44, 'Callcenter Relatorios', 'callcenter-relatorios', NULL, 0, 0), (45, 'Index', 'callcenter-relatorios', 'index', 0, 0), (46, 'Painel', 'callcenter-relatorios', 'painel', 0, 0), (47, 'Detalhar Operador Campanha', 'callcenter-relatorios', 'detalhar-operador-campanha', 0, 0), (48, 'Detalhar Atendimentos', 'callcenter-relatorios', 'detalhar-atendimentos', 0, 0), (49, 'Consultas Beneficios', 'callcenter-relatorios', 'consultas-beneficios', 0, 0), (50, 'Atendimentos', 'callcenter-relatorios', 'atendimentos', 0, 0), (51, 'Gerente Rota', 'gerente-rota', NULL, 0, 0), (52, 'Index', 'gerente-rota', 'index', 0, 0), (53, 'Save', 'gerente-rota', 'save', 0, 0), (54, 'Delete', 'gerente-rota', 'delete', 0, 0), (55, 'Get Rotas', 'gerente-rota', 'get-rotas', 0, 0), (56, 'Grupos de usuários', 'grupo-usuario', NULL, 0, 0), (57, 'Index', 'grupo-usuario', 'index', 0, 0), (58, 'Save', 'grupo-usuario', 'save', 0, 0), (59, 'Delete', 'grupo-usuario', 'delete', 0, 0), (60, 'Atualizar Recursos', 'grupo-usuario', 'atualizar-recursos', 0, 0), (61, 'Permissoes', 'grupo-usuario', 'permissoes', 0, 0), (62, 'Gerente Promotora', 'gerente-promotora', NULL, 0, 0), (63, 'Index', 'gerente-promotora', 'index', 0, 0), (64, 'Save', 'gerente-promotora', 'save', 0, 0), (65, 'Delete', 'gerente-promotora', 'delete', 0, 0), (66, 'Add Convenio', 'gerente-promotora', 'add-convenio', 0, 0), (67, 'Delete Convenio', 'gerente-promotora', 'delete-convenio', 0, 0), (68, 'Usuario', 'usuario', NULL, 0, 0), (69, 'Index', 'usuario', 'index', 0, 0), (70, 'Save', 'usuario', 'save', 0, 0), (71, 'Delete', 'usuario', 'delete', 0, 0), (75, 'Banco', 'banco', NULL, 0, 0), (76, 'Index', 'banco', 'index', 0, 0), (77, 'Save', 'banco', 'save', 0, 0), (78, 'Delete', 'banco', 'delete', 0, 0), (79, 'Tabela', 'tabela', NULL, 0, 0), (80, 'Index', 'tabela', 'index', 0, 0), (81, 'Save', 'tabela', 'save', 0, 0), (82, 'Delete', 'tabela', 'delete', 0, 0), (83, 'Fatores', 'tabela', 'fatores', 0, 0), (84, 'Save Fator', 'tabela', 'save-fator', 0, 0), (85, 'Delete Fator', 'tabela', 'delete-fator', 0, 0), (86, 'Import Fatores', 'tabela', 'import-fatores', 0, 0), (87, 'Despesa', 'despesa', NULL, 0, 0), (88, 'Index', 'despesa', 'index', 0, 0), (89, 'Add', 'despesa', 'add', 0, 0), (90, 'Update', 'despesa', 'update', 0, 0), (91, 'Delete', 'despesa', 'delete', 0, 0), (92, 'Baixa', 'despesa', 'baixa', 0, 0), (93, 'Save Baixa', 'despesa', 'save-baixa', 0, 0), (94, 'Imprimir', 'despesa', 'imprimir', 0, 0), (95, 'Delete Itens', 'despesa', 'delete-itens', 0, 0), (96, 'Fornecedor', 'fornecedor', NULL, 0, 0), (97, 'Index', 'fornecedor', 'index', 0, 0), (98, 'Save', 'fornecedor', 'save', 0, 0), (99, 'Delete', 'fornecedor', 'delete', 0, 0), (100, 'Categoria', 'categoria', NULL, 0, 0), (101, 'Index', 'categoria', 'index', 0, 0), (102, 'Save', 'categoria', 'save', 0, 0), (103, 'Delete', 'categoria', 'delete', 0, 0), (104, 'Comissionamento', 'comissionamento', NULL, 0, 0), (105, 'Index', 'comissionamento', 'index', 0, 0), (106, 'Save', 'comissionamento', 'save', 0, 0), (107, 'Delete', 'comissionamento', 'delete', 0, 0), (108, 'Add Comissao', 'comissionamento', 'add-comissao', 0, 0), (109, 'Delete Comissao', 'comissionamento', 'delete-comissao', 0, 0), (110, 'Exportar', 'comissionamento', 'exportar', 0, 0), (111, 'Executar Exportar Comissoes', 'comissionamento', 'executar-exportar-comissoes', 0, 0), (112, 'Selecionar Empresas', 'comissionamento', 'selecionar-empresas', 0, 0), (113, 'Atualizar Comissao Contratos', 'comissionamento', 'atualizar-comissao-contratos', 0, 0), (114, 'Executar Atualizar Comissoes', 'comissionamento', 'executar-atualizar-comissoes', 0, 0), (115, 'Atualiza Data Final', 'comissionamento', 'atualiza-data-final', 0, 0), (116, 'Callcenter Campanha', 'callcenter-campanha', NULL, 0, 0), (117, 'Index', 'callcenter-campanha', 'index', 0, 0), (118, 'Save', 'callcenter-campanha', 'save', 0, 0), (119, 'Delete', 'callcenter-campanha', 'delete', 0, 0), (120, 'Importar Base', 'callcenter-campanha', 'importar-base', 0, 0), (121, 'Higienizar Base', 'callcenter-campanha', 'higienizar-base', 0, 0), (122, 'Ativar Cliente Campanha', 'callcenter-campanha', 'ativar-cliente-campanha', 0, 0), (123, 'Alocar Operadores', 'callcenter-campanha', 'alocar-operadores', 0, 0), (124, 'Alocar Desalocar Operadores', 'callcenter-campanha', 'alocar-desalocar-operadores', 0, 0), (125, 'Add Supervisor Campanha', 'callcenter-campanha', 'add-supervisor-campanha', 0, 0), (126, 'Delete Supervisor Campanha', 'callcenter-campanha', 'delete-supervisor-campanha', 0, 0), (127, 'Exportar Csv', 'callcenter-campanha', 'exportar-csv', 0, 0), (128, 'Importar Avulsos', 'callcenter-campanha', 'importar-avulsos', 0, 0), (129, 'Ativar Clientes', 'callcenter-campanha', 'ativar-clientes', 0, 0), (130, 'Error', 'error', NULL, 0, 0), (131, 'Error', 'error', 'error', 0, 0), (132, 'Cliente', 'cliente', NULL, 0, 0), (133, 'Index', 'cliente', 'index', 0, 0), (134, 'Update', 'cliente', 'update', 0, 0), (135, 'Save', 'cliente', 'save', 0, 0), (136, 'Delete', 'cliente', 'delete', 0, 0), (137, 'Financeiro', 'financeiro', NULL, 0, 0), (138, 'Index', 'financeiro', 'index', 0, 0), (139, 'Visao Geral', 'financeiro', 'visao-geral', 0, 0), (140, 'Pagar Comissao', 'financeiro', 'pagar-comissao', 0, 0), (141, 'Credito Corretor', 'financeiro', 'credito-corretor', 0, 0), (142, 'Lista Credito Corretor', 'financeiro', 'lista-credito-corretor', 0, 0), (143, 'Delete Credito Corretor', 'financeiro', 'delete-credito-corretor', 0, 0), (144, 'Debito Corretor', 'financeiro', 'debito-corretor', 0, 0), (145, 'Lista Debito Corretor', 'financeiro', 'lista-debito-corretor', 0, 0), (146, 'Delete Debito Corretor', 'financeiro', 'delete-debito-corretor', 0, 0), (147, 'Receber Comissao', 'financeiro', 'receber-comissao', 0, 0), (148, 'Pagar Comissao Supervisor', 'financeiro', 'pagar-comissao-supervisor', 0, 0), (149, 'Pagar Comissao Gerente', 'financeiro', 'pagar-comissao-gerente', 0, 0), (150, 'Proposta', 'proposta', NULL, 0, 0), (151, 'Index', 'proposta', 'index', 0, 0), (152, 'Save', 'proposta', 'save', 0, 0), (153, 'Delete', 'proposta', 'delete', 0, 0), (154, 'Get Dados Cliente', 'proposta', 'get-dados-cliente', 0, 0), (155, 'Efetivar', 'proposta', 'efetivar', 0, 0), (156, 'Digitados Pelo Corretor', 'proposta', 'digitados-pelo-corretor', 0, 0), (157, 'Status Proposta', 'status-proposta', NULL, 0, 0), (158, 'Index', 'status-proposta', 'index', 0, 0), (159, 'Save', 'status-proposta', 'save', 0, 0), (160, 'Delete', 'status-proposta', 'delete', 0, 0), (161, 'Callcenter', 'callcenter', NULL, 0, 0), (162, 'Index', 'callcenter', 'index', 0, 0), (163, 'Exibir Cliente', 'callcenter', 'exibir-cliente', 0, 0), (164, 'Save Cliente', 'callcenter', 'save-cliente', 0, 0), (165, 'Agenda', 'callcenter', 'agenda', 0, 0), (166, 'Add Contato', 'callcenter', 'add-contato', 0, 0), (167, 'Delete Contato', 'callcenter', 'delete-contato', 0, 0), (168, 'Lista Operadores', 'callcenter', 'lista-operadores', 0, 0), (169, 'Save Proposta', 'callcenter', 'save-proposta', 0, 0), (170, 'Efetivar Proposta', 'callcenter', 'efetivar-proposta', 0, 0), (171, 'Delete Telefone', 'callcenter', 'delete-telefone', 0, 0), (172, 'Finalizar Filial', 'callcenter', 'finalizar-filial', 0, 0), (173, 'Listar Para Digitacao', 'callcenter', 'listar-para-digitacao', 0, 0), (174, 'Receptivos Agendados', 'callcenter', 'receptivos-agendados', 0, 0), (175, 'Verificar Receptivos', 'callcenter', 'verificar-receptivos', 0, 0), (176, 'Config', 'callcenter', 'config', 0, 0), (177, 'Calcular Fator', 'callcenter', 'calcular-fator', 0, 0), (178, 'Rota', 'rota', NULL, 0, 0), (179, 'Index', 'rota', 'index', 0, 0), (180, 'Save', 'rota', 'save', 0, 0), (181, 'Delete', 'rota', 'delete', 0, 0), (182, 'Get Corretores', 'rota', 'get-corretores', 0, 0), (183, 'Gerente', 'gerente', NULL, 0, 0), (184, 'Index', 'gerente', 'index', 0, 0), (185, 'Save', 'gerente', 'save', 0, 0), (186, 'Delete', 'gerente', 'delete', 0, 0), (187, 'Parceiro', 'parceiro', NULL, 0, 0), (188, 'Index', 'parceiro', 'index', 0, 0), (189, 'Save', 'parceiro', 'save', 0, 0), (190, 'Delete', 'parceiro', 'delete', 0, 0), (191, 'Callcenter Status Atendimento', 'callcenter-status-atendimento', NULL, 0, 0), (192, 'Index', 'callcenter-status-atendimento', 'index', 0, 0), (193, 'Save', 'callcenter-status-atendimento', 'save', 0, 0), (194, 'Delete', 'callcenter-status-atendimento', 'delete', 0, 0), (195, 'Contrato', 'contrato', NULL, 0, 0), (196, 'Index', 'contrato', 'index', 0, 0), (197, 'Save', 'contrato', 'save', 0, 0), (198, 'Delete', 'contrato', 'delete', 0, 0), (199, 'Save Dialog', 'contrato', 'save-dialog', 0, 0), (200, 'Baixar Pagamento', 'contrato', 'baixar-pagamento', 0, 0), (201, 'Baixar Recebimento', 'contrato', 'baixar-recebimento', 0, 0), (202, 'Receber Fisico', 'contrato', 'receber-fisico', 0, 0), (203, 'Baixar Fisico', 'contrato', 'baixar-fisico', 0, 0), (204, 'Enviar Fisico', 'contrato', 'enviar-fisico', 0, 0), (205, 'Baixar Envio Fisico', 'contrato', 'baixar-envio-fisico', 0, 0), (206, 'Importar Bonus', 'contrato', 'importar-bonus', 0, 0), (207, 'Analise Fisico', 'contrato', 'analise-fisico', 0, 0), (208, 'Imprimir Protocolo Pagamento', 'contrato', 'imprimir-protocolo-pagamento', 0, 0), (209, 'Exportar Bonus Pendente', 'contrato', 'exportar-bonus-pendente', 0, 0), (210, 'Exportar Pendencias', 'contrato', 'exportar-pendencias', 0, 0), (211, 'Localizar Comissao', 'contrato', 'localizar-comissao', 0, 0), (212, 'View', 'contrato', 'view', 0, 0), (213, 'Enviar Protocolo', 'contrato', 'enviar-protocolo', 0, 0), (214, 'Importar Planilha Parceiro', 'contrato', 'importar-planilha-parceiro', 0, 0), (215, 'Excluir Protocolo Pagamento', 'contrato', 'excluir-protocolo-pagamento', 0, 0), (216, 'Executar Exclusao Protocolo Pagamento', 'contrato', 'executar-exclusao-protocolo-pagamento', 0, 0), (217, 'Importar Newspace', 'contrato', 'importar-newspace', 0, 0), (218, 'Importar Envio Fisico Daycoval', 'contrato', 'importar-envio-fisico-daycoval', 0, 0), (219, 'Baixar Pagamento Supervisor', 'contrato', 'baixar-pagamento-supervisor', 0, 0), (220, 'Imprimir Protocolo Pagamento Supervisor', 'contrato', 'imprimir-protocolo-pagamento-supervisor', 0, 0), (221, 'Excluir Protocolo Pagamento Supervisor', 'contrato', 'excluir-protocolo-pagamento-supervisor', 0, 0), (222, 'Executar Exclusao Protocolo Pagamento Supervisor', 'contrato', 'executar-exclusao-protocolo-pagamento-supervisor', 0, 0), (223, 'Notificar Pendencia', 'contrato', 'notificar-pendencia', 0, 0), (224, 'Selecionar Acao', 'contrato', 'selecionar-acao', 0, 0), (225, 'Alterar Cobranca Banco', 'contrato', 'alterar-cobranca-banco', 0, 0), (226, 'Enviar Protocolo Supervisor', 'contrato', 'enviar-protocolo-supervisor', 0, 0), (227, 'Baixar Pagamento Gerente', 'contrato', 'baixar-pagamento-gerente', 0, 0), (228, 'Imprimir Protocolo Pagamento Gerente', 'contrato', 'imprimir-protocolo-pagamento-gerente', 0, 0), (229, 'Excluir Protocolo Pagamento Gerente', 'contrato', 'excluir-protocolo-pagamento-gerente', 0, 0), (230, 'Executar Exclusao Protocolo Pagamento Gerente', 'contrato', 'executar-exclusao-protocolo-pagamento-gerente', 0, 0), (231, 'Enviar Protocolo Gerente', 'contrato', 'enviar-protocolo-gerente', 0, 0), (232, 'Excluir Protocolo Fisico', 'contrato', 'excluir-protocolo-fisico', 0, 0), (233, 'Executar Exclusao Protocolo Fisico', 'contrato', 'executar-exclusao-protocolo-fisico', 0, 0), (234, 'Contratos Corrigir', 'contrato', 'contratos-corrigir', 0, 0), (235, 'Imprimir Protocolo Recebimento', 'contrato', 'imprimir-protocolo-recebimento', 0, 0), (236, 'Imprimir Protocolo Envio', 'contrato', 'imprimir-protocolo-envio', 0, 0), (237, 'Importar Producao Banco', 'contrato', 'importar-producao-banco', 0, 0), (238, 'Convenio', 'convenio', NULL, 0, 0), (239, 'Index', 'convenio', 'index', 0, 0), (240, 'Save', 'convenio', 'save', 0, 0), (241, 'Delete', 'convenio', 'delete', 0, 0), (242, 'Get Tabelas', 'convenio', 'get-tabelas', 0, 0), (243, 'Empresa', 'empresa', NULL, 0, 0), (244, 'Index', 'empresa', 'index', 0, 0), (245, 'Save', 'empresa', 'save', 0, 0), (246, 'Delete', 'empresa', 'delete', 0, 0), (247, 'Utilizado para preenchimento de combo pelo jquery', 'empresa', 'get-empresas', 0, 0), (248, 'Campanha', 'campanha', NULL, 0, 0), (249, 'Index', 'campanha', 'index', 0, 0), (250, 'Save', 'campanha', 'save', 0, 0), (251, 'Delete', 'campanha', 'delete', 0, 0), (252, 'Resgate', 'campanha', 'resgate', 0, 0), (253, 'Resgates', 'campanha', 'resgates', 0, 0), (254, 'Delete Resgate', 'campanha', 'delete-resgate', 0, 0), (255, 'Sincronização', 'sincronizacao', NULL, 0, 0), (256, 'Index', 'sincronizacao', 'index', 0, 0), (257, 'Importar', 'sincronizacao', 'importar', 0, 0), (258, 'Importação Gcom', 'sincronizacao', 'importar-gcom', 0, 0), (259, 'Localizar Arquivos', 'sincronizacao', 'localizar-arquivos', 0, 0), (260, 'Importar Arquivo', 'sincronizacao', 'importar-arquivo', 0, 0), (261, 'Arquivos Importados', 'sincronizacao', 'arquivos-importados', 0, 0), (262, 'Callcenter Base', 'callcenter-base', NULL, 0, 0), (263, 'Index', 'callcenter-base', 'index', 0, 0), (264, 'Save', 'callcenter-base', 'save', 0, 0), (265, 'Delete', 'callcenter-base', 'delete', 0, 0), (266, 'Consulta Por Cpf', 'callcenter-base', 'consulta-por-cpf', 0, 0), (267, 'Buscar Telefones', 'callcenter-base', 'buscar-telefones', 0, 0), (268, 'Reset Cliente', 'callcenter-base', 'reset-cliente', 0, 0), (269, 'Agendar Receptivo', 'callcenter-base', 'agendar-receptivo', 0, 0), (270, 'Associar Campanha', 'callcenter-base', 'associar-campanha', 0, 0), (271, 'Delete Telefone', 'callcenter-base', 'delete-telefone', 0, 0), (272, 'Get Cidades', 'callcenter-base', 'get-cidades', 0, 0), (273, 'Produto', 'produto', NULL, 0, 0), (274, 'Index', 'produto', 'index', 0, 0), (275, 'Save', 'produto', 'save', 0, 0), (276, 'Delete', 'produto', 'delete', 0, 0), (277, 'Comissionamento Corretor', 'comissionamento-corretor', NULL, 0, 0), (278, 'Index', 'comissionamento-corretor', 'index', 0, 0), (279, 'Save', 'comissionamento-corretor', 'save', 0, 0), (280, 'Delete', 'comissionamento-corretor', 'delete', 0, 0), (281, 'Add Comissao', 'comissionamento-corretor', 'add-comissao', 0, 0), (282, 'Delete Comissao', 'comissionamento-corretor', 'delete-comissao', 0, 0), (283, 'Exportar', 'comissionamento-corretor', 'exportar', 0, 0), (284, 'Executar Exportar Comissoes', 'comissionamento-corretor', 'executar-exportar-comissoes', 0, 0), (285, 'Selecionar Corretores', 'comissionamento-corretor', 'selecionar-corretores', 0, 0), (286, 'Atualizar Comissao Contratos', 'comissionamento-corretor', 'atualizar-comissao-contratos', 0, 0), (287, 'Executar Atualizar Comissoes', 'comissionamento-corretor', 'executar-atualizar-comissoes', 0, 0), (288, 'Atualiza Data Final', 'comissionamento-corretor', 'atualiza-data-final', 0, 0), (289, 'Relatorio', 'relatorio', NULL, 0, 0), (290, 'Index', 'relatorio', 'index', 0, 0), (291, 'Producao Analitico', 'relatorio', 'producao-analitico', 0, 0), (292, 'Producao Gerente', 'relatorio', 'producao-gerente', 0, 0), (293, 'Extrato Corretor', 'relatorio', 'extrato-corretor', 0, 0), (294, 'Campanhas', 'relatorio', 'campanhas', 0, 0), (295, 'Bonus Recebido', 'relatorio', 'bonus-recebido', 0, 0), (296, 'Refinanciamento', 'relatorio', 'refinanciamento', 0, 0), (297, 'Despesas', 'relatorio', 'despesas', 0, 0), (298, 'Receitas', 'relatorio', 'receitas', 0, 0), (299, 'Performance', 'relatorio', 'performance', 0, 0), (300, 'Imprimir Despesas', 'relatorio', 'imprimir-despesas', 0, 0), (301, 'Producao Supervisor', 'relatorio', 'producao-supervisor', 0, 0), (302, 'Grafico Producao', 'relatorio', 'grafico-producao', 0, 0), (303, 'Comissao Gerente', 'relatorio', 'comissao-gerente', 0, 0), (304, 'Comissao Supervisor', 'relatorio', 'comissao-supervisor', 0, 0), (305, 'Comissao Pendente', 'relatorio', 'comissao-pendente', 0, 0), (306, 'Ranking Fisicos Pendentes', 'relatorio', 'ranking-fisicos-pendentes', 0, 0), (307, 'Ranking Envios Pendentes', 'relatorio', 'ranking-envios-pendentes', 0, 0), (308, 'Contratos Liberados', 'relatorio', 'contratos-liberados', 0, 0), (309, 'Ranking Vendas', 'relatorio', 'ranking-vendas', 0, 0), (310, 'Producao Sintetico', 'relatorio', 'producao-sintetico', 0, 0), (311, 'Fisicos Pendentes', 'relatorio', 'fisicos-pendentes', 0, 0), (312, 'Producao Formalizacao', 'relatorio', 'producao-formalizacao', 0, 0), (313, 'Forma Pagamento', 'forma-pagamento', NULL, 0, 0), (314, 'Index', 'forma-pagamento', 'index', 0, 0), (315, 'Save', 'forma-pagamento', 'save', 0, 0), (316, 'Delete', 'forma-pagamento', 'delete', 0, 0), (317, 'Prospecto', 'prospecto', NULL, 0, 0), (318, 'Index', 'prospecto', 'index', 0, 0), (319, 'Update', 'prospecto', 'update', 0, 0), (320, 'Save', 'prospecto', 'save', 0, 0), (321, 'Delete', 'prospecto', 'delete', 0, 0), (322, 'Add Contato', 'prospecto', 'add-contato', 0, 0), (323, 'Delete Contato', 'prospecto', 'delete-contato', 0, 0), (324, 'Bonus', 'bonus', NULL, 0, 0), (325, 'Index', 'bonus', 'index', 0, 0), (326, 'Save', 'bonus', 'save', 0, 0), (327, 'Delete', 'bonus', 'delete', 0, 0), (328, 'Add Bonus', 'bonus', 'add-bonus', 0, 0), (329, 'Delete Bonus', 'bonus', 'delete-bonus', 0, 0), (330, 'Atualiza Data Final', 'bonus', 'atualiza-data-final', 0, 0), (332, 'Altera contrato parcial', 'altera-contrato-parcial', NULL, 0, 1), (333, 'Parcial', 'logout', NULL, 0, 1), (334, 'Visualizar contratos filiais', 'visualizar-contratos-filiais', NULL, 0, 1), (335, 'Visualizar corretores filiais', 'visualizar-corretores-filiais', NULL, 0, 1), (336, 'Visualizar clientes filiais', 'visualizar-clientes-filiais', NULL, 0, 1), (337, 'Visualizar propostas filiais', 'visualizar-propostas-filiais', NULL, 0, 1), (338, 'Contrato bloqueado', 'contrato-bloqueado', NULL, 0, 1), (339, 'Alterar status', 'alterar-status', NULL, 0, 1), (340, 'Resgate fora prazo', 'resgate-fora-prazo', NULL, 0, 1), (341, 'Operador Campanhas', 'corretor', 'operador-campanhas', 0, 0), (342, 'Get Bairros', 'callcenter-base', 'get-bairros', 0, 0), (343, 'Importacao Propria', 'callcenter-campanha', 'importacao-propria', 0, 0), (344, 'visualizar-contatos-usuarios', 'visualizar-contatos-usuarios', NULL, 0, 1), (345, 'Minhas Comissoes', 'corretor', 'minhas-comissoes', 0, 0), (346, 'Imprimir', 'proposta', 'imprimir', 0, 0), (347, 'Pos Venda', 'pos-venda', NULL, 0, 0), (348, 'Index', 'pos-venda', 'index', 0, 0), (349, 'Listar Por Cidade', 'corretor', 'listar-por-cidade', 0, 0), (350, 'Corretores Sem Producao', 'relatorio', 'corretores-sem-producao', 0, 0), (351, 'alterar-prazo-fisico', 'alterar-prazo-fisico', NULL, 0, 1), (352, 'Associar Comissao Grupo', 'comissionamento-corretor', 'associar-comissao-grupo', 0, 0), (353, 'Consultar Telefones', 'callcenter-campanha', 'consultar-telefones', 0, 0), (354, 'Consultar Beneficios', 'callcenter-campanha', 'consultar-beneficios', 0, 0), (355, 'Novo Fornecedor', 'fornecedor', 'novo-fornecedor', 0, 0), (356, 'Save Fornecedor', 'fornecedor', 'save-fornecedor', 0, 0), (357, 'Nova Categoria', 'categoria', 'nova-categoria', 0, 0), (358, 'Save Categoria', 'categoria', 'save-categoria', 0, 0), (359, 'Imprimir', 'receita', 'imprimir', 0, 0), (360, 'Imprimir Itens', 'despesa', 'imprimir-itens', 0, 0), (361, 'Update Itens', 'despesa', 'update-itens', 0, 0), (362, 'Delete Itens', 'receita', 'delete-itens', 0, 0), (363, 'Imprimir Itens', 'receita', 'imprimir-itens', 0, 0), (364, 'Resetar', 'callcenter-base', 'resetar', 0, 0), (365, 'Add Convenio', 'campanha', 'add-convenio', 0, 0), (366, 'Delete Convenio', 'campanha', 'delete-convenio', 0, 0), (367, 'Add Tabela', 'campanha', 'add-tabela', 0, 0), (368, 'Delete Tabela', 'campanha', 'delete-tabela', 0, 0), (369, 'Add Status', 'campanha', 'add-status', 0, 0), (370, 'Delete Status', 'campanha', 'delete-status', 0, 0), (371, 'Despesas Por Categoria', 'relatorio', 'despesas-por-categoria', 0, 0), (372, 'Add Anexos', 'contrato', 'add-anexos', 0, 0), (373, 'Add Anexos', 'cliente', 'add-anexos', 0, 0), (374, 'Verifica Contrato', 'contrato', 'verifica-contrato', 0, 0), (375, 'Usuario Por Grupo', 'usuario', 'usuario-por-grupo', 0, 0), (376, 'Imprimir Promissoria', 'receita', 'imprimir-promissoria', 0, 0), (377, 'Fatal Error', 'error', 'fatal-error', 0, 0), (378, 'Atualizar Comissoes', 'comissionamento-corretor', 'atualizar-comissoes', 0, 0), (379, 'Pos Venda', 'relatorio', 'pos-venda', 0, 0), (380, 'Config Busca Telefones', 'callcenter-base', 'config-busca-telefones', 0, 0), (381, 'Transferencia', 'financeiro', 'transferencia', 0, 0), (382, 'Mensagem', 'mensagem', NULL, 0, 0), (383, 'Index', 'mensagem', 'index', 0, 0), (384, 'Save', 'mensagem', 'save', 0, 0), (385, 'Delete', 'mensagem', 'delete', 0, 0), (386, 'View', 'mensagem', 'view', 0, 0), (387, 'Setor', 'setor', NULL, 0, 0), (388, 'Index', 'setor', 'index', 0, 0), (389, 'Save', 'setor', 'save', 0, 0), (390, 'Delete', 'setor', 'delete', 0, 0), (391, 'Funcionario', 'funcionario', NULL, 0, 0), (392, 'Index', 'funcionario', 'index', 0, 0), (393, 'Save', 'funcionario', 'save', 0, 0), (394, 'Delete', 'funcionario', 'delete', 0, 0), (395, 'Performance', 'performance', NULL, 0, 0), (396, 'Index', 'performance', 'index', 0, 0), (397, 'Save', 'performance', 'save', 0, 0), (398, 'Delete', 'performance', 'delete', 0, 0), (399, 'Lucratividade', 'relatorio', 'lucratividade', 0, 0), (400, 'Despesas Por Corretor', 'relatorio', 'despesas-por-corretor', 0, 0), (401, 'Despesas Por Funcionario', 'relatorio', 'despesas-por-funcionario', 0, 0), (402, 'Analise Horizontal', 'relatorio', 'analise-horizontal', 0, 0), (403, 'Exportar Para Tabela', 'comissionamento-corretor', 'exportar-para-tabela', 0, 0), (404, 'Opcoes', 'comissionamento-corretor', 'opcoes', 0, 0), (405, 'Previa Recebimento', 'contrato', 'previa-recebimento', 0, 0), (406, 'Excluir Contratos Corrigir', 'contrato', 'excluir-contratos-corrigir', 0, 0), (407, 'Update Itens', 'receita', 'update-itens', 0, 0), (408, 'Importar Extrato', 'financeiro', 'importar-extrato', 0, 0), (409, 'Extrato Para Analise', 'financeiro', 'extrato-para-analise', 0, 0), (410, 'Setar Importado', 'financeiro', 'setar-importado', 0, 0), (411, 'Associar Lancamento', 'financeiro', 'associar-lancamento', 0, 0), (412, 'Setar Lancamento Extrato', 'financeiro', 'setar-lancamento-extrato', 0, 0), (413, 'Digitado', 'proposta', 'digitado', 0, 0), (414, 'Metas', 'gerente', 'metas', 0, 0), (415, 'Delete Meta', 'gerente', 'delete-meta', 0, 0), (416, 'Tipos De Operacao', 'relatorio', 'tipos-de-operacao', 0, 0), (417, 'Alterar Estornado', 'contrato', 'alterar-estornado', 0, 0), (418, 'Resetar Varios', 'callcenter-base', 'resetar-varios', 0, 0), (419, 'Excluir Selecionados', 'contrato', 'excluir-selecionados', 0, 0), (420, 'Telefones', 'consulta', 'telefones', 0, 0), (421, 'Quitar Protocolos', 'financeiro', 'quitar-protocolos', 0, 0), (422, 'Executa Quitar Protocolos', 'financeiro', 'executa-quitar-protocolos', 0, 0), (423, 'Protocolos Quitados', 'financeiro', 'protocolos-quitados', 0, 0), (424, 'Importar Ted Devolvida', 'contrato', 'importar-ted-devolvida', 0, 0), (425, 'Importar Op Sacada', 'contrato', 'importar-op-sacada', 0, 0), (426, 'Imposto', 'relatorio', 'imposto', 0, 0), (427, 'Producao Corretor', 'relatorio', 'producao-corretor', 0, 0), (428, 'visualizar-contas-dia', 'visualizar-contas-dia', NULL, 0, 1), (429, 'Sem Producao Corretor', 'relatorio', 'sem-producao-corretor', 0, 0), (430, 'Bonificacao', 'bonificacao', NULL, 0, 0), (431, 'Index', 'bonificacao', 'index', 0, 0), (432, 'Save', 'bonificacao', 'save', 0, 0), (433, 'Delete', 'bonificacao', 'delete', 0, 0), (434, 'Add Convenio', 'bonificacao', 'add-convenio', 0, 0), (435, 'Delete Convenio', 'bonificacao', 'delete-convenio', 0, 0), (436, 'Bonificação', 'relatorio', 'bonificacao', 0, 0), (437, 'Alterar Prazo Comissoes', 'comissionamento-corretor', 'alterar-prazo-comissoes', 0, 0), (438, 'Exportar Para Outros Corretores', 'comissionamento-corretor', 'exportar-para-outros-corretores', 0, 0), (439, 'Executar Exportacao', 'comissionamento-corretor', 'executar-exportacao', 0, 0), (440, 'Anexar Comprovante Pagamento', 'financeiro', 'anexar-comprovante-pagamento', 0, 0), (441, 'Service', 'service', NULL, 0, 0), (442, 'Index', 'service', 'index', 0, 0), (443, 'Proposta', 'service', 'proposta', 0, 0), (444, 'Combos', 'service', 'combos', 0, 0), (445, 'Consultar ops disponíveis', 'corretor', 'op-sacada', 0, 0), (446, 'Comissionamento Grupo', 'comissionamento-grupo', NULL, 0, 0), (447, 'Index', 'comissionamento-grupo', 'index', 0, 0), (448, 'Save', 'comissionamento-grupo', 'save', 0, 0), (449, 'Delete', 'comissionamento-grupo', 'delete', 0, 0), (450, 'Add Comissao', 'comissionamento-grupo', 'add-comissao', 0, 0), (451, 'Delete Comissao', 'comissionamento-grupo', 'delete-comissao', 0, 0), (452, 'Exportar', 'comissionamento-grupo', 'exportar', 0, 0), (453, 'Executar Exportar Comissoes', 'comissionamento-grupo', 'executar-exportar-comissoes', 0, 0), (454, 'Selecionar Corretores', 'comissionamento-grupo', 'selecionar-corretores', 0, 0), (455, 'Atualizar Comissao Contratos', 'comissionamento-grupo', 'atualizar-comissao-contratos', 0, 0), (456, 'Executar Atualizar Comissoes', 'comissionamento-grupo', 'executar-atualizar-comissoes', 0, 0), (457, 'Atualiza Data Final', 'comissionamento-grupo', 'atualiza-data-final', 0, 0), (458, 'Associar Comissao Grupo', 'comissionamento-grupo', 'associar-comissao-grupo', 0, 0), (459, 'Atualizar Comissoes', 'comissionamento-grupo', 'atualizar-comissoes', 0, 0), (460, 'Exportar Para Tabela', 'comissionamento-grupo', 'exportar-para-tabela', 0, 0), (461, 'Exportar Para Outros Corretores', 'comissionamento-grupo', 'exportar-para-outros-corretores', 0, 0), (462, 'Executar Exportacao', 'comissionamento-grupo', 'executar-exportacao', 0, 0), (463, 'Opcoes', 'comissionamento-grupo', 'opcoes', 0, 0), (464, 'Excluir Protocolo Envio', 'contrato', 'excluir-protocolo-envio', 0, 0), (465, 'Executar Exclusao Protocolo Envio', 'contrato', 'executar-exclusao-protocolo-envio', 0, 0), (466, 'Taxas Transferencia', 'banco', 'taxas-transferencia', 0, 0), (467, 'Visualizar o saldo atual do corretor (financeiro)', 'corretor', 'get-saldo-atual-corretor', 0, 0), (468, 'Saldos', 'financeiro', 'saldos', 0, 0), (469, 'Base', 'callcenter-relatorios', 'base', 0, 0), (470, 'Notificar Ted Devolvida', 'contrato', 'notificar-ted-devolvida', 0, 0), (471, 'Notificar Op Disponivel', 'contrato', 'notificar-op-disponivel', 0, 0), (472, 'Notificiar Ted Devolvida', 'contrato', 'notificiar-ted-devolvida', 0, 0), (473, 'Visualizar aniversariantes do dia', 'visualizar-aniversariantes-do-dia', NULL, 0, 1), (474, 'Index', 'conta', 'index', 0, 0), (487, 'Autenticação de usuários', 'auth', NULL, 0, 0), (488, 'Login', 'auth', 'login', 0, 0), (489, 'Logout', 'auth', 'logout', 0, 0), (490, 'Metas', 'gerente-rota', 'metas', 0, 0), (491, 'Delete Meta', 'gerente-rota', 'delete-meta', 0, 0), (492, 'Sincronizar Bradesco', 'sincronizacao', 'sincronizar-bradesco', 0, 0), (493, 'Baixar Pagamento Teste', 'contrato', 'baixar-pagamento-teste', 0, 0), (494, 'View Protocolo', 'contrato', 'view-protocolo', 0, 0), (495, 'Edit Protocolo', 'contrato', 'edit-protocolo', 0, 0), (496, 'Pagar Comissao Teste', 'financeiro', 'pagar-comissao-teste', 0, 0), (497, 'Debitos Corretor', 'relatorio', 'debitos-corretor', 0, 0), (498, 'Debitos Corretores', 'relatorio', 'debitos-corretores', 0, 0), (499, 'View Protocolos', 'contrato', 'view-protocolos', 0, 0), (500, 'Sincronizar Bon Sucesso', 'sincronizacao', 'sincronizar-bon-sucesso', 0, 0), (501, 'Localizar Arquivos Bon Sucesso', 'sincronizacao', 'localizar-arquivos-bon-sucesso', 0, 0), (502, 'Add Ftp', 'corretor', 'add-ftp', 0, 0), (503, 'Delete Ftp', 'corretor', 'delete-ftp', 0, 0), (504, 'Add Ftp', 'empresa', 'add-ftp', 0, 0), (505, 'Delete Ftp', 'empresa', 'delete-ftp', 0, 0), (506, 'Sincronizar Bonsucesso', 'sincronizacao', 'sincronizar-bonsucesso', 0, 0), (507, 'Localizar Arquivos Bonsucesso', 'sincronizacao', 'localizar-arquivos-bonsucesso', 0, 0), (508, 'Add Ftp', 'parceiro', 'add-ftp', 0, 0), (509, 'Delete Ftp', 'parceiro', 'delete-ftp', 0, 0), (510, 'Importar Arquivo Bonsucesso', 'sincronizacao', 'importar-arquivo-bonsucesso', 0, 0), (511, 'Edit Ftp', 'empresa', 'edit-ftp', 0, 0), (512, 'Conferencia Comissao Corretor', 'relatorio', 'conferencia-comissao-corretor', 0, 0); INSERT INTO `tb_permissoes` (`id`, `resource_id`, `grupo_id`, `allow`, `excluido`) VALUES (1, 301, 1, 1, 0), (2, 15, 1, 0, 0), (3, 13, 1, 0, 0), (418, 75, 1, 1, 0), (419, 78, 1, 1, 0), (420, 76, 1, 1, 0), (421, 77, 1, 1, 0), (422, 324, 1, 1, 0), (423, 328, 1, 1, 0), (424, 330, 1, 1, 0), (425, 327, 1, 1, 0), (426, 329, 1, 1, 0), (427, 325, 1, 1, 0), (428, 326, 1, 1, 0), (429, 161, 1, 1, 0), (430, 166, 1, 1, 0), (431, 165, 1, 1, 0), (432, 177, 1, 1, 0), (433, 176, 1, 1, 0), (434, 167, 1, 1, 0), (435, 171, 1, 1, 0), (436, 170, 1, 1, 0), (437, 163, 1, 1, 0), (438, 172, 1, 1, 0), (439, 162, 1, 1, 0), (440, 168, 1, 1, 0), (441, 173, 1, 1, 0), (442, 174, 1, 1, 0), (443, 164, 1, 1, 0), (444, 169, 1, 1, 0), (445, 175, 1, 1, 0), (446, 262, 1, 1, 0), (447, 269, 1, 1, 0), (448, 270, 1, 1, 0), (449, 267, 1, 1, 0), (450, 266, 1, 1, 0), (451, 265, 1, 1, 0), (452, 271, 1, 1, 0), (453, 272, 1, 1, 0), (454, 263, 1, 1, 0), (455, 268, 1, 1, 0), (456, 264, 1, 1, 0), (457, 116, 1, 1, 0), (458, 125, 1, 1, 0), (459, 124, 1, 1, 0), (460, 123, 1, 1, 0), (461, 122, 1, 1, 0), (462, 129, 1, 1, 0), (463, 119, 1, 1, 0), (464, 126, 1, 1, 0), (465, 127, 1, 1, 0), (466, 121, 1, 1, 0), (467, 128, 1, 1, 0), (468, 120, 1, 1, 0), (469, 117, 1, 1, 0), (470, 118, 1, 1, 0), (471, 44, 1, 1, 0), (472, 50, 1, 1, 0), (473, 49, 1, 1, 0), (474, 48, 1, 1, 0), (475, 47, 1, 1, 0), (476, 45, 1, 1, 0), (477, 46, 1, 1, 0), (478, 191, 1, 1, 0), (479, 194, 1, 1, 0), (480, 192, 1, 1, 0), (481, 193, 1, 1, 0), (482, 248, 1, 1, 0), (483, 251, 1, 1, 0), (484, 254, 1, 1, 0), (485, 249, 1, 1, 0), (486, 252, 1, 1, 0), (487, 253, 1, 1, 0), (488, 250, 1, 1, 0), (489, 100, 1, 1, 0), (490, 103, 1, 1, 0), (491, 101, 1, 1, 0), (492, 102, 1, 1, 0), (493, 132, 1, 1, 0), (494, 136, 1, 1, 0), (495, 133, 1, 1, 0), (496, 135, 1, 1, 0), (497, 134, 1, 1, 0), (498, 104, 1, 1, 0), (499, 108, 1, 1, 0), (500, 115, 1, 1, 0), (501, 113, 1, 1, 0), (502, 107, 1, 1, 0), (503, 109, 1, 1, 0), (504, 114, 1, 1, 0), (505, 111, 1, 1, 0), (506, 110, 1, 1, 0), (507, 105, 1, 1, 0), (508, 106, 1, 1, 0), (509, 112, 1, 1, 0), (510, 277, 1, 1, 0), (511, 281, 1, 1, 0), (512, 288, 1, 1, 0), (513, 286, 1, 1, 0), (514, 280, 1, 1, 0), (515, 282, 1, 1, 0), (516, 287, 1, 1, 0), (517, 284, 1, 1, 0), (518, 283, 1, 1, 0), (519, 278, 1, 1, 0), (520, 279, 1, 1, 0), (521, 285, 1, 1, 0), (522, 40, 1, 1, 0), (523, 41, 1, 1, 0), (524, 42, 1, 1, 0), (525, 43, 1, 1, 0), (526, 1, 1, 1, 0), (527, 4, 1, 1, 0), (529, 3, 1, 1, 0), (530, 195, 1, 1, 0), (531, 225, 1, 1, 0), (532, 207, 1, 1, 0), (533, 205, 1, 1, 0), (534, 203, 1, 1, 0), (535, 200, 1, 1, 0), (536, 227, 1, 1, 0), (537, 219, 1, 1, 0), (538, 201, 1, 1, 0), (539, 234, 1, 1, 0), (540, 198, 1, 1, 0), (541, 204, 1, 1, 0), (542, 213, 1, 1, 0), (543, 231, 1, 1, 0), (544, 226, 1, 1, 0), (545, 232, 1, 1, 0), (546, 215, 1, 1, 0), (547, 229, 1, 1, 0), (548, 221, 1, 1, 0), (549, 233, 1, 1, 0), (550, 216, 1, 1, 0), (551, 230, 1, 1, 0), (552, 222, 1, 1, 0), (553, 209, 1, 1, 0), (554, 210, 1, 1, 0), (555, 206, 1, 1, 0), (556, 218, 1, 1, 0), (557, 217, 1, 1, 0), (558, 214, 1, 1, 0), (559, 237, 1, 1, 0), (560, 236, 1, 1, 0), (561, 208, 1, 1, 0), (562, 228, 1, 1, 0), (563, 220, 1, 1, 0), (564, 235, 1, 1, 0), (565, 196, 1, 1, 0), (566, 211, 1, 1, 0), (567, 223, 1, 1, 0), (568, 202, 1, 1, 0), (569, 197, 1, 1, 0), (570, 199, 1, 1, 0), (571, 224, 1, 1, 0), (572, 212, 1, 1, 0), (573, 238, 1, 1, 0), (574, 241, 1, 1, 0), (575, 242, 1, 1, 0), (576, 239, 1, 1, 0), (577, 240, 1, 1, 0), (578, 5, 1, 1, 0), (579, 18, 1, 1, 0), (580, 9, 1, 1, 0), (581, 11, 1, 1, 0), (582, 24, 1, 1, 0), (583, 8, 1, 1, 0), (584, 19, 1, 1, 0), (585, 10, 1, 1, 0), (586, 12, 1, 1, 0), (587, 14, 1, 1, 0), (588, 21, 1, 1, 0), (589, 6, 1, 1, 0), (590, 20, 1, 1, 0), (591, 16, 1, 0, 0), (592, 22, 1, 0, 0), (593, 7, 1, 1, 0), (594, 23, 1, 1, 0), (595, 25, 1, 1, 0), (596, 17, 1, 1, 0), (597, 87, 1, 1, 0), (598, 89, 1, 1, 0), (599, 92, 1, 1, 0), (600, 91, 1, 1, 0), (601, 95, 1, 1, 0), (602, 94, 1, 1, 0), (603, 88, 1, 1, 0), (604, 93, 1, 1, 0), (605, 90, 1, 1, 0), (606, 243, 1, 1, 0), (607, 246, 1, 1, 0), (608, 247, 1, 1, 0), (609, 244, 1, 1, 0), (610, 245, 1, 1, 0), (611, 130, 1, 1, 0), (612, 131, 1, 1, 0), (613, 137, 1, 1, 0), (614, 141, 1, 1, 0), (615, 144, 1, 1, 0), (616, 143, 1, 1, 0), (617, 146, 1, 1, 0), (618, 138, 1, 1, 0), (619, 142, 1, 1, 0), (620, 145, 1, 1, 0), (621, 140, 1, 1, 0), (622, 149, 1, 1, 0), (623, 148, 1, 1, 0), (624, 147, 1, 1, 0), (625, 139, 1, 1, 0), (626, 313, 1, 1, 0), (627, 316, 1, 1, 0), (628, 314, 1, 1, 0), (629, 315, 1, 1, 0), (630, 96, 1, 1, 0), (631, 99, 1, 1, 0), (632, 97, 1, 1, 0), (633, 98, 1, 1, 0), (634, 183, 1, 1, 0), (635, 186, 1, 1, 0), (636, 184, 1, 1, 0), (637, 185, 1, 1, 0), (638, 62, 1, 1, 0), (639, 66, 1, 1, 0), (640, 65, 1, 1, 0), (641, 67, 1, 1, 0), (642, 63, 1, 1, 0), (643, 64, 1, 1, 0), (644, 51, 1, 1, 0), (645, 54, 1, 1, 0), (646, 55, 1, 1, 0), (647, 52, 1, 1, 0), (648, 53, 1, 1, 0), (649, 36, 1, 1, 0), (650, 39, 1, 1, 0), (651, 37, 1, 1, 0), (652, 38, 1, 1, 0), (653, 56, 1, 1, 0), (654, 60, 1, 1, 0), (655, 59, 1, 1, 0), (656, 57, 1, 1, 0), (657, 61, 1, 1, 0), (658, 58, 1, 1, 0), (659, 26, 1, 1, 0), (660, 27, 1, 1, 0), (661, 28, 1, 1, 0), (662, 30, 1, 1, 0), (663, 29, 1, 1, 0), (664, 187, 1, 1, 0), (665, 190, 1, 1, 0), (666, 188, 1, 1, 0), (667, 189, 1, 1, 0), (668, 273, 1, 1, 0), (669, 276, 1, 1, 0), (670, 274, 1, 1, 0), (671, 275, 1, 1, 0), (672, 150, 1, 1, 0), (673, 153, 1, 1, 0), (674, 156, 1, 1, 0), (675, 155, 1, 1, 0), (676, 154, 1, 1, 0), (677, 151, 1, 1, 0), (678, 152, 1, 1, 0), (679, 317, 1, 1, 0), (680, 322, 1, 1, 0), (681, 321, 1, 1, 0), (682, 323, 1, 1, 0), (683, 318, 1, 1, 0), (684, 320, 1, 1, 0), (685, 319, 1, 1, 0), (686, 31, 1, 1, 0), (687, 33, 1, 1, 0), (688, 35, 1, 1, 0), (689, 32, 1, 1, 0), (690, 34, 1, 1, 0), (691, 289, 1, 1, 0), (692, 295, 1, 1, 0), (693, 294, 1, 1, 0), (694, 303, 1, 1, 0), (695, 305, 1, 1, 0), (696, 304, 1, 1, 0), (697, 308, 1, 1, 0), (698, 297, 1, 1, 0), (699, 293, 1, 1, 0), (700, 311, 1, 1, 0), (701, 302, 1, 1, 0), (702, 300, 1, 1, 0), (703, 290, 1, 1, 0), (704, 299, 1, 1, 0), (705, 291, 1, 1, 0), (706, 312, 1, 1, 0), (707, 292, 1, 1, 0), (708, 310, 1, 1, 0), (709, 307, 1, 1, 0), (710, 306, 1, 1, 0), (711, 309, 1, 1, 0), (712, 298, 1, 1, 0), (713, 296, 1, 1, 0), (714, 178, 1, 1, 0), (715, 181, 1, 1, 0), (716, 182, 1, 1, 0), (717, 179, 1, 1, 0), (718, 180, 1, 1, 0), (719, 255, 1, 1, 0), (720, 261, 1, 1, 0), (721, 257, 1, 1, 0), (722, 260, 1, 1, 0), (723, 258, 1, 1, 0), (724, 256, 1, 1, 0), (725, 259, 1, 1, 0), (726, 157, 1, 1, 0), (727, 160, 1, 1, 0), (728, 158, 1, 1, 0), (729, 159, 1, 1, 0), (730, 79, 1, 1, 0), (731, 82, 1, 1, 0), (732, 85, 1, 1, 0), (733, 83, 1, 1, 0), (734, 86, 1, 1, 0), (735, 80, 1, 1, 0), (736, 81, 1, 1, 0), (737, 84, 1, 1, 0), (738, 68, 1, 1, 0), (739, 71, 1, 1, 0), (740, 69, 1, 1, 0), (741, 70, 1, 1, 0), (801, 332, 1, 0, 0), (802, 339, 1, 1, 0), (803, 338, 1, 1, 0), (804, 333, 1, 0, 0), (805, 340, 1, 1, 0), (806, 336, 1, 1, 0), (807, 334, 1, 1, 0), (808, 335, 1, 1, 0), (809, 337, 1, 1, 0), (1149, 341, 1, 1, 0), (1150, 342, 1, 1, 0), (1151, 343, 1, 1, 0), (1152, 344, 1, 1, 0), (1483, 345, 1, 1, 0), (1484, 346, 1, 1, 0), (1485, 347, 1, 1, 0), (1486, 348, 1, 1, 0), (1487, 349, 1, 1, 0), (1488, 350, 1, 1, 0), (1489, 352, 1, 1, 0), (1490, 351, 1, 1, 0), (1491, 354, 1, 1, 0), (1492, 353, 1, 1, 0), (1493, 355, 1, 1, 0), (1494, 356, 1, 1, 0), (1495, 357, 1, 1, 0), (1496, 358, 1, 1, 0), (1497, 359, 1, 1, 0), (1498, 360, 1, 1, 0), (1499, 361, 1, 1, 0), (1500, 362, 1, 1, 0), (1501, 363, 1, 1, 0), (1502, 364, 1, 1, 0), (1503, 365, 1, 1, 0), (1504, 369, 1, 1, 0), (1505, 367, 1, 1, 0), (1506, 366, 1, 1, 0), (1507, 370, 1, 1, 0), (1508, 368, 1, 1, 0), (1509, 371, 1, 1, 0), (1541, 373, 1, 1, 0), (1542, 372, 1, 1, 0), (1543, 374, 1, 1, 0), (1544, 375, 1, 1, 0), (1545, 377, 1, 1, 0), (1546, 376, 1, 1, 0), (1585, 378, 1, 1, 0), (1586, 379, 1, 1, 0), (1587, 380, 1, 1, 0), (1588, 381, 1, 1, 0), (1589, 382, 1, 1, 0), (1590, 385, 1, 1, 0), (1591, 383, 1, 1, 0), (1592, 384, 1, 1, 0), (1593, 386, 1, 1, 0), (1594, 391, 1, 1, 0), (1595, 394, 1, 1, 0), (1596, 392, 1, 1, 0), (1597, 393, 1, 1, 0), (1598, 395, 1, 1, 0), (1599, 398, 1, 1, 0), (1600, 396, 1, 1, 0), (1601, 397, 1, 1, 0), (1602, 387, 1, 1, 0), (1603, 390, 1, 1, 0), (1604, 388, 1, 1, 0), (1605, 389, 1, 1, 0), (1606, 399, 1, 1, 0), (1607, 400, 1, 1, 0), (1608, 401, 1, 1, 0), (1609, 402, 1, 1, 0), (1610, 403, 1, 1, 0), (1611, 404, 1, 1, 0), (1612, 405, 1, 1, 0), (1613, 406, 1, 1, 0), (1614, 407, 1, 1, 0), (1615, 409, 1, 1, 0), (1616, 408, 1, 1, 0), (1617, 411, 1, 1, 0), (1618, 410, 1, 1, 0), (1619, 412, 1, 1, 0), (1620, 413, 1, 1, 0), (1621, 414, 1, 1, 0), (1622, 415, 1, 1, 0), (1623, 416, 1, 1, 0), (1663, 417, 1, 1, 0), (1664, 418, 1, 1, 0), (1665, 419, 1, 1, 0), (1666, 420, 1, 1, 0), (1667, 422, 1, 1, 0), (1668, 423, 1, 1, 0), (1669, 421, 1, 1, 0), (1670, 425, 1, 1, 0), (1671, 424, 1, 1, 0), (1672, 426, 1, 1, 0), (1684, 427, 1, 1, 0), (1685, 428, 1, 1, 0), (1686, 429, 1, 1, 0), (1689, 430, 1, 1, 0), (1690, 434, 1, 1, 0), (1691, 433, 1, 1, 0), (1692, 435, 1, 1, 0), (1693, 431, 1, 1, 0), (1694, 432, 1, 1, 0), (1695, 436, 1, 1, 0), (1696, 437, 1, 1, 0), (1697, 438, 1, 1, 0), (1698, 439, 1, 1, 0), (1699, 440, 1, 1, 0), (1700, 441, 1, 0, 0), (1701, 444, 1, 0, 0), (1702, 442, 1, 0, 0), (1703, 443, 1, 0, 0), (1720, 446, 1, 1, 0), (1721, 450, 1, 1, 0), (1722, 458, 1, 1, 0), (1723, 457, 1, 1, 0), (1724, 455, 1, 1, 0), (1725, 459, 1, 1, 0), (1726, 449, 1, 1, 0), (1727, 451, 1, 1, 0), (1728, 456, 1, 1, 0), (1729, 462, 1, 1, 0), (1730, 453, 1, 1, 0), (1731, 452, 1, 1, 0), (1732, 461, 1, 1, 0), (1733, 460, 1, 1, 0), (1734, 447, 1, 1, 0), (1735, 463, 1, 1, 0), (1736, 448, 1, 1, 0), (1737, 454, 1, 1, 0), (1738, 445, 1, 0, 0), (2176, 464, 1, 1, 0), (2177, 465, 1, 1, 0), (2178, 466, 1, 1, 0), (2179, 467, 1, 1, 0), (2180, 468, 1, 1, 0), (2181, 469, 1, 1, 0), (2182, 471, 1, 1, 0), (2183, 470, 1, 1, 0), (2184, 472, 1, 1, 0), (2185, 473, 1, 1, 0), (2190, 487, 1, 1, 0), (2191, 488, 1, 1, 0), (2192, 489, 1, 1, 0), (2193, 490, 1, 1, 0), (2194, 491, 1, 1, 0), (2195, 474, 1, 1, 0), (2196, 492, 1, 1, 0), (2197, 493, 1, 0, 0), (2198, 494, 1, 1, 0), (2199, 495, 1, 1, 0), (2200, 496, 1, 1, 0), (2201, 497, 1, 1, 0), (2202, 498, 1, 1, 0), (2203, 499, 1, 1, 0), (3600, 501, 1, 1, 0), (3601, 502, 1, 1, 0), (3602, 503, 1, 1, 0), (3603, 504, 1, 1, 0), (3604, 505, 1, 1, 0), (3605, 506, 1, 1, 0), (3606, 507, 1, 1, 0), (3607, 508, 1, 1, 0), (3608, 509, 1, 1, 0), (3609, 510, 1, 1, 0), (3610, 511, 1, 1, 0), (3611, 512, 1, 1, 0); INSERT INTO `tb_tipos` (`id`, `descricao`, `tipo`, `codigo`, `parent_id`, `excluido`) VALUES (3, 'BOLETO', 'FORMA_PAGAMENTO', NULL, NULL, 0), (4, 'CHEQUE', 'FORMA_PAGAMENTO', NULL, NULL, 0), (5, 'ESPÉCIE', 'FORMA_PAGAMENTO', NULL, NULL, 0), (6, 'DEPÓSITO', 'FORMA_PAGAMENTO', NULL, NULL, 0), (7, 'TRANSFERÊNCIA', 'FORMA_PAGAMENTO', NULL, NULL, 0), (34, 'Aguardando Exclusão', 'STATUS_PROPOSTA', 25, NULL, 0), (35, 'Em Análise', 'STATUS_PROPOSTA', 15, NULL, 0), (36, 'Pré-Aprovado', 'STATUS_PROPOSTA', 26, NULL, 0), (37, 'Aguardando Pre-Averbação', 'STATUS_PROPOSTA', 22, NULL, 0), (38, 'Pré-Averbado', 'STATUS_PROPOSTA', 24, NULL, 0), (39, 'Aprovada Averbação', 'STATUS_PROPOSTA', 27, NULL, 0), (40, 'Aguardando Aprovação de Pgto', 'STATUS_PROPOSTA', 17, NULL, 0), (41, 'Pagamento Aprovado', 'STATUS_PROPOSTA', 23, NULL, 0), (42, 'Pagamento Enviado', 'STATUS_PROPOSTA', 12, NULL, 0), (43, 'Operação Finalizada', 'STATUS_PROPOSTA', 3, NULL, 0), (44, 'Pendente', 'STATUS_PROPOSTA', 10, NULL, 0), (45, 'Re-análise', 'STATUS_PROPOSTA', 16, NULL, 0), (46, 'Aprovada', 'STATUS_PROPOSTA', 13, NULL, 0), (47, 'Aguardando Averbação', 'STATUS_PROPOSTA', 6, NULL, 0), (48, 'Averbado', 'STATUS_PROPOSTA', 19, NULL, 0), (49, 'Recusado DataPrev', 'STATUS_PROPOSTA', 20, NULL, 0), (50, 'Aprovada Envio Agendado', 'STATUS_PROPOSTA', 21, NULL, 0), (51, 'Fora Alçada', 'STATUS_PROPOSTA', 18, NULL, 0), (52, 'Validação de quitação', 'STATUS_PROPOSTA', 28, NULL, 0), (53, 'Cancelada', 'STATUS_PROPOSTA', 7, NULL, 0), (57, 'RECIBO', 'FORMA_PAGAMENTO', NULL, NULL, 0), (58, 'DÉBITO EM CONTA', 'FORMA_PAGAMENTO', NULL, NULL, 0), (63, 'Excluir DataPrev', 'STATUS_PROPOSTA', 29, NULL, 0), (64, 'Excluída DataPrev', 'STATUS_PROPOSTA', 11, NULL, 0), (65, 'Recusada Exclusão DataPrev', 'STATUS_PROPOSTA', 30, NULL, 0), (66, 'Digitado', 'STATUS_PROPOSTA', 1, NULL, 0), (67, 'Liberado sem físico', 'STATUS_PROPOSTA', 2, NULL, 0), (68, 'Digitado sem físico', 'STATUS_PROPOSTA', 4, NULL, 0), (69, 'Redigitado', 'STATUS_PROPOSTA', 5, NULL, 0), (70, 'Digitado pelo corretor', 'STATUS_PROPOSTA', 8, NULL, 0), (71, 'Liberado por solicitação da filial', 'STATUS_PROPOSTA', 9, NULL, 0), (72, 'Recusada', 'STATUS_PROPOSTA', 14, NULL, 0), (73, 'Aprovado Crivo', 'STATUS_PROPOSTA', 30, NULL, 0), (75, 'Recibo em Análise', 'STATUS_PROPOSTA', 30, NULL, 0), (88, 'VENDA', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (89, 'PROMESSA', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (90, '1º CONTATO', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (91, 'NAO LOCALIZADO', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (92, 'SEM INTERESSE', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (93, 'CONTATO', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (94, 'POS-VENDA', 'CLASSIFICACAO_CONTATO_PROSPECTO', NULL, NULL, 0), (7698, 'CARTAO', 'FORMA_PAGAMENTO', NULL, NULL, 0), (7699, 'BANCO', 'CONTA', NULL, NULL, 0), (7700, 'CAIXA', 'CONTA', NULL, NULL, 0), (7701, 'COFRE', 'CONTA', NULL, NULL, 0), (7702, 'A Corrigir', 'STATUS_PROPOSTA', 30, NULL, 0), (7703, 'NAO ATENDE', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7704, 'FALECIDO', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7705, 'RETORNAR', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7706, 'EFETIVADO', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7707, 'EM ATENDIMENTO', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7708, 'RECEPCIONAR FISICO NA LOJA', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7709, 'NAO PERTURBE', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7710, 'PEGAR FISICO NO CLIENTE', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7711, 'DIGITAR PROPOSTA', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7712, 'RECEPTIVO', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0), (7713, '1', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7714, '2', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7715, '3', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7716, '4', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7717, '5', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7718, '6', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7719, '7', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7720, '8', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7721, '19', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7722, '20', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7723, '21', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7724, '22', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7725, '23', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7726, '24', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7727, '26', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7728, '27', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7729, '28', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7730, '29', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7731, '32', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7732, '33', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7733, '34', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7734, '37', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7735, '38', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7736, '41', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7737, '42', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7738, '43', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7739, '44', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7740, '45', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7741, '46', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7742, '49', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7743, '51', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7744, '52', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7745, '54', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7746, '55', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7747, '56', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7748, '57', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7749, '58', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7750, '59', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7751, '60', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7752, '72', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7753, '78', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7754, '81', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7755, '82', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7756, '83', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7757, '84', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7758, '89', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7759, '92', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7760, '93', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7761, '96', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7762, '1', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7763, '2', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7764, '3', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7765, '4', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7766, '5', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7767, '6', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7768, '7', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7769, '8', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7770, '19', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7771, '20', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7772, '21', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7773, '22', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7774, '23', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7775, '24', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7776, '26', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7777, '27', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7778, '28', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7779, '29', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7780, '32', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7781, '33', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7782, '34', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7783, '37', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7784, '38', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7785, '41', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7786, '42', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7787, '43', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7788, '44', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7789, '45', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7790, '46', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7791, '49', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7792, '51', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7793, '52', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7794, '54', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7795, '55', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7796, '56', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7797, '57', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7798, '58', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7799, '59', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7800, '60', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7801, '72', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7802, '78', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7803, '81', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7804, '82', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7805, '83', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7806, '84', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7807, '89', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7808, '92', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7809, '93', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7810, '96', 'ESPECIE_CONSIGNAVEL', NULL, NULL, 0), (7818, 'LIMITE DE RETORNO ATINGIDO', 'CALLCENTER_STATUS_ATENDIMENTO', NULL, NULL, 0); INSERT INTO `tb_usuarios` (`id`, `grupo_id`, `empresa_id`, `corretor_id`, `nome`, `email`, `login`, `senha`, `ramal_login`, `ramal_senha`, `excluido`, `hora_inicio`, `hora_fim`, `dias`) VALUES (1, 1, 1, 0, NULL, NULL, 'yuppie', '1826f463c400e5b6d4830de6dedc3a01', NULL, NULL, 0, '00:00', '23:59', '0,1,2,3,4,5,6');
💾 保存文件
← 返回文件管理器