-- MySQL dump 10.13  Distrib 5.7.12, for Win32 (AMD64)
--
-- Host: 127.0.0.1    Database: indikae
-- ------------------------------------------------------
-- Server version	5.5.5-10.1.19-MariaDB

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `avaliacao`
--

DROP TABLE IF EXISTS `avaliacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `avaliacao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `AVALIACAO` int(11) NOT NULL,
  `OBSERVACAO` varchar(200) DEFAULT NULL,
  `ID_SERVICO` int(11) NOT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_PARTICIPANTE_AVALIACAO_idx` (`ID_PARTICIPANTE`),
  CONSTRAINT `fk_PARTICIPANTE_AVALIACAO` FOREIGN KEY (`ID_PARTICIPANTE`) REFERENCES `participante` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `avaliacao`
--

LOCK TABLES `avaliacao` WRITE;
/*!40000 ALTER TABLE `avaliacao` DISABLE KEYS */;
/*!40000 ALTER TABLE `avaliacao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `bairro`
--

DROP TABLE IF EXISTS `bairro`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bairro` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `BAIRRO` varchar(45) NOT NULL,
  `ID_UF` int(11) DEFAULT NULL,
  `ID_CIDADE` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_UF_BAIRRO_idx` (`ID_UF`),
  KEY `fk_CIDADE_BAIRRO_idx` (`ID_CIDADE`),
  CONSTRAINT `fk_CIDADE_BAIRRO` FOREIGN KEY (`ID_CIDADE`) REFERENCES `cidade` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_UF_BAIRRO` FOREIGN KEY (`ID_UF`) REFERENCES `uf` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `bairro`
--

LOCK TABLES `bairro` WRITE;
/*!40000 ALTER TABLE `bairro` DISABLE KEYS */;
INSERT INTO `bairro` VALUES (1,'Betel',26,4),(2,'Cambui',26,1),(3,'Flamboyant',26,1),(4,'Chácara da Barra',26,1),(5,'Betel',13,7),(6,'Betel',4,2);
/*!40000 ALTER TABLE `bairro` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `categoria_servico`
--

DROP TABLE IF EXISTS `categoria_servico`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `categoria_servico` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `CATEGORIA_SERVICO` varchar(255) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `categoria_servico`
--

LOCK TABLES `categoria_servico` WRITE;
/*!40000 ALTER TABLE `categoria_servico` DISABLE KEYS */;
INSERT INTO `categoria_servico` VALUES (1,'Saúde'),(2,'Educação'),(3,'Obras');
/*!40000 ALTER TABLE `categoria_servico` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cidade`
--

DROP TABLE IF EXISTS `cidade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cidade` (
  `CIDADE` varchar(45) NOT NULL,
  `ID_UF` int(11) NOT NULL,
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `CIDADE_UNIQUE` (`CIDADE`),
  UNIQUE KEY `ID_UNIQUE` (`ID`),
  KEY `fk_UF_CIDADE_idx` (`ID_UF`),
  CONSTRAINT `fk_UF_CIDADE` FOREIGN KEY (`ID_UF`) REFERENCES `uf` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cidade`
--

LOCK TABLES `cidade` WRITE;
/*!40000 ALTER TABLE `cidade` DISABLE KEYS */;
INSERT INTO `cidade` VALUES ('Campinas',26,1),('Curitiba',18,2),('Paulinia',26,4),('São Sebastião',26,6),('Rio de Janeiro',19,7);
/*!40000 ALTER TABLE `cidade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `cupom`
--

DROP TABLE IF EXISTS `cupom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cupom` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DATA` date DEFAULT NULL,
  `DATA_VALIDADE` date DEFAULT NULL,
  `DATA_RETIRADA` date DEFAULT NULL,
  `VALOR` decimal(2,0) DEFAULT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  `ID_TIPO_CUPOM` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_PARTICIPANTE_CUPOM_idx` (`ID_PARTICIPANTE`),
  CONSTRAINT `fk_PARTICIPANTE_CUPOM` FOREIGN KEY (`ID_PARTICIPANTE`) REFERENCES `participante` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `cupom`
--

LOCK TABLES `cupom` WRITE;
/*!40000 ALTER TABLE `cupom` DISABLE KEYS */;
/*!40000 ALTER TABLE `cupom` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `dia_semana`
--

DROP TABLE IF EXISTS `dia_semana`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dia_semana` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DIA_SEMANA` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `dia_semana`
--

LOCK TABLES `dia_semana` WRITE;
/*!40000 ALTER TABLE `dia_semana` DISABLE KEYS */;
INSERT INTO `dia_semana` VALUES (3,'Quarta-feira'),(4,'Segunda-feira'),(5,'Segunda-feira');
/*!40000 ALTER TABLE `dia_semana` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `disponibilidade`
--

DROP TABLE IF EXISTS `disponibilidade`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `disponibilidade` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_DIA_SEMANA` int(11) NOT NULL,
  `HORA_INI` time(2) DEFAULT NULL,
  `HORA_FIM` time(2) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_Disponibilidade_DiaSemana1_idx` (`ID_DIA_SEMANA`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `disponibilidade`
--

LOCK TABLES `disponibilidade` WRITE;
/*!40000 ALTER TABLE `disponibilidade` DISABLE KEYS */;
/*!40000 ALTER TABLE `disponibilidade` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `forma_pagamento`
--

DROP TABLE IF EXISTS `forma_pagamento`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `forma_pagamento` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `FORMA_PAGAMENTO` varchar(45) NOT NULL,
  `OBSERVACAO` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `forma_pagamento`
--

LOCK TABLES `forma_pagamento` WRITE;
/*!40000 ALTER TABLE `forma_pagamento` DISABLE KEYS */;
INSERT INTO `forma_pagamento` VALUES (3,'Cheque','Sob Consulta'),(8,'Boleto','Boleto impresso'),(9,'Cartão Crédito Visa','Informações completas'),(10,'eeee','eeee');
/*!40000 ALTER TABLE `forma_pagamento` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `indicacao`
--

DROP TABLE IF EXISTS `indicacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `indicacao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_QUEM_INDICOU` int(11) NOT NULL,
  `ID_INDICADO` int(11) NOT NULL,
  `DATA_INDICACAO` date NOT NULL,
  `OBSERVACAO` varchar(100) DEFAULT NULL,
  `DATA_ACEITACAO` date DEFAULT NULL,
  `ID_TIPO_SERVICO` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `indicacao`
--

LOCK TABLES `indicacao` WRITE;
/*!40000 ALTER TABLE `indicacao` DISABLE KEYS */;
/*!40000 ALTER TABLE `indicacao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pagamento`
--

DROP TABLE IF EXISTS `pagamento`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pagamento` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `PLANO_FORNECEDOR_ID` int(11) NOT NULL,
  `VALOR_A_PAGAR` decimal(2,0) DEFAULT NULL,
  `DATA_VENCIMENTO` date DEFAULT NULL,
  `VALOR_PAGO` decimal(2,0) DEFAULT NULL,
  `DATA_PAGAMENTO` date DEFAULT NULL,
  `VALOR_DESCONTO` decimal(2,0) DEFAULT NULL,
  `MOTIVO_DESCONTO` varchar(255) DEFAULT NULL,
  `VALOR_JUROS` decimal(2,0) DEFAULT NULL,
  `VALOR_MULTA` decimal(2,0) DEFAULT NULL,
  `DATA_CANCELAMENTO` date DEFAULT NULL,
  `MOTIVO_CANCELAMENTO` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pagamento`
--

LOCK TABLES `pagamento` WRITE;
/*!40000 ALTER TABLE `pagamento` DISABLE KEYS */;
/*!40000 ALTER TABLE `pagamento` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pais`
--

DROP TABLE IF EXISTS `pais`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pais` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `PAIS` varchar(45) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pais`
--

LOCK TABLES `pais` WRITE;
/*!40000 ALTER TABLE `pais` DISABLE KEYS */;
INSERT INTO `pais` VALUES (1,'Brasil');
/*!40000 ALTER TABLE `pais` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `participante`
--

DROP TABLE IF EXISTS `participante`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `participante` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_TIPO_PARTICIPANTE` int(11) NOT NULL,
  `NOME` varchar(45) NOT NULL,
  `EMAIL` varchar(45) NOT NULL,
  `TELEFONE_CELULAR` int(11) NOT NULL,
  `TELEFONE_RESIDENCIAL` int(11) DEFAULT NULL,
  `TIPO_PESSOA` char(1) NOT NULL,
  `CPF` varchar(11) DEFAULT NULL,
  `CNPJ` varchar(14) DEFAULT NULL,
  `ID_REGIAO` int(11) NOT NULL,
  `ENDERECO` varchar(100) NOT NULL,
  `NUMERO` int(11) NOT NULL,
  `COMPLEMENTO` varchar(45) DEFAULT NULL,
  `PONTO_REFERENCIA` varchar(100) DEFAULT NULL,
  `HOMEPAGE` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `idParticipante_UNIQUE` (`ID`),
  KEY `fk_REGIAO_PARTICIPANTE_idx` (`ID_REGIAO`),
  CONSTRAINT `fk_REGIAO_PARTICIPANTE` FOREIGN KEY (`ID_REGIAO`) REFERENCES `regiao` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `participante`
--

LOCK TABLES `participante` WRITE;
/*!40000 ALTER TABLE `participante` DISABLE KEYS */;
/*!40000 ALTER TABLE `participante` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `plano`
--

DROP TABLE IF EXISTS `plano`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `plano` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `PLANO` varchar(45) NOT NULL,
  `DATA_INI` date NOT NULL,
  `DATA_FIM` date DEFAULT NULL,
  `VALOR` decimal(10,0) NOT NULL,
  `BUSCA_SERVICO` char(1) NOT NULL,
  `NRO_SERVICOS` int(11) NOT NULL,
  `NRO_REGIOES` int(11) DEFAULT NULL,
  `VISITA_AUTOM_FORNECEDORES` char(1) NOT NULL,
  `CHAT` char(1) NOT NULL,
  `NRO_CHAT_DIARIO` int(11) DEFAULT NULL,
  `NRO_VISUAL_FORN_DIARIO` int(11) DEFAULT NULL,
  `NRO_LICITACAO_SIMULT` int(11) DEFAULT NULL,
  `AGENDA_DISPONIBILIDADE` char(1) DEFAULT NULL,
  `TERRITORIO_NACIONAL` char(1) DEFAULT NULL,
  `NRO_CLIENTES_LISTA` int(11) DEFAULT NULL,
  `NRO_FORNECEDORES_LISTA` int(11) NOT NULL,
  `ID_POSICAO_ANUNCIO` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `plano`
--

LOCK TABLES `plano` WRITE;
/*!40000 ALTER TABLE `plano` DISABLE KEYS */;
INSERT INTO `plano` VALUES (1,'Bronze','0000-00-00',NULL,10,'S',10,NULL,'','N',0,10,1,'S','N',10,10,0),(2,'Prata','0000-00-00',NULL,30,'S',20,NULL,'','S',10,20,5,'S','S',20,20,0),(3,'Diamante','0000-00-00',NULL,50,'S',30,10,'S','S',20,30,10,'S','S',30,30,0);
/*!40000 ALTER TABLE `plano` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `plano_fornecedor`
--

DROP TABLE IF EXISTS `plano_fornecedor`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `plano_fornecedor` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_PLANO` int(11) NOT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  `DATA_INI` date NOT NULL,
  `DATA_FIM` date NOT NULL,
  `DATA_CANCELAMENTO` date DEFAULT NULL,
  `MOTIVO` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `DATA_FIM_UNIQUE` (`DATA_FIM`),
  UNIQUE KEY `DATA_INI_UNIQUE` (`DATA_INI`),
  UNIQUE KEY `ID_UNIQUE` (`ID`),
  KEY `fk_PlanoFornecedor_Plano1_idx` (`ID_PLANO`),
  KEY `fk_PlanoFornecedor_Participante1_idx` (`ID_PARTICIPANTE`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `plano_fornecedor`
--

LOCK TABLES `plano_fornecedor` WRITE;
/*!40000 ALTER TABLE `plano_fornecedor` DISABLE KEYS */;
/*!40000 ALTER TABLE `plano_fornecedor` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `pontuacao`
--

DROP TABLE IF EXISTS `pontuacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pontuacao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  `ID_TIPO_PONTUACAO` int(11) NOT NULL,
  `DATA` datetime(2) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `pontuacao`
--

LOCK TABLES `pontuacao` WRITE;
/*!40000 ALTER TABLE `pontuacao` DISABLE KEYS */;
/*!40000 ALTER TABLE `pontuacao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `posicao_anuncio`
--

DROP TABLE IF EXISTS `posicao_anuncio`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `posicao_anuncio` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DESCRICAO` varchar(45) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `posicao_anuncio`
--

LOCK TABLES `posicao_anuncio` WRITE;
/*!40000 ALTER TABLE `posicao_anuncio` DISABLE KEYS */;
/*!40000 ALTER TABLE `posicao_anuncio` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `regiao`
--

DROP TABLE IF EXISTS `regiao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `regiao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_UF` int(11) DEFAULT NULL,
  `ID_CIDADE` int(11) DEFAULT NULL,
  `ID_BAIRRO` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_UF_REGIAO_idx` (`ID_UF`),
  KEY `fk_CIDADE_REGIAO_idx` (`ID_CIDADE`),
  KEY `fk_BAIRRO_REGIAO_idx` (`ID_BAIRRO`),
  CONSTRAINT `fk_BAIRRO_REGIAO` FOREIGN KEY (`ID_BAIRRO`) REFERENCES `bairro` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_CIDADE_REGIAO` FOREIGN KEY (`ID_CIDADE`) REFERENCES `cidade` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_UF_REGIAO` FOREIGN KEY (`ID_UF`) REFERENCES `uf` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `regiao`
--

LOCK TABLES `regiao` WRITE;
/*!40000 ALTER TABLE `regiao` DISABLE KEYS */;
INSERT INTO `regiao` VALUES (1,26,4,1),(2,26,1,2),(3,26,1,3);
/*!40000 ALTER TABLE `regiao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `rel_servico_regiao`
--

DROP TABLE IF EXISTS `rel_servico_regiao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rel_servico_regiao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_SERVICO` int(11) NOT NULL,
  `ID_REGIAO` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_REGIAO_REL_idx` (`ID_REGIAO`),
  CONSTRAINT `fk_REGIAO_REL` FOREIGN KEY (`ID_REGIAO`) REFERENCES `regiao` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `rel_servico_regiao`
--

LOCK TABLES `rel_servico_regiao` WRITE;
/*!40000 ALTER TABLE `rel_servico_regiao` DISABLE KEYS */;
/*!40000 ALTER TABLE `rel_servico_regiao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `senha`
--

DROP TABLE IF EXISTS `senha`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `senha` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `SENHA` varchar(45) NOT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  `DATA_INI` date NOT NULL,
  `DATA_FIM` date NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `senha`
--

LOCK TABLES `senha` WRITE;
/*!40000 ALTER TABLE `senha` DISABLE KEYS */;
/*!40000 ALTER TABLE `senha` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `servico`
--

DROP TABLE IF EXISTS `servico`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `servico` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_TIPO_SERVICO` int(11) NOT NULL,
  `ID_DISPONIBILIDADE` int(11) DEFAULT NULL,
  `DISPONIVEL_MOMENTO` char(1) NOT NULL,
  `DATA_RETORNO` date DEFAULT NULL,
  `ATENDE_ENDERECO_FORNECEDOR` char(1) DEFAULT NULL,
  `ATENDE_CLIENTE_DELIVERY` char(1) DEFAULT NULL,
  `LIGUE_GRATIS` char(1) DEFAULT NULL,
  `ESTACIONAMENTO_PROPRIO` char(1) DEFAULT NULL,
  `WIFI_INTERNET` char(1) DEFAULT NULL,
  `SEGURANCA` char(1) DEFAULT NULL,
  `AR_CONDICIONADO` char(1) DEFAULT NULL,
  `ACESSO_PORTADORES` char(1) DEFAULT NULL,
  `TRANSPORTE_LEVA_TRAZ` char(1) DEFAULT NULL,
  `ESPACO_KIDS` char(1) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `servico`
--

LOCK TABLES `servico` WRITE;
/*!40000 ALTER TABLE `servico` DISABLE KEYS */;
/*!40000 ALTER TABLE `servico` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `servico_clicks`
--

DROP TABLE IF EXISTS `servico_clicks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `servico_clicks` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DATA_CLICK` date NOT NULL,
  `ID_SERVICO` int(11) NOT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `servico_clicks`
--

LOCK TABLES `servico_clicks` WRITE;
/*!40000 ALTER TABLE `servico_clicks` DISABLE KEYS */;
/*!40000 ALTER TABLE `servico_clicks` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `servico_views`
--

DROP TABLE IF EXISTS `servico_views`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `servico_views` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `DATA_VIEW` date DEFAULT NULL,
  `ID_SERVICO` int(11) NOT NULL,
  `ID_PARTICIPANTE` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `servico_views`
--

LOCK TABLES `servico_views` WRITE;
/*!40000 ALTER TABLE `servico_views` DISABLE KEYS */;
/*!40000 ALTER TABLE `servico_views` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `subcategoria_servico`
--

DROP TABLE IF EXISTS `subcategoria_servico`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `subcategoria_servico` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `SUBCATEGORIA_SERVICO` varchar(255) NOT NULL,
  `ID_CATEGORIA` int(11) NOT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_CATEGORIA_SUB_idx` (`ID_CATEGORIA`),
  CONSTRAINT `fk_CATEGORIA_SUB` FOREIGN KEY (`ID_CATEGORIA`) REFERENCES `categoria_servico` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `subcategoria_servico`
--

LOCK TABLES `subcategoria_servico` WRITE;
/*!40000 ALTER TABLE `subcategoria_servico` DISABLE KEYS */;
INSERT INTO `subcategoria_servico` VALUES (1,'Fisioterapia',1),(2,'RPG',1),(3,'Aula Inglês',2);
/*!40000 ALTER TABLE `subcategoria_servico` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipo_cupom`
--

DROP TABLE IF EXISTS `tipo_cupom`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_cupom` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO_CUPOM` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipo_cupom`
--

LOCK TABLES `tipo_cupom` WRITE;
/*!40000 ALTER TABLE `tipo_cupom` DISABLE KEYS */;
/*!40000 ALTER TABLE `tipo_cupom` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipo_participante`
--

DROP TABLE IF EXISTS `tipo_participante`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_participante` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO_PARTICIPANTE` varchar(20) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipo_participante`
--

LOCK TABLES `tipo_participante` WRITE;
/*!40000 ALTER TABLE `tipo_participante` DISABLE KEYS */;
INSERT INTO `tipo_participante` VALUES (2,'Prestador'),(7,'Patrocinador'),(8,'Buscador'),(9,'eeee');
/*!40000 ALTER TABLE `tipo_participante` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipo_pontuacao`
--

DROP TABLE IF EXISTS `tipo_pontuacao`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_pontuacao` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO_PONTUACAO` varchar(45) NOT NULL,
  `VALOR` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipo_pontuacao`
--

LOCK TABLES `tipo_pontuacao` WRITE;
/*!40000 ALTER TABLE `tipo_pontuacao` DISABLE KEYS */;
INSERT INTO `tipo_pontuacao` VALUES (2,'Indicação',5.00),(5,'Fornecer Cupom',10.00),(7,'Avaliação',3.00),(8,'Fornecer Desconto',12.00),(10,'eeee',1.00);
/*!40000 ALTER TABLE `tipo_pontuacao` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tipo_servico`
--

DROP TABLE IF EXISTS `tipo_servico`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tipo_servico` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `CATEGORIA_SERVICO` varchar(45) DEFAULT NULL,
  `ID_CATEGORIA_DE` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  KEY `fk_TIPO_SERV_idx` (`ID_CATEGORIA_DE`),
  CONSTRAINT `fk_TIPO_SERV` FOREIGN KEY (`ID_CATEGORIA_DE`) REFERENCES `tipo_servico` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tipo_servico`
--

LOCK TABLES `tipo_servico` WRITE;
/*!40000 ALTER TABLE `tipo_servico` DISABLE KEYS */;
INSERT INTO `tipo_servico` VALUES (1,'Saúde',NULL),(2,'Fisioterapia',1),(3,'RPG',1),(4,'Educação',NULL),(5,'Obras',NULL),(13,'Assistência Técnica',5),(17,'Alimentação',17),(21,'10reg',5),(22,'11reg',17),(23,'testenull',NULL),(24,'testemarcos',NULL),(25,'testemarcos2',NULL),(29,'Novtt',5),(30,'teste',5);
/*!40000 ALTER TABLE `tipo_servico` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `uf`
--

DROP TABLE IF EXISTS `uf`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `uf` (
  `UF` varchar(2) NOT NULL,
  `DESCRICAO` varchar(45) NOT NULL,
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `ID_PAIS` int(11) DEFAULT NULL,
  PRIMARY KEY (`ID`),
  UNIQUE KEY `UF_UNIQUE` (`UF`),
  KEY `fk_UF_PAIS_idx` (`ID_PAIS`),
  CONSTRAINT `fk_UF_PAIS` FOREIGN KEY (`ID_PAIS`) REFERENCES `pais` (`ID`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `uf`
--

LOCK TABLES `uf` WRITE;
/*!40000 ALTER TABLE `uf` DISABLE KEYS */;
INSERT INTO `uf` VALUES ('AT','Acre1',1,1),('AL','Alagoas',2,1),('AM','Amazonas',3,1),('AP','Amapá',4,1),('BA','Bahia',5,1),('CE','Ceará',6,1),('DF','Distrito Federal',7,1),('ES','Espírito Santo',8,1),('GO','Goiás',9,1),('MA','Maranhão',10,1),('MG','Minas Gerais',11,1),('MS','Mato Grosso do Sul',12,1),('MT','Mato Grosso',13,1),('PA','Pará',14,1),('PB','Paraíba',15,1),('PE','Pernambuco',16,1),('PI','Piauí',17,1),('PR','Paraná',18,1),('RJ','Rio de Janeiro',19,1),('RN','Rio Grande do Norte',20,1),('RO','Rondônia',21,1),('RR','Roraima',22,1),('RS','Rio Grande do Sul',23,1),('SC','Santa Catarina',24,1),('SE','Sergipe',25,1),('SP','São Paulo',26,1),('TO','Tocantins',27,1),('NO','Novo',30,NULL),('US','Teste',31,NULL),('F1','Formula1',33,NULL),('ee','eeeeee',34,NULL);
/*!40000 ALTER TABLE `uf` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'indikae'
--

--
-- Dumping routines for database 'indikae'
--
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2017-02-24 17:36:03
