text: CREATE DATABASE  IF NOT EXISTS `tropicalbears` /*!40100 DEFAULT CHARACTER SET utf8 */;
  USE `tropicalbears`;
  -- MySQL dump 10.13  Distrib 5.7.9, for Win64 (x86_64)
  --
  -- Host: localhost    Database: tropicalbears
  -- ------------------------------------------------------
  -- Server version	5.7.12-log
  
  /*!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 `carrinho`
  --
  
  DROP TABLE IF EXISTS `carrinho`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `carrinho` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `user_id` int(11) DEFAULT NULL,
    `Status` tinyint(1) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `user_id` (`user_id`),
    CONSTRAINT `FKE884462FED8FCB6` FOREIGN KEY (`user_id`) REFERENCES `user` (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `carrinho`
  --
  
  LOCK TABLES `carrinho` WRITE;
  /*!40000 ALTER TABLE `carrinho` DISABLE KEYS */;
  /*!40000 ALTER TABLE `carrinho` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `carrinhoproduto`
  --
  
  DROP TABLE IF EXISTS `carrinhoproduto`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `carrinhoproduto` (
    `carrinho_id` int(11) NOT NULL,
    `produto_id` int(11) NOT NULL,
    KEY `produto_id` (`produto_id`),
    KEY `carrinho_id` (`carrinho_id`),
    CONSTRAINT `FKC78354AC8DEDB585` FOREIGN KEY (`carrinho_id`) REFERENCES `carrinho` (`Id`),
    CONSTRAINT `FKC78354ACAD11B1B9` FOREIGN KEY (`produto_id`) REFERENCES `produto` (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `carrinhoproduto`
  --
  
  LOCK TABLES `carrinhoproduto` WRITE;
  /*!40000 ALTER TABLE `carrinhoproduto` DISABLE KEYS */;
  /*!40000 ALTER TABLE `carrinhoproduto` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `categoria`
  --
  
  DROP TABLE IF EXISTS `categoria`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `categoria` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Nome` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `categoria`
  --
  
  LOCK TABLES `categoria` WRITE;
  /*!40000 ALTER TABLE `categoria` DISABLE KEYS */;
  INSERT INTO `categoria` VALUES (1,'Camisas'),(2,'Acessórios');
  /*!40000 ALTER TABLE `categoria` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `comentario`
  --
  
  DROP TABLE IF EXISTS `comentario`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `comentario` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Texto` varchar(255) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL,
    `produto_id` int(11) DEFAULT NULL,
    `Avaliacao` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `user_id` (`user_id`),
    KEY `produto_id` (`produto_id`),
    CONSTRAINT `FKB0AB54EDAD11B1B9` FOREIGN KEY (`produto_id`) REFERENCES `produto` (`Id`),
    CONSTRAINT `FKB0AB54EDFED8FCB6` FOREIGN KEY (`user_id`) REFERENCES `user` (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `comentario`
  --
  
  LOCK TABLES `comentario` WRITE;
  /*!40000 ALTER TABLE `comentario` DISABLE KEYS */;
  INSERT INTO `comentario` VALUES (1,'                            Muito da hora',1,3,'Bom'),(2,'Bem mais ou menos',1,3,'Ruim'),(6,'Chique demais',1,3,'Bom'),(7,'Melhor que Bacon',1,3,'Bom'),(8,'Wow!!',1,2,'Ruim'),(9,'Great T-Shirt, im buying one for my daughter right now!',1,2,'Bom'),(10,'smells like shit, really sucks! ',1,2,'Ruim'),(11,'NICE!',1,2,'Bom');
  /*!40000 ALTER TABLE `comentario` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `endereco`
  --
  
  DROP TABLE IF EXISTS `endereco`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `endereco` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Descricao` varchar(255) DEFAULT NULL,
    `Logradouro` varchar(255) DEFAULT NULL,
    `Cep` varchar(255) DEFAULT NULL,
    `Bairro` varchar(255) DEFAULT NULL,
    `Numero` varchar(255) DEFAULT NULL,
    `Complemento` varchar(255) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `user_id` (`user_id`),
    CONSTRAINT `FK9E0B468CFED8FCB6` FOREIGN KEY (`user_id`) REFERENCES `user` (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `endereco`
  --
  
  LOCK TABLES `endereco` WRITE;
  /*!40000 ALTER TABLE `endereco` DISABLE KEYS */;
  /*!40000 ALTER TABLE `endereco` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `formapagamento`
  --
  
  DROP TABLE IF EXISTS `formapagamento`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `formapagamento` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Descricao` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `formapagamento`
  --
  
  LOCK TABLES `formapagamento` WRITE;
  /*!40000 ALTER TABLE `formapagamento` DISABLE KEYS */;
  /*!40000 ALTER TABLE `formapagamento` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `imagem`
  --
  
  DROP TABLE IF EXISTS `imagem`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `imagem` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Img` varchar(255) NOT NULL,
    `produto_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `produto_id` (`produto_id`),
    CONSTRAINT `FK3116ACDFAD11B1B9` FOREIGN KEY (`produto_id`) REFERENCES `produto` (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `imagem`
  --
  
  LOCK TABLES `imagem` WRITE;
  /*!40000 ALTER TABLE `imagem` DISABLE KEYS */;
  INSERT INTO `imagem` VALUES (1,'foto1_20170924_144730_.jpg',1),(2,'foto2_20170924_144746_.jpg',2),(3,'foto3_20170924_144756_.jpg',3);
  /*!40000 ALTER TABLE `imagem` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `pesquisa`
  --
  
  DROP TABLE IF EXISTS `pesquisa`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `pesquisa` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `user_id` int(11) DEFAULT NULL,
    `Nome` varchar(255) DEFAULT NULL,
    `PrecoMinimo` double DEFAULT NULL,
    `PrecoMaximo` double DEFAULT NULL,
    `Data` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `user_id` (`user_id`),
    CONSTRAINT `FK389FAE35FED8FCB6` FOREIGN KEY (`user_id`) REFERENCES `user` (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `pesquisa`
  --
  
  LOCK TABLES `pesquisa` WRITE;
  /*!40000 ALTER TABLE `pesquisa` DISABLE KEYS */;
  INSERT INTO `pesquisa` VALUES (1,1,'',0,0,NULL),(2,1,'',0,26,NULL),(3,1,'Camisa',0,0,NULL),(4,1,'Cats',0,25,NULL),(5,1,'Cats',2,41,'2017-09-24 19:35:29');
  /*!40000 ALTER TABLE `pesquisa` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `produto`
  --
  
  DROP TABLE IF EXISTS `produto`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `produto` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `categoria_id` int(11) DEFAULT NULL,
    `subcategoria_id` int(11) DEFAULT NULL,
    `tipo_id` int(11) DEFAULT NULL,
    `Preco` double DEFAULT NULL,
    `Nome` varchar(255) DEFAULT NULL,
    `Descricao` varchar(255) DEFAULT NULL,
    `Promocao` tinyint(1) DEFAULT NULL,
    `PrecoPromocao` double DEFAULT NULL,
    `Estoque` int(11) DEFAULT NULL,
    `CreatedAt` datetime DEFAULT NULL,
    `UpdatedAt` datetime DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `categoria_id` (`categoria_id`),
    KEY `subcategoria_id` (`subcategoria_id`),
    KEY `tipo_id` (`tipo_id`),
    CONSTRAINT `FKAD09A82D910533C3` FOREIGN KEY (`categoria_id`) REFERENCES `categoria` (`Id`),
    CONSTRAINT `FKAD09A82D9375B5E5` FOREIGN KEY (`subcategoria_id`) REFERENCES `subcategoria` (`Id`),
    CONSTRAINT `FKAD09A82D946D3DFB` FOREIGN KEY (`tipo_id`) REFERENCES `tipo` (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `produto`
  --
  
  LOCK TABLES `produto` WRITE;
  /*!40000 ALTER TABLE `produto` DISABLE KEYS */;
  INSERT INTO `produto` VALUES (1,1,NULL,NULL,39.9,'Camisa Lovers','Camisa baseada no filme IT',0,0,5,'2017-09-24 14:46:18','0001-01-01 00:00:00'),(2,1,NULL,NULL,39.9,'Cats','Camisa temática, gatos',0,0,5,'2017-09-24 14:46:40','0001-01-01 00:00:00'),(3,2,NULL,NULL,25.9,'Capa Red Dead','Capa para Iphone 6, Red Dead Redemption',0,0,3,'2017-09-24 14:47:07','0001-01-01 00:00:00');
  /*!40000 ALTER TABLE `produto` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `role`
  --
  
  DROP TABLE IF EXISTS `role`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `role` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Nome` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `role`
  --
  
  LOCK TABLES `role` WRITE;
  /*!40000 ALTER TABLE `role` DISABLE KEYS */;
  INSERT INTO `role` VALUES (1,'Administrador');
  /*!40000 ALTER TABLE `role` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `subcategoria`
  --
  
  DROP TABLE IF EXISTS `subcategoria`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `subcategoria` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Nome` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `subcategoria`
  --
  
  LOCK TABLES `subcategoria` WRITE;
  /*!40000 ALTER TABLE `subcategoria` DISABLE KEYS */;
  /*!40000 ALTER TABLE `subcategoria` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `tipo`
  --
  
  DROP TABLE IF EXISTS `tipo`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `tipo` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Nome` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `tipo`
  --
  
  LOCK TABLES `tipo` WRITE;
  /*!40000 ALTER TABLE `tipo` DISABLE KEYS */;
  /*!40000 ALTER TABLE `tipo` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `user`
  --
  
  DROP TABLE IF EXISTS `user`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `Senha` varchar(255) NOT NULL,
    `Email` varchar(255) NOT NULL,
    `Nome` varchar(255) DEFAULT NULL,
    `Sobrenome` varchar(255) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    UNIQUE KEY `Senha` (`Senha`),
    UNIQUE KEY `Email` (`Email`)
  ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user`
  --
  
  LOCK TABLES `user` WRITE;
  /*!40000 ALTER TABLE `user` DISABLE KEYS */;
  INSERT INTO `user` VALUES (1,'dom0941','admin@admin','admin','admin');
  /*!40000 ALTER TABLE `user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `user_role`
  --
  
  DROP TABLE IF EXISTS `user_role`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `user_role` (
    `user_id` int(11) NOT NULL,
    `role_id` int(11) NOT NULL,
    KEY `role_id` (`role_id`),
    KEY `user_id` (`user_id`),
    CONSTRAINT `FK5E3BB4B3AD526C5D` FOREIGN KEY (`role_id`) REFERENCES `role` (`Id`),
    CONSTRAINT `FK5E3BB4B3FED8FCB6` FOREIGN KEY (`user_id`) REFERENCES `user` (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `user_role`
  --
  
  LOCK TABLES `user_role` WRITE;
  /*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
  INSERT INTO `user_role` VALUES (1,1);
  /*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `venda`
  --
  
  DROP TABLE IF EXISTS `venda`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `venda` (
    `Id` int(11) NOT NULL AUTO_INCREMENT,
    `formapagamento_id` int(11) DEFAULT NULL,
    `endereco_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`Id`),
    KEY `Id` (`Id`),
    KEY `formapagamento_id` (`formapagamento_id`),
    KEY `endereco_id` (`endereco_id`),
    CONSTRAINT `FKEA1C4FB32E37D5AA` FOREIGN KEY (`Id`) REFERENCES `carrinho` (`Id`),
    CONSTRAINT `FKEA1C4FB3A05E7B55` FOREIGN KEY (`formapagamento_id`) REFERENCES `formapagamento` (`Id`),
    CONSTRAINT `FKEA1C4FB3DDC80BB` FOREIGN KEY (`endereco_id`) REFERENCES `endereco` (`Id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `venda`
  --
  
  LOCK TABLES `venda` WRITE;
  /*!40000 ALTER TABLE `venda` DISABLE KEYS */;
  /*!40000 ALTER TABLE `venda` ENABLE KEYS */;
  UNLOCK TABLES;
  /*!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-09-24 19:39:38
  