-- https://www.phpmyadmin.net/
--
-- Servidor: localhost:3306
-- Tiempo de generación: 30-07-2026 a las 21:18:05
-- Versión del servidor: 10.11.18-MariaDB
-- Versión de PHP: 8.4.23

START TRANSACTION;



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

--
-- Estructura de tabla para la tabla `configuracion`
--

CREATE TABLE `configuracion` (
  `id` int(11) NOT NULL,
  `clave` varchar(100) NOT NULL,
  `valor` text DEFAULT NULL,
  `tipo` varchar(30) DEFAULT 'text',
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `configuracion` (`id`, `clave`, `valor`, `tipo`, `updated_at`) VALUES
(1, 'nombre_evento', '', 'text', '2026-07-21 20:44:37'),
(2, 'mensaje_espera', 'Esperando el próximo sorteo', 'text', '2026-07-21 20:37:41'),
(3, 'texto_ganador', 'GANADOR', 'text', '2026-07-21 20:37:41'),
(4, 'logo_principal', 'uploads/logos/153f0d185acfbba6.png', 'image', '2026-07-23 17:22:08'),
(5, 'logo_secundario', 'uploads/logos/e3bf6c04897d8a6e.png', 'image', '2026-07-21 20:40:00'),
(6, 'fondo_imagen', '', 'image', '2026-07-21 20:37:41'),
(7, 'fondo_video', 'uploads/fondos/42361d10fa299954.mp4', 'video', '2026-07-24 16:00:55'),
(8, 'fondo_video_activo', '1', 'bool', '2026-07-21 20:44:21'),
(9, 'fondo_opacidad', '55', 'number', '2026-07-21 20:37:41'),
(10, 'fondo_video_loop', '1', 'bool', '2026-07-21 20:37:41'),
(11, 'color_primario', '#ff2fd0', 'text', '2026-07-21 20:40:00'),
(12, 'color_secundario', '#00e6ff', 'text', '2026-07-21 20:40:00'),
(13, 'sonidos_activos', '0', 'bool', '2026-07-21 20:49:39'),
(14, 'sonido_inicio', '', 'audio', '2026-07-21 20:37:41'),
(15, 'sonido_girando', '', 'audio', '2026-07-21 20:37:41'),
(16, 'sonido_ganador', '', 'audio', '2026-07-21 20:37:41'),
(17, 'duracion_frenado', '5', 'number', '2026-07-21 20:37:41'),
(18, 'confeti_activo', '1', 'bool', '2026-07-21 20:37:41'),
(19, 'pantalla_completa', '1', 'bool', '2026-07-21 20:37:41'),
(20, 'zona_horaria', 'America/Santiago', 'text', '2026-07-21 20:37:41'),
(21, 'formato_fecha', 'd/m/Y H:i', 'text', '2026-07-21 20:37:41'),
(22, 'campos_ganador', '', 'text', '2026-07-21 20:49:39'),
(23, 'clave_control', '', 'text', '2026-07-21 20:37:41'),
(91, 'galeria_logo', '', 'image', '2026-07-21 23:23:45'),
(92, 'galeria_mensaje_espera', 'Esperando fotografías', 'text', '2026-07-21 21:21:12'),
(93, 'galeria_tiempo_foto', '6', 'number', '2026-07-21 21:21:12'),
(94, 'galeria_duracion_transicion', '3000', 'number', '2026-07-24 19:11:48'),
(95, 'galeria_transicion', 'random', 'text', '2026-07-24 21:05:50'),
(96, 'galeria_ajuste', 'contain', 'text', '2026-07-24 19:13:23'),
(97, 'galeria_fondo', 'desenfoque', 'text', '2026-07-21 21:21:12'),
(98, 'galeria_orden', 'aleatorio', 'text', '2026-07-21 21:37:34'),
(99, 'galeria_bucle', '1', 'bool', '2026-07-21 21:21:12'),
(100, 'galeria_mostrar_logo', '0', 'bool', '2026-07-24 19:10:26'),
(101, 'galeria_mostrar_contador', '0', 'bool', '2026-07-21 21:21:12'),
(102, 'galeria_mostrar_fecha', '0', 'bool', '2026-07-21 21:21:12'),
(103, 'galeria_intervalo_check', '5000', 'number', '2026-07-21 21:21:12'),
(104, 'galeria_version', '132', 'number', '2026-07-26 19:15:15');

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

--
-- Estructura de tabla para la tabla `galeria_fotos`
--

CREATE TABLE `galeria_fotos` (
  `id` int(11) NOT NULL,
  `archivo` varchar(255) NOT NULL,
  `miniatura` varchar(255) DEFAULT NULL,
  `nombre_original` varchar(255) DEFAULT NULL,
  `ancho` int(11) DEFAULT NULL,
  `alto` int(11) DEFAULT NULL,
  `orden` int(11) NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `uploaded_by` 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 `galeria_fotos`
--

INSERT INTO `galeria_fotos` (`id`, `archivo`, `miniatura`, `nombre_original`, `ancho`, `alto`, `orden`, `activo`, `uploaded_by`, `created_at`) VALUES
(63, 'uploads/galeria/e70e4ab59e5a08a7.jpg', 'uploads/galeria/thumbs/e70e4ab59e5a08a7.jpg', '01.png', 1672, 941, 1, 1, 1, '2026-07-24 20:45:20'),
(64, 'uploads/galeria/fc2e296f15e2fcde.jpg', 'uploads/galeria/thumbs/fc2e296f15e2fcde.jpg', '02.png', 1672, 941, 2, 1, 1, '2026-07-24 20:45:20'),
(65, 'uploads/galeria/b6f45cf35bf1caa9.jpg', 'uploads/galeria/thumbs/b6f45cf35bf1caa9.jpg', '03.png', 1672, 941, 3, 1, 1, '2026-07-24 20:45:20'),
(66, 'uploads/galeria/090c8ce18f2200fd.jpg', 'uploads/galeria/thumbs/090c8ce18f2200fd.jpg', '04.png', 1672, 941, 4, 1, 1, '2026-07-24 20:45:20'),
(67, 'uploads/galeria/af0c3f11027cbc97.jpg', 'uploads/galeria/thumbs/af0c3f11027cbc97.jpg', '05.png', 1448, 1086, 5, 1, 1, '2026-07-24 20:47:45'),
(68, 'uploads/galeria/8c9cc729ef3a03ad.jpg', 'uploads/galeria/thumbs/8c9cc729ef3a03ad.jpg', '06.png', 1672, 941, 6, 1, 1, '2026-07-24 20:47:45'),
(69, 'uploads/galeria/be8c30c55124102d.jpg', 'uploads/galeria/thumbs/be8c30c55124102d.jpg', '07.png', 1672, 941, 7, 1, 1, '2026-07-24 20:47:45'),
(70, 'uploads/galeria/4855c33001154ff5.jpg', 'uploads/galeria/thumbs/4855c33001154ff5.jpg', '08.png', 1672, 941, 8, 1, 1, '2026-07-24 20:47:45'),
(71, 'uploads/galeria/e97505a353f0c7dc.jpg', 'uploads/galeria/thumbs/e97505a353f0c7dc.jpg', '09.png', 1672, 941, 9, 1, 1, '2026-07-24 20:47:45'),
(72, 'uploads/galeria/be6d51a6f8163338.jpg', 'uploads/galeria/thumbs/be6d51a6f8163338.jpg', '10.png', 1448, 1086, 10, 1, 1, '2026-07-24 20:47:45'),
(73, 'uploads/galeria/4f1ce227bbac1372.jpg', 'uploads/galeria/thumbs/4f1ce227bbac1372.jpg', '11.png', 1672, 941, 11, 1, 1, '2026-07-24 20:47:45'),
(74, 'uploads/galeria/38ba4ff65616e918.jpg', 'uploads/galeria/thumbs/38ba4ff65616e918.jpg', '12.png', 1672, 941, 12, 1, 1, '2026-07-24 20:47:45'),
(75, 'uploads/galeria/292ec1c8d7a7b7f4.jpg', 'uploads/galeria/thumbs/292ec1c8d7a7b7f4.jpg', '13.png', 1672, 941, 13, 1, 1, '2026-07-24 20:47:45'),
(76, 'uploads/galeria/3d363222606b049d.jpg', 'uploads/galeria/thumbs/3d363222606b049d.jpg', '14.png', 1672, 941, 14, 1, 1, '2026-07-24 20:47:46'),
(77, 'uploads/galeria/1bd5875e17718a23.jpg', 'uploads/galeria/thumbs/1bd5875e17718a23.jpg', '15.png', 1672, 941, 15, 1, 1, '2026-07-24 20:47:46'),
(78, 'uploads/galeria/4e572bd3d27d9ee4.jpg', 'uploads/galeria/thumbs/4e572bd3d27d9ee4.jpg', '16.png', 1672, 941, 16, 1, 1, '2026-07-24 20:47:46'),
(79, 'uploads/galeria/f33c1ce13a494176.jpg', 'uploads/galeria/thumbs/f33c1ce13a494176.jpg', '17.png', 1672, 941, 17, 1, 1, '2026-07-24 20:47:46'),
(80, 'uploads/galeria/4fe8722ced8b9173.jpg', 'uploads/galeria/thumbs/4fe8722ced8b9173.jpg', '18.png', 1672, 941, 18, 1, 1, '2026-07-24 20:47:46'),
(81, 'uploads/galeria/0662b16501920aa2.jpg', 'uploads/galeria/thumbs/0662b16501920aa2.jpg', '19.png', 1672, 941, 19, 1, 1, '2026-07-24 20:47:46'),
(82, 'uploads/galeria/aa12a7269789ff7b.jpg', 'uploads/galeria/thumbs/aa12a7269789ff7b.jpg', '20.png', 1672, 941, 20, 1, 1, '2026-07-24 20:47:46'),
(83, 'uploads/galeria/5b683beac728af9c.jpg', 'uploads/galeria/thumbs/5b683beac728af9c.jpg', '21.png', 1672, 940, 21, 1, 1, '2026-07-24 20:47:46'),
(84, 'uploads/galeria/9b4cc6e62bd953c6.jpg', 'uploads/galeria/thumbs/9b4cc6e62bd953c6.jpg', '22.png', 1672, 941, 22, 1, 1, '2026-07-24 20:47:46'),
(85, 'uploads/galeria/c1e8224c63f096bc.jpg', 'uploads/galeria/thumbs/c1e8224c63f096bc.jpg', '23.png', 1672, 941, 23, 1, 1, '2026-07-24 20:47:47'),
(86, 'uploads/galeria/1473633c581ebd88.jpg', 'uploads/galeria/thumbs/1473633c581ebd88.jpg', '24.png', 1672, 941, 24, 1, 1, '2026-07-24 20:47:47'),
(87, 'uploads/galeria/56c29f696c9e256d.jpg', 'uploads/galeria/thumbs/56c29f696c9e256d.jpg', '26.png', 1920, 1080, 25, 1, 1, '2026-07-24 21:09:19'),
(88, 'uploads/galeria/84cfce7e8fdf413e.jpg', 'uploads/galeria/thumbs/84cfce7e8fdf413e.jpg', '27.png', 1920, 1072, 26, 1, 1, '2026-07-24 21:10:39'),
(89, 'uploads/galeria/47ffe7e2d69f2da6.jpg', 'uploads/galeria/thumbs/47ffe7e2d69f2da6.jpg', '28.png', 1672, 941, 27, 1, 1, '2026-07-24 21:10:54'),
(90, 'uploads/galeria/1a3bd2b0a1e45d1f.jpg', 'uploads/galeria/thumbs/1a3bd2b0a1e45d1f.jpg', '29.png', 1920, 1072, 28, 1, 1, '2026-07-24 21:21:43'),
(91, 'uploads/galeria/e753125d91ea89ce.jpg', 'uploads/galeria/thumbs/e753125d91ea89ce.jpg', '30.png', 1672, 941, 29, 1, 1, '2026-07-24 21:21:43'),
(92, 'uploads/galeria/9f05cec0848511b3.jpg', 'uploads/galeria/thumbs/9f05cec0848511b3.jpg', '31.png', 1672, 941, 30, 1, 1, '2026-07-24 21:24:12'),
(93, 'uploads/galeria/e983ee1b8cc876c2.jpg', 'uploads/galeria/thumbs/e983ee1b8cc876c2.jpg', '32.png', 1672, 941, 31, 1, 1, '2026-07-24 21:24:12'),
(94, 'uploads/galeria/a1406ba29bc63da7.jpg', 'uploads/galeria/thumbs/a1406ba29bc63da7.jpg', '33.png', 1672, 941, 32, 1, 1, '2026-07-24 21:25:32'),
(95, 'uploads/gi/generadas/c7f115dfd0f8eee3.png', 'uploads/gi/thumbs/c7f115dfd0f8eee3.jpg', 'IA #1', 1536, 1024, 33, 1, NULL, '2026-07-26 04:40:01'),
(96, 'uploads/gi/generadas/3c77b46fec334801.png', 'uploads/gi/thumbs/3c77b46fec334801.jpg', 'IA #2', 1536, 1024, 34, 1, NULL, '2026-07-26 04:42:48'),
(97, 'uploads/gi/generadas/e3945d42c6334194.png', 'uploads/gi/thumbs/e3945d42c6334194.jpg', 'IA #3', 1536, 1024, 35, 1, NULL, '2026-07-26 04:51:48'),
(98, 'uploads/gi/generadas/62dc78c4aa0179a3.png', 'uploads/gi/thumbs/62dc78c4aa0179a3.jpg', 'IA #4', 1536, 1024, 36, 1, NULL, '2026-07-26 04:55:58'),
(99, 'uploads/gi/generadas/1870932ae8d35b3b.png', 'uploads/gi/thumbs/1870932ae8d35b3b.jpg', 'IA #5', 1536, 1024, 37, 1, NULL, '2026-07-26 04:56:39'),
(100, 'uploads/gi/generadas/47ce72211f942353.png', 'uploads/gi/thumbs/47ce72211f942353.jpg', 'IA #6', 1536, 1024, 38, 1, NULL, '2026-07-26 05:00:48'),
(101, 'uploads/gi/generadas/1e4bdc086fd01893.png', 'uploads/gi/thumbs/1e4bdc086fd01893.jpg', 'IA #7', 1536, 1024, 39, 1, NULL, '2026-07-26 05:04:46'),
(102, 'uploads/gi/generadas/c26d465c302356c0.png', 'uploads/gi/thumbs/c26d465c302356c0.jpg', 'IA #8', 1920, 1080, 40, 1, NULL, '2026-07-26 05:20:03'),
(103, 'uploads/gi/generadas/d691e2d09fd1b21b.png', 'uploads/gi/thumbs/d691e2d09fd1b21b.jpg', 'IA #9', 1920, 1080, 41, 1, NULL, '2026-07-26 06:36:24'),
(104, 'uploads/gi/generadas/ed0ca55210718426.png', 'uploads/gi/thumbs/ed0ca55210718426.jpg', 'IA #10', 1920, 1080, 42, 1, NULL, '2026-07-26 07:07:20'),
(105, 'uploads/gi/generadas/456ee8fc80ca28e9.png', 'uploads/gi/thumbs/456ee8fc80ca28e9.jpg', 'IA #11', 1920, 1080, 43, 1, NULL, '2026-07-26 07:24:40'),
(106, 'uploads/gi/generadas/359ced3344cfde64.png', 'uploads/gi/thumbs/359ced3344cfde64.jpg', 'IA #12', 1920, 1080, 44, 1, NULL, '2026-07-26 07:31:34'),
(107, 'uploads/gi/generadas/07408b2159000ef2.png', 'uploads/gi/thumbs/07408b2159000ef2.jpg', 'IA #13', 1920, 1080, 45, 1, NULL, '2026-07-26 07:49:46'),
(108, 'uploads/gi/generadas/4c5e7c02a59279fd.png', 'uploads/gi/thumbs/4c5e7c02a59279fd.jpg', 'IA #14', 1920, 1080, 46, 1, NULL, '2026-07-26 07:51:44'),
(109, 'uploads/gi/generadas/13415a32a53428a7.png', 'uploads/gi/thumbs/13415a32a53428a7.jpg', 'IA #15', 1920, 1080, 47, 1, NULL, '2026-07-26 08:04:26'),
(110, 'uploads/gi/generadas/a7be4973479b6e48.png', 'uploads/gi/thumbs/a7be4973479b6e48.jpg', 'IA #16', 1920, 1080, 48, 1, NULL, '2026-07-26 08:09:37'),
(111, 'uploads/gi/generadas/d0ef5a195a58ca64.png', 'uploads/gi/thumbs/d0ef5a195a58ca64.jpg', 'IA #17', 1920, 1080, 49, 1, NULL, '2026-07-26 08:20:59'),
(112, 'uploads/gi/generadas/57d80066bfc5acf6.png', 'uploads/gi/thumbs/57d80066bfc5acf6.jpg', 'IA #18', 1920, 1080, 50, 1, NULL, '2026-07-26 08:30:21'),
(113, 'uploads/gi/generadas/2ebaf11851db22ed.png', 'uploads/gi/thumbs/2ebaf11851db22ed.jpg', 'IA #19', 1920, 1080, 51, 1, NULL, '2026-07-26 19:10:37'),
(114, 'uploads/gi/generadas/c11e1d908aed1aaf.png', 'uploads/gi/thumbs/c11e1d908aed1aaf.jpg', 'IA #20', 1920, 1080, 52, 1, NULL, '2026-07-26 19:15:15');

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

--
-- Estructura de tabla para la tabla `gi_config`
--

CREATE TABLE `gi_config` (
  `clave` varchar(80) NOT NULL,
  `valor` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `gi_config` (`clave`, `valor`) VALUES
('formatos_permitidos', 'jpg,jpeg,png,webp'),
('max_carga_mb', '12'),
('max_por_ip_hora', '40'),
('modulo_activo', '1'),
('pausa_entre_solicitudes', '1'),
('rate_min_segundos', '8'),
('trabajos_simultaneos', '2'),
('worker_token', 'a8038c2a816a8882ae1bd404');

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

--
-- Estructura de tabla para la tabla `gi_consumo`
--

CREATE TABLE `gi_consumo` (
  `id` int(11) NOT NULL,
  `evento_id` int(11) DEFAULT NULL,
  `trabajo_id` int(11) DEFAULT NULL,
  `proveedor` varchar(40) DEFAULT NULL,
  `modelo` varchar(80) DEFAULT NULL,
  `llamadas` int(11) NOT NULL DEFAULT 1,
  `unidades` int(11) DEFAULT NULL,
  `costo` decimal(10,4) DEFAULT NULL,
  `resultado` varchar(20) DEFAULT NULL,
  `tiempo_ms` int(11) DEFAULT NULL,
  `error_msg` text 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 `gi_consumo`
--

INSERT INTO `gi_consumo` (`id`, `evento_id`, `trabajo_id`, `proveedor`, `modelo`, `llamadas`, `unidades`, `costo`, `resultado`, `tiempo_ms`, `error_msg`, `created_at`) VALUES
(1, 1, 2, 'openai', 'gpt-image-1', 1, 6983, NULL, 'ok', 63272, NULL, '2026-07-26 04:40:01'),
(2, 1, 3, 'openai', 'gpt-image-1', 1, 7014, NULL, 'ok', 63035, NULL, '2026-07-26 04:42:48'),
(3, 1, 4, 'openai', 'gpt-image-1', 1, 7304, NULL, 'ok', 67223, NULL, '2026-07-26 04:51:48'),
(4, 1, 5, 'openai', 'gpt-image-1', 1, 7324, NULL, 'ok', 61988, NULL, '2026-07-26 04:55:58'),
(5, 1, 6, 'openai', 'gpt-image-1', 1, 7324, NULL, 'ok', 61940, NULL, '2026-07-26 04:56:39'),
(6, 1, 7, 'openai', 'gpt-image-1', 1, 7435, NULL, 'ok', 67522, NULL, '2026-07-26 05:00:48'),
(7, 1, 8, 'openai', 'gpt-image-1', 1, 7640, NULL, 'ok', 67440, NULL, '2026-07-26 05:04:46'),
(8, 1, 9, 'openai', 'gpt-image-1', 1, 6693, NULL, 'ok', 53292, NULL, '2026-07-26 05:20:01'),
(9, 1, 10, 'openai', 'gpt-image-1', 1, 6693, NULL, 'ok', 51131, NULL, '2026-07-26 06:36:23'),
(10, 1, 11, 'bria', '', 1, NULL, NULL, 'ok', 4218, NULL, '2026-07-26 07:07:19'),
(11, 1, 12, 'bria', '', 1, NULL, NULL, 'ok', 2217, NULL, '2026-07-26 07:24:39'),
(12, 1, 13, 'bria', '', 1, NULL, NULL, 'ok', 2242, NULL, '2026-07-26 07:31:33'),
(13, 1, 14, 'openai', 'gpt-image-1', 1, 7640, NULL, 'ok', 64793, NULL, '2026-07-26 07:49:45'),
(14, 1, 15, 'openai', 'gpt-image-1', 1, 7640, NULL, 'ok', 67655, NULL, '2026-07-26 07:51:44'),
(15, 1, 16, 'openai', 'gpt-image-1', 1, 6693, NULL, 'ok', 51972, NULL, '2026-07-26 08:04:25'),
(16, 1, 17, 'openai', 'gpt-image-1', 1, 7640, NULL, 'ok', 68449, NULL, '2026-07-26 08:09:31'),
(17, 1, 17, 'bria', '', 1, NULL, NULL, 'ok', 4218, NULL, '2026-07-26 08:09:36'),
(18, 1, 18, 'openai', 'gpt-image-1', 1, 19749, NULL, 'ok', 74202, NULL, '2026-07-26 08:20:58'),
(19, 1, 19, 'openai', 'gpt-image-1', 1, 19779, NULL, 'ok', 75802, NULL, '2026-07-26 08:30:19'),
(20, 1, 21, 'openai', 'gpt-image-1', 1, NULL, NULL, 'error', 453, 'Billing hard limit has been reached.', '2026-07-26 08:40:21'),
(21, 1, 22, 'openai', 'gpt-image-1', 1, NULL, NULL, 'error', 762, 'Billing hard limit has been reached.', '2026-07-26 08:40:49'),
(22, 1, 23, 'openai', 'gpt-image-1', 1, NULL, NULL, 'error', 1169, 'Billing hard limit has been reached.', '2026-07-26 08:59:34'),
(23, 1, 24, 'openai', 'gpt-image-1', 1, NULL, NULL, 'error', 1075, 'Billing hard limit has been reached.', '2026-07-26 18:50:59'),
(24, 1, 25, 'openai', 'gpt-image-1', 1, NULL, NULL, 'error', 906, 'Billing hard limit has been reached.', '2026-07-26 19:05:00'),
(25, 1, 26, 'openai', 'gpt-image-1', 1, 19718, NULL, 'ok', 72283, NULL, '2026-07-26 19:10:31'),
(26, 1, 26, 'bria', '', 1, NULL, NULL, 'ok', 2852, NULL, '2026-07-26 19:10:35'),
(27, 1, 27, 'openai', 'gpt-image-1', 1, 19750, NULL, 'ok', 78150, NULL, '2026-07-26 19:15:10'),
(28, 1, 27, 'bria', '', 1, NULL, NULL, 'ok', 3141, NULL, '2026-07-26 19:15:14');

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

--
-- Estructura de tabla para la tabla `gi_fondos`
--

CREATE TABLE `gi_fondos` (
  `id` int(11) NOT NULL,
  `evento_id` int(11) NOT NULL,
  `nombre` varchar(160) DEFAULT NULL,
  `archivo` varchar(255) NOT NULL,
  `miniatura` varchar(255) DEFAULT NULL,
  `formato` varchar(10) DEFAULT NULL,
  `ancho` int(11) DEFAULT NULL,
  `alto` int(11) DEFAULT NULL,
  `aspecto` varchar(20) DEFAULT NULL,
  `orden` int(11) NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `prompt` text DEFAULT NULL,
  `prompt_negativo` text DEFAULT NULL,
  `posicion_persona` varchar(40) DEFAULT NULL,
  `persona_x` decimal(6,2) NOT NULL DEFAULT 50.00,
  `persona_y` decimal(6,2) NOT NULL DEFAULT 100.00,
  `persona_escala` decimal(6,2) NOT NULL DEFAULT 80.00,
  `sombra` tinyint(1) NOT NULL DEFAULT 1,
  `sombra_intensidad` int(11) NOT NULL DEFAULT 45,
  `sombra_blur` int(11) NOT NULL DEFAULT 18,
  `luz_magenta` int(11) NOT NULL DEFAULT 25,
  `luz_azul` int(11) NOT NULL DEFAULT 20,
  `luz_contra` int(11) NOT NULL DEFAULT 20,
  `tamano_persona` varchar(40) DEFAULT NULL,
  `max_personas` int(11) NOT NULL DEFAULT 0,
  `categoria` varchar(80) DEFAULT NULL,
  `proteger_textos` tinyint(1) NOT NULL DEFAULT 1,
  `usos` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `gi_fondos` (`id`, `evento_id`, `nombre`, `archivo`, `miniatura`, `formato`, `ancho`, `alto`, `aspecto`, `orden`, `activo`, `prompt`, `prompt_negativo`, `posicion_persona`, `persona_x`, `persona_y`, `persona_escala`, `sombra`, `sombra_intensidad`, `sombra_blur`, `luz_magenta`, `luz_azul`, `luz_contra`, `tamano_persona`, `max_personas`, `categoria`, `proteger_textos`, `usos`, `created_at`) VALUES
(1, 1, '2.jpg', 'uploads/gi/fondos/a262ee133691c6df.jpg', 'uploads/gi/thumbs/a262ee133691c6df_f.jpg', 'jpg', 1920, 1080, '1.778', 1, 1, NULL, NULL, NULL, 50.00, 100.00, 80.00, 1, 45, 18, 25, 20, 20, NULL, 0, NULL, 1, 9, '2026-07-26 04:38:13');

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

--
-- Estructura de tabla para la tabla `gi_historial`
--

CREATE TABLE `gi_historial` (
  `id` int(11) NOT NULL,
  `evento_id` int(11) DEFAULT NULL,
  `accion` varchar(60) NOT NULL,
  `usuario_admin_id` int(11) DEFAULT NULL,
  `descripcion` varchar(500) 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 `gi_historial`
--

INSERT INTO `gi_historial` (`id`, `evento_id`, `accion`, `usuario_admin_id`, `descripcion`, `created_at`) VALUES
(1, NULL, 'IA_CREAR', 1, 'Proveedor creado', '2026-07-26 04:33:29'),
(2, NULL, 'IA_TEST', 1, 'Conexión correcta (550ms).', '2026-07-26 04:33:33'),
(3, 1, 'CREAR', 1, 'Evento creado: Fiesta Bci', '2026-07-26 04:36:19'),
(4, 1, 'GENERAR_ADMIN', 1, 'Foto de administrador enviada a la cola', '2026-07-26 04:36:41'),
(5, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:38:04'),
(6, 1, 'FONDO_SUBIR', 1, '1 fondos', '2026-07-26 04:38:13'),
(7, 1, 'ACTIVO', 1, 'Estado → activo', '2026-07-26 04:38:42'),
(8, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:41:22'),
(9, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:50:02'),
(10, 1, 'FONDO_SUBIR', 1, '3 fondos', '2026-07-26 04:50:23'),
(11, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:50:27'),
(12, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:54:36'),
(13, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 04:59:22'),
(14, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 05:03:24'),
(15, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 05:18:59'),
(16, NULL, 'IA_CREAR', 1, 'Proveedor creado', '2026-07-26 07:01:38'),
(17, NULL, 'IA_EDITAR', 1, 'Proveedor #1', '2026-07-26 07:02:25'),
(18, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 07:03:19'),
(19, NULL, 'IA_EDITAR', 1, 'Proveedor #2', '2026-07-26 07:06:34'),
(20, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 07:31:21'),
(21, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 07:48:21'),
(22, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:03:15'),
(23, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:05:30'),
(24, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:06:16'),
(25, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:08:09'),
(26, NULL, 'IA_EDITAR', 1, 'Proveedor #1', '2026-07-26 08:18:17'),
(27, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:19:27'),
(28, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:19:32'),
(29, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:28:47'),
(30, 1, 'GENERAR_ADMIN', 1, 'Foto de administrador enviada a la cola', '2026-07-26 08:29:24'),
(31, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:40:10'),
(32, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 08:40:42'),
(33, 1, 'EDITAR', 1, 'Configuración actualizada', '2026-07-26 18:49:44');

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

--
-- Estructura de tabla para la tabla `gi_imagenes`
--

CREATE TABLE `gi_imagenes` (
  `id` int(11) NOT NULL,
  `evento_id` int(11) NOT NULL,
  `trabajo_id` int(11) DEFAULT NULL,
  `foto_id` int(11) DEFAULT NULL,
  `fondo_id` int(11) DEFAULT NULL,
  `archivo` varchar(255) NOT NULL,
  `miniatura` varchar(255) DEFAULT NULL,
  `ancho` int(11) DEFAULT NULL,
  `alto` int(11) DEFAULT NULL,
  `estado` enum('pendiente_aprobacion','aprobada','rechazada') NOT NULL DEFAULT 'pendiente_aprobacion',
  `destacada` tinyint(1) NOT NULL DEFAULT 0,
  `en_slider` tinyint(1) NOT NULL DEFAULT 0,
  `galeria_foto_id` int(11) DEFAULT NULL,
  `descargas` int(11) NOT NULL DEFAULT 0,
  `origen` enum('admin','qr') NOT NULL DEFAULT 'qr',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `gi_imagenes` (`id`, `evento_id`, `trabajo_id`, `foto_id`, `fondo_id`, `archivo`, `miniatura`, `ancho`, `alto`, `estado`, `destacada`, `en_slider`, `galeria_foto_id`, `descargas`, `origen`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 2, 1, 'uploads/gi/generadas/c7f115dfd0f8eee3.png', 'uploads/gi/thumbs/c7f115dfd0f8eee3.jpg', 1536, 1024, 'aprobada', 0, 1, 95, 0, 'qr', '2026-07-26 04:40:01', '2026-07-26 04:40:01'),
(2, 1, 3, 3, 1, 'uploads/gi/generadas/3c77b46fec334801.png', 'uploads/gi/thumbs/3c77b46fec334801.jpg', 1536, 1024, 'aprobada', 0, 1, 96, 0, 'qr', '2026-07-26 04:42:48', '2026-07-26 04:42:48'),
(3, 1, 4, 4, 4, 'uploads/gi/generadas/e3945d42c6334194.png', 'uploads/gi/thumbs/e3945d42c6334194.jpg', 1536, 1024, 'aprobada', 0, 1, 97, 0, 'qr', '2026-07-26 04:51:48', '2026-07-26 04:51:48'),
(4, 1, 5, 5, 3, 'uploads/gi/generadas/62dc78c4aa0179a3.png', 'uploads/gi/thumbs/62dc78c4aa0179a3.jpg', 1536, 1024, 'aprobada', 0, 1, 98, 0, 'qr', '2026-07-26 04:55:58', '2026-07-26 04:55:58'),
(5, 1, 6, 6, 1, 'uploads/gi/generadas/1870932ae8d35b3b.png', 'uploads/gi/thumbs/1870932ae8d35b3b.jpg', 1536, 1024, 'aprobada', 0, 1, 99, 0, 'qr', '2026-07-26 04:56:39', '2026-07-26 04:56:39'),
(6, 1, 7, 7, 1, 'uploads/gi/generadas/47ce72211f942353.png', 'uploads/gi/thumbs/47ce72211f942353.jpg', 1536, 1024, 'aprobada', 0, 1, 100, 0, 'qr', '2026-07-26 05:00:48', '2026-07-26 05:00:48'),
(7, 1, 8, 8, 3, 'uploads/gi/generadas/1e4bdc086fd01893.png', 'uploads/gi/thumbs/1e4bdc086fd01893.jpg', 1536, 1024, 'aprobada', 0, 1, 101, 0, 'qr', '2026-07-26 05:04:46', '2026-07-26 05:04:46'),
(8, 1, 9, 9, 3, 'uploads/gi/generadas/c26d465c302356c0.png', 'uploads/gi/thumbs/c26d465c302356c0.jpg', 1920, 1080, 'aprobada', 0, 1, 102, 0, 'qr', '2026-07-26 05:20:03', '2026-07-26 05:20:03'),
(9, 1, 10, 10, 2, 'uploads/gi/generadas/d691e2d09fd1b21b.png', 'uploads/gi/thumbs/d691e2d09fd1b21b.jpg', 1920, 1080, 'aprobada', 0, 1, 103, 0, 'qr', '2026-07-26 06:36:24', '2026-07-26 06:36:24'),
(10, 1, 11, 11, 4, 'uploads/gi/generadas/ed0ca55210718426.png', 'uploads/gi/thumbs/ed0ca55210718426.jpg', 1920, 1080, 'aprobada', 0, 1, 104, 0, 'qr', '2026-07-26 07:07:20', '2026-07-26 07:07:20'),
(11, 1, 12, 12, 2, 'uploads/gi/generadas/456ee8fc80ca28e9.png', 'uploads/gi/thumbs/456ee8fc80ca28e9.jpg', 1920, 1080, 'aprobada', 0, 1, 105, 0, 'qr', '2026-07-26 07:24:40', '2026-07-26 07:24:40'),
(12, 1, 13, 13, 4, 'uploads/gi/generadas/359ced3344cfde64.png', 'uploads/gi/thumbs/359ced3344cfde64.jpg', 1920, 1080, 'aprobada', 0, 1, 106, 0, 'qr', '2026-07-26 07:31:34', '2026-07-26 07:31:34'),
(13, 1, 14, 14, 4, 'uploads/gi/generadas/07408b2159000ef2.png', 'uploads/gi/thumbs/07408b2159000ef2.jpg', 1920, 1080, 'aprobada', 0, 1, 107, 0, 'qr', '2026-07-26 07:49:46', '2026-07-26 07:49:46'),
(14, 1, 15, 15, 1, 'uploads/gi/generadas/4c5e7c02a59279fd.png', 'uploads/gi/thumbs/4c5e7c02a59279fd.jpg', 1920, 1080, 'aprobada', 0, 1, 108, 0, 'qr', '2026-07-26 07:51:44', '2026-07-26 07:51:44'),
(15, 1, 16, 16, 3, 'uploads/gi/generadas/13415a32a53428a7.png', 'uploads/gi/thumbs/13415a32a53428a7.jpg', 1920, 1080, 'aprobada', 0, 1, 109, 0, 'qr', '2026-07-26 08:04:26', '2026-07-26 08:04:26'),
(16, 1, 17, 17, 3, 'uploads/gi/generadas/a7be4973479b6e48.png', 'uploads/gi/thumbs/a7be4973479b6e48.jpg', 1920, 1080, 'aprobada', 0, 1, 110, 0, 'qr', '2026-07-26 08:09:37', '2026-07-26 08:09:37'),
(17, 1, 18, 18, 4, 'uploads/gi/generadas/d0ef5a195a58ca64.png', 'uploads/gi/thumbs/d0ef5a195a58ca64.jpg', 1920, 1080, 'aprobada', 0, 1, 111, 0, 'qr', '2026-07-26 08:20:59', '2026-07-26 08:20:59'),
(18, 1, 19, 19, 2, 'uploads/gi/generadas/57d80066bfc5acf6.png', 'uploads/gi/thumbs/57d80066bfc5acf6.jpg', 1920, 1080, 'aprobada', 0, 1, 112, 0, 'qr', '2026-07-26 08:30:21', '2026-07-26 08:30:21'),
(19, 1, 26, 26, 1, 'uploads/gi/generadas/2ebaf11851db22ed.png', 'uploads/gi/thumbs/2ebaf11851db22ed.jpg', 1920, 1080, 'aprobada', 0, 1, 113, 0, 'qr', '2026-07-26 19:10:37', '2026-07-26 19:10:37'),
(20, 1, 27, 27, 1, 'uploads/gi/generadas/c11e1d908aed1aaf.png', 'uploads/gi/thumbs/c11e1d908aed1aaf.jpg', 1920, 1080, 'aprobada', 0, 1, 114, 0, 'qr', '2026-07-26 19:15:15', '2026-07-26 19:15:15');

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

--
-- Estructura de tabla para la tabla `import_batches`
--

CREATE TABLE `import_batches` (
  `id` int(11) NOT NULL,
  `filename` varchar(255) DEFAULT NULL,
  `total_rows` int(11) DEFAULT 0,
  `imported_rows` int(11) DEFAULT 0,
  `omitted_rows` int(11) DEFAULT 0,
  `error_rows` int(11) DEFAULT 0,
  `imported_by` 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 `import_batches`
--

INSERT INTO `import_batches` (`id`, `filename`, `total_rows`, `imported_rows`, `omitted_rows`, `error_rows`, `imported_by`, `created_at`) VALUES
(1, 'Listado  Asistentes aniversario.xlsx', 138, 136, 1, 0, 1, '2026-07-21 20:40:41'),
(2, 'Listado  Asistentes aniversario.xlsx', 138, 136, 1, 0, 1, '2026-07-24 15:25:23'),
(3, 'Listado  Asistentes aniversario.xlsx', 138, 137, 0, 0, 1, '2026-07-24 15:26:38');

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

--
-- Estructura de tabla para la tabla `logs_actividad`
--

CREATE TABLE `logs_actividad` (
  `id` int(11) NOT NULL,
  `accion` varchar(100) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `ip_usuario` varchar(45) DEFAULT NULL,
  `fecha` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `logs_actividad` (`id`, `accion`, `descripcion`, `ip_usuario`, `fecha`, `admin_id`) VALUES
(118, 'LOGIN', 'Inicio de sesión exitoso', '181.42.51.84', '2025-07-25 21:47:40', 1),
(119, 'SORTEO_REALIZADO', 'Sorteo: Papàs - Ganador: Fernanda Ríos', '200.104.77.221', '2025-07-25 21:50:00', 1),
(120, 'SORTEO_REALIZADO', 'Sorteo: CAFETERA - Ganador: Mauricio Uribe', '181.42.51.84', '2025-07-25 22:16:44', 1),
(121, 'LOGIN', 'Inicio de sesión exitoso', '200.104.77.221', '2025-07-25 23:47:25', 1),
(122, 'LOGIN', 'Inicio de sesión exitoso', '200.104.77.221', '2025-09-25 21:05:41', 1),
(123, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-21 19:20:37', 1),
(124, 'SORTEO_REALIZADO', 'Sorteo: Smart TV 55 pulgadas - Ganador: Carla Sanhueza', '181.74.128.117', '2026-07-21 19:22:24', 1),
(125, 'SORTEO_REALIZADO', 'Sorteo: Cafetera - Ganador: Johannymar Barrios', '181.74.128.117', '2026-07-21 19:55:10', 1),
(126, 'CARGAR_EXCEL', 'Usuarios cargados: 119 insertados, 18 duplicados, 0 errores', '181.74.128.117', '2026-07-21 20:00:27', 1),
(127, 'SORTEO_REALIZADO', 'Sorteo: iPhone 15 - Ganador: 123', '181.74.128.117', '2026-07-21 20:00:40', 1),
(128, 'LOGOUT', 'Cierre de sesión', '181.74.128.117', '2026-07-21 20:38:16', 1),
(129, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-21 20:38:36', 1),
(130, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 20:40:00', 1),
(131, 'IMPORTAR_PARTICIPANTES', 'Lote #1: 136 insertados, 1 duplicados, 0 errores', '181.74.128.117', '2026-07-21 20:40:41', 1),
(132, 'SORTEO_CREAR', 'Sorteo #1: iPhone 15', '181.74.128.117', '2026-07-21 20:41:31', 1),
(133, 'SORTEO_INICIAR', 'Sorteo #1 (iPhone 15)', '181.74.128.117', '2026-07-21 20:41:34', 1),
(134, 'SORTEO_REALIZADO', 'Sorteo: iPhone 15 - Ganador: Ivette Erna', '181.74.128.117', '2026-07-21 20:41:46', 1),
(135, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 20:44:21', 1),
(136, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 20:44:37', 1),
(137, 'SORTEO_OCULTAR', 'Sorteo #1: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 20:45:38', 1),
(138, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-21 20:48:43', 1),
(139, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 20:49:39', 1),
(140, 'SORTEO_INICIAR', 'Sorteo #1 (iPhone 15)', '181.74.128.117', '2026-07-21 20:49:50', 1),
(141, 'SORTEO_REALIZADO', 'Sorteo: iPhone 15 - Ganador: Juan Cristian', '181.74.128.117', '2026-07-21 20:50:04', 1),
(142, 'SORTEO_OCULTAR', 'Sorteo #1: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 20:50:20', 1),
(143, 'SORTEO_INICIAR', 'Sorteo #1 (iPhone 15)', '181.74.128.117', '2026-07-21 20:51:18', 1),
(144, 'SORTEO_REALIZADO', 'Sorteo: iPhone 15 - Ganador: Tarek', '181.74.128.117', '2026-07-21 20:51:23', 1),
(145, 'SORTEO_OCULTAR', 'Sorteo #1: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 20:52:58', 1),
(146, 'SORTEO_INICIAR', 'Sorteo #1 (iPhone 15)', '181.74.128.117', '2026-07-21 20:54:14', 1),
(147, 'SORTEO_REALIZADO', 'Sorteo: iPhone 15 - Ganador: Javier Andres', '181.74.128.117', '2026-07-21 20:54:31', 1),
(148, 'SORTEO_OCULTAR', 'Sorteo #1: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 20:57:00', 1),
(149, 'SORTEO_CREAR', 'Sorteo #2: Smart TV 55 pulgadas', '181.74.128.117', '2026-07-21 20:58:00', 1),
(150, 'SORTEO_INICIAR', 'Sorteo #2 (Smart TV 55 pulgadas)', '181.74.128.117', '2026-07-21 20:58:03', 1),
(151, 'GALERIA_SUBIR', 'Fotos subidas: 4, con error: 0', '181.74.128.117', '2026-07-21 21:21:45', 1),
(152, 'RONDA_CANCELAR', 'Ronda #0 cancelada (la sesión continúa)', '181.74.128.117', '2026-07-21 21:22:28', 1),
(153, 'SORTEO_CREAR', 'Sesión de sorteo #3: Fiesta Anual 2026', '181.74.128.117', '2026-07-21 21:22:44', 1),
(154, 'RONDA_INICIAR', 'Sorteo #3 · premio: TV (ronda #1)', '181.74.128.117', '2026-07-21 21:22:57', 1),
(155, 'SORTEO_REALIZADO', 'Premio: TV - Ganador: Romina Andrea', '181.74.128.117', '2026-07-21 21:23:04', 1),
(156, 'RONDA_OCULTAR', 'Ronda #1: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 21:23:13', 1),
(157, 'RONDA_INICIAR', 'Sorteo #3 · premio: Celular (ronda #2)', '181.74.128.117', '2026-07-21 21:23:21', 1),
(158, 'SORTEO_REALIZADO', 'Premio: Celular - Ganador: Marisol Pilar', '181.74.128.117', '2026-07-21 21:23:28', 1),
(159, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:24:00', 1),
(160, 'RONDA_OCULTAR', 'Ronda #2: se dejó de mostrar al ganador', '181.74.128.117', '2026-07-21 21:24:23', 1),
(161, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '181.74.128.117', '2026-07-21 21:25:00', 1),
(162, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:28:52', 1),
(163, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:31:24', 1),
(164, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:32:42', 1),
(165, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:36:57', 1),
(166, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 21:37:34', 1),
(167, 'GALERIA_ELIMINAR', 'Foto #1 eliminada', '181.74.128.117', '2026-07-21 21:56:48', 1),
(168, 'GALERIA_ELIMINAR', 'Foto #2 eliminada', '181.74.128.117', '2026-07-21 21:56:49', 1),
(169, 'GALERIA_ELIMINAR', 'Foto #3 eliminada', '181.74.128.117', '2026-07-21 21:56:51', 1),
(170, 'GALERIA_ELIMINAR', 'Foto #4 eliminada', '181.74.128.117', '2026-07-21 21:56:51', 1),
(171, 'GALERIA_ELIMINAR', 'Foto #5 eliminada', '181.74.128.117', '2026-07-21 21:56:52', 1),
(172, 'GALERIA_SUBIR', 'Fotos subidas: 5, con error: 0', '181.74.128.117', '2026-07-21 21:57:06', 1),
(173, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 23:23:17', 1),
(174, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-21 23:23:45', 1),
(175, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-23 00:39:53', 1),
(176, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-23 16:58:02', 1),
(177, 'VOTACION_ELIMINAR', 'Votación #1 eliminada', '181.74.128.117', '2026-07-23 17:21:07', 1),
(178, 'GALERIA_ELIMINAR', 'Foto #6 eliminada', '181.74.128.117', '2026-07-23 17:21:26', 1),
(179, 'GALERIA_ELIMINAR', 'Foto #8 eliminada', '181.74.128.117', '2026-07-23 17:21:27', 1),
(180, 'GALERIA_ELIMINAR', 'Foto #7 eliminada', '181.74.128.117', '2026-07-23 17:21:28', 1),
(181, 'GALERIA_ELIMINAR', 'Foto #9 eliminada', '181.74.128.117', '2026-07-23 17:21:30', 1),
(182, 'GALERIA_ELIMINAR', 'Foto #10 eliminada', '181.74.128.117', '2026-07-23 17:21:31', 1),
(183, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '181.74.128.117', '2026-07-23 17:22:08', 1),
(184, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-23 23:11:53', 1),
(185, 'PARTICIPANTE_CREAR', 'Participante creado: Gabriel Lafertte Cárcamo', '181.74.128.117', '2026-07-23 23:12:50', 1),
(186, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-24 04:14:07', 1),
(187, 'LOGIN', 'Inicio de sesión exitoso', '186.175.20.192', '2026-07-24 13:45:44', 1),
(188, 'GALERIA_SUBIR', 'Fotos subidas: 6, con error: 0', '186.175.20.192', '2026-07-24 14:18:46', 1),
(189, 'GALERIA_ELIMINAR', 'Foto #11 eliminada', '186.175.20.192', '2026-07-24 14:52:06', 1),
(190, 'GALERIA_ELIMINAR', 'Foto #12 eliminada', '186.175.20.192', '2026-07-24 14:52:07', 1),
(191, 'GALERIA_ELIMINAR', 'Foto #13 eliminada', '186.175.20.192', '2026-07-24 14:52:09', 1),
(192, 'GALERIA_ELIMINAR', 'Foto #14 eliminada', '186.175.20.192', '2026-07-24 14:52:10', 1),
(193, 'GALERIA_ELIMINAR', 'Foto #15 eliminada', '186.175.20.192', '2026-07-24 14:52:11', 1),
(194, 'GALERIA_ELIMINAR', 'Foto #16 eliminada', '186.175.20.192', '2026-07-24 14:52:13', 1),
(195, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 14:52:27', 1),
(196, 'SORTEO_CREAR', 'Sesión de sorteo #4: Fiesta Anual', '186.175.20.192', '2026-07-24 14:58:01', 1),
(197, 'RONDA_INICIAR', 'Sorteo #4 · premio: Cerlular (ronda #3)', '186.175.20.192', '2026-07-24 15:06:51', 1),
(198, 'SORTEO_REALIZADO', 'Premio: Cerlular - Ganador: Barbara Mayeli', '186.175.20.192', '2026-07-24 15:07:01', 1),
(199, 'IMPORTAR_PARTICIPANTES', 'Lote #2: 136 insertados, 1 duplicados, 0 errores', '186.175.20.192', '2026-07-24 15:25:23', 1),
(200, 'IMPORTAR_PARTICIPANTES', 'Lote #3: 137 insertados, 0 duplicados, 0 errores', '186.175.20.192', '2026-07-24 15:26:38', 1),
(201, 'PARTICIPANTE_CREAR', 'Participante creado: Gabriel Lafertte Cárcamo', '186.175.20.192', '2026-07-24 15:28:53', 1),
(202, 'VOTACION_ELIMINAR', 'Votación #4 eliminada', '186.175.20.192', '2026-07-24 15:47:19', 1),
(203, 'LOGIN', 'Inicio de sesión exitoso', '186.175.20.192', '2026-07-24 15:57:52', 1),
(204, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 16:00:55', 1),
(205, 'RONDA_OCULTAR', 'Ronda #3: se dejó de mostrar al ganador', '186.175.20.192', '2026-07-24 16:01:33', 1),
(206, 'GALERIA_ELIMINAR', 'Foto #17 eliminada', '186.175.20.192', '2026-07-24 17:20:07', 1),
(207, 'GALERIA_SUBIR', 'Fotos subidas: 4, con error: 0', '186.175.20.192', '2026-07-24 17:46:57', 1),
(208, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 17:50:44', 1),
(209, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 17:51:08', 1),
(210, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 17:51:59', 1),
(211, 'GALERIA_SUBIR', 'Fotos subidas: 3, con error: 0', '186.175.20.192', '2026-07-24 17:55:58', 1),
(212, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:00:15', 1),
(213, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:07:33', 1),
(214, 'GALERIA_SUBIR', 'Fotos subidas: 2, con error: 0', '186.175.20.192', '2026-07-24 18:08:06', 1),
(215, 'GALERIA_SUBIR', 'Fotos subidas: 3, con error: 0', '186.175.20.192', '2026-07-24 18:11:09', 1),
(216, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:12:07', 1),
(217, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:13:46', 1),
(218, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:14:11', 1),
(219, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:14:41', 1),
(220, 'GALERIA_ELIMINAR', 'Foto #18 eliminada', '186.175.20.192', '2026-07-24 18:51:13', 1),
(221, 'GALERIA_ELIMINAR', 'Foto #19 eliminada', '186.175.20.192', '2026-07-24 18:51:15', 1),
(222, 'GALERIA_ELIMINAR', 'Foto #20 eliminada', '186.175.20.192', '2026-07-24 18:51:16', 1),
(223, 'GALERIA_ELIMINAR', 'Foto #21 eliminada', '186.175.20.192', '2026-07-24 18:51:18', 1),
(224, 'GALERIA_ELIMINAR', 'Foto #22 eliminada', '186.175.20.192', '2026-07-24 18:51:19', 1),
(225, 'GALERIA_ELIMINAR', 'Foto #23 eliminada', '186.175.20.192', '2026-07-24 18:51:20', 1),
(226, 'GALERIA_ELIMINAR', 'Foto #24 eliminada', '186.175.20.192', '2026-07-24 18:51:21', 1),
(227, 'GALERIA_ELIMINAR', 'Foto #25 eliminada', '186.175.20.192', '2026-07-24 18:51:22', 1),
(228, 'GALERIA_ELIMINAR', 'Foto #26 eliminada', '186.175.20.192', '2026-07-24 18:51:23', 1),
(229, 'GALERIA_ELIMINAR', 'Foto #27 eliminada', '186.175.20.192', '2026-07-24 18:51:24', 1),
(230, 'GALERIA_ELIMINAR', 'Foto #28 eliminada', '186.175.20.192', '2026-07-24 18:51:25', 1),
(231, 'GALERIA_ELIMINAR', 'Foto #29 eliminada', '186.175.20.192', '2026-07-24 18:51:26', 1),
(232, 'GALERIA_ELIMINAR', 'Foto #30 eliminada', '186.175.20.192', '2026-07-24 18:51:27', 1),
(233, 'GALERIA_ELIMINAR', 'Foto #31 eliminada', '186.175.20.192', '2026-07-24 18:51:28', 1),
(234, 'GALERIA_ELIMINAR', 'Foto #32 eliminada', '186.175.20.192', '2026-07-24 18:51:29', 1),
(235, 'GALERIA_ELIMINAR', 'Foto #33 eliminada', '186.175.20.192', '2026-07-24 18:51:30', 1),
(236, 'GALERIA_ELIMINAR', 'Foto #34 eliminada', '186.175.20.192', '2026-07-24 18:51:31', 1),
(237, 'GALERIA_ELIMINAR', 'Foto #35 eliminada', '186.175.20.192', '2026-07-24 18:51:32', 1),
(238, 'GALERIA_ELIMINAR', 'Foto #36 eliminada', '186.175.20.192', '2026-07-24 18:51:33', 1),
(239, 'GALERIA_ELIMINAR', 'Foto #37 eliminada', '186.175.20.192', '2026-07-24 18:51:34', 1),
(240, 'GALERIA_ELIMINAR', 'Foto #38 eliminada', '186.175.20.192', '2026-07-24 18:51:35', 1),
(241, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:55:10', 1),
(242, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 18:57:21', 1),
(243, 'GALERIA_ELIMINAR', 'Foto #39 eliminada', '186.175.20.192', '2026-07-24 18:57:23', 1),
(244, 'GALERIA_ELIMINAR', 'Foto #40 eliminada', '186.175.20.192', '2026-07-24 18:58:59', 1),
(245, 'GALERIA_SUBIR', 'Fotos subidas: 20, con error: 0', '186.175.20.192', '2026-07-24 19:01:28', 1),
(246, 'GALERIA_ELIMINAR', 'Foto #41 eliminada', '186.175.20.192', '2026-07-24 19:07:27', 1),
(247, 'GALERIA_ELIMINAR', 'Foto #42 eliminada', '186.175.20.192', '2026-07-24 19:07:29', 1),
(248, 'GALERIA_ELIMINAR', 'Foto #43 eliminada', '186.175.20.192', '2026-07-24 19:07:30', 1),
(249, 'GALERIA_ELIMINAR', 'Foto #44 eliminada', '186.175.20.192', '2026-07-24 19:07:33', 1),
(250, 'GALERIA_ELIMINAR', 'Foto #45 eliminada', '186.175.20.192', '2026-07-24 19:07:34', 1),
(251, 'GALERIA_ELIMINAR', 'Foto #46 eliminada', '186.175.20.192', '2026-07-24 19:07:35', 1),
(252, 'GALERIA_ELIMINAR', 'Foto #47 eliminada', '186.175.20.192', '2026-07-24 19:07:37', 1),
(253, 'GALERIA_ELIMINAR', 'Foto #48 eliminada', '186.175.20.192', '2026-07-24 19:07:38', 1),
(254, 'GALERIA_ELIMINAR', 'Foto #49 eliminada', '186.175.20.192', '2026-07-24 19:07:39', 1),
(255, 'GALERIA_ELIMINAR', 'Foto #50 eliminada', '186.175.20.192', '2026-07-24 19:07:40', 1),
(256, 'GALERIA_ELIMINAR', 'Foto #51 eliminada', '186.175.20.192', '2026-07-24 19:07:42', 1),
(257, 'GALERIA_ELIMINAR', 'Foto #52 eliminada', '186.175.20.192', '2026-07-24 19:07:44', 1),
(258, 'GALERIA_ELIMINAR', 'Foto #53 eliminada', '186.175.20.192', '2026-07-24 19:07:46', 1),
(259, 'GALERIA_ELIMINAR', 'Foto #54 eliminada', '186.175.20.192', '2026-07-24 19:07:47', 1),
(260, 'GALERIA_ELIMINAR', 'Foto #55 eliminada', '186.175.20.192', '2026-07-24 19:07:48', 1),
(261, 'GALERIA_ELIMINAR', 'Foto #56 eliminada', '186.175.20.192', '2026-07-24 19:07:49', 1),
(262, 'GALERIA_ELIMINAR', 'Foto #57 eliminada', '186.175.20.192', '2026-07-24 19:07:50', 1),
(263, 'GALERIA_ELIMINAR', 'Foto #58 eliminada', '186.175.20.192', '2026-07-24 19:07:53', 1),
(264, 'GALERIA_ELIMINAR', 'Foto #59 eliminada', '186.175.20.192', '2026-07-24 19:07:57', 1),
(265, 'GALERIA_ELIMINAR', 'Foto #60 eliminada', '186.175.20.192', '2026-07-24 19:07:58', 1),
(266, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 19:08:06', 1),
(267, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 19:08:14', 1),
(268, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 19:09:21', 1),
(269, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 19:10:26', 1),
(270, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 19:11:48', 1),
(271, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 19:12:37', 1),
(272, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 19:13:23', 1),
(273, 'GALERIA_ELIMINAR', 'Foto #61 eliminada', '186.175.20.192', '2026-07-24 20:44:48', 1),
(274, 'GALERIA_ELIMINAR', 'Foto #62 eliminada', '186.175.20.192', '2026-07-24 20:44:49', 1),
(275, 'GALERIA_SUBIR', 'Fotos subidas: 4, con error: 0', '186.175.20.192', '2026-07-24 20:45:20', 1),
(276, 'GALERIA_SUBIR', 'Fotos subidas: 20, con error: 0', '186.175.20.192', '2026-07-24 20:47:47', 1),
(277, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 21:05:50', 1),
(278, 'CONFIG_ACTUALIZAR', 'Configuración general actualizada', '186.175.20.192', '2026-07-24 21:05:52', 1),
(279, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 21:09:19', 1),
(280, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 21:10:39', 1),
(281, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 21:10:54', 1),
(282, 'GALERIA_SUBIR', 'Fotos subidas: 2, con error: 0', '186.175.20.192', '2026-07-24 21:21:43', 1),
(283, 'GALERIA_SUBIR', 'Fotos subidas: 2, con error: 0', '186.175.20.192', '2026-07-24 21:24:12', 1),
(284, 'GALERIA_SUBIR', 'Fotos subidas: 1, con error: 0', '186.175.20.192', '2026-07-24 21:25:32', 1),
(285, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-25 18:25:33', 1),
(286, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-26 04:31:29', 1),
(287, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-26 06:37:04', 1),
(288, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-26 18:48:35', 1),
(289, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-29 17:47:18', 1),
(290, 'LOGIN', 'Inicio de sesión exitoso', '181.74.128.117', '2026-07-30 22:01:08', 1);

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

--
-- Estructura de tabla para la tabla `participantes`
--

CREATE TABLE `participantes` (
  `id` int(11) NOT NULL,
  `nombre` varchar(255) NOT NULL,
  `identificador` varchar(100) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `telefono` varchar(50) DEFAULT NULL,
  `empresa` varchar(255) DEFAULT NULL,
  `cargo` varchar(255) DEFAULT NULL,
  `numero_participante` varchar(50) DEFAULT NULL,
  `datos_adicionales` text DEFAULT NULL,
  `estado` enum('disponible','ganador','inactivo') NOT NULL DEFAULT 'disponible',
  `ha_ganado` tinyint(1) NOT NULL DEFAULT 0,
  `import_batch_id` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `participantes` (`id`, `nombre`, `identificador`, `email`, `telefono`, `empresa`, `cargo`, `numero_participante`, `datos_adicionales`, `estado`, `ha_ganado`, `import_batch_id`, `created_at`, `updated_at`) VALUES
(274, 'Alicia Cristina Aguirre', '', '', '', '', '', '1', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(275, 'Miguel Ignacio Alcaino', '', '', '', '', '', '2', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(276, 'Macarena Fernanda Álvarez', '', '', '', '', '', '3', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(277, 'María del Pilar Arango', '', '', '', '', '', '4', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(278, 'Víctor Gabriel Arenas', '', '', '', '', '', '5', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(279, 'Verónica Andrea Barahona', '', '', '', '', '', '6', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(280, 'Yanira del Carmen Barria', '', '', '', '', '', '7', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(281, 'Bayron Alejandro Barrientos', '', '', '', '', '', '8', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(282, 'Johannymar Nazareth Barrios', '', '', '', '', '', '9', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(283, 'Marisol Pilar Becerra', '', '', '', '', '', '10', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(284, 'Antonio Francisco Benavides', '', '', '', '', '', '11', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(285, 'Daniel Ignacio Blanco', '', '', '', '', '', '12', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(286, 'Claudia Erna Bossi', '', '', '', '', '', '13', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(287, 'Francesco Alexander Bravo', '', '', '', '', '', '14', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(288, 'María José Bruce', '', '', '', '', '', '15', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(289, 'Romina Salome Bustos', '', '', '', '', '', '16', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(290, 'Valerie Andrea Cáceres', '', '', '', '', '', '17', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(291, 'Jorge Antonio Cáceres', '', '', '', '', '', '18', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(292, 'Ana Isabel Campillay', '', '', '', '', '', '19', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(293, 'Josefa Andrea Carrasco', '', '', '', '', '', '20', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(294, 'Romina Andrea Castro', '', '', '', '', '', '21', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(295, 'Ariel Andres Castro', '', '', '', '', '', '22', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(296, 'Franchesca Andrea Cepeda', '', '', '', '', '', '23', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(297, 'Rocío Estrella Collipal', '', '', '', '', '', '24', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(298, 'Lorena Ángelica Contreras', '', '', '', '', '', '25', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(299, 'Elizabeth Viviana Cornejo', '', '', '', '', '', '26', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(300, 'Rosario Andrea Cristi', '', '', '', '', '', '27', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(301, 'Ornella Karime Cubelli', '', '', '', '', '', '28', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(302, 'Lissette Díaz', '', '', '', '', '', '29', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(303, 'Barbara Gabriela Díaz', '', '', '', '', '', '30', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(304, 'Alejandra Carolina Duque', '', '', '', '', '', '31', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(305, 'Barbara Isidora Duran', '', '', '', '', '', '32', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(306, 'Ivette Erna Elgueta', '', '', '', '', '', '33', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(307, 'Noelia Naomi Erazo', '', '', '', '', '', '34', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(308, 'María Eugenia Facciolo', '', '', '', '', '', '35', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(309, 'Patricia Ángelica Farías', '', '', '', '', '', '36', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(310, 'Karla Patricia Fernández', '', '', '', '', '', '37', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(311, 'Giannina Fabiola Fernández', '', '', '', '', '', '38', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(312, 'Marianela Catalina Figueroa', '', '', '', '', '', '39', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(313, 'Valeria Katerina Flores', '', '', '', '', '', '40', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(314, 'Camila Constanza Friz', '', '', '', '', '', '41', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(315, 'Amalia Yaneska Fuentes', '', '', '', '', '', '42', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(316, 'Karin Valeria Gaete', '', '', '', '', '', '43', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(317, 'Francisco Andres Garay', '', '', '', '', '', '44', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(318, 'Francisca Arrau García', '', '', '', '', '', '45', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(319, 'Javier Andres García', '', '', '', '', '', '46', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(320, 'Fabiola Alejandra González', '', '', '', '', '', '47', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(321, 'Joyce Vanessa Guevara', '', '', '', '', '', '48', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(322, 'Javiera Francisca Guzmán', '', '', '', '', '', '49', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(323, 'Claudio Andres Henríquez', '', '', '', '', '', '50', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(324, 'Nancy Ximena Hermosilla', '', '', '', '', '', '51', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(325, 'Kevin Ignacio Hernández', '', '', '', '', '', '52', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(326, 'Daniela Alejandra Herrera', '', '', '', '', '', '53', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(327, 'Leonardo Sebastían Ibañez', '', '', '', '', '', '54', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(328, 'Barbara Ibarra', '', '', '', '', '', '55', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(329, 'Juan Cristian Irarrazabal', '', '', '', '', '', '56', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(330, 'Yessenia Andrea Iturrieta', '', '', '', '', '', '57', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(331, 'Karina Alejandra Jaime', '', '', '', '', '', '58', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(332, 'Nicole Marisol Jara', '', '', '', '', '', '59', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(333, 'Leonardo Ivan Jara', '', '', '', '', '', '60', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(334, 'Barbara Elizabeth Lizama', '', '', '', '', '', '61', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(335, 'Marietta Angelina López', '', '', '', '', '', '62', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(336, 'Olga Loukachevitch', '', '', '', '', '', '63', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(337, 'Pablo Andres Maldonado', '', '', '', '', '', '64', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(338, 'Miguel Andres Malio', '', '', '', '', '', '65', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(339, 'Camila Nicole Malschafsky', '', '', '', '', '', '66', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(340, 'Francisca Belen Mancilla', '', '', '', '', '', '67', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(341, 'Natalia Isabel Manquehual', '', '', '', '', '', '68', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(342, 'Hans Mirko Marnich', '', '', '', '', '', '69', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(343, 'Jocelyn Alejandra Márquez', '', '', '', '', '', '70', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(344, 'Julio Hernan Mendoza', '', '', '', '', '', '71', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(345, 'Marcela Andrea Merino', '', '', '', '', '', '72', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(346, 'David Alfredo Mieres', '', '', '', '', '', '73', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(347, 'Luis Marcelo Montero', '', '', '', '', '', '74', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(348, 'Rodrigo Andres Morales', '', '', '', '', '', '75', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(349, 'Ximena Beatriz Morales', '', '', '', '', '', '76', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(350, 'Felipe Alejandro Morales', '', '', '', '', '', '77', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(351, 'Luciana Jimena Moreno', '', '', '', '', '', '78', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(352, 'Gricel Andrea Muñoz', '', '', '', '', '', '79', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(353, 'Francisca Valentina Muñoz', '', '', '', '', '', '80', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(354, 'Daniela Susana Navarro', '', '', '', '', '', '81', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(355, 'Camila Estrella Novoa', '', '', '', '', '', '82', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(356, 'Claudia Ximena Nuñez', '', '', '', '', '', '83', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(357, 'María Julieta Olivares', '', '', '', '', '', '84', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(358, 'Matias Andres Opazo', '', '', '', '', '', '85', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(359, 'Makarena Constanza Ortiz', '', '', '', '', '', '86', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(360, 'Cecilia Angelina Osorio', '', '', '', '', '', '87', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(361, 'Erika Edith Pacheco', '', '', '', '', '', '88', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(362, 'Carolina Alejandra Peña', '', '', '', '', '', '89', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(363, 'Katty de las N. Pérez', '', '', '', '', '', '90', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(364, 'Sarahis Pierina Pérez', '', '', '', '', '', '91', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(365, 'Tarek Pichara', '', '', '', '', '', '92', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(366, 'Alfredo Pinilla', '', '', '', '', '', '93', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(367, 'Andrew Sebastian Pino', '', '', '', '', '', '94', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(368, 'Vania Lenka Pizarro', '', '', '', '', '', '95', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(369, 'Ruth Maria Poblete', '', '', '', '', '', '96', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(370, 'Rodrigo Martin Pradel', '', '', '', '', '', '97', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(371, 'Natalia Teresa Reyes', '', '', '', '', '', '98', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(372, 'Catalina Noemi Reyes', '', '', '', '', '', '99', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(373, 'Sandra Milena Rincon', '', '', '', '', '', '100', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(374, 'Fernanda Constanza Ríos', '', '', '', '', '', '101', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(375, 'Priscilla Jessica Robles', '', '', '', '', '', '102', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(376, 'Karen Carolina Rojas', '', '', '', '', '', '103', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(377, 'Mitzi Carolina Román', '', '', '', '', '', '104', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(378, 'Sebastian Rubina', '', '', '', '', '', '105', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(379, 'Carlos Andres Rubio', '', '', '', '', '', '106', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(380, 'Nancy Susana Ruíz', '', '', '', '', '', '107', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(381, 'Wladimir John Sánchez', '', '', '', '', '', '108', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(382, 'Valeska Lissette Sánchez', '', '', '', '', '', '109', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(383, 'Genny Alejandra Sánchez', '', '', '', '', '', '110', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(384, 'Camila Fernanda Sánchez', '', '', '', '', '', '111', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(385, 'Marco Antonio Sánchez', '', '', '', '', '', '112', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(386, 'Barbara Mayeli Sánchez', '', '', '', '', '', '113', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(387, 'Camila Fernanda Sanhueza', '', '', '', '', '', '114', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(388, 'Eduardo Andres Schramm', '', '', '', '', '', '115', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(389, 'Aivory Belen Sepúlveda', '', '', '', '', '', '116', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(390, 'Yuri Bladimir Silva', '', '', '', '', '', '117', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(391, 'Macarena Nataly Soto', '', '', '', '', '', '118', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(392, 'Katherine Viviana Soto', '', '', '', '', '', '119', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(393, 'Nicolas Gustavo Turrys', '', '', '', '', '', '120', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(394, 'Pamela Andrea Ulloa', '', '', '', '', '', '121', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(395, 'Paolo Cristobal Uribe', '', '', '', '', '', '122', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(396, 'Humberto Arturo Urzúa', '', '', '', '', '', '123', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(397, 'Rodrigo Alejandro Valderrama', '', '', '', '', '', '124', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(398, 'Macarena del Pilar Valdés', '', '', '', '', '', '125', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(399, 'Matias Ignacio Valenzuela', '', '', '', '', '', '126', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(400, 'Ingrid Paola Vargas', '', '', '', '', '', '127', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(401, 'Maria Loreto Vásquez', '', '', '', '', '', '128', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(402, 'Fernanda Daniela Venegas', '', '', '', '', '', '129', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(403, 'Sergio Andres Venegas', '', '', '', '', '', '130', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(404, 'Michael Hector Vicencio', '', '', '', '', '', '131', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(405, 'Felipe Ivan Vidal', '', '', '', '', '', '132', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(406, 'Catalina Antonia Vilches', '', '', '', '', '', '133', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(407, 'Ninoska Paulina Vivanco', '', '', '', '', '', '134', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(408, 'Angelica Bernarda Yañez', '', '', '', '', '', '135', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(409, 'Jorge Felipe Yevenes', '', '', '', '', '', '136', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(410, 'Nuria Elizabeth Zagal', '', '', '', '', '', '137', NULL, 'disponible', 0, 3, '2026-07-24 15:26:38', '2026-07-24 15:26:38'),
(411, 'Gabriel Lafertte Cárcamo', '', '', '', '', '', '', NULL, 'disponible', 0, NULL, '2026-07-24 15:28:53', '2026-07-24 15:28:53');

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

--
-- Estructura de tabla para la tabla `sorteos`
--

CREATE TABLE `sorteos` (
  `id` int(11) NOT NULL,
  `nombre_sorteo` varchar(255) NOT NULL,
  `nombre_premio` varchar(255) DEFAULT NULL,
  `descripcion_premio` text DEFAULT NULL,
  `imagen_premio` varchar(255) DEFAULT NULL,
  `cantidad_ganadores` int(11) NOT NULL DEFAULT 1,
  `observaciones` text DEFAULT NULL,
  `estado` enum('waiting','running','stopping','winner','cancelled','finished') NOT NULL DEFAULT 'waiting',
  `programado_para` datetime DEFAULT NULL,
  `started_at` datetime DEFAULT NULL,
  `stopped_at` datetime DEFAULT NULL,
  `finished_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `sorteos` (`id`, `nombre_sorteo`, `nombre_premio`, `descripcion_premio`, `imagen_premio`, `cantidad_ganadores`, `observaciones`, `estado`, `programado_para`, `started_at`, `stopped_at`, `finished_at`, `created_by`, `created_at`, `updated_at`) VALUES
(4, 'Fiesta Anual', NULL, NULL, NULL, 1, NULL, 'waiting', NULL, NULL, NULL, NULL, 1, '2026-07-24 14:58:01', '2026-07-24 16:01:33');

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

--
-- Estructura de tabla para la tabla `sorteo_ganadores`
--

CREATE TABLE `sorteo_ganadores` (
  `id` int(11) NOT NULL,
  `sorteo_id` int(11) NOT NULL,
  `ronda_id` int(11) DEFAULT NULL,
  `participante_id` int(11) NOT NULL,
  `nombre_premio` varchar(255) DEFAULT NULL,
  `estado` enum('valido','anulado') NOT NULL DEFAULT 'valido',
  `selected_at` datetime DEFAULT NULL,
  `selected_by` int(11) DEFAULT NULL,
  `annulled_at` datetime DEFAULT NULL,
  `annulled_by` int(11) DEFAULT NULL,
  `annulment_reason` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `sorteo_rondas`
--

CREATE TABLE `sorteo_rondas` (
  `id` int(11) NOT NULL,
  `sorteo_id` int(11) NOT NULL,
  `nombre_premio` varchar(255) NOT NULL,
  `estado` enum('running','stopping','winner','cancelled','finished') NOT NULL DEFAULT 'running',
  `started_at` datetime DEFAULT NULL,
  `stopped_at` datetime DEFAULT NULL,
  `cancelled_at` datetime DEFAULT NULL,
  `created_by` int(11) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `votacion_configuracion`
--

CREATE TABLE `votacion_configuracion` (
  `id` int(11) NOT NULL,
  `votacion_id` int(11) NOT NULL,
  `clave` varchar(80) NOT NULL,
  `valor` text DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `votacion_historial`
--

CREATE TABLE `votacion_historial` (
  `id` int(11) NOT NULL,
  `votacion_id` int(11) DEFAULT NULL,
  `accion` varchar(60) NOT NULL,
  `usuario_admin_id` int(11) DEFAULT NULL,
  `descripcion` varchar(500) DEFAULT NULL,
  `fecha_hora` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `votacion_historial` (`id`, `votacion_id`, `accion`, `usuario_admin_id`, `descripcion`, `fecha_hora`) VALUES
(43, 5, 'CREAR', 1, 'Votación creada: Premio Top Gun', '2026-07-24 15:47:39'),
(44, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 15:49:16'),
(45, 6, 'CREAR', 1, 'Votación creada: Premio Volver al Futuro', '2026-07-24 15:49:36'),
(46, 6, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 15:50:44'),
(47, 7, 'CREAR', 1, 'Votación creada: Premio Miami Vice Style', '2026-07-24 15:51:16'),
(48, 7, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 15:52:13'),
(49, 8, 'CREAR', 1, 'Votación creada: Premio Los Cazafantasmas', '2026-07-24 15:52:51'),
(50, 8, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 15:53:44'),
(51, 9, 'CREAR', 1, 'Votación creada: Premio Footloose', '2026-07-24 15:54:11'),
(52, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 15:55:03'),
(53, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:02:27'),
(54, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:03:12'),
(55, 6, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:04:16'),
(56, 7, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:05:23'),
(57, 8, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:12:24'),
(58, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:13:39'),
(59, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:14:32'),
(60, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:14:52'),
(61, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 16:15:25'),
(62, 5, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 18:30:35'),
(63, 6, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 18:30:39'),
(64, 7, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 18:30:43'),
(65, 8, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 18:30:47'),
(66, 9, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 18:30:54'),
(67, 5, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 19:19:38'),
(68, 5, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 19:20:24'),
(69, 5, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 19:20:42'),
(70, 7, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 19:21:14'),
(71, 8, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 19:22:04'),
(72, 8, 'PAUSADA', 1, 'Estado → pausada', '2026-07-24 19:23:07'),
(73, 9, 'PAUSADA', 1, 'Estado → pausada', '2026-07-24 19:23:19'),
(74, 7, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 19:23:50'),
(75, 5, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 19:24:12'),
(76, 8, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 19:24:20'),
(77, 9, 'ACTIVA', 1, 'Estado → activa', '2026-07-24 19:24:27'),
(78, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:32:38'),
(79, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:32:47'),
(80, 5, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:32:56'),
(81, 6, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:33:08'),
(82, 7, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:33:26'),
(83, 8, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:33:37'),
(84, 9, 'EDITAR', 1, 'Configuración actualizada', '2026-07-24 19:33:47'),
(85, 5, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:38:11'),
(86, 5, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 20:38:17'),
(87, 5, 'TOGGLE', 1, 'mostrar_resultados = 1', '2026-07-24 20:38:19'),
(88, 5, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:38:22'),
(89, 6, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 20:40:05'),
(90, 6, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:40:07'),
(91, 7, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 20:41:54'),
(92, 7, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:41:57'),
(93, 8, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 20:43:17'),
(94, 8, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:43:20'),
(95, 9, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-24 20:44:34'),
(96, 9, 'GANADORES', 1, 'dir=all revelados=3', '2026-07-24 20:44:37'),
(97, 9, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-29 17:48:40'),
(98, 9, 'TOGGLE', 1, 'mostrar_resultados = 1', '2026-07-29 17:48:52'),
(99, 8, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-29 17:49:20'),
(100, 7, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-29 17:49:32'),
(101, 6, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-29 17:49:58'),
(102, 5, 'FINALIZADA', 1, 'Estado → finalizada', '2026-07-29 17:50:24');

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

--
-- Estructura de tabla para la tabla `votacion_participantes`
--

CREATE TABLE `votacion_participantes` (
  `id` int(11) NOT NULL,
  `votacion_id` int(11) NOT NULL,
  `participante_id` int(11) NOT NULL,
  `orden` int(11) NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `votacion_participantes` (`id`, `votacion_id`, `participante_id`, `orden`, `activo`) VALUES
(681, 2, 115, 0, 1),
(682, 2, 31, 1, 1),
(683, 2, 93, 2, 1),
(684, 2, 1, 3, 1),
(685, 2, 42, 4, 1),
(686, 2, 19, 5, 1),
(687, 2, 94, 6, 1),
(688, 2, 134, 7, 1),
(689, 2, 11, 8, 1),
(690, 2, 22, 9, 1),
(691, 2, 55, 10, 1),
(692, 2, 61, 11, 1),
(693, 2, 30, 12, 1),
(694, 2, 32, 13, 1),
(695, 2, 113, 14, 1),
(696, 2, 8, 15, 1),
(697, 2, 41, 16, 1),
(698, 2, 82, 17, 1),
(699, 2, 111, 18, 1),
(700, 2, 66, 19, 1),
(701, 2, 106, 20, 1),
(702, 2, 89, 21, 1),
(703, 2, 132, 22, 1),
(704, 2, 99, 23, 1),
(705, 2, 87, 24, 1),
(706, 2, 13, 25, 1),
(707, 2, 83, 26, 1),
(708, 2, 50, 27, 1),
(709, 2, 12, 28, 1),
(710, 2, 53, 29, 1),
(711, 2, 81, 30, 1),
(712, 2, 73, 31, 1),
(713, 2, 114, 32, 1),
(714, 2, 26, 33, 1),
(715, 2, 88, 34, 1),
(716, 2, 47, 35, 1),
(717, 2, 77, 36, 1),
(718, 2, 131, 37, 1),
(719, 2, 101, 38, 1),
(720, 2, 128, 39, 1),
(721, 2, 14, 40, 1),
(722, 2, 23, 41, 1),
(723, 2, 45, 42, 1),
(724, 2, 67, 43, 1),
(725, 2, 80, 44, 1),
(726, 2, 44, 45, 1),
(727, 2, 110, 46, 1),
(728, 2, 38, 47, 1),
(729, 2, 79, 48, 1),
(730, 2, 69, 49, 1),
(731, 2, 122, 50, 1),
(732, 2, 126, 51, 1),
(733, 2, 33, 52, 1),
(734, 2, 46, 53, 1),
(735, 2, 49, 54, 1),
(736, 2, 70, 55, 1),
(737, 2, 9, 56, 1),
(738, 2, 18, 57, 1),
(739, 2, 135, 58, 1),
(740, 2, 20, 59, 1),
(741, 2, 48, 60, 1),
(742, 2, 56, 61, 1),
(743, 2, 71, 62, 1),
(744, 2, 103, 63, 1),
(745, 2, 43, 64, 1),
(746, 2, 58, 65, 1),
(747, 2, 37, 66, 1),
(748, 2, 118, 67, 1),
(749, 2, 90, 68, 1),
(750, 2, 52, 69, 1),
(751, 2, 60, 70, 1),
(752, 2, 54, 71, 1),
(753, 2, 29, 72, 1),
(754, 2, 25, 73, 1),
(755, 2, 78, 74, 1),
(756, 2, 74, 75, 1),
(757, 2, 124, 76, 1),
(758, 2, 3, 77, 1),
(759, 2, 117, 78, 1),
(760, 2, 86, 79, 1),
(761, 2, 72, 80, 1),
(762, 2, 112, 81, 1),
(763, 2, 4, 82, 1),
(764, 2, 35, 83, 1),
(765, 2, 15, 84, 1),
(766, 2, 84, 85, 1),
(767, 2, 127, 86, 1),
(768, 2, 39, 87, 1),
(769, 2, 62, 88, 1),
(770, 2, 10, 89, 1),
(771, 2, 85, 90, 1),
(772, 2, 125, 91, 1),
(773, 2, 130, 92, 1),
(774, 2, 65, 93, 1),
(775, 2, 2, 94, 1),
(776, 2, 104, 95, 1),
(777, 2, 107, 96, 1),
(778, 2, 51, 97, 1),
(779, 2, 68, 98, 1),
(780, 2, 98, 99, 1),
(781, 2, 119, 100, 1),
(782, 2, 59, 101, 1),
(783, 2, 133, 102, 1),
(784, 2, 34, 103, 1),
(785, 2, 136, 104, 1),
(786, 2, 63, 105, 1),
(787, 2, 28, 106, 1),
(788, 2, 64, 107, 1),
(789, 2, 120, 108, 1),
(790, 2, 121, 109, 1),
(791, 2, 36, 110, 1),
(792, 2, 102, 111, 1),
(793, 2, 24, 112, 1),
(794, 2, 123, 113, 1),
(795, 2, 75, 114, 1),
(796, 2, 97, 115, 1),
(797, 2, 21, 116, 1),
(798, 2, 16, 117, 1),
(799, 2, 27, 118, 1),
(800, 2, 96, 119, 1),
(801, 2, 100, 120, 1),
(802, 2, 91, 121, 1),
(803, 2, 105, 122, 1),
(804, 2, 129, 123, 1),
(805, 2, 92, 124, 1),
(806, 2, 40, 125, 1),
(807, 2, 17, 126, 1),
(808, 2, 109, 127, 1),
(809, 2, 95, 128, 1),
(810, 2, 6, 129, 1),
(811, 2, 5, 130, 1),
(812, 2, 108, 131, 1),
(813, 2, 76, 132, 1),
(814, 2, 7, 133, 1),
(815, 2, 57, 134, 1),
(816, 2, 116, 135, 1),
(817, 3, 115, 0, 1),
(818, 3, 31, 1, 1),
(819, 3, 93, 2, 1),
(820, 3, 1, 3, 1),
(821, 3, 42, 4, 1),
(822, 3, 19, 5, 1),
(823, 3, 94, 6, 1),
(824, 3, 134, 7, 1),
(825, 3, 11, 8, 1),
(826, 3, 22, 9, 1),
(827, 3, 55, 10, 1),
(828, 3, 61, 11, 1),
(829, 3, 30, 12, 1),
(830, 3, 32, 13, 1),
(831, 3, 113, 14, 1),
(832, 3, 8, 15, 1),
(833, 3, 41, 16, 1),
(834, 3, 82, 17, 1),
(835, 3, 111, 18, 1),
(836, 3, 66, 19, 1),
(837, 3, 106, 20, 1),
(838, 3, 89, 21, 1),
(839, 3, 132, 22, 1),
(840, 3, 99, 23, 1),
(841, 3, 87, 24, 1),
(842, 3, 13, 25, 1),
(843, 3, 83, 26, 1),
(844, 3, 50, 27, 1),
(845, 3, 12, 28, 1),
(846, 3, 53, 29, 1),
(847, 3, 81, 30, 1),
(848, 3, 73, 31, 1),
(849, 3, 114, 32, 1),
(850, 3, 26, 33, 1),
(851, 3, 88, 34, 1),
(852, 3, 47, 35, 1),
(853, 3, 77, 36, 1),
(854, 3, 131, 37, 1),
(855, 3, 101, 38, 1),
(856, 3, 128, 39, 1),
(857, 3, 14, 40, 1),
(858, 3, 23, 41, 1),
(859, 3, 45, 42, 1),
(860, 3, 67, 43, 1),
(861, 3, 80, 44, 1),
(862, 3, 44, 45, 1),
(863, 3, 110, 46, 1),
(864, 3, 38, 47, 1),
(865, 3, 79, 48, 1),
(866, 3, 69, 49, 1),
(867, 3, 122, 50, 1),
(868, 3, 126, 51, 1),
(869, 3, 33, 52, 1),
(870, 3, 46, 53, 1),
(871, 3, 49, 54, 1),
(872, 3, 70, 55, 1),
(873, 3, 9, 56, 1),
(874, 3, 18, 57, 1),
(875, 3, 135, 58, 1),
(876, 3, 20, 59, 1),
(877, 3, 48, 60, 1),
(878, 3, 56, 61, 1),
(879, 3, 71, 62, 1),
(880, 3, 103, 63, 1),
(881, 3, 43, 64, 1),
(882, 3, 58, 65, 1),
(883, 3, 37, 66, 1),
(884, 3, 118, 67, 1),
(885, 3, 90, 68, 1),
(886, 3, 52, 69, 1),
(887, 3, 60, 70, 1),
(888, 3, 54, 71, 1),
(889, 3, 29, 72, 1),
(890, 3, 25, 73, 1),
(891, 3, 78, 74, 1),
(892, 3, 74, 75, 1),
(893, 3, 124, 76, 1),
(894, 3, 3, 77, 1),
(895, 3, 117, 78, 1),
(896, 3, 86, 79, 1),
(897, 3, 72, 80, 1),
(898, 3, 112, 81, 1),
(899, 3, 4, 82, 1),
(900, 3, 35, 83, 1),
(901, 3, 15, 84, 1),
(902, 3, 84, 85, 1),
(903, 3, 127, 86, 1),
(904, 3, 39, 87, 1),
(905, 3, 62, 88, 1),
(906, 3, 10, 89, 1),
(907, 3, 85, 90, 1),
(908, 3, 125, 91, 1),
(909, 3, 130, 92, 1),
(910, 3, 65, 93, 1),
(911, 3, 2, 94, 1),
(912, 3, 104, 95, 1),
(913, 3, 107, 96, 1),
(914, 3, 51, 97, 1),
(915, 3, 68, 98, 1),
(916, 3, 98, 99, 1),
(917, 3, 119, 100, 1),
(918, 3, 59, 101, 1),
(919, 3, 133, 102, 1),
(920, 3, 34, 103, 1),
(921, 3, 136, 104, 1),
(922, 3, 63, 105, 1),
(923, 3, 28, 106, 1),
(924, 3, 64, 107, 1),
(925, 3, 120, 108, 1),
(926, 3, 121, 109, 1),
(927, 3, 36, 110, 1),
(928, 3, 102, 111, 1),
(929, 3, 24, 112, 1),
(930, 3, 123, 113, 1),
(931, 3, 75, 114, 1),
(932, 3, 97, 115, 1),
(933, 3, 21, 116, 1),
(934, 3, 16, 117, 1),
(935, 3, 27, 118, 1),
(936, 3, 96, 119, 1),
(937, 3, 100, 120, 1),
(938, 3, 91, 121, 1),
(939, 3, 105, 122, 1),
(940, 3, 129, 123, 1),
(941, 3, 92, 124, 1),
(942, 3, 40, 125, 1),
(943, 3, 17, 126, 1),
(944, 3, 109, 127, 1),
(945, 3, 95, 128, 1),
(946, 3, 6, 129, 1),
(947, 3, 5, 130, 1),
(948, 3, 108, 131, 1),
(949, 3, 76, 132, 1),
(950, 3, 7, 133, 1),
(951, 3, 57, 134, 1),
(952, 3, 116, 135, 1),
(3298, 5, 389, 0, 1),
(3299, 5, 304, 1, 1),
(3300, 5, 366, 2, 1),
(3301, 5, 274, 3, 1),
(3302, 5, 315, 4, 1),
(3303, 5, 292, 5, 1),
(3304, 5, 367, 6, 1),
(3305, 5, 408, 7, 1),
(3306, 5, 284, 8, 1),
(3307, 5, 295, 9, 1),
(3308, 5, 334, 10, 1),
(3309, 5, 303, 11, 1),
(3310, 5, 328, 12, 1),
(3311, 5, 305, 13, 1),
(3312, 5, 386, 14, 1),
(3313, 5, 281, 15, 1),
(3314, 5, 314, 16, 1),
(3315, 5, 355, 17, 1),
(3316, 5, 384, 18, 1),
(3317, 5, 387, 19, 1),
(3318, 5, 339, 20, 1),
(3319, 5, 379, 21, 1),
(3320, 5, 362, 22, 1),
(3321, 5, 406, 23, 1),
(3322, 5, 372, 24, 1),
(3323, 5, 360, 25, 1),
(3324, 5, 286, 26, 1),
(3325, 5, 356, 27, 1),
(3326, 5, 323, 28, 1),
(3327, 5, 285, 29, 1),
(3328, 5, 326, 30, 1),
(3329, 5, 354, 31, 1),
(3330, 5, 346, 32, 1),
(3331, 5, 388, 33, 1),
(3332, 5, 299, 34, 1),
(3333, 5, 361, 35, 1),
(3334, 5, 320, 36, 1),
(3335, 5, 350, 37, 1),
(3336, 5, 405, 38, 1),
(3337, 5, 374, 39, 1),
(3338, 5, 402, 40, 1),
(3339, 5, 287, 41, 1),
(3340, 5, 296, 42, 1),
(3341, 5, 318, 43, 1),
(3342, 5, 340, 44, 1),
(3343, 5, 353, 45, 1),
(3344, 5, 317, 46, 1),
(3345, 5, 411, 47, 1),
(3346, 5, 383, 48, 1),
(3347, 5, 311, 49, 1),
(3348, 5, 352, 50, 1),
(3349, 5, 342, 51, 1),
(3350, 5, 396, 52, 1),
(3351, 5, 400, 53, 1),
(3352, 5, 306, 54, 1),
(3353, 5, 319, 55, 1),
(3354, 5, 322, 56, 1),
(3355, 5, 343, 57, 1),
(3356, 5, 282, 58, 1),
(3357, 5, 291, 59, 1),
(3358, 5, 409, 60, 1),
(3359, 5, 293, 61, 1),
(3360, 5, 321, 62, 1),
(3361, 5, 329, 63, 1),
(3362, 5, 344, 64, 1),
(3363, 5, 376, 65, 1),
(3364, 5, 316, 66, 1),
(3365, 5, 331, 67, 1),
(3366, 5, 310, 68, 1),
(3367, 5, 392, 69, 1),
(3368, 5, 363, 70, 1),
(3369, 5, 325, 71, 1),
(3370, 5, 333, 72, 1),
(3371, 5, 327, 73, 1),
(3372, 5, 302, 74, 1),
(3373, 5, 298, 75, 1),
(3374, 5, 351, 76, 1),
(3375, 5, 347, 77, 1),
(3376, 5, 398, 78, 1),
(3377, 5, 276, 79, 1),
(3378, 5, 391, 80, 1),
(3379, 5, 359, 81, 1),
(3380, 5, 345, 82, 1),
(3381, 5, 385, 83, 1),
(3382, 5, 277, 84, 1),
(3383, 5, 308, 85, 1),
(3384, 5, 288, 86, 1),
(3385, 5, 357, 87, 1),
(3386, 5, 401, 88, 1),
(3387, 5, 312, 89, 1),
(3388, 5, 335, 90, 1),
(3389, 5, 283, 91, 1),
(3390, 5, 358, 92, 1),
(3391, 5, 399, 93, 1),
(3392, 5, 404, 94, 1),
(3393, 5, 338, 95, 1),
(3394, 5, 275, 96, 1),
(3395, 5, 377, 97, 1),
(3396, 5, 380, 98, 1),
(3397, 5, 324, 99, 1),
(3398, 5, 341, 100, 1),
(3399, 5, 371, 101, 1),
(3400, 5, 393, 102, 1),
(3401, 5, 332, 103, 1),
(3402, 5, 407, 104, 1),
(3403, 5, 307, 105, 1),
(3404, 5, 410, 106, 1),
(3405, 5, 336, 107, 1),
(3406, 5, 301, 108, 1),
(3407, 5, 337, 109, 1),
(3408, 5, 394, 110, 1),
(3409, 5, 395, 111, 1),
(3410, 5, 309, 112, 1),
(3411, 5, 375, 113, 1),
(3412, 5, 297, 114, 1),
(3413, 5, 397, 115, 1),
(3414, 5, 348, 116, 1),
(3415, 5, 370, 117, 1),
(3416, 5, 294, 118, 1),
(3417, 5, 289, 119, 1),
(3418, 5, 300, 120, 1),
(3419, 5, 369, 121, 1),
(3420, 5, 373, 122, 1),
(3421, 5, 364, 123, 1),
(3422, 5, 378, 124, 1),
(3423, 5, 403, 125, 1),
(3424, 5, 365, 126, 1),
(3425, 5, 313, 127, 1),
(3426, 5, 290, 128, 1),
(3427, 5, 382, 129, 1),
(3428, 5, 368, 130, 1),
(3429, 5, 279, 131, 1),
(3430, 5, 278, 132, 1),
(3431, 5, 381, 133, 1),
(3432, 5, 349, 134, 1),
(3433, 5, 280, 135, 1),
(3434, 5, 330, 136, 1),
(3435, 5, 390, 137, 1),
(3436, 6, 389, 0, 1),
(3437, 6, 304, 1, 1),
(3438, 6, 366, 2, 1),
(3439, 6, 274, 3, 1),
(3440, 6, 315, 4, 1),
(3441, 6, 292, 5, 1),
(3442, 6, 367, 6, 1),
(3443, 6, 408, 7, 1),
(3444, 6, 284, 8, 1),
(3445, 6, 295, 9, 1),
(3446, 6, 334, 10, 1),
(3447, 6, 303, 11, 1),
(3448, 6, 328, 12, 1),
(3449, 6, 305, 13, 1),
(3450, 6, 386, 14, 1),
(3451, 6, 281, 15, 1),
(3452, 6, 314, 16, 1),
(3453, 6, 355, 17, 1),
(3454, 6, 384, 18, 1),
(3455, 6, 387, 19, 1),
(3456, 6, 339, 20, 1),
(3457, 6, 379, 21, 1),
(3458, 6, 362, 22, 1),
(3459, 6, 406, 23, 1),
(3460, 6, 372, 24, 1),
(3461, 6, 360, 25, 1),
(3462, 6, 286, 26, 1),
(3463, 6, 356, 27, 1),
(3464, 6, 323, 28, 1),
(3465, 6, 285, 29, 1),
(3466, 6, 326, 30, 1),
(3467, 6, 354, 31, 1),
(3468, 6, 346, 32, 1),
(3469, 6, 388, 33, 1),
(3470, 6, 299, 34, 1),
(3471, 6, 361, 35, 1),
(3472, 6, 320, 36, 1),
(3473, 6, 350, 37, 1),
(3474, 6, 405, 38, 1),
(3475, 6, 374, 39, 1),
(3476, 6, 402, 40, 1),
(3477, 6, 287, 41, 1),
(3478, 6, 296, 42, 1),
(3479, 6, 318, 43, 1),
(3480, 6, 340, 44, 1),
(3481, 6, 353, 45, 1),
(3482, 6, 317, 46, 1),
(3483, 6, 411, 47, 1),
(3484, 6, 383, 48, 1),
(3485, 6, 311, 49, 1),
(3486, 6, 352, 50, 1),
(3487, 6, 342, 51, 1),
(3488, 6, 396, 52, 1),
(3489, 6, 400, 53, 1),
(3490, 6, 306, 54, 1),
(3491, 6, 319, 55, 1),
(3492, 6, 322, 56, 1),
(3493, 6, 343, 57, 1),
(3494, 6, 282, 58, 1),
(3495, 6, 291, 59, 1),
(3496, 6, 409, 60, 1),
(3497, 6, 293, 61, 1),
(3498, 6, 321, 62, 1),
(3499, 6, 329, 63, 1),
(3500, 6, 344, 64, 1),
(3501, 6, 376, 65, 1),
(3502, 6, 316, 66, 1),
(3503, 6, 331, 67, 1),
(3504, 6, 310, 68, 1),
(3505, 6, 392, 69, 1),
(3506, 6, 363, 70, 1),
(3507, 6, 325, 71, 1),
(3508, 6, 333, 72, 1),
(3509, 6, 327, 73, 1),
(3510, 6, 302, 74, 1),
(3511, 6, 298, 75, 1),
(3512, 6, 351, 76, 1),
(3513, 6, 347, 77, 1),
(3514, 6, 398, 78, 1),
(3515, 6, 276, 79, 1),
(3516, 6, 391, 80, 1),
(3517, 6, 359, 81, 1),
(3518, 6, 345, 82, 1),
(3519, 6, 385, 83, 1),
(3520, 6, 277, 84, 1),
(3521, 6, 308, 85, 1),
(3522, 6, 288, 86, 1),
(3523, 6, 357, 87, 1),
(3524, 6, 401, 88, 1),
(3525, 6, 312, 89, 1),
(3526, 6, 335, 90, 1),
(3527, 6, 283, 91, 1),
(3528, 6, 358, 92, 1),
(3529, 6, 399, 93, 1),
(3530, 6, 404, 94, 1),
(3531, 6, 338, 95, 1),
(3532, 6, 275, 96, 1),
(3533, 6, 377, 97, 1),
(3534, 6, 380, 98, 1),
(3535, 6, 324, 99, 1),
(3536, 6, 341, 100, 1),
(3537, 6, 371, 101, 1),
(3538, 6, 393, 102, 1),
(3539, 6, 332, 103, 1),
(3540, 6, 407, 104, 1),
(3541, 6, 307, 105, 1),
(3542, 6, 410, 106, 1),
(3543, 6, 336, 107, 1),
(3544, 6, 301, 108, 1),
(3545, 6, 337, 109, 1),
(3546, 6, 394, 110, 1),
(3547, 6, 395, 111, 1),
(3548, 6, 309, 112, 1),
(3549, 6, 375, 113, 1),
(3550, 6, 297, 114, 1),
(3551, 6, 397, 115, 1),
(3552, 6, 348, 116, 1),
(3553, 6, 370, 117, 1),
(3554, 6, 294, 118, 1),
(3555, 6, 289, 119, 1),
(3556, 6, 300, 120, 1),
(3557, 6, 369, 121, 1),
(3558, 6, 373, 122, 1),
(3559, 6, 364, 123, 1),
(3560, 6, 378, 124, 1),
(3561, 6, 403, 125, 1),
(3562, 6, 365, 126, 1),
(3563, 6, 313, 127, 1),
(3564, 6, 290, 128, 1),
(3565, 6, 382, 129, 1),
(3566, 6, 368, 130, 1),
(3567, 6, 279, 131, 1),
(3568, 6, 278, 132, 1),
(3569, 6, 381, 133, 1),
(3570, 6, 349, 134, 1),
(3571, 6, 280, 135, 1),
(3572, 6, 330, 136, 1),
(3573, 6, 390, 137, 1),
(3574, 7, 389, 0, 1),
(3575, 7, 304, 1, 1),
(3576, 7, 366, 2, 1),
(3577, 7, 274, 3, 1),
(3578, 7, 315, 4, 1),
(3579, 7, 292, 5, 1),
(3580, 7, 367, 6, 1),
(3581, 7, 408, 7, 1),
(3582, 7, 284, 8, 1),
(3583, 7, 295, 9, 1),
(3584, 7, 334, 10, 1),
(3585, 7, 303, 11, 1),
(3586, 7, 328, 12, 1),
(3587, 7, 305, 13, 1),
(3588, 7, 386, 14, 1),
(3589, 7, 281, 15, 1),
(3590, 7, 314, 16, 1),
(3591, 7, 355, 17, 1),
(3592, 7, 384, 18, 1),
(3593, 7, 387, 19, 1),
(3594, 7, 339, 20, 1),
(3595, 7, 379, 21, 1),
(3596, 7, 362, 22, 1),
(3597, 7, 406, 23, 1),
(3598, 7, 372, 24, 1),
(3599, 7, 360, 25, 1),
(3600, 7, 286, 26, 1),
(3601, 7, 356, 27, 1),
(3602, 7, 323, 28, 1),
(3603, 7, 285, 29, 1),
(3604, 7, 326, 30, 1),
(3605, 7, 354, 31, 1),
(3606, 7, 346, 32, 1),
(3607, 7, 388, 33, 1),
(3608, 7, 299, 34, 1),
(3609, 7, 361, 35, 1),
(3610, 7, 320, 36, 1),
(3611, 7, 350, 37, 1),
(3612, 7, 405, 38, 1),
(3613, 7, 374, 39, 1),
(3614, 7, 402, 40, 1),
(3615, 7, 287, 41, 1),
(3616, 7, 296, 42, 1),
(3617, 7, 318, 43, 1),
(3618, 7, 340, 44, 1),
(3619, 7, 353, 45, 1),
(3620, 7, 317, 46, 1),
(3621, 7, 411, 47, 1),
(3622, 7, 383, 48, 1),
(3623, 7, 311, 49, 1),
(3624, 7, 352, 50, 1),
(3625, 7, 342, 51, 1),
(3626, 7, 396, 52, 1),
(3627, 7, 400, 53, 1),
(3628, 7, 306, 54, 1),
(3629, 7, 319, 55, 1),
(3630, 7, 322, 56, 1),
(3631, 7, 343, 57, 1),
(3632, 7, 282, 58, 1),
(3633, 7, 291, 59, 1),
(3634, 7, 409, 60, 1),
(3635, 7, 293, 61, 1),
(3636, 7, 321, 62, 1),
(3637, 7, 329, 63, 1),
(3638, 7, 344, 64, 1),
(3639, 7, 376, 65, 1),
(3640, 7, 316, 66, 1),
(3641, 7, 331, 67, 1),
(3642, 7, 310, 68, 1),
(3643, 7, 392, 69, 1),
(3644, 7, 363, 70, 1),
(3645, 7, 325, 71, 1),
(3646, 7, 333, 72, 1),
(3647, 7, 327, 73, 1),
(3648, 7, 302, 74, 1),
(3649, 7, 298, 75, 1),
(3650, 7, 351, 76, 1),
(3651, 7, 347, 77, 1),
(3652, 7, 398, 78, 1),
(3653, 7, 276, 79, 1),
(3654, 7, 391, 80, 1),
(3655, 7, 359, 81, 1),
(3656, 7, 345, 82, 1),
(3657, 7, 385, 83, 1),
(3658, 7, 277, 84, 1),
(3659, 7, 308, 85, 1),
(3660, 7, 288, 86, 1),
(3661, 7, 357, 87, 1),
(3662, 7, 401, 88, 1),
(3663, 7, 312, 89, 1),
(3664, 7, 335, 90, 1),
(3665, 7, 283, 91, 1),
(3666, 7, 358, 92, 1),
(3667, 7, 399, 93, 1),
(3668, 7, 404, 94, 1),
(3669, 7, 338, 95, 1),
(3670, 7, 275, 96, 1),
(3671, 7, 377, 97, 1),
(3672, 7, 380, 98, 1),
(3673, 7, 324, 99, 1),
(3674, 7, 341, 100, 1),
(3675, 7, 371, 101, 1),
(3676, 7, 393, 102, 1),
(3677, 7, 332, 103, 1),
(3678, 7, 407, 104, 1),
(3679, 7, 307, 105, 1),
(3680, 7, 410, 106, 1),
(3681, 7, 336, 107, 1),
(3682, 7, 301, 108, 1),
(3683, 7, 337, 109, 1),
(3684, 7, 394, 110, 1),
(3685, 7, 395, 111, 1),
(3686, 7, 309, 112, 1),
(3687, 7, 375, 113, 1),
(3688, 7, 297, 114, 1),
(3689, 7, 397, 115, 1),
(3690, 7, 348, 116, 1),
(3691, 7, 370, 117, 1),
(3692, 7, 294, 118, 1),
(3693, 7, 289, 119, 1),
(3694, 7, 300, 120, 1),
(3695, 7, 369, 121, 1),
(3696, 7, 373, 122, 1),
(3697, 7, 364, 123, 1),
(3698, 7, 378, 124, 1),
(3699, 7, 403, 125, 1),
(3700, 7, 365, 126, 1),
(3701, 7, 313, 127, 1),
(3702, 7, 290, 128, 1),
(3703, 7, 382, 129, 1),
(3704, 7, 368, 130, 1),
(3705, 7, 279, 131, 1),
(3706, 7, 278, 132, 1),
(3707, 7, 381, 133, 1),
(3708, 7, 349, 134, 1),
(3709, 7, 280, 135, 1),
(3710, 7, 330, 136, 1),
(3711, 7, 390, 137, 1),
(3712, 8, 389, 0, 1),
(3713, 8, 304, 1, 1),
(3714, 8, 366, 2, 1),
(3715, 8, 274, 3, 1),
(3716, 8, 315, 4, 1),
(3717, 8, 292, 5, 1),
(3718, 8, 367, 6, 1),
(3719, 8, 408, 7, 1),
(3720, 8, 284, 8, 1),
(3721, 8, 295, 9, 1),
(3722, 8, 334, 10, 1),
(3723, 8, 303, 11, 1),
(3724, 8, 328, 12, 1),
(3725, 8, 305, 13, 1),
(3726, 8, 386, 14, 1),
(3727, 8, 281, 15, 1),
(3728, 8, 314, 16, 1),
(3729, 8, 355, 17, 1),
(3730, 8, 384, 18, 1),
(3731, 8, 387, 19, 1),
(3732, 8, 339, 20, 1),
(3733, 8, 379, 21, 1),
(3734, 8, 362, 22, 1),
(3735, 8, 406, 23, 1),
(3736, 8, 372, 24, 1),
(3737, 8, 360, 25, 1),
(3738, 8, 286, 26, 1),
(3739, 8, 356, 27, 1),
(3740, 8, 323, 28, 1),
(3741, 8, 285, 29, 1),
(3742, 8, 326, 30, 1),
(3743, 8, 354, 31, 1),
(3744, 8, 346, 32, 1),
(3745, 8, 388, 33, 1),
(3746, 8, 299, 34, 1),
(3747, 8, 361, 35, 1),
(3748, 8, 320, 36, 1),
(3749, 8, 350, 37, 1),
(3750, 8, 405, 38, 1),
(3751, 8, 374, 39, 1),
(3752, 8, 402, 40, 1),
(3753, 8, 287, 41, 1),
(3754, 8, 296, 42, 1),
(3755, 8, 318, 43, 1),
(3756, 8, 340, 44, 1),
(3757, 8, 353, 45, 1),
(3758, 8, 317, 46, 1),
(3759, 8, 411, 47, 1),
(3760, 8, 383, 48, 1),
(3761, 8, 311, 49, 1),
(3762, 8, 352, 50, 1),
(3763, 8, 342, 51, 1),
(3764, 8, 396, 52, 1),
(3765, 8, 400, 53, 1),
(3766, 8, 306, 54, 1),
(3767, 8, 319, 55, 1),
(3768, 8, 322, 56, 1),
(3769, 8, 343, 57, 1),
(3770, 8, 282, 58, 1),
(3771, 8, 291, 59, 1),
(3772, 8, 409, 60, 1),
(3773, 8, 293, 61, 1),
(3774, 8, 321, 62, 1),
(3775, 8, 329, 63, 1),
(3776, 8, 344, 64, 1),
(3777, 8, 376, 65, 1),
(3778, 8, 316, 66, 1),
(3779, 8, 331, 67, 1),
(3780, 8, 310, 68, 1),
(3781, 8, 392, 69, 1),
(3782, 8, 363, 70, 1),
(3783, 8, 325, 71, 1),
(3784, 8, 333, 72, 1),
(3785, 8, 327, 73, 1),
(3786, 8, 302, 74, 1),
(3787, 8, 298, 75, 1),
(3788, 8, 351, 76, 1),
(3789, 8, 347, 77, 1),
(3790, 8, 398, 78, 1),
(3791, 8, 276, 79, 1),
(3792, 8, 391, 80, 1),
(3793, 8, 359, 81, 1),
(3794, 8, 345, 82, 1),
(3795, 8, 385, 83, 1),
(3796, 8, 277, 84, 1),
(3797, 8, 308, 85, 1),
(3798, 8, 288, 86, 1),
(3799, 8, 357, 87, 1),
(3800, 8, 401, 88, 1),
(3801, 8, 312, 89, 1),
(3802, 8, 335, 90, 1),
(3803, 8, 283, 91, 1),
(3804, 8, 358, 92, 1),
(3805, 8, 399, 93, 1),
(3806, 8, 404, 94, 1),
(3807, 8, 338, 95, 1),
(3808, 8, 275, 96, 1),
(3809, 8, 377, 97, 1),
(3810, 8, 380, 98, 1),
(3811, 8, 324, 99, 1),
(3812, 8, 341, 100, 1),
(3813, 8, 371, 101, 1),
(3814, 8, 393, 102, 1),
(3815, 8, 332, 103, 1),
(3816, 8, 407, 104, 1),
(3817, 8, 307, 105, 1),
(3818, 8, 410, 106, 1),
(3819, 8, 336, 107, 1),
(3820, 8, 301, 108, 1),
(3821, 8, 337, 109, 1),
(3822, 8, 394, 110, 1),
(3823, 8, 395, 111, 1),
(3824, 8, 309, 112, 1),
(3825, 8, 375, 113, 1),
(3826, 8, 297, 114, 1),
(3827, 8, 397, 115, 1),
(3828, 8, 348, 116, 1),
(3829, 8, 370, 117, 1),
(3830, 8, 294, 118, 1),
(3831, 8, 289, 119, 1),
(3832, 8, 300, 120, 1),
(3833, 8, 369, 121, 1),
(3834, 8, 373, 122, 1),
(3835, 8, 364, 123, 1),
(3836, 8, 378, 124, 1),
(3837, 8, 403, 125, 1),
(3838, 8, 365, 126, 1),
(3839, 8, 313, 127, 1),
(3840, 8, 290, 128, 1),
(3841, 8, 382, 129, 1),
(3842, 8, 368, 130, 1),
(3843, 8, 279, 131, 1),
(3844, 8, 278, 132, 1),
(3845, 8, 381, 133, 1),
(3846, 8, 349, 134, 1),
(3847, 8, 280, 135, 1),
(3848, 8, 330, 136, 1),
(3849, 8, 390, 137, 1),
(3850, 9, 389, 0, 1),
(3851, 9, 304, 1, 1),
(3852, 9, 366, 2, 1),
(3853, 9, 274, 3, 1),
(3854, 9, 315, 4, 1),
(3855, 9, 292, 5, 1),
(3856, 9, 367, 6, 1),
(3857, 9, 408, 7, 1),
(3858, 9, 284, 8, 1),
(3859, 9, 295, 9, 1),
(3860, 9, 334, 10, 1),
(3861, 9, 303, 11, 1),
(3862, 9, 328, 12, 1),
(3863, 9, 305, 13, 1),
(3864, 9, 386, 14, 1),
(3865, 9, 281, 15, 1),
(3866, 9, 314, 16, 1),
(3867, 9, 355, 17, 1),
(3868, 9, 384, 18, 1),
(3869, 9, 387, 19, 1),
(3870, 9, 339, 20, 1),
(3871, 9, 379, 21, 1),
(3872, 9, 362, 22, 1),
(3873, 9, 406, 23, 1),
(3874, 9, 372, 24, 1),
(3875, 9, 360, 25, 1),
(3876, 9, 286, 26, 1),
(3877, 9, 356, 27, 1),
(3878, 9, 323, 28, 1),
(3879, 9, 285, 29, 1),
(3880, 9, 326, 30, 1),
(3881, 9, 354, 31, 1),
(3882, 9, 346, 32, 1),
(3883, 9, 388, 33, 1),
(3884, 9, 299, 34, 1),
(3885, 9, 361, 35, 1),
(3886, 9, 320, 36, 1),
(3887, 9, 350, 37, 1),
(3888, 9, 405, 38, 1),
(3889, 9, 374, 39, 1),
(3890, 9, 402, 40, 1),
(3891, 9, 287, 41, 1),
(3892, 9, 296, 42, 1),
(3893, 9, 318, 43, 1),
(3894, 9, 340, 44, 1),
(3895, 9, 353, 45, 1),
(3896, 9, 317, 46, 1),
(3897, 9, 411, 47, 1),
(3898, 9, 383, 48, 1),
(3899, 9, 311, 49, 1),
(3900, 9, 352, 50, 1),
(3901, 9, 342, 51, 1),
(3902, 9, 396, 52, 1),
(3903, 9, 400, 53, 1),
(3904, 9, 306, 54, 1),
(3905, 9, 319, 55, 1),
(3906, 9, 322, 56, 1),
(3907, 9, 343, 57, 1),
(3908, 9, 282, 58, 1),
(3909, 9, 291, 59, 1),
(3910, 9, 409, 60, 1),
(3911, 9, 293, 61, 1),
(3912, 9, 321, 62, 1),
(3913, 9, 329, 63, 1),
(3914, 9, 344, 64, 1),
(3915, 9, 376, 65, 1),
(3916, 9, 316, 66, 1),
(3917, 9, 331, 67, 1),
(3918, 9, 310, 68, 1),
(3919, 9, 392, 69, 1),
(3920, 9, 363, 70, 1),
(3921, 9, 325, 71, 1),
(3922, 9, 333, 72, 1),
(3923, 9, 327, 73, 1),
(3924, 9, 302, 74, 1),
(3925, 9, 298, 75, 1),
(3926, 9, 351, 76, 1),
(3927, 9, 347, 77, 1),
(3928, 9, 398, 78, 1),
(3929, 9, 276, 79, 1),
(3930, 9, 391, 80, 1),
(3931, 9, 359, 81, 1),
(3932, 9, 345, 82, 1),
(3933, 9, 385, 83, 1),
(3934, 9, 277, 84, 1),
(3935, 9, 308, 85, 1),
(3936, 9, 288, 86, 1),
(3937, 9, 357, 87, 1),
(3938, 9, 401, 88, 1),
(3939, 9, 312, 89, 1),
(3940, 9, 335, 90, 1),
(3941, 9, 283, 91, 1),
(3942, 9, 358, 92, 1),
(3943, 9, 399, 93, 1),
(3944, 9, 404, 94, 1),
(3945, 9, 338, 95, 1),
(3946, 9, 275, 96, 1),
(3947, 9, 377, 97, 1),
(3948, 9, 380, 98, 1),
(3949, 9, 324, 99, 1),
(3950, 9, 341, 100, 1),
(3951, 9, 371, 101, 1),
(3952, 9, 393, 102, 1),
(3953, 9, 332, 103, 1),
(3954, 9, 407, 104, 1),
(3955, 9, 307, 105, 1),
(3956, 9, 410, 106, 1),
(3957, 9, 336, 107, 1),
(3958, 9, 301, 108, 1),
(3959, 9, 337, 109, 1),
(3960, 9, 394, 110, 1),
(3961, 9, 395, 111, 1),
(3962, 9, 309, 112, 1),
(3963, 9, 375, 113, 1),
(3964, 9, 297, 114, 1),
(3965, 9, 397, 115, 1),
(3966, 9, 348, 116, 1),
(3967, 9, 370, 117, 1),
(3968, 9, 294, 118, 1),
(3969, 9, 289, 119, 1),
(3970, 9, 300, 120, 1),
(3971, 9, 369, 121, 1),
(3972, 9, 373, 122, 1),
(3973, 9, 364, 123, 1),
(3974, 9, 378, 124, 1),
(3975, 9, 403, 125, 1),
(3976, 9, 365, 126, 1),
(3977, 9, 313, 127, 1),
(3978, 9, 290, 128, 1),
(3979, 9, 382, 129, 1),
(3980, 9, 368, 130, 1),
(3981, 9, 279, 131, 1),
(3982, 9, 278, 132, 1),
(3983, 9, 381, 133, 1),
(3984, 9, 349, 134, 1),
(3985, 9, 280, 135, 1),
(3986, 9, 330, 136, 1),
(3987, 9, 390, 137, 1);

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

--
-- Estructura de tabla para la tabla `_bak_encuestas`
--

CREATE TABLE `_bak_encuestas` (
  `id` int(11) NOT NULL DEFAULT 0,
  `titulo` varchar(255) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `activa` tinyint(1) DEFAULT 1,
  `fecha_creacion` timestamp NOT NULL DEFAULT current_timestamp(),
  `fecha_cierre` timestamp NULL DEFAULT NULL,
  `total_votos` int(11) DEFAULT 0,
  `admin_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estructura de tabla para la tabla `_bak_opciones`
--

CREATE TABLE `_bak_opciones` (
  `id` int(11) NOT NULL DEFAULT 0,
  `encuesta_id` int(11) NOT NULL,
  `texto_opcion` varchar(255) NOT NULL,
  `votos` int(11) DEFAULT 0,
  `orden` int(11) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Estructura de tabla para la tabla `_bak_sorteos`
--

CREATE TABLE `_bak_sorteos` (
  `id` int(11) NOT NULL DEFAULT 0,
  `encuesta_id` int(11) DEFAULT NULL,
  `usuario_ganador_id` int(11) NOT NULL,
  `fecha_sorteo` timestamp NOT NULL DEFAULT current_timestamp(),
  `admin_id` int(11) DEFAULT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `nombre_premio` varchar(255) NOT NULL DEFAULT '',
  `tipo_sorteo` enum('general','encuesta') DEFAULT 'general'
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `_bak_sorteos` (`id`, `encuesta_id`, `usuario_ganador_id`, `fecha_sorteo`, `admin_id`, `descripcion`, `nombre_premio`, `tipo_sorteo`) VALUES
(21, NULL, 264, '2026-07-21 20:00:40', 1, 'Sorteo de iPhone 15', 'iPhone 15', 'general');

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

--
-- Estructura de tabla para la tabla `_bak_usuarios_sorteo`
--

CREATE TABLE `_bak_usuarios_sorteo` (
  `id` int(11) NOT NULL DEFAULT 0,
  `nombre` varchar(255) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `telefono` varchar(20) DEFAULT NULL,
  `documento` varchar(50) DEFAULT NULL,
  `activo` tinyint(1) DEFAULT 1,
  `fecha_carga` timestamp NOT NULL DEFAULT current_timestamp(),
  `encuesta_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `_bak_usuarios_sorteo` (`id`, `nombre`, `email`, `telefono`, `documento`, `activo`, `fecha_carga`, `encuesta_id`) VALUES
(159, '1', 'Aguirre', 'Quijada', 'Alicia Cristina', 1, '2026-07-21 20:00:27', NULL),
(160, '2', 'Alcaino', 'Valenzuela', 'Miguel Ignacio', 1, '2026-07-21 20:00:27', NULL),
(161, '3', 'Álvarez', 'Sepúlveda', 'Macarena Fernanda', 1, '2026-07-21 20:00:27', NULL),
(162, '4', 'Arango', 'Delgado', 'María del Pilar', 1, '2026-07-21 20:00:27', NULL),
(163, '5', 'Arenas', 'Díaz', 'Víctor Gabriel', 1, '2026-07-21 20:00:27', NULL),
(164, '6', 'Barahona', 'Kaschel', 'Verónica Andrea', 1, '2026-07-21 20:00:27', NULL),
(165, '7', 'Barria', 'Sáez', 'Yanira del Carmen', 1, '2026-07-21 20:00:27', NULL),
(166, '8', 'Barrientos', 'Fuentes', 'Bayron Alejandro', 1, '2026-07-21 20:00:27', NULL),
(167, '9', 'Barrios', 'Basanta', 'Johannymar Nazareth', 1, '2026-07-21 20:00:27', NULL),
(168, '10', 'Becerra', 'Verdugo', 'Marisol Pilar', 1, '2026-07-21 20:00:27', NULL),
(169, '11', 'Benavides', 'Silva', 'Antonio Francisco', 1, '2026-07-21 20:00:27', NULL),
(170, '12', 'Blanco', 'De La Parra', 'Daniel Ignacio', 1, '2026-07-21 20:00:27', NULL),
(171, '13', 'Bossi', 'Martínez', 'Claudia Erna', 1, '2026-07-21 20:00:27', NULL),
(172, '14', 'Bravo', 'Huenchulaf', 'Francesco Alexander', 1, '2026-07-21 20:00:27', NULL),
(173, '15', 'Bruce', 'Montes', 'María José', 1, '2026-07-21 20:00:27', NULL),
(174, '16', 'Bustos', 'Rioseco', 'Romina Salome', 1, '2026-07-21 20:00:27', NULL),
(175, '17', 'Cáceres', 'Salas', 'Valerie Andrea', 1, '2026-07-21 20:00:27', NULL),
(176, '19', 'Campillay', 'Martínez', 'Ana Isabel', 1, '2026-07-21 20:00:27', NULL),
(177, '20', 'Carrasco', 'Muñoz', 'Josefa Andrea', 1, '2026-07-21 20:00:27', NULL),
(178, '21', 'Castro', 'Vega', 'Romina Andrea', 1, '2026-07-21 20:00:27', NULL),
(179, '23', 'Cepeda', 'Bleck', 'Franchesca Andrea', 1, '2026-07-21 20:00:27', NULL),
(180, '24', 'Collipal', 'Aedo', 'Rocío Estrella', 1, '2026-07-21 20:00:27', NULL),
(181, '25', 'Contreras', 'Pittaluga', 'Lorena Ángelica', 1, '2026-07-21 20:00:27', NULL),
(182, '26', 'Cornejo', 'Rodríguez', 'Elizabeth Viviana', 1, '2026-07-21 20:00:27', NULL),
(183, '27', 'Cristi', 'Tejeda', 'Rosario Andrea', 1, '2026-07-21 20:00:27', NULL),
(184, '28', 'Cubelli', 'Nazer', 'Ornella Karime', 1, '2026-07-21 20:00:27', NULL),
(185, '29', 'Díaz', 'Leyton', 'Lissette', 1, '2026-07-21 20:00:27', NULL),
(186, '31', 'Duque', 'Aponte', 'Alejandra Carolina', 1, '2026-07-21 20:00:27', NULL),
(187, '32', 'Duran', 'Portales', 'Barbara Isidora', 1, '2026-07-21 20:00:27', NULL),
(188, '33', 'Elgueta', 'Orellana', 'Ivette Erna', 1, '2026-07-21 20:00:27', NULL),
(189, '34', 'Erazo', 'Pérez', 'Noelia Naomi', 1, '2026-07-21 20:00:27', NULL),
(190, '35', 'Facciolo', '', 'María Eugenia', 1, '2026-07-21 20:00:27', NULL),
(191, '36', 'Farías', 'Flores', 'Patricia Ángelica', 1, '2026-07-21 20:00:27', NULL),
(192, '37', 'Fernández', 'Rioseco', 'Karla Patricia', 1, '2026-07-21 20:00:27', NULL),
(193, '39', 'Figueroa', 'Orellana', 'Marianela Catalina', 1, '2026-07-21 20:00:27', NULL),
(194, '40', 'Flores', 'Olea', 'Valeria Katerina', 1, '2026-07-21 20:00:27', NULL),
(195, '41', 'Friz', 'Ramírez', 'Camila Constanza', 1, '2026-07-21 20:00:27', NULL),
(196, '42', 'Fuentes', 'Bastidas', 'Amalia Yaneska', 1, '2026-07-21 20:00:27', NULL),
(197, '43', 'Gaete', 'Garrido', 'Karin Valeria', 1, '2026-07-21 20:00:27', NULL),
(198, '44', 'Garay', 'González', 'Francisco Andres', 1, '2026-07-21 20:00:27', NULL),
(199, '45', 'García', 'De La Huerta', 'Francisca Arrau', 1, '2026-07-21 20:00:27', NULL),
(200, '47', 'González', 'Muñoz', 'Fabiola Alejandra', 1, '2026-07-21 20:00:27', NULL),
(201, '48', 'Guevara', 'Gutiérrez', 'Joyce Vanessa', 1, '2026-07-21 20:00:27', NULL),
(202, '49', 'Guzmán', 'Osorio', 'Javiera Francisca', 1, '2026-07-21 20:00:27', NULL),
(203, '50', 'Henríquez', 'Mora', 'Claudio Andres', 1, '2026-07-21 20:00:27', NULL),
(204, '51', 'Hermosilla', 'Bravo', 'Nancy Ximena', 1, '2026-07-21 20:00:27', NULL),
(205, '52', 'Hernández', 'Salas', 'Kevin Ignacio', 1, '2026-07-21 20:00:27', NULL),
(206, '53', 'Herrera', 'Campos', 'Daniela Alejandra', 1, '2026-07-21 20:00:27', NULL),
(207, '54', 'Ibañez', 'González', 'Leonardo Sebastían', 1, '2026-07-21 20:00:27', NULL),
(208, '55', 'Ibarra', 'Muñoz', 'Barbara', 1, '2026-07-21 20:00:27', NULL),
(209, '56', 'Irarrazabal', 'Chamorro', 'Juan Cristian', 1, '2026-07-21 20:00:27', NULL),
(210, '57', 'Iturrieta', 'González', 'Yessenia Andrea', 1, '2026-07-21 20:00:27', NULL),
(211, '58', 'Jaime', 'Barrientos', 'Karina Alejandra', 1, '2026-07-21 20:00:27', NULL),
(212, '59', 'Jara', 'Ureta', 'Nicole Marisol', 1, '2026-07-21 20:00:27', NULL),
(213, '61', 'Lizama', 'Ormeño', 'Barbara Elizabeth', 1, '2026-07-21 20:00:27', NULL),
(214, '62', 'López', 'Ponce', 'Marietta Angelina', 1, '2026-07-21 20:00:27', NULL),
(215, '63', 'Loukachevitch', '', 'Olga', 1, '2026-07-21 20:00:27', NULL),
(216, '64', 'Maldonado', 'Vásquez', 'Pablo Andres', 1, '2026-07-21 20:00:27', NULL),
(217, '65', 'Malio', 'Rojas', 'Miguel Andres', 1, '2026-07-21 20:00:27', NULL),
(218, '66', 'Malschafsky', 'Corvalán', 'Camila Nicole', 1, '2026-07-21 20:00:27', NULL),
(219, '67', 'Mancilla', 'Cárcamo', 'Francisca Belen', 1, '2026-07-21 20:00:27', NULL),
(220, '68', 'Manquehual', 'Pincheira', 'Natalia Isabel', 1, '2026-07-21 20:00:27', NULL),
(221, '69', 'Marnich', 'Navarrete', 'Hans Mirko', 1, '2026-07-21 20:00:27', NULL),
(222, '70', 'Márquez', 'Lavanderos', 'Jocelyn Alejandra', 1, '2026-07-21 20:00:27', NULL),
(223, '71', 'Mendoza', 'Veas', 'Julio Hernan', 1, '2026-07-21 20:00:27', NULL),
(224, '72', 'Merino', 'Venegas', 'Marcela Andrea', 1, '2026-07-21 20:00:27', NULL),
(225, '73', 'Mieres', 'Cayul', 'David Alfredo', 1, '2026-07-21 20:00:27', NULL),
(226, '74', 'Montero', 'Cerda', 'Luis Marcelo', 1, '2026-07-21 20:00:27', NULL),
(227, '75', 'Morales', 'Torres', 'Rodrigo Andres', 1, '2026-07-21 20:00:27', NULL),
(228, '78', 'Moreno', 'Moreno', 'Luciana Jimena', 1, '2026-07-21 20:00:27', NULL),
(229, '79', 'Muñoz', 'Muñoz', 'Gricel Andrea', 1, '2026-07-21 20:00:27', NULL),
(230, '81', 'Navarro', 'Gutiérrez', 'Daniela Susana', 1, '2026-07-21 20:00:27', NULL),
(231, '82', 'Novoa', 'Cea', 'Camila Estrella', 1, '2026-07-21 20:00:27', NULL),
(232, '83', 'Nuñez', 'Valencia', 'Claudia Ximena', 1, '2026-07-21 20:00:27', NULL),
(233, '84', 'Olivares', '', 'María Julieta', 1, '2026-07-21 20:00:27', NULL),
(234, '85', 'Opazo', 'Medina', 'Matias Andres', 1, '2026-07-21 20:00:27', NULL),
(235, '86', 'Ortiz', 'Clift', 'Makarena Constanza', 1, '2026-07-21 20:00:27', NULL),
(236, '87', 'Osorio', 'Lisboa', 'Cecilia Angelina', 1, '2026-07-21 20:00:27', NULL),
(237, '88', 'Pacheco', 'Moller', 'Erika Edith', 1, '2026-07-21 20:00:27', NULL),
(238, '89', 'Peña', 'Cartes', 'Carolina Alejandra', 1, '2026-07-21 20:00:27', NULL),
(239, '90', 'Pérez', 'Salinas', 'Katty de las N.', 1, '2026-07-21 20:00:27', NULL),
(240, '92', 'Pichara', 'Saud', 'Tarek', 1, '2026-07-21 20:00:27', NULL),
(241, '93', 'Pinilla', 'Araya', 'Alfredo', 1, '2026-07-21 20:00:27', NULL),
(242, '94', 'Pino', 'Muñoz', 'Andrew Sebastian', 1, '2026-07-21 20:00:27', NULL),
(243, '95', 'Pizarro', 'Morales', 'Vania Lenka', 1, '2026-07-21 20:00:27', NULL),
(244, '96', 'Poblete', 'Carrillanca', 'Ruth Maria', 1, '2026-07-21 20:00:27', NULL),
(245, '97', 'Pradel', 'Villalobos', 'Rodrigo Martin', 1, '2026-07-21 20:00:27', NULL),
(246, '98', 'Reyes', 'Rodríguez', 'Natalia Teresa', 1, '2026-07-21 20:00:27', NULL),
(247, '100', 'Rincon', 'Pinilla', 'Sandra Milena', 1, '2026-07-21 20:00:27', NULL),
(248, '101', 'Ríos', 'Montenegro', 'Fernanda Constanza', 1, '2026-07-21 20:00:27', NULL),
(249, '102', 'Robles', 'Astudillo', 'Priscilla Jessica', 1, '2026-07-21 20:00:27', NULL),
(250, '103', 'Rojas', 'Burgos', 'Karen Carolina', 1, '2026-07-21 20:00:27', NULL),
(251, '104', 'Román', 'Sepúlveda', 'Mitzi Carolina', 1, '2026-07-21 20:00:27', NULL),
(252, '105', 'Rubina', 'Espinoza', 'Sebastian', 1, '2026-07-21 20:00:27', NULL),
(253, '106', 'Rubio', 'Vera', 'Carlos Andres', 1, '2026-07-21 20:00:27', NULL),
(254, '107', 'Ruíz', 'Rodríguez', 'Nancy Susana', 1, '2026-07-21 20:00:27', NULL),
(255, '108', 'Sánchez', 'Zamorano', 'Wladimir John', 1, '2026-07-21 20:00:27', NULL),
(256, '114', 'Sanhueza', 'Hernández', 'Camila Fernanda', 1, '2026-07-21 20:00:27', NULL),
(257, '115', 'Schramm', 'Quintuman', 'Eduardo Andres', 1, '2026-07-21 20:00:27', NULL),
(258, '116', 'Sepúlveda', 'Garay', 'Aivory Belen', 1, '2026-07-21 20:00:27', NULL),
(259, '117', 'Silva', 'Salinas', 'Yuri Bladimir', 1, '2026-07-21 20:00:27', NULL),
(260, '118', 'Soto', 'Melo', 'Macarena Nataly', 1, '2026-07-21 20:00:27', NULL),
(261, '120', 'Turrys', 'Morales', 'Nicolas Gustavo', 1, '2026-07-21 20:00:27', NULL),
(262, '121', 'Ulloa', 'Riveros', 'Pamela Andrea', 1, '2026-07-21 20:00:27', NULL),
(263, '122', 'Uribe', 'Asin', 'Paolo Cristobal', 1, '2026-07-21 20:00:27', NULL),
(264, '123', 'Urzúa', 'Miranda', 'Humberto Arturo', 1, '2026-07-21 20:00:27', NULL),
(265, '124', 'Valderrama', 'Parraguez', 'Rodrigo Alejandro', 1, '2026-07-21 20:00:27', NULL),
(266, '125', 'Valdés', 'González', 'Macarena del Pilar', 1, '2026-07-21 20:00:27', NULL),
(267, '126', 'Valenzuela', 'Rodríguez', 'Matias Ignacio', 1, '2026-07-21 20:00:27', NULL),
(268, '127', 'Vargas', 'Benavente', 'Ingrid Paola', 1, '2026-07-21 20:00:27', NULL),
(269, '128', 'Vásquez', 'Letelier', 'Maria Loreto', 1, '2026-07-21 20:00:27', NULL),
(270, '129', 'Venegas', 'Acevedo', 'Fernanda Daniela', 1, '2026-07-21 20:00:27', NULL),
(271, '131', 'Vicencio', 'Pérez', 'Michael Hector', 1, '2026-07-21 20:00:27', NULL),
(272, '132', 'Vidal', 'Rojas', 'Felipe Ivan', 1, '2026-07-21 20:00:27', NULL),
(273, '133', 'Vilches', 'Medina', 'Catalina Antonia', 1, '2026-07-21 20:00:27', NULL),
(274, '134', 'Vivanco', 'Vega', 'Ninoska Paulina', 1, '2026-07-21 20:00:27', NULL),
(275, '135', 'Yañez', 'Aguilar', 'Angelica Bernarda', 1, '2026-07-21 20:00:27', NULL),
(276, '136', 'Yevenes', 'Bienzobas', 'Jorge Felipe', 1, '2026-07-21 20:00:27', NULL),
(277, '137', 'Zagal', 'Leibur', 'Nuria Elizabeth', 1, '2026-07-21 20:00:27', NULL);

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

--
-- Estructura de tabla para la tabla `_bak_votos`
--

CREATE TABLE `_bak_votos` (
  `id` int(11) NOT NULL DEFAULT 0,
  `encuesta_id` int(11) NOT NULL,
  `opcion_id` int(11) NOT NULL,
  `ip_usuario` varchar(45) NOT NULL,
  `user_agent` text DEFAULT NULL,
  `fecha_voto` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indices de la tabla `configuracion`
--
ALTER TABLE `configuracion`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_clave` (`clave`);

--
-- Indices de la tabla `galeria_fotos`
--
ALTER TABLE `galeria_fotos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_activo_orden` (`activo`,`orden`);

--
-- Indices de la tabla `gi_config`
--
ALTER TABLE `gi_config`
  ADD PRIMARY KEY (`clave`);

--
-- Indices de la tabla `gi_consumo`
--
ALTER TABLE `gi_consumo`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_evento` (`evento_id`);

--
-- Indices de la tabla `gi_fondos`
--
ALTER TABLE `gi_fondos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_evento` (`evento_id`,`activo`,`orden`);

--
-- Indices de la tabla `gi_historial`
--
ALTER TABLE `gi_historial`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_evento` (`evento_id`);

--
-- Indices de la tabla `gi_imagenes`
--
ALTER TABLE `gi_imagenes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_evento` (`evento_id`,`estado`);

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

--
-- Indices de la tabla `logs_actividad`
--
ALTER TABLE `logs_actividad`
  ADD PRIMARY KEY (`id`),
  ADD KEY `admin_id` (`admin_id`),
  ADD KEY `idx_logs_fecha` (`fecha`);

--
-- Indices de la tabla `participantes`
--
ALTER TABLE `participantes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_estado` (`estado`),
  ADD KEY `idx_identificador` (`identificador`),
  ADD KEY `idx_batch` (`import_batch_id`);

--
-- Indices de la tabla `sorteos`
--
ALTER TABLE `sorteos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_estado` (`estado`),
  ADD KEY `idx_created_by` (`created_by`);

--
-- Indices de la tabla `sorteo_ganadores`
--
ALTER TABLE `sorteo_ganadores`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_sorteo` (`sorteo_id`),
  ADD KEY `idx_participante` (`participante_id`),
  ADD KEY `idx_estado` (`estado`),
  ADD KEY `idx_ronda` (`ronda_id`);

--
-- Indices de la tabla `sorteo_rondas`
--
ALTER TABLE `sorteo_rondas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_sorteo` (`sorteo_id`),
  ADD KEY `idx_estado` (`estado`);

--
-- Indices de la tabla `votacion_configuracion`
--
ALTER TABLE `votacion_configuracion`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_vot_clave` (`votacion_id`,`clave`);

--
-- Indices de la tabla `votacion_historial`
--
ALTER TABLE `votacion_historial`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_votacion` (`votacion_id`);

--
-- Indices de la tabla `votacion_participantes`
--
ALTER TABLE `votacion_participantes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_vot_part` (`votacion_id`,`participante_id`),
  ADD KEY `idx_votacion` (`votacion_id`);

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `logs_actividad`
--
ALTER TABLE `logs_actividad`
  ADD CONSTRAINT `logs_actividad_ibfk_1` FOREIGN KEY (`admin_id`) REFERENCES `administradores` (`id`) ON DELETE SET NULL;
COMMIT;

