-- 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:04
-- 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: `bancopainel`
--

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

--
-- Estrutura para tabela `combinaarthur`
--

CREATE TABLE `combinaarthur` (
  `idcombinaarthur` int(10) UNSIGNED NOT NULL,
  `ledarthur_idledarthur` int(10) UNSIGNED NOT NULL,
  `painelarthur_idpainelarthur` int(10) UNSIGNED NOT NULL,
  `macarthur_idmacarthur` varchar(17) 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 `combinaarthur`
--

INSERT INTO `combinaarthur` (`idcombinaarthur`, `ledarthur_idledarthur`, `painelarthur_idpainelarthur`, `macarthur_idmacarthur`, `ledr`, `ledg`, `ledb`) VALUES
(1, 1, 1, '84:F3:EB:32:26:1D', 0, 255, 0),
(2, 2, 1, '84:F3:EB:32:26:1D', 255, 0, 0),
(3, 2, 2, '84:F3:EB:32:26:1D', 0, 0, 255),
(4, 1, 2, '84:F3:EB:32:26:1D', 255, 255, 255);

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

--
-- Estrutura para tabela `ledarthur`
--

CREATE TABLE `ledarthur` (
  `idledarthur` int(10) UNSIGNED NOT NULL,
  `nome` varchar(35) 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 `ledarthur`
--

INSERT INTO `ledarthur` (`idledarthur`, `nome`, `pinor`, `pinog`, `pinob`) VALUES
(1, 'Led do Arthur', 5, 6, 7),
(2, 'Led da Ana', 10, 11, 12);

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

--
-- Estrutura para tabela `macarthur`
--

CREATE TABLE `macarthur` (
  `idmacarthur` varchar(17) NOT NULL,
  `nome` varchar(50) DEFAULT NULL,
  `ativo` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Despejando dados para a tabela `macarthur`
--

INSERT INTO `macarthur` (`idmacarthur`, `nome`, `ativo`) VALUES
('84:F3:EB:32:26:1D', 'Placa da Dupla Ana e Arthur', 1);

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

--
-- Estrutura para tabela `painelarthur`
--

CREATE TABLE `painelarthur` (
  `idpainelarthur` 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 `painelarthur`
--

INSERT INTO `painelarthur` (`idpainelarthur`, `nome`, `datainicio`, `datafim`) VALUES
(1, 'Painel da aula do dia 18/09', '2026-09-18 14:00:00', '2026-09-18 23:59:59'),
(2, 'Painel da aula do dia 24/09', '2026-09-24 00:00:00', '2026-09-24 23:59:59');

--
-- Índices para tabelas despejadas
--

--
-- Índices de tabela `combinaarthur`
--
ALTER TABLE `combinaarthur`
  ADD PRIMARY KEY (`idcombinaarthur`),
  ADD KEY `combinaarthur_FKIndex1` (`macarthur_idmacarthur`),
  ADD KEY `combinaarthur_FKIndex2` (`painelarthur_idpainelarthur`),
  ADD KEY `combinaarthur_FKIndex3` (`ledarthur_idledarthur`);

--
-- Índices de tabela `ledarthur`
--
ALTER TABLE `ledarthur`
  ADD PRIMARY KEY (`idledarthur`);

--
-- Índices de tabela `macarthur`
--
ALTER TABLE `macarthur`
  ADD PRIMARY KEY (`idmacarthur`);

--
-- Índices de tabela `painelarthur`
--
ALTER TABLE `painelarthur`
  ADD PRIMARY KEY (`idpainelarthur`);

--
-- AUTO_INCREMENT para tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `combinaarthur`
--
ALTER TABLE `combinaarthur`
  MODIFY `idcombinaarthur` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

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

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

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

--
-- Restrições para tabelas `combinaarthur`
--
ALTER TABLE `combinaarthur`
  ADD CONSTRAINT `combinaarthur_ibfk_1` FOREIGN KEY (`macarthur_idmacarthur`) REFERENCES `macarthur` (`idmacarthur`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `combinaarthur_ibfk_2` FOREIGN KEY (`painelarthur_idpainelarthur`) REFERENCES `painelarthur` (`idpainelarthur`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `combinaarthur_ibfk_3` FOREIGN KEY (`ledarthur_idledarthur`) REFERENCES `ledarthur` (`idledarthur`) ON DELETE NO ACTION ON UPDATE NO ACTION;
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 */;
