-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 18/09/2026 às 20:05
-- Versão do servidor: 10.4.32-MariaDB
-- Versão do PHP: 8.2.12

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";


/*!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 utf8mb4 */;

--
-- Banco de dados: `criabancoledfelipe`
--

-- --------------------------------------------------------

--
-- Estrutura para tabela `combinafelipe`
--

CREATE TABLE `combinafelipe` (
  `idcombinafelipe` int(10) UNSIGNED NOT NULL,
  `painelfelipe_idpainelfelipe` int(10) UNSIGNED NOT NULL,
  `macfelipe_idmacfelipe` varchar(17) NOT NULL,
  `ledfelipe_idledfelipe` int(10) UNSIGNED NOT NULL,
  `ledr` int(10) UNSIGNED DEFAULT NULL,
  `ledg` int(10) UNSIGNED DEFAULT NULL,
  `ledb` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Despejando dados para a tabela `combinafelipe`
--

INSERT INTO `combinafelipe` (`idcombinafelipe`, `painelfelipe_idpainelfelipe`, `macfelipe_idmacfelipe`, `ledfelipe_idledfelipe`, `ledr`, `ledg`, `ledb`) VALUES
(1, 1, '98:F4:AB:B4:C0:B5', 1, 255, 0, 0),
(2, 1, '98:F4:AB:B4:C0:B5', 2, 0, 0, 255);

-- --------------------------------------------------------

--
-- Estrutura para tabela `ledfelipe`
--

CREATE TABLE `ledfelipe` (
  `idledfelipe` int(10) UNSIGNED NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `pinor` int(10) UNSIGNED DEFAULT NULL,
  `pinog` int(10) UNSIGNED DEFAULT NULL,
  `pinob` int(10) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Despejando dados para a tabela `ledfelipe`
--

INSERT INTO `ledfelipe` (`idledfelipe`, `nome`, `pinor`, `pinog`, `pinob`) VALUES
(1, 'led1', 5, 6, 7),
(2, 'led2', 10, 11, 12);

-- --------------------------------------------------------

--
-- Estrutura para tabela `macfelipe`
--

CREATE TABLE `macfelipe` (
  `idmacfelipe` varchar(17) NOT NULL,
  `nome` varchar(35) DEFAULT NULL,
  `ativo` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Despejando dados para a tabela `macfelipe`
--

INSERT INTO `macfelipe` (`idmacfelipe`, `nome`, `ativo`) VALUES
('98:F4:AB:B4:C0:B5', 'felipe', 1),
('CC:50:E3:05:19:BA', 'felipe', 1);

-- --------------------------------------------------------

--
-- Estrutura para tabela `painelfelipe`
--

CREATE TABLE `painelfelipe` (
  `idpainelfelipe` int(10) UNSIGNED NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `datainicio` datetime DEFAULT NULL,
  `datafim` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Despejando dados para a tabela `painelfelipe`
--

INSERT INTO `painelfelipe` (`idpainelfelipe`, `nome`, `datainicio`, `datafim`) VALUES
(1, 'aula hoje', '2026-09-17 14:56:39', '2026-09-19 14:56:39');

--
-- Índices para tabelas despejadas
--

--
-- Índices de tabela `combinafelipe`
--
ALTER TABLE `combinafelipe`
  ADD PRIMARY KEY (`idcombinafelipe`),
  ADD KEY `combinafelipe_FKIndex1` (`painelfelipe_idpainelfelipe`),
  ADD KEY `combinafelipe_FKIndex2` (`macfelipe_idmacfelipe`),
  ADD KEY `combinafelipe_FKIndex3` (`ledfelipe_idledfelipe`);

--
-- Índices de tabela `ledfelipe`
--
ALTER TABLE `ledfelipe`
  ADD PRIMARY KEY (`idledfelipe`);

--
-- Índices de tabela `macfelipe`
--
ALTER TABLE `macfelipe`
  ADD PRIMARY KEY (`idmacfelipe`);

--
-- Índices de tabela `painelfelipe`
--
ALTER TABLE `painelfelipe`
  ADD PRIMARY KEY (`idpainelfelipe`);

--
-- AUTO_INCREMENT para tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `combinafelipe`
--
ALTER TABLE `combinafelipe`
  MODIFY `idcombinafelipe` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `ledfelipe`
--
ALTER TABLE `ledfelipe`
  MODIFY `idledfelipe` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `painelfelipe`
--
ALTER TABLE `painelfelipe`
  MODIFY `idpainelfelipe` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Restrições para tabelas despejadas
--

--
-- Restrições para tabelas `combinafelipe`
--
ALTER TABLE `combinafelipe`
  ADD CONSTRAINT `combinafelipe_ibfk_1` FOREIGN KEY (`painelfelipe_idpainelfelipe`) REFERENCES `painelfelipe` (`idpainelfelipe`),
  ADD CONSTRAINT `combinafelipe_ibfk_2` FOREIGN KEY (`macfelipe_idmacfelipe`) REFERENCES `macfelipe` (`idmacfelipe`),
  ADD CONSTRAINT `combinafelipe_ibfk_3` FOREIGN KEY (`ledfelipe_idledfelipe`) REFERENCES `ledfelipe` (`idledfelipe`);
COMMIT;

/*!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 */;
