-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 20-10-2026 a las 20:09:49
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de 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 */;

--
-- Base de datos: `projetooswalt2`
--

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

--
-- Estructura de tabla para la tabla `combinaoswalt`
--

CREATE TABLE `combinaoswalt` (
  `idcombinaoswalt` int(10) UNSIGNED NOT NULL,
  `ledoswalt_idledoswalt` int(10) UNSIGNED NOT NULL,
  `paineloswalt_idpaineloswalt` int(10) UNSIGNED NOT NULL,
  `macoswalt_idmacoswalt` 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;

--
-- Volcado de datos para la tabla `combinaoswalt`
--

INSERT INTO `combinaoswalt` (`idcombinaoswalt`, `ledoswalt_idledoswalt`, `paineloswalt_idpaineloswalt`, `macoswalt_idmacoswalt`, `ledr`, `ledg`, `ledb`) VALUES
(1, 1, 1, '38:2B:78:03:A6:32', 255, 0, 0),
(5, 1, 2, '38:2B:78:03:A6:32', 0, 255, 0);

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

--
-- Estructura de tabla para la tabla `ledoswalt`
--

CREATE TABLE `ledoswalt` (
  `idledoswalt` 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;

--
-- Volcado de datos para la tabla `ledoswalt`
--

INSERT INTO `ledoswalt` (`idledoswalt`, `nome`, `pinor`, `pinog`, `pinob`) VALUES
(1, 'Led do oswalt', 5, 6, 7);

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

--
-- Estructura de tabla para la tabla `macoswalt`
--

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

--
-- Volcado de datos para la tabla `macoswalt`
--

INSERT INTO `macoswalt` (`idmacoswalt`, `nome`, `ativo`) VALUES
('38:2B:78:03:A6:32', 'Placa do oswalt', 1);

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

--
-- Estructura de tabla para la tabla `paineloswalt`
--

CREATE TABLE `paineloswalt` (
  `idpaineloswalt` 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;

--
-- Volcado de datos para la tabla `paineloswalt`
--

INSERT INTO `paineloswalt` (`idpaineloswalt`, `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:04', '2026-09-24 23:59:59');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `combinaoswalt`
--
ALTER TABLE `combinaoswalt`
  ADD PRIMARY KEY (`idcombinaoswalt`),
  ADD KEY `combinaoswalt_FKIndex1` (`macoswalt_idmacoswalt`),
  ADD KEY `combinaoswalt_FKIndex2` (`paineloswalt_idpaineloswalt`),
  ADD KEY `combinaoswalt_FKIndex3` (`ledoswalt_idledoswalt`);

--
-- Indices de la tabla `ledoswalt`
--
ALTER TABLE `ledoswalt`
  ADD PRIMARY KEY (`idledoswalt`);

--
-- Indices de la tabla `macoswalt`
--
ALTER TABLE `macoswalt`
  ADD PRIMARY KEY (`idmacoswalt`);

--
-- Indices de la tabla `paineloswalt`
--
ALTER TABLE `paineloswalt`
  ADD PRIMARY KEY (`idpaineloswalt`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `combinaoswalt`
--
ALTER TABLE `combinaoswalt`
  MODIFY `idcombinaoswalt` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de la tabla `ledoswalt`
--
ALTER TABLE `ledoswalt`
  MODIFY `idledoswalt` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `paineloswalt`
--
ALTER TABLE `paineloswalt`
  MODIFY `idpaineloswalt` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `combinaoswalt`
--
ALTER TABLE `combinaoswalt`
  ADD CONSTRAINT `combinaoswalt_ibfk_1` FOREIGN KEY (`macoswalt_idmacoswalt`) REFERENCES `macoswalt` (`idmacoswalt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `combinaoswalt_ibfk_2` FOREIGN KEY (`paineloswalt_idpaineloswalt`) REFERENCES `paineloswalt` (`idpaineloswalt`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `combinaoswalt_ibfk_3` FOREIGN KEY (`ledoswalt_idledoswalt`) REFERENCES `ledoswalt` (`idledoswalt`) 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 */;
