-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Servidor: 127.0.0.1
-- Tiempo de generación: 09-08-2025 a las 21:23:36
-- Versión del servidor: 10.4.32-MariaDB
-- Versión de PHP: 8.0.30

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: `ruleta_db`
--

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

--
-- Estructura de tabla para la tabla `admin_users`
--

CREATE TABLE `admin_users` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `email` varchar(150) NOT NULL,
  `password_hash` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `admin_users` (`id`, `nombre`, `email`, `password_hash`, `created_at`) VALUES
(1, 'Administrador', 'admin@localhost', '$2y$10$14EWwemmWzjU4Vr9fZXvduxHgsfnHrpk5ziLFN3IGJ5Pw5QzSorm6', '2025-08-08 21:23:15');

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

--
-- Estructura de tabla para la tabla `cartas`
--

CREATE TABLE `cartas` (
  `id` int(11) NOT NULL,
  `juego_id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `imagen_frontal` varchar(255) DEFAULT NULL,
  `imagen_trasera` varchar(255) NOT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `cartas` (`id`, `juego_id`, `nombre`, `imagen_frontal`, `imagen_trasera`, `activo`, `created_at`) VALUES
(7, 1, 'carta1', '/ruleta/uploads/memoria/back-6896886e0c5fa.png', '/ruleta/uploads/memoria/img-1-6896886e0c89e.png', 1, '2025-08-08 23:29:50'),
(8, 1, 'carta2', '/ruleta/uploads/memoria/back-689688b64d392.png', '/ruleta/uploads/memoria/img-2-689688b64d806.png', 1, '2025-08-08 23:31:02'),
(9, 2, 'primera', NULL, '/ruleta/uploads/memoria/img-1-689689e0611fb.png', 1, '2025-08-08 23:36:00'),
(10, 2, 'imagen2', NULL, '/ruleta/uploads/memoria/img-2-68968c7021030.png', 1, '2025-08-08 23:46:56'),
(11, 2, 'image3', NULL, '/ruleta/uploads/memoria/img-3-68968ca3dab11.png', 1, '2025-08-08 23:47:47'),
(12, 2, 'imagen4', NULL, '/ruleta/uploads/memoria/img-4-68968cb31a8ad.png', 1, '2025-08-08 23:48:03'),
(13, 2, 'imagen5', NULL, '/ruleta/uploads/memoria/img-5-68968cc1091b2.png', 1, '2025-08-08 23:48:17'),
(14, 2, 'imagen6', NULL, '/ruleta/uploads/memoria/img-6-68968ccee8e67.png', 1, '2025-08-08 23:48:30');

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

--
-- Estructura de tabla para la tabla `juegos_config`
--

CREATE TABLE `juegos_config` (
  `id` int(11) NOT NULL,
  `juego_id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `banner_1` varchar(255) DEFAULT NULL,
  `banner_2` varchar(255) DEFAULT NULL,
  `banner_3` varchar(255) DEFAULT NULL,
  `banner_4` varchar(255) DEFAULT NULL,
  `background_image` varchar(255) DEFAULT NULL,
  `fullscreen_icon` varchar(255) DEFAULT NULL,
  `reverso_default` varchar(255) DEFAULT NULL,
  `ruleta_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `juegos_config` (`id`, `juego_id`, `nombre`, `banner_1`, `banner_2`, `banner_3`, `banner_4`, `background_image`, `fullscreen_icon`, `reverso_default`, `ruleta_id`, `created_at`) VALUES
(2, 2, 'Test', NULL, NULL, NULL, NULL, '/ruleta/uploads/memoria/BANNER-SUPERIOR-GRANDE-68978a66db94e.png', '/ruleta/uploads/memoria/fullscreen-icon-68978a66dc1b1.png', '/ruleta/uploads/memoria/front-68978a66dcac1.jpg', 0, '2025-08-08 23:35:30');

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

--
-- Estructura de tabla para la tabla `jugadas`
--

CREATE TABLE `jugadas` (
  `id` int(11) NOT NULL,
  `ruleta_id` int(11) NOT NULL,
  `premio_id` int(11) DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `fecha_juego` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `jugadas` (`id`, `ruleta_id`, `premio_id`, `ip_address`, `user_agent`, `fecha_juego`) VALUES
(1, 2, 2, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 21:39:31'),
(6, 2, 5, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 21:57:34'),
(7, 2, 5, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 22:01:31'),
(8, 3, 6, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 22:08:40'),
(9, 3, 6, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 22:09:44'),
(10, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 22:27:31'),
(11, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15', '2025-08-08 22:29:41'),
(12, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15', '2025-08-08 22:30:04'),
(13, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15', '2025-08-08 22:41:26'),
(14, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:38:35'),
(15, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:38:53'),
(16, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:39:32'),
(17, 4, 8, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:42:29'),
(18, 4, 8, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:42:39'),
(19, 4, 7, '148.101.50.128', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', '2025-08-08 23:43:58'),
(20, 4, 7, '148.101.50.128', 'Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1', '2025-08-09 17:59:24');

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

--
-- Estructura de tabla para la tabla `jugadas_memoria`
--

CREATE TABLE `jugadas_memoria` (
  `id` int(11) NOT NULL,
  `juego_id` int(11) NOT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `tiempo_ms` int(11) DEFAULT 0,
  `aciertos` int(11) DEFAULT 0,
  `fecha_juego` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `jugadas_memoria` (`id`, `juego_id`, `ip_address`, `user_agent`, `tiempo_ms`, `aciertos`, `fecha_juego`) VALUES
(1, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 12864, 1, '2025-08-08 23:36:28'),
(2, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 8170, 1, '2025-08-08 23:45:59'),
(3, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 14532, 2, '2025-08-08 23:47:15'),
(4, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 38886, 6, '2025-08-08 23:49:16'),
(5, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 1644391, 6, '2025-08-09 14:24:29'),
(6, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 35695, 6, '2025-08-09 14:25:13'),
(7, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 36400, 6, '2025-08-09 14:26:00'),
(8, 2, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 231321, 6, '2025-08-09 17:54:32');

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

--
-- Estructura de tabla para la tabla `jugadas_rasca`
--

CREATE TABLE `jugadas_rasca` (
  `id` int(11) NOT NULL,
  `rasca_id` int(11) NOT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `porcentaje` int(11) DEFAULT 0,
  `premio_id` int(11) DEFAULT NULL,
  `fecha_juego` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `jugadas_rasca` (`id`, `rasca_id`, `ip_address`, `user_agent`, `porcentaje`, `premio_id`, `fecha_juego`) VALUES
(1, 10, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15', 50, 2, '2025-08-09 18:26:37'),
(2, 10, '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.0 Safari/605.1.15', 50, 2, '2025-08-09 18:26:50'),
(3, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 51, 2, '2025-08-09 18:27:29'),
(4, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 51, 2, '2025-08-09 18:27:44'),
(5, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:29:45'),
(6, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:30:24'),
(7, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:31:29'),
(8, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:32:14'),
(9, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 51, 2, '2025-08-09 18:32:36'),
(10, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 51, 2, '2025-08-09 18:35:47'),
(11, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:37:16'),
(12, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 50, 2, '2025-08-09 18:37:45'),
(13, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 2, 2, '2025-08-09 18:39:13'),
(14, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 2, 2, '2025-08-09 18:39:25'),
(15, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 9, 2, '2025-08-09 18:39:50'),
(16, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 5, 2, '2025-08-09 18:40:43'),
(17, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 27, 2, '2025-08-09 18:43:22'),
(18, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 3, 2, '2025-08-09 19:22:04'),
(19, 10, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Safari/537.36', 2, 2, '2025-08-09 19:22:42');

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

--
-- Estructura de tabla para la tabla `premios`
--

CREATE TABLE `premios` (
  `id` int(11) NOT NULL,
  `ruleta_id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `cantidad` int(11) DEFAULT 0,
  `probabilidad` decimal(6,2) NOT NULL DEFAULT 0.00,
  `inicio_angulo` decimal(7,2) NOT NULL DEFAULT 0.00,
  `fin_angulo` decimal(7,2) NOT NULL DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `premios` (`id`, `ruleta_id`, `nombre`, `cantidad`, `probabilidad`, `inicio_angulo`, `fin_angulo`) VALUES
(2, 2, 'Freidora de aire', 0, 1.00, 100.00, 150.00),
(5, 2, 'correa', 98, 1.00, 180.00, 190.00),
(6, 3, 'bono de compra', 8, 1.00, 180.00, 182.00),
(7, 4, 'plancha', 12, 0.75, 180.00, 190.00),
(8, 4, 'Abanico de Piso', 8, 0.25, 15.00, 30.00);

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

--
-- Estructura de tabla para la tabla `rasca_config`
--

CREATE TABLE `rasca_config` (
  `id` int(11) NOT NULL,
  `rasca_id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `ruleta_id` int(11) DEFAULT NULL,
  `banner_1` varchar(255) DEFAULT NULL,
  `banner_2` varchar(255) DEFAULT NULL,
  `banner_3` varchar(255) DEFAULT NULL,
  `banner_4` varchar(255) DEFAULT NULL,
  `background_image` varchar(255) DEFAULT NULL,
  `fullscreen_icon` varchar(255) DEFAULT NULL,
  `fg_image` varchar(255) DEFAULT NULL,
  `bg_image` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `rasca_config` (`id`, `rasca_id`, `nombre`, `ruleta_id`, `banner_1`, `banner_2`, `banner_3`, `banner_4`, `background_image`, `fullscreen_icon`, `fg_image`, `bg_image`, `created_at`) VALUES
(8, 10, 'Test2', NULL, NULL, NULL, NULL, NULL, '/ruleta/uploads/rasca/BANNER-SUPERIOR-GRANDE-689784d6b20a2.png', '/ruleta/uploads/rasca/fullscreen-icon-689784d6b2a9e.png', '/ruleta/uploads/rasca/front-689784d6b3331.jpg', '/ruleta/uploads/rasca/back-68979308bd719.jpg', '2025-08-09 17:26:46');

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

--
-- Estructura de tabla para la tabla `rasca_premios`
--

CREATE TABLE `rasca_premios` (
  `id` int(11) NOT NULL,
  `rasca_id` int(11) NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `probabilidad` decimal(6,3) NOT NULL DEFAULT 0.000,
  `stock` int(11) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `imagen_url` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `rasca_premios` (`id`, `rasca_id`, `nombre`, `probabilidad`, `stock`, `activo`, `imagen_url`, `created_at`) VALUES
(2, 10, 'laptop', 1.000, 97, 1, '/ruleta/uploads/rasca_premios/Gpay_Card_2-689784f9ba2c3.jpg', '2025-08-09 17:27:21');

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

--
-- Estructura de tabla para la tabla `ruletas`
--

CREATE TABLE `ruletas` (
  `id` int(11) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `imagen_ruleta` varchar(255) DEFAULT NULL,
  `imagen_puntero` varchar(255) DEFAULT NULL,
  `fecha_creacion` timestamp NOT NULL DEFAULT current_timestamp(),
  `banner_1` varchar(255) DEFAULT NULL,
  `banner_2` varchar(255) DEFAULT NULL,
  `banner_3` varchar(255) DEFAULT NULL,
  `banner_4` varchar(255) DEFAULT NULL,
  `background_image` varchar(255) DEFAULT NULL,
  `fullscreen_icon` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `ruletas` (`id`, `nombre`, `descripcion`, `imagen_ruleta`, `imagen_puntero`, `fecha_creacion`, `banner_1`, `banner_2`, `banner_3`, `banner_4`, `background_image`, `fullscreen_icon`) VALUES
(2, 'Test', '1', '/ruleta/uploads/ruletas/ruleta1-68966beb88079.png', '/ruleta/uploads/ruletas/puntero11-68966beb88ae7.png', '2025-08-08 21:28:11', '/ruleta/uploads/ruletas/BANNER-1-689671662b081.png', '/ruleta/uploads/ruletas/BANNER-2-689671662c041.png', NULL, NULL, '/ruleta/uploads/ruletas/background1-6896708085ee4.png', '/ruleta/uploads/ruletas/fullscreen-icon-689671662c540.png'),
(3, 'ruleta2', 'jlsgksjgkjfg', '/ruleta/uploads/ruletas/ruleta-68967520e286f.png', '/ruleta/uploads/ruletas/puntero-68967520e2a68.png', '2025-08-08 22:07:28', NULL, '/ruleta/uploads/ruletas/puntero2-68967520e2c3d.png', NULL, NULL, '/ruleta/uploads/ruletas/background-68967520e3c87.png', '/ruleta/uploads/ruletas/fullscreen-icon-68967520e3e76.png'),
(4, 'promotion 1', 'My first rule', '/ruleta/uploads/ruletas/ruleta-68967960bad31.png', '/ruleta/uploads/ruletas/puntero-68967960bafae.png', '2025-08-08 22:25:36', '/ruleta/uploads/ruletas/BANNER-1-68967960bb15c.png', '/ruleta/uploads/ruletas/BANNER-2-68967960bb380.png', NULL, '/ruleta/uploads/ruletas/BANNER-4-68967960bb67a.png', '/ruleta/uploads/ruletas/Strong-68967960bbc33.png', '/ruleta/uploads/ruletas/fullscreen-icon-68967960bbed3.png');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `admin_users`
--
ALTER TABLE `admin_users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`);

--
-- Indices de la tabla `cartas`
--
ALTER TABLE `cartas`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `juegos_config`
--
ALTER TABLE `juegos_config`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `juego_id` (`juego_id`);

--
-- Indices de la tabla `jugadas`
--
ALTER TABLE `jugadas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ruleta_id` (`ruleta_id`),
  ADD KEY `premio_id` (`premio_id`);

--
-- Indices de la tabla `jugadas_memoria`
--
ALTER TABLE `jugadas_memoria`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `jugadas_rasca`
--
ALTER TABLE `jugadas_rasca`
  ADD PRIMARY KEY (`id`);

--
-- Indices de la tabla `premios`
--
ALTER TABLE `premios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ruleta_id` (`ruleta_id`);

--
-- Indices de la tabla `rasca_config`
--
ALTER TABLE `rasca_config`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `rasca_id` (`rasca_id`);

--
-- Indices de la tabla `rasca_premios`
--
ALTER TABLE `rasca_premios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `rasca_id` (`rasca_id`),
  ADD KEY `activo` (`activo`);

--
-- Indices de la tabla `ruletas`
--
ALTER TABLE `ruletas`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `admin_users`
--
ALTER TABLE `admin_users`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `cartas`
--
ALTER TABLE `cartas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT de la tabla `juegos_config`
--
ALTER TABLE `juegos_config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT de la tabla `jugadas`
--
ALTER TABLE `jugadas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT de la tabla `jugadas_memoria`
--
ALTER TABLE `jugadas_memoria`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `jugadas_rasca`
--
ALTER TABLE `jugadas_rasca`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;

--
-- AUTO_INCREMENT de la tabla `premios`
--
ALTER TABLE `premios`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `rasca_config`
--
ALTER TABLE `rasca_config`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT de la tabla `rasca_premios`
--
ALTER TABLE `rasca_premios`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `ruletas`
--
ALTER TABLE `ruletas`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `jugadas`
--
ALTER TABLE `jugadas`
  ADD CONSTRAINT `jugadas_ibfk_1` FOREIGN KEY (`ruleta_id`) REFERENCES `ruletas` (`id`),
  ADD CONSTRAINT `jugadas_ibfk_2` FOREIGN KEY (`premio_id`) REFERENCES `premios` (`id`);

--
-- Filtros para la tabla `premios`
--
ALTER TABLE `premios`
  ADD CONSTRAINT `premios_ibfk_1` FOREIGN KEY (`ruleta_id`) REFERENCES `ruletas` (`id`) ON DELETE CASCADE;
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 */;
