-- MySQL dump 10.13  Distrib 8.0.36, for Linux (x86_64)
--
-- Host: localhost    Database: fastwaymarketing_duelo
-- ------------------------------------------------------
-- Server version	8.0.36

/*!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 */;
/*!50503 SET NAMES utf8mb4 */;
/*!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 `duelo`
--

DROP TABLE IF EXISTS `duelo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `duelo` (
  `id` int NOT NULL AUTO_INCREMENT,
  `participante_1` int NOT NULL,
  `participante_2` int NOT NULL,
  `tema` int DEFAULT NULL,
  `votos_1` int DEFAULT NULL,
  `votos_2` int DEFAULT NULL,
  `vencedor` int DEFAULT NULL,
  `data` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `participante_1` (`participante_1`),
  KEY `participante_2` (`participante_2`),
  KEY `tema` (`tema`),
  CONSTRAINT `duelo_ibfk_1` FOREIGN KEY (`participante_1`) REFERENCES `participantes` (`id`),
  CONSTRAINT `duelo_ibfk_2` FOREIGN KEY (`participante_2`) REFERENCES `participantes` (`id`),
  CONSTRAINT `duelo_ibfk_3` FOREIGN KEY (`tema`) REFERENCES `tema` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `duelo`
--

LOCK TABLES `duelo` WRITE;
/*!40000 ALTER TABLE `duelo` DISABLE KEYS */;
INSERT INTO `duelo` (`id`, `participante_1`, `participante_2`, `tema`, `votos_1`, `votos_2`, `vencedor`, `data`) VALUES (14,22,21,NULL,NULL,NULL,NULL,NULL),(15,22,21,NULL,NULL,NULL,NULL,NULL),(16,22,26,NULL,NULL,NULL,NULL,NULL),(17,22,26,NULL,NULL,NULL,NULL,NULL),(18,22,26,NULL,NULL,NULL,NULL,NULL),(19,20,26,NULL,NULL,NULL,NULL,NULL),(20,20,21,NULL,NULL,NULL,NULL,NULL),(21,20,21,NULL,NULL,NULL,NULL,NULL),(22,20,21,NULL,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `duelo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `participantes`
--

DROP TABLE IF EXISTS `participantes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `participantes` (
  `id` int NOT NULL AUTO_INCREMENT,
  `nome` varchar(45) NOT NULL,
  `url_foto` varchar(60) DEFAULT NULL,
  `vitorias` int NOT NULL,
  `camp_dia` int NOT NULL DEFAULT '0',
  `duelos` int DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `participantes`
--

LOCK TABLES `participantes` WRITE;
/*!40000 ALTER TABLE `participantes` DISABLE KEYS */;
INSERT INTO `participantes` (`id`, `nome`, `url_foto`, `vitorias`, `camp_dia`, `duelos`) VALUES (17,'Karim','karim.png',0,0,0),(20,'Katia','katia.jpg',0,0,0),(21,'Gleisson','gleisson.jpg',0,0,0),(22,'Giselma','giselma.jpg',0,0,0),(26,'Leonardo','leonardo.jpg',0,0,0),(27,'Gleisson','foto gleisson 2022 fundo laranja.jpeg',0,0,0);
/*!40000 ALTER TABLE `participantes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `tema`
--

DROP TABLE IF EXISTS `tema`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `tema` (
  `id` int NOT NULL AUTO_INCREMENT,
  `tema_1` varchar(60) NOT NULL,
  `tema_2` varchar(60) NOT NULL,
  `visivel` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `tema`
--

LOCK TABLES `tema` WRITE;
/*!40000 ALTER TABLE `tema` DISABLE KEYS */;
INSERT INTO `tema` (`id`, `tema_1`, `tema_2`, `visivel`) VALUES (7,'teste','teste',1),(8,'teste','teste',1);
/*!40000 ALTER TABLE `tema` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'fastwaymarketing_duelo'
--

--
-- Dumping routines for database 'fastwaymarketing_duelo'
--
/*!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 2024-02-06 17:20:10
