-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 07-05-2026 a las 21:17:27
-- Versión del servidor: 10.4.28-MariaDB
-- Versión de PHP: 8.2.4

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


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `veltrix_pos`
--

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

--
-- Estructura de tabla para la tabla `ai_help_messages`
--

CREATE TABLE `ai_help_messages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `session_id` bigint(20) UNSIGNED DEFAULT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `rol` enum('user','assistant','system') NOT NULL DEFAULT 'assistant',
  `contenido` text NOT NULL,
  `modelo` varchar(120) DEFAULT NULL,
  `metadata_json` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `ai_help_sessions`
--

CREATE TABLE `ai_help_sessions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `titulo` varchar(160) NOT NULL,
  `estado` enum('activa','cerrada') NOT NULL DEFAULT 'activa',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `last_activity_at` datetime DEFAULT NULL,
  `closed_at` datetime DEFAULT NULL,
  `reopened_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `ai_help_sessions` (`id`, `empresa_id`, `usuario_id`, `titulo`, `estado`, `created_at`, `updated_at`, `last_activity_at`, `closed_at`, `reopened_at`) VALUES
(1, 2, 9, 'Chat 03/04/2026 20:06', 'activa', '2026-04-03 20:06:54', '2026-04-03 21:10:53', '2026-04-03 21:10:53', NULL, NULL),
(2, 1, 8, 'Chat 04/04/2026 21:33', 'activa', '2026-04-04 21:33:09', '2026-04-22 23:59:35', '2026-04-22 23:59:35', NULL, NULL),
(3, 3, 13, 'Nuevo chat 23/04 13:04', 'activa', '2026-04-23 13:04:36', '2026-04-23 13:10:42', '2026-04-23 13:10:42', NULL, NULL);

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

--
-- Estructura de tabla para la tabla `ajustes_inventario`
--

CREATE TABLE `ajustes_inventario` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `variante_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tipo_ajuste` enum('incremento','decremento','correccion') NOT NULL DEFAULT 'correccion',
  `stock_anterior` decimal(12,2) NOT NULL,
  `stock_nuevo` decimal(12,2) NOT NULL,
  `motivo` varchar(255) DEFAULT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `estado` enum('pendiente','aprobado','rechazado') NOT NULL DEFAULT 'pendiente',
  `aprobado_por_id` bigint(20) UNSIGNED DEFAULT NULL,
  `observacion_aprobacion` text DEFAULT NULL,
  `aprobado_at` datetime DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `aperturas_caja`
--

CREATE TABLE `aperturas_caja` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `caja_id` bigint(20) UNSIGNED DEFAULT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `monto_apertura` decimal(12,2) NOT NULL DEFAULT 0.00,
  `monto_cierre` decimal(12,2) DEFAULT NULL,
  `diferencia` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('abierta','cerrada') NOT NULL DEFAULT 'abierta',
  `fecha_apertura` datetime NOT NULL,
  `fecha_cierre` datetime DEFAULT NULL,
  `notas` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `aperturas_caja` (`id`, `empresa_id`, `caja_id`, `usuario_id`, `monto_apertura`, `monto_cierre`, `diferencia`, `estado`, `fecha_apertura`, `fecha_cierre`, `notas`, `created_at`) VALUES
(1, 1, 3, 8, 450000.00, NULL, 0.00, 'abierta', '2026-04-03 22:42:12', NULL, NULL, '2026-04-03 22:42:12');

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

--
-- Estructura de tabla para la tabla `avisos_cobro_suscripcion`
--

CREATE TABLE `avisos_cobro_suscripcion` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `suscripcion_id` bigint(20) UNSIGNED NOT NULL,
  `tipo` varchar(80) NOT NULL,
  `fecha_referencia` date NOT NULL,
  `canal` enum('email','whatsapp','log') NOT NULL DEFAULT 'email',
  `destinatario` varchar(180) DEFAULT NULL,
  `asunto` varchar(180) DEFAULT NULL,
  `mensaje` text DEFAULT NULL,
  `estado` enum('pendiente','enviado','error') NOT NULL DEFAULT 'pendiente',
  `intentos` tinyint(3) UNSIGNED NOT NULL DEFAULT 0,
  `max_intentos` tinyint(3) UNSIGNED NOT NULL DEFAULT 3,
  `ultimo_intento_at` datetime DEFAULT NULL,
  `proximo_intento_at` datetime DEFAULT NULL,
  `enviado_at` datetime DEFAULT NULL,
  `error_detalle` varchar(255) DEFAULT NULL,
  `metadata_json` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `avisos_cobro_suscripcion` (`id`, `empresa_id`, `suscripcion_id`, `tipo`, `fecha_referencia`, `canal`, `destinatario`, `asunto`, `mensaje`, `estado`, `intentos`, `max_intentos`, `ultimo_intento_at`, `proximo_intento_at`, `enviado_at`, `error_detalle`, `metadata_json`, `created_at`, `updated_at`) VALUES
(1, 2, 2, 'previo_1_dia', '2026-04-16', 'email', 'd.rios@hunolabs.com', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Daniel!\n\nTu suscripción de Abril vence mañana.\n\n📅 Fecha de pago oportuno: 16 de abril de 2026\n⏳ Fecha de suspensión: 17 de abril de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260417-D01&signature%3Aintegrity=fd36a975f093e7f787952bb16eda42897036d4cf8fdf3d19118f46595ec418a3&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-16 18:25:36', NULL, '2026-04-16 18:25:36', NULL, NULL, '2026-04-16 18:25:33', '2026-04-16 18:25:36'),
(2, 2, 2, 'previo_1_dia', '2026-04-16', 'whatsapp', '573122644576', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Daniel!\n\nTu suscripción de Abril vence mañana.\n\n📅 Fecha de pago oportuno: 16 de abril de 2026\n⏳ Fecha de suspensión: 17 de abril de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260417-D01&signature%3Aintegrity=fd36a975f093e7f787952bb16eda42897036d4cf8fdf3d19118f46595ec418a3&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-16 18:25:37', NULL, '2026-04-16 18:25:37', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSNEU0Qjg2NEFERjk5MEVENTk1AA==\"}]}}', '2026-04-16 18:25:33', '2026-04-16 18:25:37'),
(3, 1, 1, 'previo_1_dia', '2026-04-17', 'email', 'luisaconcha93@gmail.com', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Luisa!\n\nTu suscripción de Abril vence mañana.\n\n📅 Fecha de pago oportuno: 17 de abril de 2026\n⏳ Fecha de suspensión: 18 de abril de 2026\n💰 Total a pagar: $299.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=29900000&reference=VXREN-1-20260418-D01&signature%3Aintegrity=7d97227cb8885bf2fbb43bca1f56f644b984cc17cb0f57de6a2599cdf0e779bd&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dvolta&customer-data%3Aemail=luisaconcha93%40gmail.com', 'enviado', 1, 3, '2026-04-17 10:01:43', NULL, '2026-04-17 10:01:43', NULL, NULL, '2026-04-17 10:01:32', '2026-04-17 10:01:43'),
(4, 1, 1, 'previo_1_dia', '2026-04-17', 'whatsapp', '573246802685', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Luisa!\n\nTu suscripción de Abril vence mañana.\n\n📅 Fecha de pago oportuno: 17 de abril de 2026\n⏳ Fecha de suspensión: 18 de abril de 2026\n💰 Total a pagar: $299.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=29900000&reference=VXREN-1-20260418-D01&signature%3Aintegrity=7d97227cb8885bf2fbb43bca1f56f644b984cc17cb0f57de6a2599cdf0e779bd&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dvolta&customer-data%3Aemail=luisaconcha93%40gmail.com', 'enviado', 1, 3, '2026-04-17 10:01:57', NULL, '2026-04-17 10:01:57', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573246802685\",\"wa_id\":\"573246802685\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMjQ2ODAyNjg1FQIAERgSNjgzOTgyM0I2ODBERTg2MUE5AA==\"}]}}', '2026-04-17 10:01:32', '2026-04-17 10:01:57'),
(5, 2, 2, 'vence_hoy', '2026-04-17', 'email', 'd.rios@hunolabs.com', 'Hoy vence tu suscripción', '*Hoy vence tu suscripción*\n📢 ¡Hola, Daniel!\n\nTu suscripción de Abril vence hoy.\n\n📅 Fecha de pago oportuno: 16 de abril de 2026\n⏳ Fecha de suspensión: 17 de abril de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260417-D00&signature%3Aintegrity=a3d30a88dac230255115e22d2da595dd264b4ed3c9c6d101907273b24742b840&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-17 10:02:22', NULL, '2026-04-17 10:02:22', NULL, NULL, '2026-04-17 10:01:32', '2026-04-17 10:02:22'),
(6, 2, 2, 'vence_hoy', '2026-04-17', 'whatsapp', '573122644576', 'Hoy vence tu suscripción', '*Hoy vence tu suscripción*\n📢 ¡Hola, Daniel!\n\nTu suscripción de Abril vence hoy.\n\n📅 Fecha de pago oportuno: 16 de abril de 2026\n⏳ Fecha de suspensión: 17 de abril de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260417-D00&signature%3Aintegrity=a3d30a88dac230255115e22d2da595dd264b4ed3c9c6d101907273b24742b840&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-17 10:02:30', NULL, '2026-04-17 10:02:30', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMzk0MEEzMDIzRDdDREZEMzhDAA==\"}]}}', '2026-04-17 10:01:32', '2026-04-17 10:02:30'),
(7, 2, 2, 'vencida', '2026-04-18', 'email', 'd.rios@hunolabs.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-18 10:00:16', NULL, '2026-04-18 10:00:16', NULL, NULL, '2026-04-18 10:00:13', '2026-04-18 10:00:16'),
(8, 2, 2, 'vencida', '2026-04-18', 'whatsapp', '573122644576', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-18 10:00:19', NULL, '2026-04-18 10:00:19', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMUM0M0IzQzlDMDk5QTBCQzUwAA==\"}]}}', '2026-04-18 10:00:13', '2026-04-18 10:00:19'),
(9, 1, 1, 'vence_hoy', '2026-04-18', 'email', 'luisaconcha93@gmail.com', 'Hoy vence tu suscripción', '*Hoy vence tu suscripción*\n📢 ¡Hola, Luisa!\n\nTu suscripción de Abril vence hoy.\n\n📅 Fecha de pago oportuno: 17 de abril de 2026\n⏳ Fecha de suspensión: 18 de abril de 2026\n💰 Total a pagar: $299.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=29900000&reference=VXREN-1-20260418-D00&signature%3Aintegrity=041953b96fca78149f5ca8d07c746659440cc317290776f667547a1855875787&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dvolta&customer-data%3Aemail=luisaconcha93%40gmail.com', 'enviado', 1, 3, '2026-04-18 10:00:21', NULL, '2026-04-18 10:00:21', NULL, NULL, '2026-04-18 10:00:13', '2026-04-18 10:00:21'),
(10, 1, 1, 'vence_hoy', '2026-04-18', 'whatsapp', '573246802685', 'Hoy vence tu suscripción', '*Hoy vence tu suscripción*\n📢 ¡Hola, Luisa!\n\nTu suscripción de Abril vence hoy.\n\n📅 Fecha de pago oportuno: 17 de abril de 2026\n⏳ Fecha de suspensión: 18 de abril de 2026\n💰 Total a pagar: $299.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=29900000&reference=VXREN-1-20260418-D00&signature%3Aintegrity=041953b96fca78149f5ca8d07c746659440cc317290776f667547a1855875787&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dvolta&customer-data%3Aemail=luisaconcha93%40gmail.com', 'enviado', 1, 3, '2026-04-18 10:00:22', NULL, '2026-04-18 10:00:22', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573246802685\",\"wa_id\":\"573246802685\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMjQ2ODAyNjg1FQIAERgSRTlCNTc4RjlEMTA2Q0VBQTEwAA==\"}]}}', '2026-04-18 10:00:13', '2026-04-18 10:00:22'),
(11, 1, 1, 'vencida', '2026-04-19', 'email', 'luisaconcha93@gmail.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-19 10:00:08', NULL, '2026-04-19 10:00:08', NULL, NULL, '2026-04-19 10:00:04', '2026-04-19 10:00:08'),
(12, 1, 1, 'vencida', '2026-04-19', 'whatsapp', '573246802685', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-19 10:00:09', NULL, '2026-04-19 10:00:09', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573246802685\",\"wa_id\":\"573246802685\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMjQ2ODAyNjg1FQIAERgSMzkzRTQxNEI3QzM2RUZCNDQ4AA==\"}]}}', '2026-04-19 10:00:04', '2026-04-19 10:00:09'),
(13, 2, 2, 'vencida', '2026-04-19', 'email', 'd.rios@hunolabs.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-19 10:00:12', NULL, '2026-04-19 10:00:12', NULL, NULL, '2026-04-19 10:00:04', '2026-04-19 10:00:12'),
(14, 2, 2, 'vencida', '2026-04-19', 'whatsapp', '573122644576', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-19 10:00:13', NULL, '2026-04-19 10:00:13', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSOTgyOTIwMzI1MzA0Q0Y5NzYyAA==\"}]}}', '2026-04-19 10:00:04', '2026-04-19 10:00:13'),
(15, 1, 1, 'vencida', '2026-04-20', 'email', 'luisaconcha93@gmail.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-20 10:00:04', NULL, '2026-04-20 10:00:04', NULL, NULL, '2026-04-20 10:00:01', '2026-04-20 10:00:04'),
(16, 1, 1, 'vencida', '2026-04-20', 'whatsapp', '573246802685', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-20 10:00:05', NULL, '2026-04-20 10:00:05', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573246802685\",\"wa_id\":\"573246802685\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMjQ2ODAyNjg1FQIAERgSM0M2MkU0ODQ4QjEzMDgwNzJBAA==\"}]}}', '2026-04-20 10:00:01', '2026-04-20 10:00:05'),
(17, 2, 2, 'vencida', '2026-04-20', 'email', 'd.rios@hunolabs.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-20 10:00:07', NULL, '2026-04-20 10:00:07', NULL, NULL, '2026-04-20 10:00:01', '2026-04-20 10:00:07'),
(18, 2, 2, 'vencida', '2026-04-20', 'whatsapp', '573122644576', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-20 10:00:08', NULL, '2026-04-20 10:00:08', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSNTdCNzZGRDBEOUFGRkU5NDJGAA==\"}]}}', '2026-04-20 10:00:01', '2026-04-20 10:00:08'),
(19, 1, 1, 'vencida', '2026-04-21', 'email', 'luisaconcha93@gmail.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-21 10:00:08', NULL, '2026-04-21 10:00:08', NULL, NULL, '2026-04-21 10:00:04', '2026-04-21 10:00:08'),
(20, 1, 1, 'vencida', '2026-04-21', 'whatsapp', '573246802685', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Volta\nPlan: Plan Premium\nFecha de vencimiento: 2026-04-18\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-04-21 10:00:10', NULL, '2026-04-21 10:00:10', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573246802685\",\"wa_id\":\"573246802685\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMjQ2ODAyNjg1FQIAERgSM0Q0QkVBQzVFNDg3RDE3NTY5AA==\"}]}}', '2026-04-21 10:00:04', '2026-04-21 10:00:10'),
(21, 2, 2, 'morosa', '2026-04-21', 'email', 'd.rios@hunolabs.com', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-04-21 10:00:13', NULL, '2026-04-21 10:00:13', NULL, NULL, '2026-04-21 10:00:04', '2026-04-21 10:00:13'),
(22, 2, 2, 'morosa', '2026-04-21', 'whatsapp', '573122644576', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-04-17\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-04-21 10:00:14', NULL, '2026-04-21 10:00:14', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMTRFQ0M3RkVEQTlGNjg2NUY2AA==\"}]}}', '2026-04-21 10:00:04', '2026-04-21 10:00:14'),
(23, 2, 2, 'previo_3_dias', '2026-04-28', 'email', 'd.rios@hunolabs.com', 'En 3 días vence tu suscripción', '*En 3 días vence tu suscripción*\n📢 ¡Atención, Huno Labs!\n\nTu suscripción de Mayo está por vencer.\n\n📅 Fecha de pago oportuno: 30 de abril de 2026\n⏳ Fecha de suspensión: 1 de mayo de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260501-D03&signature%3Aintegrity=7a59de5f60de850e1aa1ee4926b88c2517c452bb45658095981fac03f6dfbeaa&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-28 15:00:05', NULL, '2026-04-28 15:00:05', NULL, NULL, '2026-04-28 10:00:08', '2026-04-28 15:00:05'),
(24, 2, 2, 'previo_3_dias', '2026-04-28', 'whatsapp', '573122644576', 'En 3 días vence tu suscripción', '*En 3 días vence tu suscripción*\n📢 ¡Atención, Huno Labs!\n\nTu suscripción de Mayo está por vencer.\n\n📅 Fecha de pago oportuno: 30 de abril de 2026\n⏳ Fecha de suspensión: 1 de mayo de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260501-D03&signature%3Aintegrity=7a59de5f60de850e1aa1ee4926b88c2517c452bb45658095981fac03f6dfbeaa&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-28 15:00:07', NULL, '2026-04-28 15:00:07', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMTMxMUZDRTE2NDVEOEYzOERGAA==\",\"message_status\":\"accepted\"}]}}', '2026-04-28 10:00:08', '2026-04-28 15:00:07'),
(25, 2, 2, 'previo_1_dia', '2026-04-30', 'email', 'd.rios@hunolabs.com', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Huno Labs!\n\nTu suscripción de Mayo vence mañana.\n\n📅 Fecha de pago oportuno: 30 de abril de 2026\n⏳ Fecha de suspensión: 1 de mayo de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260501-D01&signature%3Aintegrity=b1ea243e0da05bc9a3e03f330f16614d529a4c6dee1db1f9a9b386611f4ee365&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-30 10:00:04', NULL, '2026-04-30 10:00:04', NULL, NULL, '2026-04-30 10:00:02', '2026-04-30 10:00:04'),
(26, 2, 2, 'previo_1_dia', '2026-04-30', 'whatsapp', '573122644576', 'Mañana vence tu suscripción', '*Mañana vence tu suscripción*\n📢 ¡Hola, Huno Labs!\n\nTu suscripción de Mayo vence mañana.\n\n📅 Fecha de pago oportuno: 30 de abril de 2026\n⏳ Fecha de suspensión: 1 de mayo de 2026\n💰 Total a pagar: $149.000\n\nRealiza tu pago aquí ⬇️\nhttps://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-2-20260501-D01&signature%3Aintegrity=b1ea243e0da05bc9a3e03f330f16614d529a4c6dee1db1f9a9b386611f4ee365&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin%3Fempresa%3Dhunolabs&customer-data%3Aemail=d.rios%40hunolabs.com', 'enviado', 1, 3, '2026-04-30 10:00:07', NULL, '2026-04-30 10:00:07', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSQzhFMjA0QTVDMTg5ODQ5NUExAA==\"}]}}', '2026-04-30 10:00:02', '2026-04-30 10:00:07'),
(27, 2, 2, 'vencida', '2026-05-02', 'email', 'd.rios@hunolabs.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-05-02 10:00:05', NULL, '2026-05-02 10:00:05', NULL, NULL, '2026-05-02 10:00:01', '2026-05-02 10:00:05'),
(28, 2, 2, 'vencida', '2026-05-02', 'whatsapp', '573122644576', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-05-02 10:00:07', NULL, '2026-05-02 10:00:07', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMUEwNTBBNENBQTUzNDdGN0E5AA==\"}]}}', '2026-05-02 10:00:01', '2026-05-02 10:00:07'),
(29, 2, 2, 'vencida', '2026-05-04', 'email', 'd.rios@hunolabs.com', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-05-04 10:00:06', NULL, '2026-05-04 10:00:06', NULL, NULL, '2026-05-04 10:00:03', '2026-05-04 10:00:06'),
(30, 2, 2, 'vencida', '2026-05-04', 'whatsapp', '573122644576', 'Recordatorio de pago: suscripción vencida', 'Tu suscripción está vencida\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nRealiza el pago para mantener tu acceso sin bloqueos.', 'enviado', 1, 3, '2026-05-04 10:00:08', NULL, '2026-05-04 10:00:08', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMDU5MTM2NUVGNUM3MjBFMjY1AA==\"}]}}', '2026-05-04 10:00:03', '2026-05-04 10:00:08'),
(31, 2, 2, 'morosa', '2026-05-05', 'email', 'd.rios@hunolabs.com', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-05 10:00:08', NULL, '2026-05-05 10:00:08', NULL, NULL, '2026-05-05 10:00:03', '2026-05-05 10:00:08'),
(32, 2, 2, 'morosa', '2026-05-05', 'whatsapp', '573122644576', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-05 10:00:10', NULL, '2026-05-05 10:00:10', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSQTJFMUFDOTI3NkQ2REQ5NjNFAA==\"}]}}', '2026-05-05 10:00:03', '2026-05-05 10:00:10'),
(33, 2, 2, 'morosa', '2026-05-06', 'email', 'd.rios@hunolabs.com', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-06 10:00:04', NULL, '2026-05-06 10:00:04', NULL, NULL, '2026-05-06 10:00:02', '2026-05-06 10:00:04'),
(34, 2, 2, 'morosa', '2026-05-06', 'whatsapp', '573122644576', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-06 10:00:06', NULL, '2026-05-06 10:00:06', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSMkI1RjgyRjNDODlBNkY5REM0AA==\"}]}}', '2026-05-06 10:00:02', '2026-05-06 10:00:06'),
(35, 2, 2, 'morosa', '2026-05-07', 'email', 'd.rios@hunolabs.com', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-07 10:00:07', NULL, '2026-05-07 10:00:07', NULL, NULL, '2026-05-07 10:00:04', '2026-05-07 10:00:07'),
(36, 2, 2, 'morosa', '2026-05-07', 'whatsapp', '573122644576', 'Acción requerida: suscripción en mora', 'Tu suscripción está en mora\n\nEmpresa: Huno Labs\nPlan: Plan Profesional\nFecha de vencimiento: 2026-05-01\n\nPara evitar interrupciones prolongadas, realiza el pago y confirma con soporte.', 'enviado', 1, 3, '2026-05-07 10:00:09', NULL, '2026-05-07 10:00:09', NULL, '{\"status\":200,\"body\":{\"messaging_product\":\"whatsapp\",\"contacts\":[{\"input\":\"573122644576\",\"wa_id\":\"573122644576\"}],\"messages\":[{\"id\":\"wamid.HBgMNTczMTIyNjQ0NTc2FQIAERgSQjZCM0FGOTAyRTYxODIzQjcxAA==\"}]}}', '2026-05-07 10:00:04', '2026-05-07 10:00:09');

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

--
-- Estructura de tabla para la tabla `cajas`
--

CREATE TABLE `cajas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nombre` varchar(120) NOT NULL,
  `estado` enum('activa','inactiva') NOT NULL DEFAULT 'activa',
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `cajas` (`id`, `empresa_id`, `sucursal_id`, `nombre`, `estado`, `created_at`) VALUES
(1, 1, 1, 'Caja 1', 'activa', '2026-04-03 22:32:34'),
(2, 1, 1, 'Caja 2', 'activa', '2026-04-03 22:32:45'),
(3, 1, 2, 'Caja 3', 'activa', '2026-04-03 22:39:02');

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

--
-- Estructura de tabla para la tabla `categorias`
--

CREATE TABLE `categorias` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `categorias` (`id`, `empresa_id`, `nombre`, `descripcion`, `activo`, `created_at`, `updated_at`) VALUES
(1, 1, 'Pijamas', 'Ropa para dormir o estar en casa', 1, '2026-04-03 22:11:30', NULL),
(2, 1, 'Pantalones', 'Pantalones de distintas telas', 1, '2026-04-03 22:12:08', NULL),
(3, 1, 'Vestidos', '', 1, '2026-04-03 22:12:18', NULL),
(4, 1, 'Tops', 'Blusas, camisas, camisetas de calle', 1, '2026-04-03 22:12:42', NULL);

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

--
-- Estructura de tabla para la tabla `cierres_caja`
--

CREATE TABLE `cierres_caja` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `apertura_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `monto_esperado` decimal(12,2) NOT NULL DEFAULT 0.00,
  `monto_real` decimal(12,2) NOT NULL DEFAULT 0.00,
  `diferencia` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `ciudades`
--

CREATE TABLE `ciudades` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pais_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `departamento` varchar(120) DEFAULT NULL,
  `codigo_dane` varchar(10) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `ciudades` (`id`, `pais_id`, `nombre`, `departamento`, `codigo_dane`, `created_at`) VALUES
(6, 2, 'Ciudad de Mexico', NULL, NULL, '2026-04-02 21:41:47'),
(7, 2, 'Guadalajara', NULL, NULL, '2026-04-02 21:41:47'),
(8, 2, 'Monterrey', NULL, NULL, '2026-04-02 21:41:47'),
(9, 2, 'Puebla', NULL, NULL, '2026-04-02 21:41:47'),
(10, 3, 'Lima', NULL, NULL, '2026-04-02 21:41:47'),
(11, 3, 'Arequipa', NULL, NULL, '2026-04-02 21:41:47'),
(12, 3, 'Trujillo', NULL, NULL, '2026-04-02 21:41:47'),
(13, 4, 'Quito', NULL, NULL, '2026-04-02 21:41:47'),
(14, 4, 'Guayaquil', NULL, NULL, '2026-04-02 21:41:47'),
(15, 5, 'Santiago', NULL, NULL, '2026-04-02 21:41:47'),
(16, 5, 'Valparaiso', NULL, NULL, '2026-04-02 21:41:47'),
(17, 6, 'Buenos Aires', NULL, NULL, '2026-04-02 21:41:47'),
(18, 6, 'Cordoba', NULL, NULL, '2026-04-02 21:41:47'),
(19, 7, 'Miami', NULL, NULL, '2026-04-02 21:41:47'),
(20, 7, 'New York', NULL, NULL, '2026-04-02 21:41:47'),
(21, 7, 'Los Angeles', NULL, NULL, '2026-04-02 21:41:47'),
(22, 8, 'Madrid', NULL, NULL, '2026-04-02 21:41:47'),
(23, 8, 'Barcelona', NULL, NULL, '2026-04-02 21:41:47'),
(24, 1, 'MEDELLÍN', 'Antioquia', '05001', '2026-04-04 04:37:16'),
(25, 1, 'ABEJORRAL', 'Antioquia', '05002', '2026-04-04 04:37:16'),
(26, 1, 'ABRIAQUÍ', 'Antioquia', '05004', '2026-04-04 04:37:16'),
(27, 1, 'ALEJANDRÍA', 'Antioquia', '05021', '2026-04-04 04:37:16'),
(28, 1, 'AMAGÁ', 'Antioquia', '05030', '2026-04-04 04:37:16'),
(29, 1, 'AMALFI', 'Antioquia', '05031', '2026-04-04 04:37:16'),
(30, 1, 'ANDES', 'Antioquia', '05034', '2026-04-04 04:37:16'),
(31, 1, 'ANGELÓPOLIS', 'Antioquia', '05036', '2026-04-04 04:37:16'),
(32, 1, 'ANGOSTURA', 'Antioquia', '05038', '2026-04-04 04:37:16'),
(33, 1, 'ANORÍ', 'Antioquia', '05040', '2026-04-04 04:37:16'),
(34, 1, 'SANTA FÉ DE ANTIOQUIA', 'Antioquia', '05042', '2026-04-04 04:37:16'),
(35, 1, 'ANZÁ', 'Antioquia', '05044', '2026-04-04 04:37:16'),
(36, 1, 'APARTADÓ', 'Antioquia', '05045', '2026-04-04 04:37:16'),
(37, 1, 'ARBOLETES', 'Antioquia', '05051', '2026-04-04 04:37:16'),
(38, 1, 'ARGELIA', 'Antioquia', '05055', '2026-04-04 04:37:16'),
(39, 1, 'ARMENIA', 'Antioquia', '05059', '2026-04-04 04:37:16'),
(40, 1, 'BARBOSA', 'Antioquia', '05079', '2026-04-04 04:37:16'),
(41, 1, 'BELMIRA', 'Antioquia', '05086', '2026-04-04 04:37:16'),
(42, 1, 'BELLO', 'Antioquia', '05088', '2026-04-04 04:37:16'),
(43, 1, 'BETANIA', 'Antioquia', '05091', '2026-04-04 04:37:16'),
(44, 1, 'BETULIA', 'Antioquia', '05093', '2026-04-04 04:37:16'),
(45, 1, 'CIUDAD BOLÍVAR', 'Antioquia', '05101', '2026-04-04 04:37:16'),
(46, 1, 'BRICEÑO', 'Antioquia', '05107', '2026-04-04 04:37:16'),
(47, 1, 'BURITICÁ', 'Antioquia', '05113', '2026-04-04 04:37:16'),
(48, 1, 'CÁCERES', 'Antioquia', '05120', '2026-04-04 04:37:16'),
(49, 1, 'CAICEDO', 'Antioquia', '05125', '2026-04-04 04:37:16'),
(50, 1, 'CALDAS', 'Antioquia', '05129', '2026-04-04 04:37:16'),
(51, 1, 'CAMPAMENTO', 'Antioquia', '05134', '2026-04-04 04:37:16'),
(52, 1, 'CAÑASGORDAS', 'Antioquia', '05138', '2026-04-04 04:37:16'),
(53, 1, 'CARACOLÍ', 'Antioquia', '05142', '2026-04-04 04:37:16'),
(54, 1, 'CARAMANTA', 'Antioquia', '05145', '2026-04-04 04:37:16'),
(55, 1, 'CAREPA', 'Antioquia', '05147', '2026-04-04 04:37:16'),
(56, 1, 'EL CARMEN DE VIBORAL', 'Antioquia', '05148', '2026-04-04 04:37:16'),
(57, 1, 'CAROLINA', 'Antioquia', '05150', '2026-04-04 04:37:16'),
(58, 1, 'CAUCASIA', 'Antioquia', '05154', '2026-04-04 04:37:16'),
(59, 1, 'CHIGORODÓ', 'Antioquia', '05172', '2026-04-04 04:37:16'),
(60, 1, 'CISNEROS', 'Antioquia', '05190', '2026-04-04 04:37:16'),
(61, 1, 'COCORNÁ', 'Antioquia', '05197', '2026-04-04 04:37:16'),
(62, 1, 'CONCEPCIÓN', 'Antioquia', '05206', '2026-04-04 04:37:16'),
(63, 1, 'CONCORDIA', 'Antioquia', '05209', '2026-04-04 04:37:16'),
(64, 1, 'COPACABANA', 'Antioquia', '05212', '2026-04-04 04:37:16'),
(65, 1, 'DABEIBA', 'Antioquia', '05234', '2026-04-04 04:37:16'),
(66, 1, 'DONMATÍAS', 'Antioquia', '05237', '2026-04-04 04:37:16'),
(67, 1, 'EBÉJICO', 'Antioquia', '05240', '2026-04-04 04:37:16'),
(68, 1, 'EL BAGRE', 'Antioquia', '05250', '2026-04-04 04:37:16'),
(69, 1, 'ENTRERRÍOS', 'Antioquia', '05264', '2026-04-04 04:37:16'),
(70, 1, 'ENVIGADO', 'Antioquia', '05266', '2026-04-04 04:37:16'),
(71, 1, 'FREDONIA', 'Antioquia', '05282', '2026-04-04 04:37:16'),
(72, 1, 'FRONTINO', 'Antioquia', '05284', '2026-04-04 04:37:16'),
(73, 1, 'GIRALDO', 'Antioquia', '05306', '2026-04-04 04:37:16'),
(74, 1, 'GIRARDOTA', 'Antioquia', '05308', '2026-04-04 04:37:16'),
(75, 1, 'GÓMEZ PLATA', 'Antioquia', '05310', '2026-04-04 04:37:16'),
(76, 1, 'GRANADA', 'Antioquia', '05313', '2026-04-04 04:37:16'),
(77, 1, 'GUADALUPE', 'Antioquia', '05315', '2026-04-04 04:37:16'),
(78, 1, 'GUARNE', 'Antioquia', '05318', '2026-04-04 04:37:16'),
(79, 1, 'GUATAPÉ', 'Antioquia', '05321', '2026-04-04 04:37:16'),
(80, 1, 'HELICONIA', 'Antioquia', '05347', '2026-04-04 04:37:16'),
(81, 1, 'HISPANIA', 'Antioquia', '05353', '2026-04-04 04:37:16'),
(82, 1, 'ITAGÜÍ', 'Antioquia', '05360', '2026-04-04 04:37:16'),
(83, 1, 'ITUANGO', 'Antioquia', '05361', '2026-04-04 04:37:16'),
(84, 1, 'JARDÍN', 'Antioquia', '05364', '2026-04-04 04:37:16'),
(85, 1, 'JERICÓ', 'Antioquia', '05368', '2026-04-04 04:37:16'),
(86, 1, 'LA CEJA', 'Antioquia', '05376', '2026-04-04 04:37:16'),
(87, 1, 'LA ESTRELLA', 'Antioquia', '05380', '2026-04-04 04:37:16'),
(88, 1, 'LA PINTADA', 'Antioquia', '05390', '2026-04-04 04:37:16'),
(89, 1, 'LA UNIÓN', 'Antioquia', '05400', '2026-04-04 04:37:16'),
(90, 1, 'LIBORINA', 'Antioquia', '05411', '2026-04-04 04:37:16'),
(91, 1, 'MACEO', 'Antioquia', '05425', '2026-04-04 04:37:16'),
(92, 1, 'MARINILLA', 'Antioquia', '05440', '2026-04-04 04:37:16'),
(93, 1, 'MONTEBELLO', 'Antioquia', '05467', '2026-04-04 04:37:16'),
(94, 1, 'MURINDÓ', 'Antioquia', '05475', '2026-04-04 04:37:16'),
(95, 1, 'MUTATÁ', 'Antioquia', '05480', '2026-04-04 04:37:16'),
(96, 1, 'NARIÑO', 'Antioquia', '05483', '2026-04-04 04:37:16'),
(97, 1, 'NECOCLÍ', 'Antioquia', '05490', '2026-04-04 04:37:16'),
(98, 1, 'NECHÍ', 'Antioquia', '05495', '2026-04-04 04:37:16'),
(99, 1, 'OLAYA', 'Antioquia', '05501', '2026-04-04 04:37:16'),
(100, 1, 'PEÑOL', 'Antioquia', '05541', '2026-04-04 04:37:16'),
(101, 1, 'PEQUE', 'Antioquia', '05543', '2026-04-04 04:37:16'),
(102, 1, 'PUEBLORRICO', 'Antioquia', '05576', '2026-04-04 04:37:16'),
(103, 1, 'PUERTO BERRÍO', 'Antioquia', '05579', '2026-04-04 04:37:16'),
(104, 1, 'PUERTO NARE', 'Antioquia', '05585', '2026-04-04 04:37:16'),
(105, 1, 'PUERTO TRIUNFO', 'Antioquia', '05591', '2026-04-04 04:37:16'),
(106, 1, 'REMEDIOS', 'Antioquia', '05604', '2026-04-04 04:37:16'),
(107, 1, 'RETIRO', 'Antioquia', '05607', '2026-04-04 04:37:16'),
(108, 1, 'RIONEGRO', 'Antioquia', '05615', '2026-04-04 04:37:16'),
(109, 1, 'SABANALARGA', 'Antioquia', '05628', '2026-04-04 04:37:16'),
(110, 1, 'SABANETA', 'Antioquia', '05631', '2026-04-04 04:37:16'),
(111, 1, 'SALGAR', 'Antioquia', '05642', '2026-04-04 04:37:16'),
(112, 1, 'SAN ANDRÉS DE CUERQUÍA', 'Antioquia', '05647', '2026-04-04 04:37:16'),
(113, 1, 'SAN CARLOS', 'Antioquia', '05649', '2026-04-04 04:37:16'),
(114, 1, 'SAN FRANCISCO', 'Antioquia', '05652', '2026-04-04 04:37:16'),
(115, 1, 'SAN JERÓNIMO', 'Antioquia', '05656', '2026-04-04 04:37:16'),
(116, 1, 'SAN JOSÉ DE LA MONTAÑA', 'Antioquia', '05658', '2026-04-04 04:37:16'),
(117, 1, 'SAN JUAN DE URABÁ', 'Antioquia', '05659', '2026-04-04 04:37:16'),
(118, 1, 'SAN LUIS', 'Antioquia', '05660', '2026-04-04 04:37:16'),
(119, 1, 'SAN PEDRO DE LOS MILAGROS', 'Antioquia', '05664', '2026-04-04 04:37:16'),
(120, 1, 'SAN PEDRO DE URABÁ', 'Antioquia', '05665', '2026-04-04 04:37:16'),
(121, 1, 'SAN RAFAEL', 'Antioquia', '05667', '2026-04-04 04:37:16'),
(122, 1, 'SAN ROQUE', 'Antioquia', '05670', '2026-04-04 04:37:16'),
(123, 1, 'SAN VICENTE FERRER', 'Antioquia', '05674', '2026-04-04 04:37:16'),
(124, 1, 'SANTA BÁRBARA', 'Antioquia', '05679', '2026-04-04 04:37:16'),
(125, 1, 'SANTA ROSA DE OSOS', 'Antioquia', '05686', '2026-04-04 04:37:16'),
(126, 1, 'SANTO DOMINGO', 'Antioquia', '05690', '2026-04-04 04:37:16'),
(127, 1, 'EL SANTUARIO', 'Antioquia', '05697', '2026-04-04 04:37:16'),
(128, 1, 'SEGOVIA', 'Antioquia', '05736', '2026-04-04 04:37:16'),
(129, 1, 'SONSÓN', 'Antioquia', '05756', '2026-04-04 04:37:16'),
(130, 1, 'SOPETRÁN', 'Antioquia', '05761', '2026-04-04 04:37:16'),
(131, 1, 'TÁMESIS', 'Antioquia', '05789', '2026-04-04 04:37:16'),
(132, 1, 'TARAZÁ', 'Antioquia', '05790', '2026-04-04 04:37:16'),
(133, 1, 'TARSO', 'Antioquia', '05792', '2026-04-04 04:37:16'),
(134, 1, 'TITIRIBÍ', 'Antioquia', '05809', '2026-04-04 04:37:16'),
(135, 1, 'TOLEDO', 'Antioquia', '05819', '2026-04-04 04:37:16'),
(136, 1, 'TURBO', 'Antioquia', '05837', '2026-04-04 04:37:16'),
(137, 1, 'URAMITA', 'Antioquia', '05842', '2026-04-04 04:37:16'),
(138, 1, 'URRAO', 'Antioquia', '05847', '2026-04-04 04:37:16'),
(139, 1, 'VALDIVIA', 'Antioquia', '05854', '2026-04-04 04:37:16'),
(140, 1, 'VALPARAÍSO', 'Antioquia', '05856', '2026-04-04 04:37:16'),
(141, 1, 'VEGACHÍ', 'Antioquia', '05858', '2026-04-04 04:37:16'),
(142, 1, 'VENECIA', 'Antioquia', '05861', '2026-04-04 04:37:16'),
(143, 1, 'VIGÍA DEL FUERTE', 'Antioquia', '05873', '2026-04-04 04:37:16'),
(144, 1, 'YALÍ', 'Antioquia', '05885', '2026-04-04 04:37:16'),
(145, 1, 'YARUMAL', 'Antioquia', '05887', '2026-04-04 04:37:16'),
(146, 1, 'YOLOMBÓ', 'Antioquia', '05890', '2026-04-04 04:37:16'),
(147, 1, 'YONDÓ', 'Antioquia', '05893', '2026-04-04 04:37:16'),
(148, 1, 'ZARAGOZA', 'Antioquia', '05895', '2026-04-04 04:37:16'),
(149, 1, 'BARRANQUILLA', 'Atlántico', '08001', '2026-04-04 04:37:16'),
(150, 1, 'BARANOA', 'Atlántico', '08078', '2026-04-04 04:37:16'),
(151, 1, 'CAMPO DE LA CRUZ', 'Atlántico', '08137', '2026-04-04 04:37:16'),
(152, 1, 'CANDELARIA', 'Atlántico', '08141', '2026-04-04 04:37:16'),
(153, 1, 'GALAPA', 'Atlántico', '08296', '2026-04-04 04:37:16'),
(154, 1, 'JUAN DE ACOSTA', 'Atlántico', '08372', '2026-04-04 04:37:16'),
(155, 1, 'LURUACO', 'Atlántico', '08421', '2026-04-04 04:37:16'),
(156, 1, 'MALAMBO', 'Atlántico', '08433', '2026-04-04 04:37:16'),
(157, 1, 'MANATÍ', 'Atlántico', '08436', '2026-04-04 04:37:16'),
(158, 1, 'PALMAR DE VARELA', 'Atlántico', '08520', '2026-04-04 04:37:16'),
(159, 1, 'PIOJÓ', 'Atlántico', '08549', '2026-04-04 04:37:16'),
(160, 1, 'POLONUEVO', 'Atlántico', '08558', '2026-04-04 04:37:16'),
(161, 1, 'PONEDERA', 'Atlántico', '08560', '2026-04-04 04:37:16'),
(162, 1, 'PUERTO COLOMBIA', 'Atlántico', '08573', '2026-04-04 04:37:16'),
(163, 1, 'REPELÓN', 'Atlántico', '08606', '2026-04-04 04:37:16'),
(164, 1, 'SABANAGRANDE', 'Atlántico', '08634', '2026-04-04 04:37:16'),
(165, 1, 'SABANALARGA', 'Atlántico', '08638', '2026-04-04 04:37:16'),
(166, 1, 'SANTA LUCÍA', 'Atlántico', '08675', '2026-04-04 04:37:16'),
(167, 1, 'SANTO TOMÁS', 'Atlántico', '08685', '2026-04-04 04:37:16'),
(168, 1, 'SOLEDAD', 'Atlántico', '08758', '2026-04-04 04:37:16'),
(169, 1, 'SUAN', 'Atlántico', '08770', '2026-04-04 04:37:16'),
(170, 1, 'TUBARÁ', 'Atlántico', '08832', '2026-04-04 04:37:16'),
(171, 1, 'USIACURÍ', 'Atlántico', '08849', '2026-04-04 04:37:16'),
(172, 1, 'BOGOTÁ, D.C.', 'Bogotá D.C.', '11001', '2026-04-04 04:37:16'),
(173, 1, 'CARTAGENA DE INDIAS', 'Bolívar', '13001', '2026-04-04 04:37:16'),
(174, 1, 'ACHÍ', 'Bolívar', '13006', '2026-04-04 04:37:16'),
(175, 1, 'ALTOS DEL ROSARIO', 'Bolívar', '13030', '2026-04-04 04:37:16'),
(176, 1, 'ARENAL', 'Bolívar', '13042', '2026-04-04 04:37:16'),
(177, 1, 'ARJONA', 'Bolívar', '13052', '2026-04-04 04:37:16'),
(178, 1, 'ARROYOHONDO', 'Bolívar', '13062', '2026-04-04 04:37:16'),
(179, 1, 'BARRANCO DE LOBA', 'Bolívar', '13074', '2026-04-04 04:37:16'),
(180, 1, 'CALAMAR', 'Bolívar', '13140', '2026-04-04 04:37:16'),
(181, 1, 'CANTAGALLO', 'Bolívar', '13160', '2026-04-04 04:37:16'),
(182, 1, 'CICUCO', 'Bolívar', '13188', '2026-04-04 04:37:16'),
(183, 1, 'CÓRDOBA', 'Bolívar', '13212', '2026-04-04 04:37:16'),
(184, 1, 'CLEMENCIA', 'Bolívar', '13222', '2026-04-04 04:37:16'),
(185, 1, 'EL CARMEN DE BOLÍVAR', 'Bolívar', '13244', '2026-04-04 04:37:16'),
(186, 1, 'EL GUAMO', 'Bolívar', '13248', '2026-04-04 04:37:16'),
(187, 1, 'EL PEÑÓN', 'Bolívar', '13268', '2026-04-04 04:37:16'),
(188, 1, 'HATILLO DE LOBA', 'Bolívar', '13300', '2026-04-04 04:37:16'),
(189, 1, 'MAGANGUÉ', 'Bolívar', '13430', '2026-04-04 04:37:16'),
(190, 1, 'MAHATES', 'Bolívar', '13433', '2026-04-04 04:37:16'),
(191, 1, 'MARGARITA', 'Bolívar', '13440', '2026-04-04 04:37:16'),
(192, 1, 'MARÍA LA BAJA', 'Bolívar', '13442', '2026-04-04 04:37:16'),
(193, 1, 'MONTECRISTO', 'Bolívar', '13458', '2026-04-04 04:37:16'),
(194, 1, 'MOMPÓS', 'Bolívar', '13468', '2026-04-04 04:37:16'),
(195, 1, 'MORALES', 'Bolívar', '13473', '2026-04-04 04:37:16'),
(196, 1, 'NOROSÍ', 'Bolívar', '13490', '2026-04-04 04:37:16'),
(197, 1, 'PINILLOS', 'Bolívar', '13549', '2026-04-04 04:37:16'),
(198, 1, 'REGIDOR', 'Bolívar', '13580', '2026-04-04 04:37:16'),
(199, 1, 'RÍO VIEJO', 'Bolívar', '13600', '2026-04-04 04:37:16'),
(200, 1, 'SAN CRISTÓBAL', 'Bolívar', '13620', '2026-04-04 04:37:16'),
(201, 1, 'SAN ESTANISLAO', 'Bolívar', '13647', '2026-04-04 04:37:16'),
(202, 1, 'SAN FERNANDO', 'Bolívar', '13650', '2026-04-04 04:37:16'),
(203, 1, 'SAN JACINTO', 'Bolívar', '13654', '2026-04-04 04:37:16'),
(204, 1, 'SAN JACINTO DEL CAUCA', 'Bolívar', '13655', '2026-04-04 04:37:16'),
(205, 1, 'SAN JUAN NEPOMUCENO', 'Bolívar', '13657', '2026-04-04 04:37:16'),
(206, 1, 'SAN MARTÍN DE LOBA', 'Bolívar', '13667', '2026-04-04 04:37:16'),
(207, 1, 'SAN PABLO', 'Bolívar', '13670', '2026-04-04 04:37:16'),
(208, 1, 'SANTA CATALINA', 'Bolívar', '13673', '2026-04-04 04:37:16'),
(209, 1, 'SANTA ROSA', 'Bolívar', '13683', '2026-04-04 04:37:16'),
(210, 1, 'SANTA ROSA DEL SUR', 'Bolívar', '13688', '2026-04-04 04:37:16'),
(211, 1, 'SIMITÍ', 'Bolívar', '13744', '2026-04-04 04:37:16'),
(212, 1, 'SOPLAVIENTO', 'Bolívar', '13760', '2026-04-04 04:37:16'),
(213, 1, 'TALAIGUA NUEVO', 'Bolívar', '13780', '2026-04-04 04:37:16'),
(214, 1, 'TIQUISIO', 'Bolívar', '13810', '2026-04-04 04:37:16'),
(215, 1, 'TURBACO', 'Bolívar', '13836', '2026-04-04 04:37:16'),
(216, 1, 'TURBANÁ', 'Bolívar', '13838', '2026-04-04 04:37:16'),
(217, 1, 'VILLANUEVA', 'Bolívar', '13873', '2026-04-04 04:37:16'),
(218, 1, 'ZAMBRANO', 'Bolívar', '13894', '2026-04-04 04:37:16'),
(219, 1, 'TUNJA', 'Boyacá', '15001', '2026-04-04 04:37:16'),
(220, 1, 'ALMEIDA', 'Boyacá', '15022', '2026-04-04 04:37:16'),
(221, 1, 'AQUITANIA', 'Boyacá', '15047', '2026-04-04 04:37:16'),
(222, 1, 'ARCABUCO', 'Boyacá', '15051', '2026-04-04 04:37:16'),
(223, 1, 'BELÉN', 'Boyacá', '15087', '2026-04-04 04:37:16'),
(224, 1, 'BERBEO', 'Boyacá', '15090', '2026-04-04 04:37:16'),
(225, 1, 'BETÉITIVA', 'Boyacá', '15092', '2026-04-04 04:37:16'),
(226, 1, 'BOAVITA', 'Boyacá', '15097', '2026-04-04 04:37:16'),
(227, 1, 'BOYACÁ', 'Boyacá', '15104', '2026-04-04 04:37:16'),
(228, 1, 'BRICEÑO', 'Boyacá', '15106', '2026-04-04 04:37:16'),
(229, 1, 'BUENAVISTA', 'Boyacá', '15109', '2026-04-04 04:37:16'),
(230, 1, 'BUSBANZÁ', 'Boyacá', '15114', '2026-04-04 04:37:16'),
(231, 1, 'CALDAS', 'Boyacá', '15131', '2026-04-04 04:37:16'),
(232, 1, 'CAMPOHERMOSO', 'Boyacá', '15135', '2026-04-04 04:37:16'),
(233, 1, 'CERINZA', 'Boyacá', '15162', '2026-04-04 04:37:16'),
(234, 1, 'CHINAVITA', 'Boyacá', '15172', '2026-04-04 04:37:16'),
(235, 1, 'CHIQUINQUIRÁ', 'Boyacá', '15176', '2026-04-04 04:37:16'),
(236, 1, 'CHISCAS', 'Boyacá', '15180', '2026-04-04 04:37:16'),
(237, 1, 'CHITA', 'Boyacá', '15183', '2026-04-04 04:37:16'),
(238, 1, 'CHITARAQUE', 'Boyacá', '15185', '2026-04-04 04:37:16'),
(239, 1, 'CHIVATÁ', 'Boyacá', '15187', '2026-04-04 04:37:16'),
(240, 1, 'CIÉNEGA', 'Boyacá', '15189', '2026-04-04 04:37:16'),
(241, 1, 'CÓMBITA', 'Boyacá', '15204', '2026-04-04 04:37:16'),
(242, 1, 'COPER', 'Boyacá', '15212', '2026-04-04 04:37:16'),
(243, 1, 'CORRALES', 'Boyacá', '15215', '2026-04-04 04:37:16'),
(244, 1, 'COVARACHÍA', 'Boyacá', '15218', '2026-04-04 04:37:16'),
(245, 1, 'CUBARÁ', 'Boyacá', '15223', '2026-04-04 04:37:16'),
(246, 1, 'CUCAITA', 'Boyacá', '15224', '2026-04-04 04:37:16'),
(247, 1, 'CUÍTIVA', 'Boyacá', '15226', '2026-04-04 04:37:16'),
(248, 1, 'CHÍQUIZA', 'Boyacá', '15232', '2026-04-04 04:37:16'),
(249, 1, 'CHIVOR', 'Boyacá', '15236', '2026-04-04 04:37:16'),
(250, 1, 'DUITAMA', 'Boyacá', '15238', '2026-04-04 04:37:16'),
(251, 1, 'EL COCUY', 'Boyacá', '15244', '2026-04-04 04:37:16'),
(252, 1, 'EL ESPINO', 'Boyacá', '15248', '2026-04-04 04:37:16'),
(253, 1, 'FIRAVITOBA', 'Boyacá', '15272', '2026-04-04 04:37:16'),
(254, 1, 'FLORESTA', 'Boyacá', '15276', '2026-04-04 04:37:16'),
(255, 1, 'GACHANTIVÁ', 'Boyacá', '15293', '2026-04-04 04:37:16'),
(256, 1, 'GÁMEZA', 'Boyacá', '15296', '2026-04-04 04:37:16'),
(257, 1, 'GARAGOA', 'Boyacá', '15299', '2026-04-04 04:37:16'),
(258, 1, 'GUACAMAYAS', 'Boyacá', '15317', '2026-04-04 04:37:16'),
(259, 1, 'GUATEQUE', 'Boyacá', '15322', '2026-04-04 04:37:16'),
(260, 1, 'GUAYATÁ', 'Boyacá', '15325', '2026-04-04 04:37:16'),
(261, 1, 'GÜICÁN', 'Boyacá', '15332', '2026-04-04 04:37:16'),
(262, 1, 'IZA', 'Boyacá', '15362', '2026-04-04 04:37:16'),
(263, 1, 'JENESANO', 'Boyacá', '15367', '2026-04-04 04:37:16'),
(264, 1, 'JERICÓ', 'Boyacá', '15368', '2026-04-04 04:37:16'),
(265, 1, 'LABRANZAGRANDE', 'Boyacá', '15377', '2026-04-04 04:37:16'),
(266, 1, 'LA CAPILLA', 'Boyacá', '15380', '2026-04-04 04:37:16'),
(267, 1, 'LA VICTORIA', 'Boyacá', '15401', '2026-04-04 04:37:16'),
(268, 1, 'LA UVITA', 'Boyacá', '15403', '2026-04-04 04:37:16'),
(269, 1, 'VILLA DE LEYVA', 'Boyacá', '15407', '2026-04-04 04:37:16'),
(270, 1, 'MACANAL', 'Boyacá', '15425', '2026-04-04 04:37:16'),
(271, 1, 'MARIPÍ', 'Boyacá', '15442', '2026-04-04 04:37:16'),
(272, 1, 'MIRAFLORES', 'Boyacá', '15455', '2026-04-04 04:37:16'),
(273, 1, 'MONGUA', 'Boyacá', '15464', '2026-04-04 04:37:16'),
(274, 1, 'MONGUÍ', 'Boyacá', '15466', '2026-04-04 04:37:16'),
(275, 1, 'MONIQUIRÁ', 'Boyacá', '15469', '2026-04-04 04:37:16'),
(276, 1, 'MOTAVITA', 'Boyacá', '15476', '2026-04-04 04:37:16'),
(277, 1, 'MUZO', 'Boyacá', '15480', '2026-04-04 04:37:16'),
(278, 1, 'NOBSA', 'Boyacá', '15491', '2026-04-04 04:37:16'),
(279, 1, 'NUEVO COLÓN', 'Boyacá', '15494', '2026-04-04 04:37:16'),
(280, 1, 'OICATÁ', 'Boyacá', '15500', '2026-04-04 04:37:16'),
(281, 1, 'OTANCHE', 'Boyacá', '15507', '2026-04-04 04:37:16'),
(282, 1, 'PACHAVITA', 'Boyacá', '15511', '2026-04-04 04:37:16'),
(283, 1, 'PÁEZ', 'Boyacá', '15514', '2026-04-04 04:37:16'),
(284, 1, 'PAIPA', 'Boyacá', '15516', '2026-04-04 04:37:16'),
(285, 1, 'PAJARITO', 'Boyacá', '15518', '2026-04-04 04:37:16'),
(286, 1, 'PANQUEBA', 'Boyacá', '15522', '2026-04-04 04:37:16'),
(287, 1, 'PAUNA', 'Boyacá', '15531', '2026-04-04 04:37:16'),
(288, 1, 'PAYA', 'Boyacá', '15533', '2026-04-04 04:37:16'),
(289, 1, 'PAZ DE RÍO', 'Boyacá', '15537', '2026-04-04 04:37:16'),
(290, 1, 'PESCA', 'Boyacá', '15542', '2026-04-04 04:37:16'),
(291, 1, 'PISBA', 'Boyacá', '15550', '2026-04-04 04:37:16'),
(292, 1, 'PUERTO BOYACÁ', 'Boyacá', '15572', '2026-04-04 04:37:16'),
(293, 1, 'QUÍPAMA', 'Boyacá', '15580', '2026-04-04 04:37:16'),
(294, 1, 'RAMIRIQUÍ', 'Boyacá', '15599', '2026-04-04 04:37:16'),
(295, 1, 'RÁQUIRA', 'Boyacá', '15600', '2026-04-04 04:37:16'),
(296, 1, 'RONDÓN', 'Boyacá', '15621', '2026-04-04 04:37:16'),
(297, 1, 'SABOYÁ', 'Boyacá', '15632', '2026-04-04 04:37:16'),
(298, 1, 'SÁCHICA', 'Boyacá', '15638', '2026-04-04 04:37:16'),
(299, 1, 'SAMACÁ', 'Boyacá', '15646', '2026-04-04 04:37:16'),
(300, 1, 'SAN EDUARDO', 'Boyacá', '15660', '2026-04-04 04:37:16'),
(301, 1, 'SAN JOSÉ DE PARE', 'Boyacá', '15664', '2026-04-04 04:37:16'),
(302, 1, 'SAN LUIS DE GACENO', 'Boyacá', '15667', '2026-04-04 04:37:16'),
(303, 1, 'SAN MATEO', 'Boyacá', '15673', '2026-04-04 04:37:16'),
(304, 1, 'SAN MIGUEL DE SEMA', 'Boyacá', '15676', '2026-04-04 04:37:16'),
(305, 1, 'SAN PABLO DE BORBUR', 'Boyacá', '15681', '2026-04-04 04:37:16'),
(306, 1, 'SANTANA', 'Boyacá', '15686', '2026-04-04 04:37:16'),
(307, 1, 'SANTA MARÍA', 'Boyacá', '15690', '2026-04-04 04:37:16'),
(308, 1, 'SANTA ROSA DE VITERBO', 'Boyacá', '15693', '2026-04-04 04:37:16'),
(309, 1, 'SANTA SOFÍA', 'Boyacá', '15696', '2026-04-04 04:37:16'),
(310, 1, 'SATIVANORTE', 'Boyacá', '15720', '2026-04-04 04:37:16'),
(311, 1, 'SATIVASUR', 'Boyacá', '15723', '2026-04-04 04:37:16'),
(312, 1, 'SIACHOQUE', 'Boyacá', '15740', '2026-04-04 04:37:16'),
(313, 1, 'SOATÁ', 'Boyacá', '15753', '2026-04-04 04:37:16'),
(314, 1, 'SOCOTÁ', 'Boyacá', '15755', '2026-04-04 04:37:16'),
(315, 1, 'SOCHA', 'Boyacá', '15757', '2026-04-04 04:37:16'),
(316, 1, 'SOGAMOSO', 'Boyacá', '15759', '2026-04-04 04:37:16'),
(317, 1, 'SOMONDOCO', 'Boyacá', '15761', '2026-04-04 04:37:16'),
(318, 1, 'SORA', 'Boyacá', '15762', '2026-04-04 04:37:16'),
(319, 1, 'SOTAQUIRÁ', 'Boyacá', '15763', '2026-04-04 04:37:16'),
(320, 1, 'SORACÁ', 'Boyacá', '15764', '2026-04-04 04:37:16'),
(321, 1, 'SUSACÓN', 'Boyacá', '15774', '2026-04-04 04:37:16'),
(322, 1, 'SUTAMARCHÁN', 'Boyacá', '15776', '2026-04-04 04:37:16'),
(323, 1, 'SUTATENZA', 'Boyacá', '15778', '2026-04-04 04:37:16'),
(324, 1, 'TASCO', 'Boyacá', '15790', '2026-04-04 04:37:16'),
(325, 1, 'TENZA', 'Boyacá', '15798', '2026-04-04 04:37:16'),
(326, 1, 'TIBANÁ', 'Boyacá', '15804', '2026-04-04 04:37:16'),
(327, 1, 'TIBASOSA', 'Boyacá', '15806', '2026-04-04 04:37:16'),
(328, 1, 'TINJACÁ', 'Boyacá', '15808', '2026-04-04 04:37:16'),
(329, 1, 'TIPACOQUE', 'Boyacá', '15810', '2026-04-04 04:37:16'),
(330, 1, 'TOCA', 'Boyacá', '15814', '2026-04-04 04:37:16'),
(331, 1, 'TOGÜÍ', 'Boyacá', '15816', '2026-04-04 04:37:16'),
(332, 1, 'TÓPAGA', 'Boyacá', '15820', '2026-04-04 04:37:16'),
(333, 1, 'TOTA', 'Boyacá', '15822', '2026-04-04 04:37:16'),
(334, 1, 'TUNUNGUÁ', 'Boyacá', '15832', '2026-04-04 04:37:16'),
(335, 1, 'TURMEQUÉ', 'Boyacá', '15835', '2026-04-04 04:37:16'),
(336, 1, 'TUTA', 'Boyacá', '15837', '2026-04-04 04:37:16'),
(337, 1, 'TUTAZÁ', 'Boyacá', '15839', '2026-04-04 04:37:16'),
(338, 1, 'ÚMBITA', 'Boyacá', '15842', '2026-04-04 04:37:16'),
(339, 1, 'VENTAQUEMADA', 'Boyacá', '15861', '2026-04-04 04:37:16'),
(340, 1, 'VIRACACHÁ', 'Boyacá', '15879', '2026-04-04 04:37:16'),
(341, 1, 'ZETAQUIRA', 'Boyacá', '15897', '2026-04-04 04:37:16'),
(342, 1, 'MANIZALES', 'Caldas', '17001', '2026-04-04 04:37:16'),
(343, 1, 'AGUADAS', 'Caldas', '17013', '2026-04-04 04:37:16'),
(344, 1, 'ANSERMA', 'Caldas', '17042', '2026-04-04 04:37:16'),
(345, 1, 'ARANZAZU', 'Caldas', '17050', '2026-04-04 04:37:16'),
(346, 1, 'BELALCÁZAR', 'Caldas', '17088', '2026-04-04 04:37:16'),
(347, 1, 'CHINCHINÁ', 'Caldas', '17174', '2026-04-04 04:37:16'),
(348, 1, 'FILADELFIA', 'Caldas', '17272', '2026-04-04 04:37:16'),
(349, 1, 'LA DORADA', 'Caldas', '17380', '2026-04-04 04:37:16'),
(350, 1, 'LA MERCED', 'Caldas', '17388', '2026-04-04 04:37:16'),
(351, 1, 'MANZANARES', 'Caldas', '17433', '2026-04-04 04:37:16'),
(352, 1, 'MARMATO', 'Caldas', '17442', '2026-04-04 04:37:16'),
(353, 1, 'MARQUETALIA', 'Caldas', '17444', '2026-04-04 04:37:16'),
(354, 1, 'MARULANDA', 'Caldas', '17446', '2026-04-04 04:37:16'),
(355, 1, 'NEIRA', 'Caldas', '17486', '2026-04-04 04:37:16'),
(356, 1, 'NORCASIA', 'Caldas', '17495', '2026-04-04 04:37:16'),
(357, 1, 'PÁCORA', 'Caldas', '17513', '2026-04-04 04:37:16'),
(358, 1, 'PALESTINA', 'Caldas', '17524', '2026-04-04 04:37:16'),
(359, 1, 'PENSILVANIA', 'Caldas', '17541', '2026-04-04 04:37:16'),
(360, 1, 'RIOSUCIO', 'Caldas', '17614', '2026-04-04 04:37:16'),
(361, 1, 'RISARALDA', 'Caldas', '17616', '2026-04-04 04:37:16'),
(362, 1, 'SALAMINA', 'Caldas', '17653', '2026-04-04 04:37:16'),
(363, 1, 'SAMANÁ', 'Caldas', '17662', '2026-04-04 04:37:16'),
(364, 1, 'SAN JOSÉ', 'Caldas', '17665', '2026-04-04 04:37:16'),
(365, 1, 'SUPÍA', 'Caldas', '17777', '2026-04-04 04:37:16'),
(366, 1, 'VICTORIA', 'Caldas', '17867', '2026-04-04 04:37:16'),
(367, 1, 'VILLAMARÍA', 'Caldas', '17873', '2026-04-04 04:37:16'),
(368, 1, 'VITERBO', 'Caldas', '17877', '2026-04-04 04:37:16'),
(369, 1, 'FLORENCIA', 'Caquetá', '18001', '2026-04-04 04:37:16'),
(370, 1, 'ALBANIA', 'Caquetá', '18029', '2026-04-04 04:37:16'),
(371, 1, 'BELÉN DE LOS ANDAQUÍES', 'Caquetá', '18094', '2026-04-04 04:37:16'),
(372, 1, 'CARTAGENA DEL CHAIRÁ', 'Caquetá', '18150', '2026-04-04 04:37:16'),
(373, 1, 'CURILLO', 'Caquetá', '18205', '2026-04-04 04:37:16'),
(374, 1, 'EL DONCELLO', 'Caquetá', '18247', '2026-04-04 04:37:16'),
(375, 1, 'EL PAUJÍL', 'Caquetá', '18256', '2026-04-04 04:37:16'),
(376, 1, 'LA MONTAÑITA', 'Caquetá', '18410', '2026-04-04 04:37:16'),
(377, 1, 'MILÁN', 'Caquetá', '18460', '2026-04-04 04:37:16'),
(378, 1, 'MORELIA', 'Caquetá', '18479', '2026-04-04 04:37:16'),
(379, 1, 'PUERTO RICO', 'Caquetá', '18592', '2026-04-04 04:37:16'),
(380, 1, 'SAN JOSÉ DEL FRAGUA', 'Caquetá', '18610', '2026-04-04 04:37:16'),
(381, 1, 'SAN VICENTE DEL CAGUÁN', 'Caquetá', '18753', '2026-04-04 04:37:16'),
(382, 1, 'SOLANO', 'Caquetá', '18756', '2026-04-04 04:37:16'),
(383, 1, 'SOLITA', 'Caquetá', '18785', '2026-04-04 04:37:16'),
(384, 1, 'VALPARAÍSO', 'Caquetá', '18860', '2026-04-04 04:37:16'),
(385, 1, 'POPAYÁN', 'Cauca', '19001', '2026-04-04 04:37:16'),
(386, 1, 'ALMAGUER', 'Cauca', '19022', '2026-04-04 04:37:16'),
(387, 1, 'ARGELIA', 'Cauca', '19050', '2026-04-04 04:37:16'),
(388, 1, 'BALBOA', 'Cauca', '19075', '2026-04-04 04:37:16'),
(389, 1, 'BOLÍVAR', 'Cauca', '19100', '2026-04-04 04:37:16'),
(390, 1, 'BUENOS AIRES', 'Cauca', '19110', '2026-04-04 04:37:16'),
(391, 1, 'CAJIBÍO', 'Cauca', '19130', '2026-04-04 04:37:16'),
(392, 1, 'CALDONO', 'Cauca', '19137', '2026-04-04 04:37:16'),
(393, 1, 'CALOTO', 'Cauca', '19142', '2026-04-04 04:37:16'),
(394, 1, 'CORINTO', 'Cauca', '19212', '2026-04-04 04:37:16'),
(395, 1, 'EL TAMBO', 'Cauca', '19256', '2026-04-04 04:37:16'),
(396, 1, 'FLORENCIA', 'Cauca', '19290', '2026-04-04 04:37:16'),
(397, 1, 'GUACHENÉ', 'Cauca', '19300', '2026-04-04 04:37:16'),
(398, 1, 'GUAPÍ', 'Cauca', '19318', '2026-04-04 04:37:16'),
(399, 1, 'INZÁ', 'Cauca', '19355', '2026-04-04 04:37:16'),
(400, 1, 'JAMBALÓ', 'Cauca', '19364', '2026-04-04 04:37:16'),
(401, 1, 'LA SIERRA', 'Cauca', '19392', '2026-04-04 04:37:16'),
(402, 1, 'LA VEGA', 'Cauca', '19397', '2026-04-04 04:37:16'),
(403, 1, 'LÓPEZ DE MICAY', 'Cauca', '19418', '2026-04-04 04:37:16'),
(404, 1, 'MERCADERES', 'Cauca', '19450', '2026-04-04 04:37:16'),
(405, 1, 'MIRANDA', 'Cauca', '19455', '2026-04-04 04:37:16'),
(406, 1, 'MORALES', 'Cauca', '19473', '2026-04-04 04:37:16'),
(407, 1, 'PADILLA', 'Cauca', '19513', '2026-04-04 04:37:16'),
(408, 1, 'PÁEZ', 'Cauca', '19517', '2026-04-04 04:37:16'),
(409, 1, 'PATÍA', 'Cauca', '19532', '2026-04-04 04:37:16'),
(410, 1, 'PIAMONTE', 'Cauca', '19533', '2026-04-04 04:37:16'),
(411, 1, 'PIENDAMÓ', 'Cauca', '19548', '2026-04-04 04:37:16'),
(412, 1, 'PUERTO TEJADA', 'Cauca', '19573', '2026-04-04 04:37:16'),
(413, 1, 'PURACÉ', 'Cauca', '19585', '2026-04-04 04:37:16'),
(414, 1, 'ROSAS', 'Cauca', '19622', '2026-04-04 04:37:16'),
(415, 1, 'SAN SEBASTIÁN', 'Cauca', '19693', '2026-04-04 04:37:16'),
(416, 1, 'SANTANDER DE QUILICHAO', 'Cauca', '19698', '2026-04-04 04:37:16'),
(417, 1, 'SANTA ROSA', 'Cauca', '19701', '2026-04-04 04:37:16'),
(418, 1, 'SILVIA', 'Cauca', '19743', '2026-04-04 04:37:16'),
(419, 1, 'SOTARA', 'Cauca', '19760', '2026-04-04 04:37:16'),
(420, 1, 'SUÁREZ', 'Cauca', '19780', '2026-04-04 04:37:16'),
(421, 1, 'SUCRE', 'Cauca', '19785', '2026-04-04 04:37:16'),
(422, 1, 'TIMBÍO', 'Cauca', '19807', '2026-04-04 04:37:16'),
(423, 1, 'TIMBIQUÍ', 'Cauca', '19809', '2026-04-04 04:37:16'),
(424, 1, 'TORIBÍO', 'Cauca', '19821', '2026-04-04 04:37:16'),
(425, 1, 'TOTORÓ', 'Cauca', '19824', '2026-04-04 04:37:16'),
(426, 1, 'VILLA RICA', 'Cauca', '19845', '2026-04-04 04:37:16'),
(427, 1, 'VALLEDUPAR', 'Cesar', '20001', '2026-04-04 04:37:16'),
(428, 1, 'AGUACHICA', 'Cesar', '20011', '2026-04-04 04:37:16'),
(429, 1, 'AGUSTÍN CODAZZI', 'Cesar', '20013', '2026-04-04 04:37:16'),
(430, 1, 'ASTREA', 'Cesar', '20032', '2026-04-04 04:37:16'),
(431, 1, 'BECERRIL', 'Cesar', '20045', '2026-04-04 04:37:16'),
(432, 1, 'BOSCONIA', 'Cesar', '20060', '2026-04-04 04:37:16'),
(433, 1, 'CHIMICHAGUA', 'Cesar', '20175', '2026-04-04 04:37:16'),
(434, 1, 'CHIRIGUANÁ', 'Cesar', '20178', '2026-04-04 04:37:16'),
(435, 1, 'CURUMANÍ', 'Cesar', '20228', '2026-04-04 04:37:16'),
(436, 1, 'EL COPEY', 'Cesar', '20238', '2026-04-04 04:37:16'),
(437, 1, 'EL PASO', 'Cesar', '20250', '2026-04-04 04:37:16'),
(438, 1, 'GAMARRA', 'Cesar', '20295', '2026-04-04 04:37:16'),
(439, 1, 'GONZÁLEZ', 'Cesar', '20310', '2026-04-04 04:37:16'),
(440, 1, 'LA GLORIA', 'Cesar', '20383', '2026-04-04 04:37:16'),
(441, 1, 'LA JAGUA DE IBIRICO', 'Cesar', '20400', '2026-04-04 04:37:16'),
(442, 1, 'MANAURE BALCÓN DEL CESAR', 'Cesar', '20443', '2026-04-04 04:37:16'),
(443, 1, 'PAILITAS', 'Cesar', '20517', '2026-04-04 04:37:16'),
(444, 1, 'PELAYA', 'Cesar', '20550', '2026-04-04 04:37:16'),
(445, 1, 'PUEBLO BELLO', 'Cesar', '20570', '2026-04-04 04:37:16'),
(446, 1, 'RÍO DE ORO', 'Cesar', '20614', '2026-04-04 04:37:16'),
(447, 1, 'LA PAZ', 'Cesar', '20621', '2026-04-04 04:37:16'),
(448, 1, 'SAN ALBERTO', 'Cesar', '20710', '2026-04-04 04:37:16'),
(449, 1, 'SAN DIEGO', 'Cesar', '20750', '2026-04-04 04:37:16'),
(450, 1, 'SAN MARTÍN', 'Cesar', '20770', '2026-04-04 04:37:16'),
(451, 1, 'TAMALAMEQUE', 'Cesar', '20787', '2026-04-04 04:37:16'),
(452, 1, 'MONTERÍA', 'Córdoba', '23001', '2026-04-04 04:37:16'),
(453, 1, 'AYAPEL', 'Córdoba', '23068', '2026-04-04 04:37:16'),
(454, 1, 'BUENAVISTA', 'Córdoba', '23079', '2026-04-04 04:37:16'),
(455, 1, 'CANALETE', 'Córdoba', '23090', '2026-04-04 04:37:16'),
(456, 1, 'CERETÉ', 'Córdoba', '23162', '2026-04-04 04:37:16'),
(457, 1, 'CHIMÁ', 'Córdoba', '23168', '2026-04-04 04:37:16'),
(458, 1, 'CHINÚ', 'Córdoba', '23182', '2026-04-04 04:37:16'),
(459, 1, 'CIÉNAGA DE ORO', 'Córdoba', '23189', '2026-04-04 04:37:16'),
(460, 1, 'COTORRA', 'Córdoba', '23300', '2026-04-04 04:37:16'),
(461, 1, 'LA APARTADA', 'Córdoba', '23350', '2026-04-04 04:37:16'),
(462, 1, 'LORICA', 'Córdoba', '23417', '2026-04-04 04:37:16'),
(463, 1, 'LOS CÓRDOBAS', 'Córdoba', '23419', '2026-04-04 04:37:16'),
(464, 1, 'MOMIL', 'Córdoba', '23464', '2026-04-04 04:37:16'),
(465, 1, 'MONTELÍBANO', 'Córdoba', '23466', '2026-04-04 04:37:16'),
(466, 1, 'MOÑITOS', 'Córdoba', '23500', '2026-04-04 04:37:16'),
(467, 1, 'PLANETA RICA', 'Córdoba', '23555', '2026-04-04 04:37:16'),
(468, 1, 'PUEBLO NUEVO', 'Córdoba', '23570', '2026-04-04 04:37:16'),
(469, 1, 'PUERTO ESCONDIDO', 'Córdoba', '23574', '2026-04-04 04:37:16'),
(470, 1, 'PUERTO LIBERTADOR', 'Córdoba', '23580', '2026-04-04 04:37:16'),
(471, 1, 'PURÍSIMA DE LA CONCEPCIÓN', 'Córdoba', '23586', '2026-04-04 04:37:16'),
(472, 1, 'SAHAGÚN', 'Córdoba', '23660', '2026-04-04 04:37:16'),
(473, 1, 'SAN ANDRÉS DE SOTAVENTO', 'Córdoba', '23670', '2026-04-04 04:37:16'),
(474, 1, 'SAN ANTERO', 'Córdoba', '23672', '2026-04-04 04:37:16'),
(475, 1, 'SAN BERNARDO DEL VIENTO', 'Córdoba', '23675', '2026-04-04 04:37:16'),
(476, 1, 'SAN CARLOS', 'Córdoba', '23678', '2026-04-04 04:37:16'),
(477, 1, 'SAN JOSÉ DE URÉ', 'Córdoba', '23682', '2026-04-04 04:37:16'),
(478, 1, 'SAN PELAYO', 'Córdoba', '23686', '2026-04-04 04:37:16'),
(479, 1, 'TIERRALTA', 'Córdoba', '23807', '2026-04-04 04:37:16'),
(480, 1, 'TUCHÍN', 'Córdoba', '23815', '2026-04-04 04:37:16'),
(481, 1, 'VALENCIA', 'Córdoba', '23855', '2026-04-04 04:37:16'),
(482, 1, 'AGUA DE DIOS', 'Cundinamarca', '25001', '2026-04-04 04:37:16'),
(483, 1, 'ALBÁN', 'Cundinamarca', '25019', '2026-04-04 04:37:16'),
(484, 1, 'ANAPOIMA', 'Cundinamarca', '25035', '2026-04-04 04:37:16'),
(485, 1, 'ANOLAIMA', 'Cundinamarca', '25040', '2026-04-04 04:37:16'),
(486, 1, 'ARBELÁEZ', 'Cundinamarca', '25053', '2026-04-04 04:37:16'),
(487, 1, 'BELTRÁN', 'Cundinamarca', '25086', '2026-04-04 04:37:16'),
(488, 1, 'BITUIMA', 'Cundinamarca', '25095', '2026-04-04 04:37:16'),
(489, 1, 'BOJACÁ', 'Cundinamarca', '25099', '2026-04-04 04:37:16'),
(490, 1, 'CABRERA', 'Cundinamarca', '25120', '2026-04-04 04:37:16'),
(491, 1, 'CACHIPAY', 'Cundinamarca', '25123', '2026-04-04 04:37:16'),
(492, 1, 'CAJICÁ', 'Cundinamarca', '25126', '2026-04-04 04:37:16'),
(493, 1, 'CAPARRAPÍ', 'Cundinamarca', '25148', '2026-04-04 04:37:16'),
(494, 1, 'CÁQUEZA', 'Cundinamarca', '25151', '2026-04-04 04:37:16'),
(495, 1, 'CARMEN DE CARUPA', 'Cundinamarca', '25154', '2026-04-04 04:37:16'),
(496, 1, 'CHAGUANÍ', 'Cundinamarca', '25168', '2026-04-04 04:37:16'),
(497, 1, 'CHÍA', 'Cundinamarca', '25175', '2026-04-04 04:37:16'),
(498, 1, 'CHIPAQUE', 'Cundinamarca', '25178', '2026-04-04 04:37:16'),
(499, 1, 'CHOACHÍ', 'Cundinamarca', '25181', '2026-04-04 04:37:16'),
(500, 1, 'CHOCONTÁ', 'Cundinamarca', '25183', '2026-04-04 04:37:16'),
(501, 1, 'COGUA', 'Cundinamarca', '25200', '2026-04-04 04:37:16'),
(502, 1, 'COTA', 'Cundinamarca', '25214', '2026-04-04 04:37:16'),
(503, 1, 'CUCUNUBÁ', 'Cundinamarca', '25224', '2026-04-04 04:37:16'),
(504, 1, 'EL COLEGIO', 'Cundinamarca', '25245', '2026-04-04 04:37:16'),
(505, 1, 'EL PEÑÓN', 'Cundinamarca', '25258', '2026-04-04 04:37:16'),
(506, 1, 'EL ROSAL', 'Cundinamarca', '25260', '2026-04-04 04:37:16'),
(507, 1, 'FACATATIVÁ', 'Cundinamarca', '25269', '2026-04-04 04:37:16'),
(508, 1, 'FÓMEQUE', 'Cundinamarca', '25279', '2026-04-04 04:37:16'),
(509, 1, 'FOSCA', 'Cundinamarca', '25281', '2026-04-04 04:37:16'),
(510, 1, 'FUNZA', 'Cundinamarca', '25286', '2026-04-04 04:37:16'),
(511, 1, 'FÚQUENE', 'Cundinamarca', '25288', '2026-04-04 04:37:16'),
(512, 1, 'FUSAGASUGÁ', 'Cundinamarca', '25290', '2026-04-04 04:37:16'),
(513, 1, 'GACHALÁ', 'Cundinamarca', '25293', '2026-04-04 04:37:16'),
(514, 1, 'GACHANCIPÁ', 'Cundinamarca', '25295', '2026-04-04 04:37:16'),
(515, 1, 'GACHETÁ', 'Cundinamarca', '25297', '2026-04-04 04:37:16'),
(516, 1, 'GAMA', 'Cundinamarca', '25299', '2026-04-04 04:37:16'),
(517, 1, 'GIRARDOT', 'Cundinamarca', '25307', '2026-04-04 04:37:16'),
(518, 1, 'GRANADA', 'Cundinamarca', '25312', '2026-04-04 04:37:16'),
(519, 1, 'GUACHETÁ', 'Cundinamarca', '25317', '2026-04-04 04:37:16'),
(520, 1, 'GUADUAS', 'Cundinamarca', '25320', '2026-04-04 04:37:16'),
(521, 1, 'GUASCA', 'Cundinamarca', '25322', '2026-04-04 04:37:16'),
(522, 1, 'GUATAQUÍ', 'Cundinamarca', '25324', '2026-04-04 04:37:16'),
(523, 1, 'GUATAVITA', 'Cundinamarca', '25326', '2026-04-04 04:37:16'),
(524, 1, 'GUAYABAL DE SÍQUIMA', 'Cundinamarca', '25328', '2026-04-04 04:37:16'),
(525, 1, 'GUAYABETAL', 'Cundinamarca', '25335', '2026-04-04 04:37:16'),
(526, 1, 'GUTIÉRREZ', 'Cundinamarca', '25339', '2026-04-04 04:37:16'),
(527, 1, 'JERUSALÉN', 'Cundinamarca', '25368', '2026-04-04 04:37:16'),
(528, 1, 'JUNÍN', 'Cundinamarca', '25372', '2026-04-04 04:37:16'),
(529, 1, 'LA CALERA', 'Cundinamarca', '25377', '2026-04-04 04:37:16'),
(530, 1, 'LA MESA', 'Cundinamarca', '25386', '2026-04-04 04:37:16'),
(531, 1, 'LA PALMA', 'Cundinamarca', '25394', '2026-04-04 04:37:16'),
(532, 1, 'LA PEÑA', 'Cundinamarca', '25398', '2026-04-04 04:37:16'),
(533, 1, 'LA VEGA', 'Cundinamarca', '25402', '2026-04-04 04:37:16'),
(534, 1, 'LENGUAZAQUE', 'Cundinamarca', '25407', '2026-04-04 04:37:16'),
(535, 1, 'MACHETÁ', 'Cundinamarca', '25426', '2026-04-04 04:37:16'),
(536, 1, 'MADRID', 'Cundinamarca', '25430', '2026-04-04 04:37:16'),
(537, 1, 'MANTA', 'Cundinamarca', '25436', '2026-04-04 04:37:16'),
(538, 1, 'MEDINA', 'Cundinamarca', '25438', '2026-04-04 04:37:16'),
(539, 1, 'MOSQUERA', 'Cundinamarca', '25473', '2026-04-04 04:37:16'),
(540, 1, 'NARIÑO', 'Cundinamarca', '25483', '2026-04-04 04:37:16'),
(541, 1, 'NEMOCÓN', 'Cundinamarca', '25486', '2026-04-04 04:37:16'),
(542, 1, 'NILO', 'Cundinamarca', '25488', '2026-04-04 04:37:16'),
(543, 1, 'NIMAIMA', 'Cundinamarca', '25489', '2026-04-04 04:37:16'),
(544, 1, 'NOCAIMA', 'Cundinamarca', '25491', '2026-04-04 04:37:16'),
(545, 1, 'VENECIA', 'Cundinamarca', '25506', '2026-04-04 04:37:16'),
(546, 1, 'PACHO', 'Cundinamarca', '25513', '2026-04-04 04:37:16'),
(547, 1, 'PAIME', 'Cundinamarca', '25518', '2026-04-04 04:37:16'),
(548, 1, 'PANDI', 'Cundinamarca', '25524', '2026-04-04 04:37:16'),
(549, 1, 'PARATEBUENO', 'Cundinamarca', '25530', '2026-04-04 04:37:16'),
(550, 1, 'PASCA', 'Cundinamarca', '25535', '2026-04-04 04:37:16'),
(551, 1, 'PUERTO SALGAR', 'Cundinamarca', '25572', '2026-04-04 04:37:16'),
(552, 1, 'PULÍ', 'Cundinamarca', '25580', '2026-04-04 04:37:16'),
(553, 1, 'QUEBRADANEGRA', 'Cundinamarca', '25592', '2026-04-04 04:37:16'),
(554, 1, 'QUETAME', 'Cundinamarca', '25594', '2026-04-04 04:37:16'),
(555, 1, 'QUIPILE', 'Cundinamarca', '25596', '2026-04-04 04:37:16'),
(556, 1, 'APULO', 'Cundinamarca', '25599', '2026-04-04 04:37:16'),
(557, 1, 'RICAURTE', 'Cundinamarca', '25612', '2026-04-04 04:37:16'),
(558, 1, 'SAN ANTONIO DEL TEQUENDAMA', 'Cundinamarca', '25645', '2026-04-04 04:37:16'),
(559, 1, 'SAN BERNARDO', 'Cundinamarca', '25649', '2026-04-04 04:37:16'),
(560, 1, 'SAN CAYETANO', 'Cundinamarca', '25653', '2026-04-04 04:37:16'),
(561, 1, 'SAN FRANCISCO', 'Cundinamarca', '25658', '2026-04-04 04:37:16'),
(562, 1, 'SAN JUAN DE RIOSECO', 'Cundinamarca', '25662', '2026-04-04 04:37:16'),
(563, 1, 'SASAIMA', 'Cundinamarca', '25718', '2026-04-04 04:37:16'),
(564, 1, 'SESQUILÉ', 'Cundinamarca', '25736', '2026-04-04 04:37:16'),
(565, 1, 'SIBATÉ', 'Cundinamarca', '25740', '2026-04-04 04:37:16'),
(566, 1, 'SILVANIA', 'Cundinamarca', '25743', '2026-04-04 04:37:16'),
(567, 1, 'SIMIJACA', 'Cundinamarca', '25745', '2026-04-04 04:37:16'),
(568, 1, 'SOACHA', 'Cundinamarca', '25754', '2026-04-04 04:37:16'),
(569, 1, 'SOPÓ', 'Cundinamarca', '25758', '2026-04-04 04:37:16'),
(570, 1, 'SUBACHOQUE', 'Cundinamarca', '25769', '2026-04-04 04:37:16'),
(571, 1, 'SUESCA', 'Cundinamarca', '25772', '2026-04-04 04:37:16'),
(572, 1, 'SUPATÁ', 'Cundinamarca', '25777', '2026-04-04 04:37:16'),
(573, 1, 'SUSA', 'Cundinamarca', '25779', '2026-04-04 04:37:16'),
(574, 1, 'SUTATAUSA', 'Cundinamarca', '25781', '2026-04-04 04:37:16'),
(575, 1, 'TABIO', 'Cundinamarca', '25785', '2026-04-04 04:37:16'),
(576, 1, 'TAUSA', 'Cundinamarca', '25793', '2026-04-04 04:37:16'),
(577, 1, 'TENA', 'Cundinamarca', '25797', '2026-04-04 04:37:16'),
(578, 1, 'TENJO', 'Cundinamarca', '25799', '2026-04-04 04:37:16'),
(579, 1, 'TIBACUY', 'Cundinamarca', '25805', '2026-04-04 04:37:16'),
(580, 1, 'TIBIRITA', 'Cundinamarca', '25807', '2026-04-04 04:37:16'),
(581, 1, 'TOCAIMA', 'Cundinamarca', '25815', '2026-04-04 04:37:16'),
(582, 1, 'TOCANCIPÁ', 'Cundinamarca', '25817', '2026-04-04 04:37:16'),
(583, 1, 'TOPAIPÍ', 'Cundinamarca', '25823', '2026-04-04 04:37:16'),
(584, 1, 'UBALÁ', 'Cundinamarca', '25839', '2026-04-04 04:37:16'),
(585, 1, 'UBAQUE', 'Cundinamarca', '25841', '2026-04-04 04:37:16'),
(586, 1, 'VILLA DE SAN DIEGO DE UBATÉ', 'Cundinamarca', '25843', '2026-04-04 04:37:16'),
(587, 1, 'UNE', 'Cundinamarca', '25845', '2026-04-04 04:37:16'),
(588, 1, 'ÚTICA', 'Cundinamarca', '25851', '2026-04-04 04:37:16'),
(589, 1, 'VERGARA', 'Cundinamarca', '25862', '2026-04-04 04:37:16'),
(590, 1, 'VIANÍ', 'Cundinamarca', '25867', '2026-04-04 04:37:16'),
(591, 1, 'VILLAGÓMEZ', 'Cundinamarca', '25871', '2026-04-04 04:37:16'),
(592, 1, 'VILLAPINZÓN', 'Cundinamarca', '25873', '2026-04-04 04:37:16'),
(593, 1, 'VILLETA', 'Cundinamarca', '25875', '2026-04-04 04:37:16'),
(594, 1, 'VIOTÁ', 'Cundinamarca', '25878', '2026-04-04 04:37:16'),
(595, 1, 'YACOPÍ', 'Cundinamarca', '25885', '2026-04-04 04:37:16'),
(596, 1, 'ZIPACÓN', 'Cundinamarca', '25898', '2026-04-04 04:37:16'),
(597, 1, 'ZIPAQUIRÁ', 'Cundinamarca', '25899', '2026-04-04 04:37:16'),
(598, 1, 'QUIBDÓ', 'Chocó', '27001', '2026-04-04 04:37:16'),
(599, 1, 'ACANDÍ', 'Chocó', '27006', '2026-04-04 04:37:16'),
(600, 1, 'ALTO BAUDÓ', 'Chocó', '27025', '2026-04-04 04:37:16'),
(601, 1, 'ATRATO', 'Chocó', '27050', '2026-04-04 04:37:16'),
(602, 1, 'BAGADÓ', 'Chocó', '27073', '2026-04-04 04:37:16'),
(603, 1, 'BAHÍA SOLANO', 'Chocó', '27075', '2026-04-04 04:37:16'),
(604, 1, 'BAJO BAUDÓ', 'Chocó', '27077', '2026-04-04 04:37:16'),
(605, 1, 'BOJAYÁ', 'Chocó', '27099', '2026-04-04 04:37:16'),
(606, 1, 'EL CANTÓN DEL SAN PABLO', 'Chocó', '27135', '2026-04-04 04:37:16'),
(607, 1, 'CARMEN DEL DARIÉN', 'Chocó', '27150', '2026-04-04 04:37:16'),
(608, 1, 'CÉRTEGUI', 'Chocó', '27160', '2026-04-04 04:37:16'),
(609, 1, 'CONDOTO', 'Chocó', '27205', '2026-04-04 04:37:16'),
(610, 1, 'EL CARMEN DE ATRATO', 'Chocó', '27245', '2026-04-04 04:37:16'),
(611, 1, 'EL LITORAL DEL SAN JUAN', 'Chocó', '27250', '2026-04-04 04:37:16'),
(612, 1, 'ISTMINA', 'Chocó', '27361', '2026-04-04 04:37:16'),
(613, 1, 'JURADÓ', 'Chocó', '27372', '2026-04-04 04:37:16'),
(614, 1, 'LLORÓ', 'Chocó', '27413', '2026-04-04 04:37:16'),
(615, 1, 'MEDIO ATRATO', 'Chocó', '27425', '2026-04-04 04:37:16'),
(616, 1, 'MEDIO BAUDÓ', 'Chocó', '27430', '2026-04-04 04:37:16'),
(617, 1, 'MEDIO SAN JUAN', 'Chocó', '27450', '2026-04-04 04:37:16'),
(618, 1, 'NÓVITA', 'Chocó', '27491', '2026-04-04 04:37:16'),
(619, 1, 'NUQUÍ', 'Chocó', '27495', '2026-04-04 04:37:16'),
(620, 1, 'RÍO IRÓ', 'Chocó', '27580', '2026-04-04 04:37:16'),
(621, 1, 'RÍO QUITO', 'Chocó', '27600', '2026-04-04 04:37:16'),
(622, 1, 'RIOSUCIO', 'Chocó', '27615', '2026-04-04 04:37:16'),
(623, 1, 'SAN JOSÉ DEL PALMAR', 'Chocó', '27660', '2026-04-04 04:37:16'),
(624, 1, 'SIPÍ', 'Chocó', '27745', '2026-04-04 04:37:16'),
(625, 1, 'TADÓ', 'Chocó', '27787', '2026-04-04 04:37:16'),
(626, 1, 'UNGUÍA', 'Chocó', '27800', '2026-04-04 04:37:16'),
(627, 1, 'UNIÓN PANAMERICANA', 'Chocó', '27810', '2026-04-04 04:37:16'),
(628, 1, 'NEIVA', 'Huila', '41001', '2026-04-04 04:37:16'),
(629, 1, 'ACEVEDO', 'Huila', '41006', '2026-04-04 04:37:16'),
(630, 1, 'AGRADO', 'Huila', '41013', '2026-04-04 04:37:16'),
(631, 1, 'AIPE', 'Huila', '41016', '2026-04-04 04:37:16'),
(632, 1, 'ALGECIRAS', 'Huila', '41020', '2026-04-04 04:37:16'),
(633, 1, 'ALTAMIRA', 'Huila', '41026', '2026-04-04 04:37:16'),
(634, 1, 'BARAYA', 'Huila', '41078', '2026-04-04 04:37:16'),
(635, 1, 'CAMPOALEGRE', 'Huila', '41132', '2026-04-04 04:37:16'),
(636, 1, 'COLOMBIA', 'Huila', '41206', '2026-04-04 04:37:16'),
(637, 1, 'ELÍAS', 'Huila', '41244', '2026-04-04 04:37:16'),
(638, 1, 'GARZÓN', 'Huila', '41298', '2026-04-04 04:37:16'),
(639, 1, 'GIGANTE', 'Huila', '41306', '2026-04-04 04:37:16'),
(640, 1, 'GUADALUPE', 'Huila', '41319', '2026-04-04 04:37:16'),
(641, 1, 'HOBO', 'Huila', '41349', '2026-04-04 04:37:16'),
(642, 1, 'ÍQUIRA', 'Huila', '41357', '2026-04-04 04:37:16'),
(643, 1, 'ISNOS', 'Huila', '41359', '2026-04-04 04:37:16'),
(644, 1, 'LA ARGENTINA', 'Huila', '41378', '2026-04-04 04:37:16'),
(645, 1, 'LA PLATA', 'Huila', '41396', '2026-04-04 04:37:16'),
(646, 1, 'NÁTAGA', 'Huila', '41483', '2026-04-04 04:37:16'),
(647, 1, 'OPORAPA', 'Huila', '41503', '2026-04-04 04:37:16'),
(648, 1, 'PAICOL', 'Huila', '41518', '2026-04-04 04:37:16'),
(649, 1, 'PALERMO', 'Huila', '41524', '2026-04-04 04:37:16'),
(650, 1, 'PALESTINA', 'Huila', '41530', '2026-04-04 04:37:16'),
(651, 1, 'PITAL', 'Huila', '41548', '2026-04-04 04:37:16'),
(652, 1, 'PITALITO', 'Huila', '41551', '2026-04-04 04:37:16'),
(653, 1, 'RIVERA', 'Huila', '41615', '2026-04-04 04:37:16'),
(654, 1, 'SALADOBLANCO', 'Huila', '41660', '2026-04-04 04:37:16'),
(655, 1, 'SAN AGUSTÍN', 'Huila', '41668', '2026-04-04 04:37:16'),
(656, 1, 'SANTA MARÍA', 'Huila', '41676', '2026-04-04 04:37:16'),
(657, 1, 'SUAZA', 'Huila', '41770', '2026-04-04 04:37:16'),
(658, 1, 'TARQUI', 'Huila', '41791', '2026-04-04 04:37:16'),
(659, 1, 'TESALIA', 'Huila', '41797', '2026-04-04 04:37:16'),
(660, 1, 'TELLO', 'Huila', '41799', '2026-04-04 04:37:16'),
(661, 1, 'TERUEL', 'Huila', '41801', '2026-04-04 04:37:16'),
(662, 1, 'TIMANÁ', 'Huila', '41807', '2026-04-04 04:37:16'),
(663, 1, 'VILLAVIEJA', 'Huila', '41872', '2026-04-04 04:37:16'),
(664, 1, 'YAGUARÁ', 'Huila', '41885', '2026-04-04 04:37:16'),
(665, 1, 'RIOHACHA', 'La Guajira', '44001', '2026-04-04 04:37:16'),
(666, 1, 'ALBANIA', 'La Guajira', '44035', '2026-04-04 04:37:16'),
(667, 1, 'BARRANCAS', 'La Guajira', '44078', '2026-04-04 04:37:16'),
(668, 1, 'DIBULLA', 'La Guajira', '44090', '2026-04-04 04:37:16'),
(669, 1, 'DISTRACCIÓN', 'La Guajira', '44098', '2026-04-04 04:37:16'),
(670, 1, 'EL MOLINO', 'La Guajira', '44110', '2026-04-04 04:37:16'),
(671, 1, 'FONSECA', 'La Guajira', '44279', '2026-04-04 04:37:16'),
(672, 1, 'HATONUEVO', 'La Guajira', '44378', '2026-04-04 04:37:16'),
(673, 1, 'LA JAGUA DEL PILAR', 'La Guajira', '44420', '2026-04-04 04:37:16'),
(674, 1, 'MAICAO', 'La Guajira', '44430', '2026-04-04 04:37:16'),
(675, 1, 'MANAURE', 'La Guajira', '44560', '2026-04-04 04:37:16'),
(676, 1, 'SAN JUAN DEL CESAR', 'La Guajira', '44650', '2026-04-04 04:37:16'),
(677, 1, 'URIBIA', 'La Guajira', '44847', '2026-04-04 04:37:16'),
(678, 1, 'URUMITA', 'La Guajira', '44855', '2026-04-04 04:37:16'),
(679, 1, 'VILLANUEVA', 'La Guajira', '44874', '2026-04-04 04:37:16'),
(680, 1, 'SANTA MARTA', 'Magdalena', '47001', '2026-04-04 04:37:16'),
(681, 1, 'ALGARROBO', 'Magdalena', '47030', '2026-04-04 04:37:16'),
(682, 1, 'ARACATACA', 'Magdalena', '47053', '2026-04-04 04:37:16'),
(683, 1, 'ARIGUANÍ', 'Magdalena', '47058', '2026-04-04 04:37:16'),
(684, 1, 'CERRO DE SAN ANTONIO', 'Magdalena', '47161', '2026-04-04 04:37:16'),
(685, 1, 'CHIVOLO', 'Magdalena', '47170', '2026-04-04 04:37:16'),
(686, 1, 'CIÉNAGA', 'Magdalena', '47189', '2026-04-04 04:37:16'),
(687, 1, 'CONCORDIA', 'Magdalena', '47205', '2026-04-04 04:37:16'),
(688, 1, 'EL BANCO', 'Magdalena', '47245', '2026-04-04 04:37:16'),
(689, 1, 'EL PIÑÓN', 'Magdalena', '47258', '2026-04-04 04:37:16'),
(690, 1, 'EL RETÉN', 'Magdalena', '47268', '2026-04-04 04:37:16'),
(691, 1, 'FUNDACIÓN', 'Magdalena', '47288', '2026-04-04 04:37:16'),
(692, 1, 'GUAMAL', 'Magdalena', '47318', '2026-04-04 04:37:16'),
(693, 1, 'NUEVA GRANADA', 'Magdalena', '47460', '2026-04-04 04:37:16'),
(694, 1, 'PEDRAZA', 'Magdalena', '47541', '2026-04-04 04:37:16'),
(695, 1, 'PIJIÑO DEL CARMEN', 'Magdalena', '47545', '2026-04-04 04:37:16'),
(696, 1, 'PIVIJAY', 'Magdalena', '47551', '2026-04-04 04:37:16'),
(697, 1, 'PLATO', 'Magdalena', '47555', '2026-04-04 04:37:16'),
(698, 1, 'PUEBLOVIEJO', 'Magdalena', '47570', '2026-04-04 04:37:16'),
(699, 1, 'REMOLINO', 'Magdalena', '47605', '2026-04-04 04:37:16'),
(700, 1, 'SABANAS DE SAN ÁNGEL', 'Magdalena', '47660', '2026-04-04 04:37:16'),
(701, 1, 'SALAMINA', 'Magdalena', '47675', '2026-04-04 04:37:16'),
(702, 1, 'SAN SEBASTIÁN DE BUENAVISTA', 'Magdalena', '47692', '2026-04-04 04:37:16'),
(703, 1, 'SAN ZENÓN', 'Magdalena', '47703', '2026-04-04 04:37:16'),
(704, 1, 'SANTA ANA', 'Magdalena', '47707', '2026-04-04 04:37:16'),
(705, 1, 'SANTA BÁRBARA DE PINTO', 'Magdalena', '47720', '2026-04-04 04:37:16'),
(706, 1, 'SITIONUEVO', 'Magdalena', '47745', '2026-04-04 04:37:16'),
(707, 1, 'TENERIFE', 'Magdalena', '47798', '2026-04-04 04:37:16'),
(708, 1, 'ZAPAYÁN', 'Magdalena', '47960', '2026-04-04 04:37:16'),
(709, 1, 'ZONA BANANERA', 'Magdalena', '47980', '2026-04-04 04:37:16'),
(710, 1, 'VILLAVICENCIO', 'Meta', '50001', '2026-04-04 04:37:16'),
(711, 1, 'ACACÍAS', 'Meta', '50006', '2026-04-04 04:37:16'),
(712, 1, 'BARRANCA DE UPÍA', 'Meta', '50110', '2026-04-04 04:37:16'),
(713, 1, 'CABUYARO', 'Meta', '50124', '2026-04-04 04:37:16'),
(714, 1, 'CASTILLA LA NUEVA', 'Meta', '50150', '2026-04-04 04:37:16'),
(715, 1, 'CUBARRAL', 'Meta', '50223', '2026-04-04 04:37:16'),
(716, 1, 'CUMARAL', 'Meta', '50226', '2026-04-04 04:37:16'),
(717, 1, 'EL CALVARIO', 'Meta', '50245', '2026-04-04 04:37:16'),
(718, 1, 'EL CASTILLO', 'Meta', '50251', '2026-04-04 04:37:16'),
(719, 1, 'EL DORADO', 'Meta', '50270', '2026-04-04 04:37:16'),
(720, 1, 'FUENTE DE ORO', 'Meta', '50287', '2026-04-04 04:37:16'),
(721, 1, 'GRANADA', 'Meta', '50313', '2026-04-04 04:37:16'),
(722, 1, 'GUAMAL', 'Meta', '50318', '2026-04-04 04:37:16'),
(723, 1, 'MAPIRIPÁN', 'Meta', '50325', '2026-04-04 04:37:16'),
(724, 1, 'MESETAS', 'Meta', '50330', '2026-04-04 04:37:16'),
(725, 1, 'LA MACARENA', 'Meta', '50350', '2026-04-04 04:37:16'),
(726, 1, 'URIBE', 'Meta', '50370', '2026-04-04 04:37:16'),
(727, 1, 'LEJANÍAS', 'Meta', '50400', '2026-04-04 04:37:16'),
(728, 1, 'PUERTO CONCORDIA', 'Meta', '50450', '2026-04-04 04:37:16'),
(729, 1, 'PUERTO GAITÁN', 'Meta', '50568', '2026-04-04 04:37:16'),
(730, 1, 'PUERTO LÓPEZ', 'Meta', '50573', '2026-04-04 04:37:16'),
(731, 1, 'PUERTO LLERAS', 'Meta', '50577', '2026-04-04 04:37:16'),
(732, 1, 'PUERTO RICO', 'Meta', '50590', '2026-04-04 04:37:16'),
(733, 1, 'RESTREPO', 'Meta', '50606', '2026-04-04 04:37:16'),
(734, 1, 'SAN CARLOS DE GUAROA', 'Meta', '50680', '2026-04-04 04:37:16'),
(735, 1, 'SAN JUAN DE ARAMA', 'Meta', '50683', '2026-04-04 04:37:16'),
(736, 1, 'SAN JUANITO', 'Meta', '50686', '2026-04-04 04:37:16'),
(737, 1, 'SAN MARTÍN', 'Meta', '50689', '2026-04-04 04:37:16'),
(738, 1, 'VISTAHERMOSA', 'Meta', '50711', '2026-04-04 04:37:16'),
(739, 1, 'PASTO', 'Nariño', '52001', '2026-04-04 04:37:16'),
(740, 1, 'ALBÁN', 'Nariño', '52019', '2026-04-04 04:37:16'),
(741, 1, 'ALDANA', 'Nariño', '52022', '2026-04-04 04:37:16'),
(742, 1, 'ANCUYÁ', 'Nariño', '52036', '2026-04-04 04:37:16'),
(743, 1, 'ARBOLEDA', 'Nariño', '52051', '2026-04-04 04:37:16'),
(744, 1, 'BARBACOAS', 'Nariño', '52079', '2026-04-04 04:37:16'),
(745, 1, 'BELÉN', 'Nariño', '52083', '2026-04-04 04:37:16'),
(746, 1, 'BUESACO', 'Nariño', '52110', '2026-04-04 04:37:16'),
(747, 1, 'COLÓN', 'Nariño', '52203', '2026-04-04 04:37:16'),
(748, 1, 'CONSACÁ', 'Nariño', '52207', '2026-04-04 04:37:16'),
(749, 1, 'CONTADERO', 'Nariño', '52210', '2026-04-04 04:37:16'),
(750, 1, 'CÓRDOBA', 'Nariño', '52215', '2026-04-04 04:37:16'),
(751, 1, 'CUASPÚD', 'Nariño', '52224', '2026-04-04 04:37:16'),
(752, 1, 'CUMBAL', 'Nariño', '52227', '2026-04-04 04:37:16'),
(753, 1, 'CUMBITARA', 'Nariño', '52233', '2026-04-04 04:37:16'),
(754, 1, 'CHACHAGÜÍ', 'Nariño', '52240', '2026-04-04 04:37:16'),
(755, 1, 'EL CHARCO', 'Nariño', '52250', '2026-04-04 04:37:16'),
(756, 1, 'EL PEÑOL', 'Nariño', '52254', '2026-04-04 04:37:16'),
(757, 1, 'EL ROSARIO', 'Nariño', '52256', '2026-04-04 04:37:16'),
(758, 1, 'EL TABLÓN DE GÓMEZ', 'Nariño', '52258', '2026-04-04 04:37:16'),
(759, 1, 'EL TAMBO', 'Nariño', '52260', '2026-04-04 04:37:16'),
(760, 1, 'FUNES', 'Nariño', '52287', '2026-04-04 04:37:16'),
(761, 1, 'GUACHUCAL', 'Nariño', '52317', '2026-04-04 04:37:16'),
(762, 1, 'GUAITARILLA', 'Nariño', '52320', '2026-04-04 04:37:16'),
(763, 1, 'GUALMATÁN', 'Nariño', '52323', '2026-04-04 04:37:16'),
(764, 1, 'ILES', 'Nariño', '52352', '2026-04-04 04:37:16'),
(765, 1, 'IMUÉS', 'Nariño', '52354', '2026-04-04 04:37:16'),
(766, 1, 'IPIALES', 'Nariño', '52356', '2026-04-04 04:37:16'),
(767, 1, 'LA CRUZ', 'Nariño', '52378', '2026-04-04 04:37:16'),
(768, 1, 'LA FLORIDA', 'Nariño', '52381', '2026-04-04 04:37:16'),
(769, 1, 'LA LLANADA', 'Nariño', '52385', '2026-04-04 04:37:16'),
(770, 1, 'LA TOLA', 'Nariño', '52390', '2026-04-04 04:37:16'),
(771, 1, 'LA UNIÓN', 'Nariño', '52399', '2026-04-04 04:37:16'),
(772, 1, 'LEIVA', 'Nariño', '52405', '2026-04-04 04:37:16'),
(773, 1, 'LINARES', 'Nariño', '52411', '2026-04-04 04:37:16'),
(774, 1, 'LOS ANDES', 'Nariño', '52418', '2026-04-04 04:37:16'),
(775, 1, 'MAGÜÍ', 'Nariño', '52427', '2026-04-04 04:37:16'),
(776, 1, 'MALLAMA', 'Nariño', '52435', '2026-04-04 04:37:16'),
(777, 1, 'MOSQUERA', 'Nariño', '52473', '2026-04-04 04:37:16'),
(778, 1, 'NARIÑO', 'Nariño', '52480', '2026-04-04 04:37:16'),
(779, 1, 'OLAYA HERRERA', 'Nariño', '52490', '2026-04-04 04:37:16'),
(780, 1, 'OSPINA', 'Nariño', '52506', '2026-04-04 04:37:16'),
(781, 1, 'FRANCISCO PIZARRO', 'Nariño', '52520', '2026-04-04 04:37:16'),
(782, 1, 'POLICARPA', 'Nariño', '52540', '2026-04-04 04:37:16'),
(783, 1, 'POTOSÍ', 'Nariño', '52560', '2026-04-04 04:37:16');
INSERT INTO `ciudades` (`id`, `pais_id`, `nombre`, `departamento`, `codigo_dane`, `created_at`) VALUES
(784, 1, 'PROVIDENCIA', 'Nariño', '52565', '2026-04-04 04:37:16'),
(785, 1, 'PUERRES', 'Nariño', '52573', '2026-04-04 04:37:16'),
(786, 1, 'PUPIALES', 'Nariño', '52585', '2026-04-04 04:37:16'),
(787, 1, 'RICAURTE', 'Nariño', '52612', '2026-04-04 04:37:16'),
(788, 1, 'ROBERTO PAYÁN', 'Nariño', '52621', '2026-04-04 04:37:16'),
(789, 1, 'SAMANIEGO', 'Nariño', '52678', '2026-04-04 04:37:16'),
(790, 1, 'SANDONÁ', 'Nariño', '52683', '2026-04-04 04:37:16'),
(791, 1, 'SAN BERNARDO', 'Nariño', '52685', '2026-04-04 04:37:16'),
(792, 1, 'SAN LORENZO', 'Nariño', '52687', '2026-04-04 04:37:16'),
(793, 1, 'SAN PABLO', 'Nariño', '52693', '2026-04-04 04:37:16'),
(794, 1, 'SAN PEDRO DE CARTAGO', 'Nariño', '52694', '2026-04-04 04:37:16'),
(795, 1, 'SANTA BÁRBARA', 'Nariño', '52696', '2026-04-04 04:37:16'),
(796, 1, 'SANTACRUZ', 'Nariño', '52699', '2026-04-04 04:37:16'),
(797, 1, 'SAPUYES', 'Nariño', '52720', '2026-04-04 04:37:16'),
(798, 1, 'TAMINANGO', 'Nariño', '52786', '2026-04-04 04:37:16'),
(799, 1, 'TANGUA', 'Nariño', '52788', '2026-04-04 04:37:16'),
(800, 1, 'SAN ANDRÉS DE TUMACO', 'Nariño', '52835', '2026-04-04 04:37:16'),
(801, 1, 'TÚQUERRES', 'Nariño', '52838', '2026-04-04 04:37:16'),
(802, 1, 'YACUANQUER', 'Nariño', '52885', '2026-04-04 04:37:16'),
(803, 1, 'CÚCUTA', 'Norte de Santander', '54001', '2026-04-04 04:37:16'),
(804, 1, 'ÁBREGO', 'Norte de Santander', '54003', '2026-04-04 04:37:16'),
(805, 1, 'ARBOLEDAS', 'Norte de Santander', '54051', '2026-04-04 04:37:16'),
(806, 1, 'BOCHALEMA', 'Norte de Santander', '54099', '2026-04-04 04:37:16'),
(807, 1, 'BUCARASICA', 'Norte de Santander', '54109', '2026-04-04 04:37:16'),
(808, 1, 'CÁCOTA', 'Norte de Santander', '54125', '2026-04-04 04:37:16'),
(809, 1, 'CÁCHIRA', 'Norte de Santander', '54128', '2026-04-04 04:37:16'),
(810, 1, 'CHINÁCOTA', 'Norte de Santander', '54172', '2026-04-04 04:37:16'),
(811, 1, 'CHITAGÁ', 'Norte de Santander', '54174', '2026-04-04 04:37:16'),
(812, 1, 'CONVENCIÓN', 'Norte de Santander', '54206', '2026-04-04 04:37:16'),
(813, 1, 'CUCUTILLA', 'Norte de Santander', '54223', '2026-04-04 04:37:16'),
(814, 1, 'DURANIA', 'Norte de Santander', '54239', '2026-04-04 04:37:16'),
(815, 1, 'EL CARMEN', 'Norte de Santander', '54245', '2026-04-04 04:37:16'),
(816, 1, 'EL TARRA', 'Norte de Santander', '54250', '2026-04-04 04:37:16'),
(817, 1, 'EL ZULIA', 'Norte de Santander', '54261', '2026-04-04 04:37:16'),
(818, 1, 'GRAMALOTE', 'Norte de Santander', '54313', '2026-04-04 04:37:16'),
(819, 1, 'HACARÍ', 'Norte de Santander', '54344', '2026-04-04 04:37:16'),
(820, 1, 'HERRÁN', 'Norte de Santander', '54347', '2026-04-04 04:37:16'),
(821, 1, 'LABATECA', 'Norte de Santander', '54377', '2026-04-04 04:37:16'),
(822, 1, 'LA ESPERANZA', 'Norte de Santander', '54385', '2026-04-04 04:37:16'),
(823, 1, 'LA PLAYA', 'Norte de Santander', '54398', '2026-04-04 04:37:16'),
(824, 1, 'LOS PATIOS', 'Norte de Santander', '54405', '2026-04-04 04:37:16'),
(825, 1, 'LOURDES', 'Norte de Santander', '54418', '2026-04-04 04:37:16'),
(826, 1, 'MUTISCUA', 'Norte de Santander', '54480', '2026-04-04 04:37:16'),
(827, 1, 'OCAÑA', 'Norte de Santander', '54498', '2026-04-04 04:37:16'),
(828, 1, 'PAMPLONA', 'Norte de Santander', '54518', '2026-04-04 04:37:16'),
(829, 1, 'PAMPLONITA', 'Norte de Santander', '54520', '2026-04-04 04:37:16'),
(830, 1, 'PUERTO SANTANDER', 'Norte de Santander', '54553', '2026-04-04 04:37:16'),
(831, 1, 'RAGONVALIA', 'Norte de Santander', '54599', '2026-04-04 04:37:16'),
(832, 1, 'SALAZAR', 'Norte de Santander', '54660', '2026-04-04 04:37:16'),
(833, 1, 'SAN CALIXTO', 'Norte de Santander', '54670', '2026-04-04 04:37:16'),
(834, 1, 'SAN CAYETANO', 'Norte de Santander', '54673', '2026-04-04 04:37:16'),
(835, 1, 'SANTIAGO', 'Norte de Santander', '54680', '2026-04-04 04:37:16'),
(836, 1, 'SARDINATA', 'Norte de Santander', '54720', '2026-04-04 04:37:16'),
(837, 1, 'SILOS', 'Norte de Santander', '54743', '2026-04-04 04:37:16'),
(838, 1, 'TEORAMA', 'Norte de Santander', '54800', '2026-04-04 04:37:16'),
(839, 1, 'TIBÚ', 'Norte de Santander', '54810', '2026-04-04 04:37:16'),
(840, 1, 'TOLEDO', 'Norte de Santander', '54820', '2026-04-04 04:37:16'),
(841, 1, 'VILLA CARO', 'Norte de Santander', '54871', '2026-04-04 04:37:16'),
(842, 1, 'VILLA DEL ROSARIO', 'Norte de Santander', '54874', '2026-04-04 04:37:16'),
(843, 1, 'ARMENIA', 'Quindío', '63001', '2026-04-04 04:37:16'),
(844, 1, 'BUENAVISTA', 'Quindío', '63111', '2026-04-04 04:37:16'),
(845, 1, 'CALARCÁ', 'Quindío', '63130', '2026-04-04 04:37:16'),
(846, 1, 'CIRCASIA', 'Quindío', '63190', '2026-04-04 04:37:16'),
(847, 1, 'CÓRDOBA', 'Quindío', '63212', '2026-04-04 04:37:16'),
(848, 1, 'FILANDIA', 'Quindío', '63272', '2026-04-04 04:37:16'),
(849, 1, 'GÉNOVA', 'Quindío', '63302', '2026-04-04 04:37:16'),
(850, 1, 'LA TEBAIDA', 'Quindío', '63401', '2026-04-04 04:37:16'),
(851, 1, 'MONTENEGRO', 'Quindío', '63470', '2026-04-04 04:37:16'),
(852, 1, 'PIJAO', 'Quindío', '63548', '2026-04-04 04:37:16'),
(853, 1, 'QUIMBAYA', 'Quindío', '63594', '2026-04-04 04:37:16'),
(854, 1, 'SALENTO', 'Quindío', '63690', '2026-04-04 04:37:16'),
(855, 1, 'PEREIRA', 'Risaralda', '66001', '2026-04-04 04:37:16'),
(856, 1, 'APÍA', 'Risaralda', '66045', '2026-04-04 04:37:16'),
(857, 1, 'BALBOA', 'Risaralda', '66075', '2026-04-04 04:37:16'),
(858, 1, 'BELÉN DE UMBRÍA', 'Risaralda', '66088', '2026-04-04 04:37:16'),
(859, 1, 'DOSQUEBRADAS', 'Risaralda', '66170', '2026-04-04 04:37:16'),
(860, 1, 'GUÁTICA', 'Risaralda', '66318', '2026-04-04 04:37:16'),
(861, 1, 'LA CELIA', 'Risaralda', '66383', '2026-04-04 04:37:16'),
(862, 1, 'LA VIRGINIA', 'Risaralda', '66400', '2026-04-04 04:37:16'),
(863, 1, 'MARSELLA', 'Risaralda', '66440', '2026-04-04 04:37:16'),
(864, 1, 'MISTRATÓ', 'Risaralda', '66456', '2026-04-04 04:37:16'),
(865, 1, 'PUEBLO RICO', 'Risaralda', '66572', '2026-04-04 04:37:16'),
(866, 1, 'QUINCHÍA', 'Risaralda', '66594', '2026-04-04 04:37:16'),
(867, 1, 'SANTA ROSA DE CABAL', 'Risaralda', '66682', '2026-04-04 04:37:16'),
(868, 1, 'SANTUARIO', 'Risaralda', '66687', '2026-04-04 04:37:16'),
(869, 1, 'BUCARAMANGA', 'Santander', '68001', '2026-04-04 04:37:16'),
(870, 1, 'AGUADA', 'Santander', '68013', '2026-04-04 04:37:16'),
(871, 1, 'ALBANIA', 'Santander', '68020', '2026-04-04 04:37:16'),
(872, 1, 'ARATOCA', 'Santander', '68051', '2026-04-04 04:37:16'),
(873, 1, 'BARBOSA', 'Santander', '68077', '2026-04-04 04:37:16'),
(874, 1, 'BARICHARA', 'Santander', '68079', '2026-04-04 04:37:16'),
(875, 1, 'BARRANCABERMEJA', 'Santander', '68081', '2026-04-04 04:37:16'),
(876, 1, 'BETULIA', 'Santander', '68092', '2026-04-04 04:37:16'),
(877, 1, 'BOLÍVAR', 'Santander', '68101', '2026-04-04 04:37:16'),
(878, 1, 'CABRERA', 'Santander', '68121', '2026-04-04 04:37:16'),
(879, 1, 'CALIFORNIA', 'Santander', '68132', '2026-04-04 04:37:16'),
(880, 1, 'CAPITANEJO', 'Santander', '68147', '2026-04-04 04:37:16'),
(881, 1, 'CARCASÍ', 'Santander', '68152', '2026-04-04 04:37:16'),
(882, 1, 'CEPITÁ', 'Santander', '68160', '2026-04-04 04:37:16'),
(883, 1, 'CERRITO', 'Santander', '68162', '2026-04-04 04:37:16'),
(884, 1, 'CHARALÁ', 'Santander', '68167', '2026-04-04 04:37:16'),
(885, 1, 'CHARTA', 'Santander', '68169', '2026-04-04 04:37:16'),
(886, 1, 'CHIMA', 'Santander', '68176', '2026-04-04 04:37:16'),
(887, 1, 'CHIPATÁ', 'Santander', '68179', '2026-04-04 04:37:16'),
(888, 1, 'CIMITARRA', 'Santander', '68190', '2026-04-04 04:37:16'),
(889, 1, 'CONCEPCIÓN', 'Santander', '68207', '2026-04-04 04:37:16'),
(890, 1, 'CONFINES', 'Santander', '68209', '2026-04-04 04:37:16'),
(891, 1, 'CONTRATACIÓN', 'Santander', '68211', '2026-04-04 04:37:16'),
(892, 1, 'COROMORO', 'Santander', '68217', '2026-04-04 04:37:16'),
(893, 1, 'CURITÍ', 'Santander', '68229', '2026-04-04 04:37:16'),
(894, 1, 'EL CARMEN DE CHUCURÍ', 'Santander', '68235', '2026-04-04 04:37:16'),
(895, 1, 'EL GUACAMAYO', 'Santander', '68245', '2026-04-04 04:37:16'),
(896, 1, 'EL PEÑÓN', 'Santander', '68250', '2026-04-04 04:37:16'),
(897, 1, 'EL PLAYÓN', 'Santander', '68255', '2026-04-04 04:37:16'),
(898, 1, 'ENCINO', 'Santander', '68264', '2026-04-04 04:37:16'),
(899, 1, 'ENCISO', 'Santander', '68266', '2026-04-04 04:37:16'),
(900, 1, 'FLORIÁN', 'Santander', '68271', '2026-04-04 04:37:16'),
(901, 1, 'FLORIDABLANCA', 'Santander', '68276', '2026-04-04 04:37:16'),
(902, 1, 'GALÁN', 'Santander', '68296', '2026-04-04 04:37:16'),
(903, 1, 'GÁMBITA', 'Santander', '68298', '2026-04-04 04:37:16'),
(904, 1, 'GIRÓN', 'Santander', '68307', '2026-04-04 04:37:16'),
(905, 1, 'GUACA', 'Santander', '68318', '2026-04-04 04:37:16'),
(906, 1, 'GUADALUPE', 'Santander', '68320', '2026-04-04 04:37:16'),
(907, 1, 'GUAPOTÁ', 'Santander', '68322', '2026-04-04 04:37:16'),
(908, 1, 'GUAVATÁ', 'Santander', '68324', '2026-04-04 04:37:16'),
(909, 1, 'GÜEPSA', 'Santander', '68327', '2026-04-04 04:37:16'),
(910, 1, 'HATO', 'Santander', '68344', '2026-04-04 04:37:16'),
(911, 1, 'JESÚS MARÍA', 'Santander', '68368', '2026-04-04 04:37:16'),
(912, 1, 'JORDÁN', 'Santander', '68370', '2026-04-04 04:37:16'),
(913, 1, 'LA BELLEZA', 'Santander', '68377', '2026-04-04 04:37:16'),
(914, 1, 'LANDÁZURI', 'Santander', '68385', '2026-04-04 04:37:16'),
(915, 1, 'LA PAZ', 'Santander', '68397', '2026-04-04 04:37:16'),
(916, 1, 'LEBRIJA', 'Santander', '68406', '2026-04-04 04:37:16'),
(917, 1, 'LOS SANTOS', 'Santander', '68418', '2026-04-04 04:37:16'),
(918, 1, 'MACARAVITA', 'Santander', '68425', '2026-04-04 04:37:16'),
(919, 1, 'MÁLAGA', 'Santander', '68432', '2026-04-04 04:37:16'),
(920, 1, 'MATANZA', 'Santander', '68444', '2026-04-04 04:37:16'),
(921, 1, 'MOGOTES', 'Santander', '68464', '2026-04-04 04:37:16'),
(922, 1, 'MOLAGAVITA', 'Santander', '68468', '2026-04-04 04:37:16'),
(923, 1, 'OCAMONTE', 'Santander', '68498', '2026-04-04 04:37:16'),
(924, 1, 'OIBA', 'Santander', '68500', '2026-04-04 04:37:16'),
(925, 1, 'ONZAGA', 'Santander', '68502', '2026-04-04 04:37:16'),
(926, 1, 'PALMAR', 'Santander', '68522', '2026-04-04 04:37:16'),
(927, 1, 'PALMAS DEL SOCORRO', 'Santander', '68524', '2026-04-04 04:37:16'),
(928, 1, 'PÁRAMO', 'Santander', '68533', '2026-04-04 04:37:16'),
(929, 1, 'PIEDECUESTA', 'Santander', '68547', '2026-04-04 04:37:16'),
(930, 1, 'PINCHOTE', 'Santander', '68549', '2026-04-04 04:37:16'),
(931, 1, 'PUENTE NACIONAL', 'Santander', '68572', '2026-04-04 04:37:16'),
(932, 1, 'PUERTO PARRA', 'Santander', '68573', '2026-04-04 04:37:16'),
(933, 1, 'PUERTO WILCHES', 'Santander', '68575', '2026-04-04 04:37:16'),
(934, 1, 'RIONEGRO', 'Santander', '68615', '2026-04-04 04:37:16'),
(935, 1, 'SABANA DE TORRES', 'Santander', '68655', '2026-04-04 04:37:16'),
(936, 1, 'SAN ANDRÉS', 'Santander', '68669', '2026-04-04 04:37:16'),
(937, 1, 'SAN BENITO', 'Santander', '68673', '2026-04-04 04:37:16'),
(938, 1, 'SAN GIL', 'Santander', '68679', '2026-04-04 04:37:16'),
(939, 1, 'SAN JOAQUÍN', 'Santander', '68682', '2026-04-04 04:37:16'),
(940, 1, 'SAN JOSÉ DE MIRANDA', 'Santander', '68684', '2026-04-04 04:37:16'),
(941, 1, 'SAN MIGUEL', 'Santander', '68686', '2026-04-04 04:37:16'),
(942, 1, 'SAN VICENTE DE CHUCURÍ', 'Santander', '68689', '2026-04-04 04:37:16'),
(943, 1, 'SANTA BÁRBARA', 'Santander', '68705', '2026-04-04 04:37:16'),
(944, 1, 'SANTA HELENA DEL OPÓN', 'Santander', '68720', '2026-04-04 04:37:16'),
(945, 1, 'SIMACOTA', 'Santander', '68745', '2026-04-04 04:37:16'),
(946, 1, 'SOCORRO', 'Santander', '68755', '2026-04-04 04:37:16'),
(947, 1, 'SUAITA', 'Santander', '68770', '2026-04-04 04:37:16'),
(948, 1, 'SUCRE', 'Santander', '68773', '2026-04-04 04:37:16'),
(949, 1, 'SURATÁ', 'Santander', '68780', '2026-04-04 04:37:16'),
(950, 1, 'TONA', 'Santander', '68820', '2026-04-04 04:37:16'),
(951, 1, 'VALLE DE SAN JOSÉ', 'Santander', '68855', '2026-04-04 04:37:16'),
(952, 1, 'VÉLEZ', 'Santander', '68861', '2026-04-04 04:37:16'),
(953, 1, 'VETAS', 'Santander', '68867', '2026-04-04 04:37:16'),
(954, 1, 'VILLANUEVA', 'Santander', '68872', '2026-04-04 04:37:16'),
(955, 1, 'ZAPATOCA', 'Santander', '68895', '2026-04-04 04:37:16'),
(956, 1, 'SINCELEJO', 'Sucre', '70001', '2026-04-04 04:37:16'),
(957, 1, 'BUENAVISTA', 'Sucre', '70110', '2026-04-04 04:37:16'),
(958, 1, 'CAIMITO', 'Sucre', '70124', '2026-04-04 04:37:16'),
(959, 1, 'COLOSÓ', 'Sucre', '70204', '2026-04-04 04:37:16'),
(960, 1, 'COROZAL', 'Sucre', '70215', '2026-04-04 04:37:16'),
(961, 1, 'COVEÑAS', 'Sucre', '70221', '2026-04-04 04:37:16'),
(962, 1, 'CHALÁN', 'Sucre', '70230', '2026-04-04 04:37:16'),
(963, 1, 'EL ROBLE', 'Sucre', '70233', '2026-04-04 04:37:16'),
(964, 1, 'GALERAS', 'Sucre', '70235', '2026-04-04 04:37:16'),
(965, 1, 'GUARANDA', 'Sucre', '70265', '2026-04-04 04:37:16'),
(966, 1, 'LA UNIÓN', 'Sucre', '70400', '2026-04-04 04:37:16'),
(967, 1, 'LOS PALMITOS', 'Sucre', '70418', '2026-04-04 04:37:16'),
(968, 1, 'MAJAGUAL', 'Sucre', '70429', '2026-04-04 04:37:16'),
(969, 1, 'MORROA', 'Sucre', '70473', '2026-04-04 04:37:16'),
(970, 1, 'OVEJAS', 'Sucre', '70508', '2026-04-04 04:37:16'),
(971, 1, 'PALMITO', 'Sucre', '70523', '2026-04-04 04:37:16'),
(972, 1, 'SAMPUÉS', 'Sucre', '70670', '2026-04-04 04:37:16'),
(973, 1, 'SAN BENITO ABAD', 'Sucre', '70678', '2026-04-04 04:37:16'),
(974, 1, 'SAN JUAN DE BETULIA', 'Sucre', '70702', '2026-04-04 04:37:16'),
(975, 1, 'SAN MARCOS', 'Sucre', '70708', '2026-04-04 04:37:16'),
(976, 1, 'SAN ONOFRE', 'Sucre', '70713', '2026-04-04 04:37:16'),
(977, 1, 'SAN PEDRO', 'Sucre', '70717', '2026-04-04 04:37:16'),
(978, 1, 'SAN LUIS DE SINCÉ', 'Sucre', '70742', '2026-04-04 04:37:16'),
(979, 1, 'SUCRE', 'Sucre', '70771', '2026-04-04 04:37:16'),
(980, 1, 'SANTIAGO DE TOLÚ', 'Sucre', '70820', '2026-04-04 04:37:16'),
(981, 1, 'TOLÚ VIEJO', 'Sucre', '70823', '2026-04-04 04:37:16'),
(982, 1, 'IBAGUÉ', 'Tolima', '73001', '2026-04-04 04:37:16'),
(983, 1, 'ALPUJARRA', 'Tolima', '73024', '2026-04-04 04:37:16'),
(984, 1, 'ALVARADO', 'Tolima', '73026', '2026-04-04 04:37:16'),
(985, 1, 'AMBALEMA', 'Tolima', '73030', '2026-04-04 04:37:16'),
(986, 1, 'ANZOÁTEGUI', 'Tolima', '73043', '2026-04-04 04:37:16'),
(987, 1, 'ARMERO GUAYABAL', 'Tolima', '73055', '2026-04-04 04:37:16'),
(988, 1, 'ATACO', 'Tolima', '73067', '2026-04-04 04:37:16'),
(989, 1, 'CAJAMARCA', 'Tolima', '73124', '2026-04-04 04:37:16'),
(990, 1, 'CARMEN DE APICALÁ', 'Tolima', '73148', '2026-04-04 04:37:16'),
(991, 1, 'CASABIANCA', 'Tolima', '73152', '2026-04-04 04:37:16'),
(992, 1, 'CHAPARRAL', 'Tolima', '73168', '2026-04-04 04:37:16'),
(993, 1, 'COELLO', 'Tolima', '73200', '2026-04-04 04:37:16'),
(994, 1, 'COYAIMA', 'Tolima', '73217', '2026-04-04 04:37:16'),
(995, 1, 'CUNDAY', 'Tolima', '73226', '2026-04-04 04:37:16'),
(996, 1, 'DOLORES', 'Tolima', '73236', '2026-04-04 04:37:16'),
(997, 1, 'ESPINAL', 'Tolima', '73268', '2026-04-04 04:37:16'),
(998, 1, 'FALAN', 'Tolima', '73270', '2026-04-04 04:37:16'),
(999, 1, 'FLANDES', 'Tolima', '73275', '2026-04-04 04:37:16'),
(1000, 1, 'FRESNO', 'Tolima', '73283', '2026-04-04 04:37:16'),
(1001, 1, 'GUAMO', 'Tolima', '73319', '2026-04-04 04:37:16'),
(1002, 1, 'HERVEO', 'Tolima', '73347', '2026-04-04 04:37:16'),
(1003, 1, 'HONDA', 'Tolima', '73349', '2026-04-04 04:37:16'),
(1004, 1, 'ICONONZO', 'Tolima', '73352', '2026-04-04 04:37:16'),
(1005, 1, 'LÉRIDA', 'Tolima', '73408', '2026-04-04 04:37:16'),
(1006, 1, 'LÍBANO', 'Tolima', '73411', '2026-04-04 04:37:16'),
(1007, 1, 'SAN SEBASTIÁN DE MARIQUITA', 'Tolima', '73443', '2026-04-04 04:37:16'),
(1008, 1, 'MELGAR', 'Tolima', '73449', '2026-04-04 04:37:16'),
(1009, 1, 'MURILLO', 'Tolima', '73461', '2026-04-04 04:37:16'),
(1010, 1, 'NATAGAIMA', 'Tolima', '73483', '2026-04-04 04:37:16'),
(1011, 1, 'ORTEGA', 'Tolima', '73504', '2026-04-04 04:37:16'),
(1012, 1, 'PALOCABILDO', 'Tolima', '73520', '2026-04-04 04:37:16'),
(1013, 1, 'PIEDRAS', 'Tolima', '73547', '2026-04-04 04:37:16'),
(1014, 1, 'PLANADAS', 'Tolima', '73555', '2026-04-04 04:37:16'),
(1015, 1, 'PRADO', 'Tolima', '73563', '2026-04-04 04:37:16'),
(1016, 1, 'PURIFICACIÓN', 'Tolima', '73585', '2026-04-04 04:37:16'),
(1017, 1, 'RIOBLANCO', 'Tolima', '73616', '2026-04-04 04:37:16'),
(1018, 1, 'RONCESVALLES', 'Tolima', '73622', '2026-04-04 04:37:16'),
(1019, 1, 'ROVIRA', 'Tolima', '73624', '2026-04-04 04:37:16'),
(1020, 1, 'SALDAÑA', 'Tolima', '73671', '2026-04-04 04:37:16'),
(1021, 1, 'SAN ANTONIO', 'Tolima', '73675', '2026-04-04 04:37:16'),
(1022, 1, 'SAN LUIS', 'Tolima', '73678', '2026-04-04 04:37:16'),
(1023, 1, 'SANTA ISABEL', 'Tolima', '73686', '2026-04-04 04:37:16'),
(1024, 1, 'SUÁREZ', 'Tolima', '73770', '2026-04-04 04:37:16'),
(1025, 1, 'VALLE DE SAN JUAN', 'Tolima', '73854', '2026-04-04 04:37:16'),
(1026, 1, 'VENADILLO', 'Tolima', '73861', '2026-04-04 04:37:16'),
(1027, 1, 'VILLAHERMOSA', 'Tolima', '73870', '2026-04-04 04:37:16'),
(1028, 1, 'VILLARRICA', 'Tolima', '73873', '2026-04-04 04:37:16'),
(1029, 1, 'CALI', 'Valle del Cauca', '76001', '2026-04-04 04:37:16'),
(1030, 1, 'ALCALÁ', 'Valle del Cauca', '76020', '2026-04-04 04:37:16'),
(1031, 1, 'ANDALUCÍA', 'Valle del Cauca', '76036', '2026-04-04 04:37:16'),
(1032, 1, 'ANSERMANUEVO', 'Valle del Cauca', '76041', '2026-04-04 04:37:16'),
(1033, 1, 'ARGELIA', 'Valle del Cauca', '76054', '2026-04-04 04:37:16'),
(1034, 1, 'BOLÍVAR', 'Valle del Cauca', '76100', '2026-04-04 04:37:16'),
(1035, 1, 'BUENAVENTURA', 'Valle del Cauca', '76109', '2026-04-04 04:37:16'),
(1036, 1, 'GUADALAJARA DE BUGA', 'Valle del Cauca', '76111', '2026-04-04 04:37:16'),
(1037, 1, 'BUGALAGRANDE', 'Valle del Cauca', '76113', '2026-04-04 04:37:16'),
(1038, 1, 'CAICEDONIA', 'Valle del Cauca', '76122', '2026-04-04 04:37:16'),
(1039, 1, 'CALIMA', 'Valle del Cauca', '76126', '2026-04-04 04:37:16'),
(1040, 1, 'CANDELARIA', 'Valle del Cauca', '76130', '2026-04-04 04:37:16'),
(1041, 1, 'CARTAGO', 'Valle del Cauca', '76147', '2026-04-04 04:37:16'),
(1042, 1, 'DAGUA', 'Valle del Cauca', '76233', '2026-04-04 04:37:16'),
(1043, 1, 'EL ÁGUILA', 'Valle del Cauca', '76243', '2026-04-04 04:37:16'),
(1044, 1, 'EL CAIRO', 'Valle del Cauca', '76246', '2026-04-04 04:37:16'),
(1045, 1, 'EL CERRITO', 'Valle del Cauca', '76248', '2026-04-04 04:37:16'),
(1046, 1, 'EL DOVIO', 'Valle del Cauca', '76250', '2026-04-04 04:37:16'),
(1047, 1, 'FLORIDA', 'Valle del Cauca', '76275', '2026-04-04 04:37:16'),
(1048, 1, 'GINEBRA', 'Valle del Cauca', '76306', '2026-04-04 04:37:16'),
(1049, 1, 'GUACARÍ', 'Valle del Cauca', '76318', '2026-04-04 04:37:16'),
(1050, 1, 'JAMUNDÍ', 'Valle del Cauca', '76364', '2026-04-04 04:37:16'),
(1051, 1, 'LA CUMBRE', 'Valle del Cauca', '76377', '2026-04-04 04:37:16'),
(1052, 1, 'LA UNIÓN', 'Valle del Cauca', '76400', '2026-04-04 04:37:16'),
(1053, 1, 'LA VICTORIA', 'Valle del Cauca', '76403', '2026-04-04 04:37:16'),
(1054, 1, 'OBANDO', 'Valle del Cauca', '76497', '2026-04-04 04:37:16'),
(1055, 1, 'PALMIRA', 'Valle del Cauca', '76520', '2026-04-04 04:37:16'),
(1056, 1, 'PRADERA', 'Valle del Cauca', '76563', '2026-04-04 04:37:16'),
(1057, 1, 'RESTREPO', 'Valle del Cauca', '76606', '2026-04-04 04:37:16'),
(1058, 1, 'RIOFRÍO', 'Valle del Cauca', '76616', '2026-04-04 04:37:16'),
(1059, 1, 'ROLDANILLO', 'Valle del Cauca', '76622', '2026-04-04 04:37:16'),
(1060, 1, 'SAN PEDRO', 'Valle del Cauca', '76670', '2026-04-04 04:37:16'),
(1061, 1, 'SEVILLA', 'Valle del Cauca', '76736', '2026-04-04 04:37:16'),
(1062, 1, 'TORO', 'Valle del Cauca', '76823', '2026-04-04 04:37:16'),
(1063, 1, 'TRUJILLO', 'Valle del Cauca', '76828', '2026-04-04 04:37:16'),
(1064, 1, 'TULUÁ', 'Valle del Cauca', '76834', '2026-04-04 04:37:16'),
(1065, 1, 'ULLOA', 'Valle del Cauca', '76845', '2026-04-04 04:37:16'),
(1066, 1, 'VERSALLES', 'Valle del Cauca', '76863', '2026-04-04 04:37:16'),
(1067, 1, 'VIJES', 'Valle del Cauca', '76869', '2026-04-04 04:37:16'),
(1068, 1, 'YOTOCO', 'Valle del Cauca', '76890', '2026-04-04 04:37:16'),
(1069, 1, 'YUMBO', 'Valle del Cauca', '76892', '2026-04-04 04:37:16'),
(1070, 1, 'ZARZAL', 'Valle del Cauca', '76895', '2026-04-04 04:37:16'),
(1071, 1, 'ARAUCA', 'Arauca', '81001', '2026-04-04 04:37:16'),
(1072, 1, 'ARAUQUITA', 'Arauca', '81065', '2026-04-04 04:37:16'),
(1073, 1, 'CRAVO NORTE', 'Arauca', '81220', '2026-04-04 04:37:16'),
(1074, 1, 'FORTUL', 'Arauca', '81300', '2026-04-04 04:37:16'),
(1075, 1, 'PUERTO RONDÓN', 'Arauca', '81591', '2026-04-04 04:37:16'),
(1076, 1, 'SARAVENA', 'Arauca', '81736', '2026-04-04 04:37:16'),
(1077, 1, 'TAME', 'Arauca', '81794', '2026-04-04 04:37:16'),
(1078, 1, 'YOPAL', 'Casanare', '85001', '2026-04-04 04:37:16'),
(1079, 1, 'AGUAZUL', 'Casanare', '85010', '2026-04-04 04:37:16'),
(1080, 1, 'CHÁMEZA', 'Casanare', '85015', '2026-04-04 04:37:16'),
(1081, 1, 'HATO COROZAL', 'Casanare', '85125', '2026-04-04 04:37:16'),
(1082, 1, 'LA SALINA', 'Casanare', '85136', '2026-04-04 04:37:16'),
(1083, 1, 'MANÍ', 'Casanare', '85139', '2026-04-04 04:37:16'),
(1084, 1, 'MONTERREY', 'Casanare', '85162', '2026-04-04 04:37:16'),
(1085, 1, 'NUNCHÍA', 'Casanare', '85225', '2026-04-04 04:37:16'),
(1086, 1, 'OROCUÉ', 'Casanare', '85230', '2026-04-04 04:37:16'),
(1087, 1, 'PAZ DE ARIPORO', 'Casanare', '85250', '2026-04-04 04:37:16'),
(1088, 1, 'PORE', 'Casanare', '85263', '2026-04-04 04:37:16'),
(1089, 1, 'RECETOR', 'Casanare', '85279', '2026-04-04 04:37:16'),
(1090, 1, 'SABANALARGA', 'Casanare', '85300', '2026-04-04 04:37:16'),
(1091, 1, 'SÁCAMA', 'Casanare', '85315', '2026-04-04 04:37:16'),
(1092, 1, 'SAN LUIS DE PALENQUE', 'Casanare', '85325', '2026-04-04 04:37:16'),
(1093, 1, 'TÁMARA', 'Casanare', '85400', '2026-04-04 04:37:16'),
(1094, 1, 'TAURAMENA', 'Casanare', '85410', '2026-04-04 04:37:16'),
(1095, 1, 'TRINIDAD', 'Casanare', '85430', '2026-04-04 04:37:16'),
(1096, 1, 'VILLANUEVA', 'Casanare', '85440', '2026-04-04 04:37:16'),
(1097, 1, 'MOCOA', 'Putumayo', '86001', '2026-04-04 04:37:16'),
(1098, 1, 'COLÓN', 'Putumayo', '86219', '2026-04-04 04:37:16'),
(1099, 1, 'ORITO', 'Putumayo', '86320', '2026-04-04 04:37:16'),
(1100, 1, 'PUERTO ASÍS', 'Putumayo', '86568', '2026-04-04 04:37:16'),
(1101, 1, 'PUERTO CAICEDO', 'Putumayo', '86569', '2026-04-04 04:37:16'),
(1102, 1, 'PUERTO GUZMÁN', 'Putumayo', '86571', '2026-04-04 04:37:16'),
(1103, 1, 'PUERTO LEGUÍZAMO', 'Putumayo', '86573', '2026-04-04 04:37:16'),
(1104, 1, 'SIBUNDOY', 'Putumayo', '86749', '2026-04-04 04:37:16'),
(1105, 1, 'SAN FRANCISCO', 'Putumayo', '86755', '2026-04-04 04:37:16'),
(1106, 1, 'SAN MIGUEL', 'Putumayo', '86757', '2026-04-04 04:37:16'),
(1107, 1, 'SANTIAGO', 'Putumayo', '86760', '2026-04-04 04:37:16'),
(1108, 1, 'VALLE DEL GUAMUEZ', 'Putumayo', '86865', '2026-04-04 04:37:16'),
(1109, 1, 'VILLAGARZÓN', 'Putumayo', '86885', '2026-04-04 04:37:16'),
(1110, 1, 'SAN ANDRÉS', 'Archipiélago de San Andrés, Providencia y Santa Catalina', '88001', '2026-04-04 04:37:16'),
(1111, 1, 'PROVIDENCIA', 'Archipiélago de San Andrés, Providencia y Santa Catalina', '88564', '2026-04-04 04:37:16'),
(1112, 1, 'LETICIA', 'Amazonas', '91001', '2026-04-04 04:37:16'),
(1113, 1, 'EL ENCANTO', 'Amazonas', '91263', '2026-04-04 04:37:16'),
(1114, 1, 'LA CHORRERA', 'Amazonas', '91405', '2026-04-04 04:37:16'),
(1115, 1, 'LA PEDRERA', 'Amazonas', '91407', '2026-04-04 04:37:16'),
(1116, 1, 'LA VICTORIA', 'Amazonas', '91430', '2026-04-04 04:37:16'),
(1117, 1, 'MIRITÍ - PARANÁ', 'Amazonas', '91460', '2026-04-04 04:37:16'),
(1118, 1, 'PUERTO ALEGRÍA', 'Amazonas', '91530', '2026-04-04 04:37:16'),
(1119, 1, 'PUERTO ARICA', 'Amazonas', '91536', '2026-04-04 04:37:16'),
(1120, 1, 'PUERTO NARIÑO', 'Amazonas', '91540', '2026-04-04 04:37:16'),
(1121, 1, 'PUERTO SANTANDER', 'Amazonas', '91669', '2026-04-04 04:37:16'),
(1122, 1, 'TARAPACÁ', 'Amazonas', '91798', '2026-04-04 04:37:16'),
(1123, 1, 'INÍRIDA', 'Guainía', '94001', '2026-04-04 04:37:16'),
(1124, 1, 'BARRANCO MINAS', 'Guainía', '94343', '2026-04-04 04:37:16'),
(1125, 1, 'MAPIRIPANA', 'Guainía', '94663', '2026-04-04 04:37:16'),
(1126, 1, 'SAN FELIPE', 'Guainía', '94883', '2026-04-04 04:37:16'),
(1127, 1, 'PUERTO COLOMBIA', 'Guainía', '94884', '2026-04-04 04:37:16'),
(1128, 1, 'LA GUADALUPE', 'Guainía', '94885', '2026-04-04 04:37:16'),
(1129, 1, 'CACAHUAL', 'Guainía', '94886', '2026-04-04 04:37:16'),
(1130, 1, 'PANA PANA', 'Guainía', '94887', '2026-04-04 04:37:16'),
(1131, 1, 'MORICHAL', 'Guainía', '94888', '2026-04-04 04:37:16'),
(1132, 1, 'SAN JOSÉ DEL GUAVIARE', 'Guaviare', '95001', '2026-04-04 04:37:16'),
(1133, 1, 'CALAMAR', 'Guaviare', '95015', '2026-04-04 04:37:16'),
(1134, 1, 'EL RETORNO', 'Guaviare', '95025', '2026-04-04 04:37:16'),
(1135, 1, 'MIRAFLORES', 'Guaviare', '95200', '2026-04-04 04:37:16'),
(1136, 1, 'MITÚ', 'Vaupés', '97001', '2026-04-04 04:37:16'),
(1137, 1, 'CARURÚ', 'Vaupés', '97161', '2026-04-04 04:37:16'),
(1138, 1, 'PACOA', 'Vaupés', '97511', '2026-04-04 04:37:16'),
(1139, 1, 'TARAIRA', 'Vaupés', '97666', '2026-04-04 04:37:16'),
(1140, 1, 'PAPUNAUA', 'Vaupés', '97777', '2026-04-04 04:37:16'),
(1141, 1, 'YAVARATÉ', 'Vaupés', '97889', '2026-04-04 04:37:16'),
(1142, 1, 'PUERTO CARREÑO', 'Vichada', '99001', '2026-04-04 04:37:16'),
(1143, 1, 'LA PRIMAVERA', 'Vichada', '99524', '2026-04-04 04:37:16'),
(1144, 1, 'SANTA ROSALÍA', 'Vichada', '99624', '2026-04-04 04:37:16'),
(1145, 1, 'CUMARIBO', 'Vichada', '99773', '2026-04-04 04:37:16');

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

--
-- Estructura de tabla para la tabla `clientes`
--

CREATE TABLE `clientes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `documento` varchar(60) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `telefono` varchar(40) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `saldo_pendiente` decimal(12,2) NOT NULL DEFAULT 0.00,
  `credito_maximo` decimal(12,2) NOT NULL DEFAULT 0.00,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `clientes` (`id`, `empresa_id`, `nombre`, `documento`, `email`, `telefono`, `direccion`, `saldo_pendiente`, `credito_maximo`, `activo`, `created_at`, `updated_at`) VALUES
(1, 1, 'Daniel', '1088299637', 'danielamaya774@gmail.com', '3122644576', 'Calle 78C #130-55', 0.00, 0.00, 1, '2026-04-08 21:23:32', NULL);

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

--
-- Estructura de tabla para la tabla `compras`
--

CREATE TABLE `compras` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `orden_compra_id` bigint(20) UNSIGNED DEFAULT NULL,
  `recepcion_compra_id` bigint(20) UNSIGNED DEFAULT NULL,
  `proveedor_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `fecha` datetime NOT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `impuestos` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('borrador','recibida','anulada') NOT NULL DEFAULT 'recibida',
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `compras` (`id`, `empresa_id`, `orden_compra_id`, `recepcion_compra_id`, `proveedor_id`, `usuario_id`, `fecha`, `subtotal`, `impuestos`, `total`, `estado`, `created_at`) VALUES
(1, 1, NULL, NULL, 1, 8, '2026-04-03 22:16:49', 244000.00, 0.00, 244000.00, 'recibida', '2026-04-03 22:16:49'),
(2, 1, 1, 1, 1, 8, '2026-04-03 23:00:50', 190000.00, 0.00, 190000.00, 'recibida', '2026-04-03 23:00:50'),
(3, 1, 2, 2, 1, 8, '2026-04-03 23:01:08', 120000.00, 0.00, 120000.00, 'recibida', '2026-04-03 23:01:08');

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

--
-- Estructura de tabla para la tabla `compra_detalles`
--

CREATE TABLE `compra_detalles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `compra_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `variante_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `costo_unitario` decimal(12,2) NOT NULL,
  `impuesto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_linea` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `compra_detalles` (`id`, `compra_id`, `empresa_id`, `producto_id`, `variante_id`, `cantidad`, `costo_unitario`, `impuesto`, `total_linea`) VALUES
(1, 1, 1, 5, NULL, 9.00, 20000.00, 0.00, 180000.00),
(2, 1, 1, 4, NULL, 8.00, 8000.00, 0.00, 64000.00),
(3, 2, 1, 1, NULL, 10.00, 19000.00, 0.00, 190000.00),
(4, 3, 1, 4, NULL, 15.00, 8000.00, 0.00, 120000.00);

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

--
-- Estructura de tabla para la tabla `configuracion_empresa`
--

CREATE TABLE `configuracion_empresa` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `clave` varchar(120) NOT NULL,
  `valor` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `configuracion_empresa` (`id`, `empresa_id`, `clave`, `valor`, `created_at`, `updated_at`) VALUES
(1, 1, 'regimen_fiscal', 'comun', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(2, 1, 'responsable_iva', '1', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(3, 1, 'facturacion_electronica', '1', '2026-04-08 13:19:40', '2026-04-09 11:18:53'),
(4, 1, 'ambiente_facturacion', 'pruebas', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(5, 1, 'prefijo_factura', 'Volt', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(6, 1, 'resolucion_dian', '18764095110448', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(7, 1, 'actividad_economica', '4771', '2026-04-08 13:19:40', '2026-04-08 21:21:35'),
(44, 1, 'factus_api_url', 'https://api-sandbox.factus.com.co', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(45, 1, 'factus_client_id', 'enc:v1:iO/6qLuMQe2+yc265apaSsUGFU57acTi40p2nyLRsml8Frq7vM3g4hpVh5+2Dd0OlDkiDmt1C1Zo8VUPHINfBebfUzpiWxq3KD3AYEwF8cO7y/qkkvp7JtHbjImVMHzN', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(46, 1, 'factus_client_secret', 'enc:v1:wN0QMAAIg/7Pz8PNIfnwpwoCmq4YBvjKSfXCPHm24W7jXvcmSkCapLWS0HcHDMIBeqjvH0evTK5MAqyP3kToHd5tuLTnfyZr/wvS06ZdQaJ6yopseQ8IaCq0AyWOvCVO', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(47, 1, 'factus_username', 'enc:v1:lDfbxHXfWYhQTs4XnsGNFk6OKJIfmuBj55ERSXRdY0Jere1wlKykx/GyHkBVUoVZ3JgpDv4t0j5M+Q33kjfeYaPVFVve6CLj4yaqigkGYm0=', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(48, 1, 'factus_password', 'enc:v1:BzO3JDXrz5rV5ctkp4azcd+cmzEmzso84yJW9Z6n2cmuUTuBszW2F1x4oKsQeaLt7CZH7/6kS7Msi7HstOeHPw==', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(49, 1, 'factus_software_id', 'enc:v1:CUmY3kN2utAIcoIiuqk30mz8quQZkl+WmyH/lgXxsgUl9+hxD+Kr/GPO2bbvMf93Kr6xMg8oK1BpgJEFZ7J8mg==', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(50, 1, 'factus_software_pin', 'enc:v1:sCq//kwzPEq/Zj2ddAotUUXc2xT43i4OCZDdPXcTOxtMG7smIYImDVtB53Wy3rzhugG//VUNzRTAt9letRsDyg==', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(51, 1, 'factus_numbering_range_id', '8', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(52, 1, 'factus_municipality_id', '169', '2026-04-09 10:18:42', '2026-04-09 11:18:53'),
(63, 1, 'bold_enabled', '0', '2026-04-09 23:28:54', '2026-04-10 13:13:22'),
(64, 1, 'bold_api_url', 'https://integrations.api.bold.co', '2026-04-09 23:28:54', '2026-04-10 13:13:22'),
(65, 1, 'bold_api_key', 'enc:v1:1bFEDWU4mFopuHqTVDXa9PpE1GWOOnvmfWu8zYA+Lbu9IdkFHcXF6P9qaufAhV03DfJqiUasAtguRe8OMDJmifra6Zr983pt49IJmRlw7+YS3nR06tgFgA6h0ZvMJ7Pk', '2026-04-09 23:28:54', '2026-04-10 13:13:22'),
(66, 1, 'bold_last_validation_status', 'ok', '2026-04-09 23:30:19', '2026-04-10 11:26:50'),
(67, 1, 'bold_last_validation_message', 'Link de pago creado correctamente en Bold.', '2026-04-09 23:30:19', '2026-04-10 11:26:50'),
(68, 1, 'bold_last_validation_at', '2026-04-10 11:26:50', '2026-04-09 23:30:19', '2026-04-10 11:26:50'),
(76, 1, 'bold_mode', 'button', '2026-04-10 00:01:41', '2026-04-10 13:13:22'),
(79, 1, 'bold_button_checkout_url', 'https://checkout.bold.co', '2026-04-10 00:01:41', '2026-04-10 13:13:22'),
(80, 1, 'bold_button_public_key', 'enc:v1:zxJqdOCTq+9G6JRZ+eIyUiRoDrPgFRnouenDZhzyosEBu3c0/j4Pus33DxI64iXkPhns37HlsS6YElGRsC88KJxp1q9vvNi6CvEDh9lwwBR385q2Exa07kY7dLKipvOc', '2026-04-10 00:01:41', '2026-04-10 13:13:22'),
(81, 1, 'bold_button_secret_key', 'enc:v1:Yr8yXUCVh9ICgEYNWYYZ1zLh/dWGPmavuSPRR9jiQx1fZA9Mhz/92rLmk/wCHyGFtbvFG3IXrDhxnExps8Nle+JYqq8b05LFuMtU2jnfxeo=', '2026-04-10 00:01:41', '2026-04-10 13:13:22'),
(175, 1, 'credibanco_enabled', '0', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(176, 1, 'credibanco_api_url', 'https://api-consulta-informacion-transaccional-preprod-production.apps-pruebas.credibanco.com', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(177, 1, 'credibanco_client_id', 'enc:v1:s6W2Gupwv/oabUw1u4IKLAFZUYF9ZyUHZX/CPbnXyHLBeDg/GxjVc3IigzjMtgot8u0y6EZsTipknHAvJBAI+w==', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(178, 1, 'credibanco_client_secret', 'enc:v1:LbwGzjkS45U+PhXnszOkaniygnyunNm8EAbCPDGu/m4cXpJyjUL91X67REtjS/avA/9dMQjGk7DRHAspR7U8M73fBYSkKS2Bi1Yxgy0uy5AtOuYPAaA5i6se2gZmMu8D', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(179, 1, 'credibanco_api_key', 'enc:v1:HennVj/4Nrf/9MMzICXl/ZUI0U8MjcR/k5LTwykwDiAu6cRGN+jDURxEQNE+7Fm5vKca+XSKKWgtCS5YXQcpAMN9S1JuhiGzTE51WPVou7xoXJl/xq8C+U5lCzmt2fb3', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(180, 1, 'credibanco_events_secret', '', '2026-04-14 16:09:28', '2026-04-14 16:30:52'),
(187, 1, 'credibanco_last_validation_status', 'error', '2026-04-14 16:10:37', '2026-04-14 16:23:29'),
(188, 1, 'credibanco_last_validation_message', 'Authentication parameters missing', '2026-04-14 16:10:37', '2026-04-14 16:23:29'),
(189, 1, 'credibanco_last_validation_at', '2026-04-14 16:23:29', '2026-04-14 16:10:37', '2026-04-14 16:23:29'),
(195, 1, 'credibanco_token_url', 'https://api-consulta-informacion-transaccional-preprod-production.apps-pruebas.credibanco.com', '2026-04-14 16:23:11', '2026-04-14 16:30:52'),
(210, 1, 'pos_ticket_size', '80mm', '2026-04-26 00:22:51', '2026-04-26 00:30:08');

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

--
-- Estructura de tabla para la tabla `configuracion_global`
--

CREATE TABLE `configuracion_global` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `clave` varchar(120) NOT NULL,
  `valor` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `configuracion_global` (`id`, `clave`, `valor`, `created_at`, `updated_at`) VALUES
(4, 'notify_email_from_name', 'Veltrix POS', '2026-04-01 18:41:01', '2026-04-15 01:43:57'),
(5, 'notify_email_from_address', 'd.rios@hunolabs.com', '2026-04-01 18:41:01', '2026-04-15 01:43:57'),
(6, 'notify_whatsapp_api_url', 'https://graph.facebook.com/v20.0', '2026-04-01 18:41:01', '2026-04-15 16:22:56'),
(7, 'notify_whatsapp_default_country_code', '57', '2026-04-01 18:41:01', '2026-04-15 16:22:56'),
(8, 'notify_retry_max_attempts', '3', '2026-04-01 18:41:01', '2026-04-15 01:43:58'),
(9, 'notify_retry_backoff_minutes', '5,30,180', '2026-04-01 18:41:01', '2026-04-15 01:43:58'),
(10, 'notify_channel_email', '1', '2026-04-01 18:41:01', '2026-04-15 16:22:56'),
(11, 'notify_channel_whatsapp', '1', '2026-04-01 18:41:01', '2026-04-15 16:22:56'),
(12, 'wompi_public_key', 'pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn', '2026-04-01 20:53:57', '2026-04-01 20:53:57'),
(13, 'wompi_integrity_secret', 'test_integrity_ic2Pd53o0IyZligu7a9n4gP1D9IrsO71', '2026-04-01 20:53:57', '2026-04-01 20:53:57'),
(14, 'wompi_events_secret', 'test_events_eT5cY4FCI2nL8xPon3VEYZtqxcuP91Gf', '2026-04-01 20:53:57', '2026-04-01 20:53:57'),
(15, 'notify_smtp_host', 'smtp.gmail.com', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(16, 'notify_smtp_port', '587', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(17, 'notify_smtp_username', 'correomacromedia@gmail.com', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(18, 'notify_smtp_secure', 'tls', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(19, 'notify_smtp_from_email', 'correomacromedia@gmail.com', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(20, 'notify_smtp_from_name', 'Veltrix POS', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(23, 'notify_smtp_password', 'hepi xmfw qrym dgwh', '2026-04-03 10:32:59', '2026-04-03 10:32:59'),
(24, 'ai_enabled', '1', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(25, 'ai_provider', 'openai', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(26, 'ai_model', 'gpt-4o-mini', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(27, 'ai_openai_base_url', 'https://api.openai.com/v1', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(28, 'ai_temperature', '0.2', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(29, 'ai_max_output_tokens', '700', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(30, 'ai_system_prompt', 'Eres Veltrix AI, asistente de soporte del software Veltrix POS SaaS. Responde en español claro y breve. Solo ayudas sobre uso del sistema (POS, ventas, caja, inventario, compras, clientes, proveedores, reportes, sucursales, usuarios, configuración, suscripciones y superadmin). Si falta contexto, pide máximo 1 dato clave. Nunca inventes datos, rutas o resultados. Prioriza pasos concretos para resolver la tarea en menos de 8 pasos.', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(31, 'ai_openai_api_key', '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', '2026-04-03 19:33:56', '2026-04-03 19:33:56'),
(32, 'ai_budget_daily_usd', '0.46', '2026-04-03 20:42:40', '2026-04-03 20:44:55'),
(33, 'ai_budget_monthly_usd', '14', '2026-04-03 20:42:40', '2026-04-03 20:44:55'),
(34, 'ai_company_daily_question_limit', '100', '2026-04-03 20:42:40', '2026-04-03 20:44:55'),
(35, 'ai_context_history_limit', '12', '2026-04-03 20:42:40', '2026-04-03 20:44:55'),
(50, 'notify_email_reply_to', 'd.rios@hunolabs.com', '2026-04-14 21:49:49', '2026-04-15 01:43:57'),
(51, 'notify_whatsapp_provider', 'meta', '2026-04-14 21:49:49', '2026-04-15 16:22:56'),
(53, 'notify_whatsapp_phone_number_id', '586642031210193', '2026-04-14 21:49:49', '2026-04-15 16:22:56'),
(54, 'notify_whatsapp_access_token', 'EAAJlvxxWq1EBRE08SC1BcGPCFh8SKLpUQgiexkzJ0lvxZAHP28LLLxc8B8L37OL991tQvvM6IRZA6tJE0VJgmZC7h8HMmD2Q74cNXMMC0qKtzTteXZBtDmCwcJFoRj2QgsD4YCAl3r3Iz8ZCPUrOmngg9bZA2f6ePckBKdEfHsekJB6ZBkxcOolZBJz1MjaKGAZDZD', '2026-04-14 21:49:49', '2026-04-15 01:43:57'),
(56, 'notify_manychat_api_url', 'https://api.manychat.com', '2026-04-14 21:49:49', '2026-04-15 01:43:57'),
(57, 'notify_manychat_access_token', '3536665:1c62465bc2823294a5a4376c3d5c7eff', '2026-04-14 21:49:49', '2026-04-15 01:07:40'),
(58, 'notify_manychat_message_tag', 'ACCOUNT_UPDATE', '2026-04-14 21:49:49', '2026-04-15 01:43:57'),
(243, 'notify_whatsapp_business_account_id', '1053381113357941', '2026-04-15 16:12:08', '2026-04-15 16:22:56'),
(245, 'notify_whatsapp_template_enabled', '1', '2026-04-15 16:12:08', '2026-04-15 16:36:03'),
(246, 'notify_whatsapp_template_language', 'es_CO', '2026-04-15 16:12:08', '2026-04-15 16:36:03'),
(278, 'notify_whatsapp_template_name_10d', 'aviso_10_dias', '2026-04-15 16:35:57', '2026-04-15 16:35:57'),
(281, 'notify_whatsapp_template_name_3d', 'aviso_3_dias', '2026-04-15 16:36:03', '2026-04-15 16:36:03'),
(282, 'notify_whatsapp_dispatch_time_default', '10:00', '2026-04-16 14:22:57', '2026-04-16 14:48:37'),
(283, 'notify_whatsapp_dispatch_time_previo_10_dias', '10:00', '2026-04-16 14:22:58', '2026-04-16 14:48:37'),
(284, 'notify_whatsapp_dispatch_time_previo_3_dias', '14:50', '2026-04-16 14:22:58', '2026-04-16 14:48:37'),
(285, 'notify_whatsapp_dispatch_time_previo_1_dia', '10:00', '2026-04-16 14:22:58', '2026-04-16 14:48:37'),
(286, 'notify_whatsapp_dispatch_time_vence_hoy', '10:00', '2026-04-16 14:22:58', '2026-04-16 14:48:37'),
(287, 'notify_whatsapp_dispatch_time_vencida', '10:00', '2026-04-16 14:22:58', '2026-04-16 14:48:37'),
(288, 'notify_whatsapp_dispatch_time_morosa', '10:00', '2026-04-16 14:22:58', '2026-04-16 14:48:37');

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

--
-- Estructura de tabla para la tabla `devoluciones`
--

CREATE TABLE `devoluciones` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `venta_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `motivo` varchar(255) DEFAULT NULL,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `fecha` datetime NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `empresas`
--

CREATE TABLE `empresas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `slug` varchar(120) NOT NULL,
  `nit` varchar(40) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `telefono` varchar(40) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `pais_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ciudad_id` bigint(20) UNSIGNED DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `moneda` varchar(10) NOT NULL DEFAULT 'COP',
  `zona_horaria` varchar(60) NOT NULL DEFAULT 'America/Bogota',
  `estado` enum('activa','suspendida','bloqueada') NOT NULL DEFAULT 'activa',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `empresas` (`id`, `nombre`, `slug`, `nit`, `email`, `telefono`, `direccion`, `pais_id`, `ciudad_id`, `logo`, `moneda`, `zona_horaria`, `estado`, `created_at`, `updated_at`) VALUES
(1, 'Volta', 'volta', '1144065109', 'luisaconcha93@gmail.com', '3246802685', 'calee 78c #130-55', 1, 172, 'uploads/logos/logo_20260424_190316_mqgged6tacslalp2.jpg', 'COP', 'America/Bogota', 'activa', '2026-04-03 11:18:35', '2026-04-24 19:03:16'),
(2, 'Huno Labs', 'hunolabs', '900201567', 'd.rios@hunolabs.com', '3122644576', 'Calle 78C 130-55', 1, 855, 'uploads/logos/logo_20260403_211615_e6fb4b6d1f9cf2a8.png', 'COP', 'America/Bogota', 'bloqueada', '2026-04-03 11:51:42', '2026-04-21 10:00:04'),
(3, 'Empresa Demo', 'demo-empresa', NULL, 'demo@veltrix.local', '3000000000', 'Direccion demo', NULL, NULL, NULL, 'COP', 'America/Bogota', 'activa', '2026-04-22 14:09:51', '2026-04-22 14:09:51');

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

--
-- Estructura de tabla para la tabla `facturas`
--

CREATE TABLE `facturas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `venta_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cliente_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tipo_documento` enum('factura','nota_credito','nota_debito') NOT NULL DEFAULT 'factura',
  `numero` varchar(80) NOT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `impuestos` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('borrador','emitida','anulada','aceptada','rechazada') NOT NULL DEFAULT 'emitida',
  `documento_referencia_id` bigint(20) UNSIGNED DEFAULT NULL,
  `motivo_documento` varchar(255) DEFAULT NULL,
  `anulado_por_usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `anulado_motivo` varchar(255) DEFAULT NULL,
  `anulado_at` datetime DEFAULT NULL,
  `cufe` varchar(120) DEFAULT NULL,
  `qr_path` varchar(255) DEFAULT NULL,
  `fecha_emision` datetime NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `facturas` (`id`, `empresa_id`, `sucursal_id`, `venta_id`, `cliente_id`, `tipo_documento`, `numero`, `subtotal`, `impuestos`, `total`, `estado`, `documento_referencia_id`, `motivo_documento`, `anulado_por_usuario_id`, `anulado_motivo`, `anulado_at`, `cufe`, `qr_path`, `fecha_emision`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 1, NULL, 'factura', 'POS-2-1', 92000.00, 0.00, 92000.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-03 22:43:59', '2026-04-03 22:43:59', '2026-04-03 22:43:59'),
(2, 1, 2, 2, NULL, 'factura', 'POS-2-2', 225000.00, 0.00, 205000.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-03 22:47:53', '2026-04-03 22:47:53', '2026-04-03 22:47:53'),
(3, 1, 2, 3, NULL, 'factura', 'POS-2-3', 675000.00, 0.00, 600000.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-03 22:56:56', '2026-04-03 22:56:56', '2026-04-03 22:56:56'),
(4, 1, 2, 4, NULL, 'factura', 'POS-2-4', 25000.00, 4037.50, 25287.50, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-04 11:20:39', '2026-04-04 11:20:39', '2026-04-04 11:20:39'),
(5, 1, 2, 5, NULL, 'factura', 'POS-2-5', 85000.00, 15931.50, 99781.50, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-04 21:12:42', '2026-04-04 21:12:42', '2026-04-04 21:12:42'),
(6, 1, 2, 6, NULL, 'factura', 'POS-2-6', 25000.00, 4750.00, 29750.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-04 21:22:45', '2026-04-04 21:22:45', '2026-04-04 21:22:45'),
(7, 1, 2, 9, NULL, 'factura', 'POS-2-9', 60000.00, 11324.00, 70924.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-05 13:56:13', '2026-04-05 13:56:13', '2026-04-05 13:56:13'),
(8, 1, 2, 10, NULL, 'factura', 'POS-2-10', 82000.00, 15580.00, 97580.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-08 13:18:12', '2026-04-08 13:18:12', '2026-04-08 13:18:12'),
(9, 1, 2, 11, NULL, 'factura', 'VOLT5000001', 122000.00, 23180.00, 145180.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-08 13:22:56', '2026-04-08 13:22:56', '2026-04-08 13:22:56'),
(10, 1, 2, 12, NULL, 'factura', 'VOLT5000002', 25000.00, 4750.00, 29750.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-08 21:07:29', '2026-04-08 21:07:29', '2026-04-08 21:07:29'),
(11, 1, 2, 13, 1, 'factura', 'VOLT5000003', 70000.00, 13300.00, 83300.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-08 21:27:52', '2026-04-08 21:27:52', '2026-04-08 21:27:52'),
(12, 1, 2, 14, NULL, 'factura', 'VOLT5000004', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-09 08:24:08', '2026-04-09 08:24:08', '2026-04-09 08:24:08'),
(14, 1, 2, 16, 1, 'factura', 'SETP990029946', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, '759e9f8f9275391f53fef5d781afaace2d87a64be7de6a012f3ed72cf0ca7df4b0d447522b1aa59534c1e42dc960d92c', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=759e9f8f9275391f53fef5d781afaace2d87a64be7de6a012f3ed72cf0ca7df4b0d447522b1aa59534c1e42dc960d92c', '2026-04-09 11:22:05', '2026-04-09 11:22:05', '2026-04-09 11:22:09'),
(15, 1, 2, 17, NULL, 'factura', 'SETP990029952', 64000.00, 12160.00, 76160.00, 'emitida', NULL, NULL, NULL, NULL, NULL, 'b23770eff48dd1ad752911cd7b25f91527f3f74677e97b27efe28e9bb36e0110035fd663997970cb5bc8f0bae67cba18', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=b23770eff48dd1ad752911cd7b25f91527f3f74677e97b27efe28e9bb36e0110035fd663997970cb5bc8f0bae67cba18', '2026-04-09 14:09:25', '2026-04-09 14:09:25', '2026-04-09 14:09:32'),
(16, 1, 2, 18, NULL, 'factura', 'SETP990030018', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, '60c346266eb2d6b9fcd26151f17ec0e3f39d3bbd7f1927b1a451d9b7522fb9ebc7dbf63afea54788c4ec3dd9ba03774d', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=60c346266eb2d6b9fcd26151f17ec0e3f39d3bbd7f1927b1a451d9b7522fb9ebc7dbf63afea54788c4ec3dd9ba03774d', '2026-04-10 13:10:27', '2026-04-10 13:10:27', '2026-04-10 13:10:32'),
(17, 1, 2, 19, NULL, 'factura', 'SETP990032791', 25000.00, 4750.00, 29750.00, 'emitida', NULL, NULL, NULL, NULL, NULL, '550f9c980b8faa5afad37a13e5388e563d9f5bf95f99f16cc700867d4a9c3eb4360f94d6cd99e9ccf88cc41da077d589', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=550f9c980b8faa5afad37a13e5388e563d9f5bf95f99f16cc700867d4a9c3eb4360f94d6cd99e9ccf88cc41da077d589', '2026-04-21 19:04:07', '2026-04-21 19:04:07', '2026-04-21 19:04:12'),
(18, 1, 2, 20, NULL, 'factura', 'SETP990032795', 25000.00, 4750.00, 29750.00, 'anulada', NULL, NULL, NULL, NULL, NULL, '8189560c23d3d91bbcc3ec33f659c50330288a9afb9ed78a69621507e9179275257bc801c0521ba1ebe59e19167cf7e5', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=8189560c23d3d91bbcc3ec33f659c50330288a9afb9ed78a69621507e9179275257bc801c0521ba1ebe59e19167cf7e5', '2026-04-21 19:48:46', '2026-04-21 19:48:46', '2026-04-21 19:49:38'),
(19, 1, 2, 21, NULL, 'factura', 'SETP990032796', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, '12cb28679369e76f784acd7e8c952090854d379e21749307ea39f9306130362c62e6eae60fd840f5850413510032ce82', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=12cb28679369e76f784acd7e8c952090854d379e21749307ea39f9306130362c62e6eae60fd840f5850413510032ce82', '2026-04-21 19:53:48', '2026-04-21 19:53:48', '2026-04-21 19:53:52'),
(20, 1, 2, 22, NULL, 'factura', 'SETP990032799', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, '4e95b82d32ecee84c987f3934e4b61affcae3256185af7d552c1100c869de1243b742e28eb41213e79b4242ed8f8cb23', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=4e95b82d32ecee84c987f3934e4b61affcae3256185af7d552c1100c869de1243b742e28eb41213e79b4242ed8f8cb23', '2026-04-21 20:04:36', '2026-04-21 20:04:36', '2026-04-21 20:04:40'),
(21, 1, 2, 23, NULL, 'factura', 'SETP990032802', 32000.00, 6080.00, 38080.00, 'emitida', NULL, NULL, NULL, NULL, NULL, 'cc0990d20280b7fc83fdcba965da16d72e70c17ea601e9f4e8b318c346391549cc0420b00bb1240f236d7fcc926c5b87', 'https://catalogo-vpfe-hab.dian.gov.co/document/searchqr?documentkey=cc0990d20280b7fc83fdcba965da16d72e70c17ea601e9f4e8b318c346391549cc0420b00bb1240f236d7fcc926c5b87', '2026-04-21 21:09:10', '2026-04-21 21:09:10', '2026-04-21 21:09:14'),
(24, 1, 2, 37, NULL, 'factura', 'VOLT5000013', 50000.00, 9500.00, 59500.00, 'emitida', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2026-04-25 01:30:59', '2026-04-25 01:30:59', '2026-04-25 01:30:59');

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

--
-- Estructura de tabla para la tabla `factura_detalles`
--

CREATE TABLE `factura_detalles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `factura_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED DEFAULT NULL,
  `descripcion` varchar(255) NOT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `precio_unitario` decimal(12,2) NOT NULL,
  `impuesto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_linea` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `factura_detalles` (`id`, `factura_id`, `producto_id`, `descripcion`, `cantidad`, `precio_unitario`, `impuesto`, `total_linea`) VALUES
(1, 1, 3, 'Camiseta manga larga', 1.00, 32000.00, 0.00, 32000.00),
(2, 1, 5, 'Pantalon B/Ancha', 1.00, 60000.00, 0.00, 60000.00),
(3, 2, 2, 'Camiseta V', 3.00, 25000.00, 0.00, 75000.00),
(4, 2, 5, 'Pantalon B/Ancha', 1.00, 60000.00, 0.00, 60000.00),
(5, 2, 1, 'Short Algodon', 2.00, 45000.00, 0.00, 90000.00),
(6, 3, 4, 'Camiseta U', 27.00, 25000.00, 0.00, 675000.00),
(7, 4, 4, 'Camiseta U', 1.00, 25000.00, 4037.50, 25287.50),
(8, 5, 2, 'Camiseta V', 1.00, 25000.00, 4607.50, 28857.50),
(9, 5, 5, 'Pantalon B/Ancha', 1.00, 60000.00, 11324.00, 70924.00),
(10, 6, 2, 'Camiseta V', 1.00, 25000.00, 4750.00, 29750.00),
(11, 7, 5, 'Pantalon B/Ancha - Talla: L / Color: Azul', 1.00, 60000.00, 11324.00, 70924.00),
(12, 8, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(13, 8, 4, 'Camiseta U', 1.00, 25000.00, 4750.00, 29750.00),
(14, 8, 2, 'Camiseta V', 1.00, 25000.00, 4750.00, 29750.00),
(15, 9, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(16, 9, 6, 'Body', 1.00, 90000.00, 17100.00, 107100.00),
(17, 10, 4, 'Camiseta U', 1.00, 25000.00, 4750.00, 29750.00),
(18, 11, 1, 'Short Algodon', 1.00, 45000.00, 8550.00, 53550.00),
(19, 11, 4, 'Camiseta U', 1.00, 25000.00, 4750.00, 29750.00),
(20, 12, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(22, 14, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(23, 15, 3, 'Camiseta manga larga', 2.00, 32000.00, 12160.00, 76160.00),
(24, 16, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(25, 17, 4, 'Camiseta U', 1.00, 25000.00, 4750.00, 29750.00),
(26, 18, 4, 'Camiseta U', 1.00, 25000.00, 4750.00, 29750.00),
(27, 19, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(28, 20, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(29, 21, 3, 'Camiseta manga larga', 1.00, 32000.00, 6080.00, 38080.00),
(32, 24, 2, 'Camiseta V', 2.00, 25000.00, 9500.00, 59500.00);

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

--
-- Estructura de tabla para la tabla `impresoras`
--

CREATE TABLE `impresoras` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nombre` varchar(120) NOT NULL,
  `tipo` varchar(40) NOT NULL DEFAULT 'termica',
  `ip` varchar(80) DEFAULT NULL,
  `puerto` varchar(20) DEFAULT NULL,
  `activa` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `impuestos`
--

CREATE TABLE `impuestos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nombre` varchar(80) NOT NULL,
  `porcentaje` decimal(5,2) NOT NULL,
  `tipo` varchar(40) NOT NULL DEFAULT 'IVA',
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `impuestos` (`id`, `empresa_id`, `nombre`, `porcentaje`, `tipo`, `activo`, `created_at`) VALUES
(1, 2, 'IVA', 19.00, 'IVA', 1, '2026-04-03 21:14:20'),
(2, 2, 'ReteFuente', 8.00, 'RETEFUENTE', 1, '2026-04-03 21:14:39'),
(3, 1, 'IVA', 19.00, 'IVA', 1, '2026-04-03 22:02:53');

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

--
-- Estructura de tabla para la tabla `inventario`
--

CREATE TABLE `inventario` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `stock` decimal(12,2) NOT NULL DEFAULT 0.00,
  `costo_promedio` decimal(12,2) NOT NULL DEFAULT 0.00,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `inventario` (`id`, `empresa_id`, `sucursal_id`, `producto_id`, `stock`, `costo_promedio`, `updated_at`) VALUES
(1, 1, 2, 3, 7.00, 12000.00, '2026-04-21 21:09:10'),
(2, 1, 2, 5, 25.00, 20000.00, '2026-04-05 13:56:13'),
(3, 1, 2, 2, 8.00, 8000.00, '2026-04-08 13:18:12'),
(4, 1, 2, 1, 27.00, 19000.00, '2026-04-08 21:27:52'),
(5, 1, 2, 4, 6.00, 8000.00, '2026-04-21 19:48:46'),
(8, 1, 2, 6, 7.00, 30000.00, '2026-04-08 13:22:56');

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

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

CREATE TABLE `logs_actividad` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED DEFAULT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `accion` varchar(120) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `logs_actividad` (`id`, `empresa_id`, `usuario_id`, `accion`, `descripcion`, `ip`, `user_agent`, `created_at`) VALUES
(1, NULL, NULL, 'saas.checkout.intent', 'Intento de checkout creado ID: 1', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-04-03 11:16:58'),
(2, NULL, NULL, 'saas.checkout.provisioned', 'Empresa auto-creada por webhook Wompi. ID: 1', '::1', 'Faraday v0.15.4', '2026-04-03 11:18:37'),
(3, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', '2026-04-03 11:19:47'),
(4, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 11:49:06'),
(5, NULL, NULL, 'saas.checkout.intent', 'Intento de checkout creado ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 11:50:17'),
(6, NULL, NULL, 'saas.checkout.provisioned', 'Empresa auto-creada por webhook Wompi. ID: 2', '::1', 'Faraday v0.15.4', '2026-04-03 11:51:44'),
(7, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 11:54:12'),
(8, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 12:10:55'),
(9, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 12:10:59'),
(10, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 12:11:37'),
(11, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 12:11:49'),
(12, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 14:03:48'),
(13, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 14:04:04'),
(14, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 18:54:11'),
(15, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 18:54:45'),
(16, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 18:55:02'),
(17, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:04:43'),
(18, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:04:47'),
(19, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:13:41'),
(20, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:13:51'),
(21, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:30:36'),
(22, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:30:45'),
(23, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:30:53'),
(24, NULL, 1, 'superadmin.ai.actualizar', 'Configuración IA actualizada. Claves: ai_enabled, ai_provider, ai_model, ai_openai_base_url, ai_temperature, ai_max_output_tokens, ai_system_prompt, ai_openai_api_key', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:33:56'),
(25, NULL, 1, 'superadmin.ai.probar', 'Prueba de asistente IA exitosa.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:34:09'),
(26, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:34:32'),
(27, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:34:45'),
(28, 2, 9, 'ai.help.ask', 'Consulta IA realizada por usuario ID: 9', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:35:13'),
(29, 2, 9, 'ai.help.ask', 'Consulta IA realizada por usuario ID: 9', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 19:36:34'),
(30, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:25:56'),
(31, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:26:12'),
(32, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:26:43'),
(33, NULL, 1, 'superadmin.openia.reporte.actualizar', 'Configuración de Reporte OpenIA actualizada. Claves: ai_budget_daily_usd, ai_budget_monthly_usd, ai_company_daily_question_limit, ai_context_history_limit', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:42:40'),
(34, NULL, 1, 'superadmin.openia.reporte.actualizar', 'Configuración de Reporte OpenIA actualizada. Claves: ai_budget_daily_usd, ai_budget_monthly_usd, ai_company_daily_question_limit, ai_context_history_limit', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:42:55'),
(35, NULL, 1, 'superadmin.openia.reporte.actualizar', 'Configuración de Reporte OpenIA actualizada. Claves: ai_budget_daily_usd, ai_budget_monthly_usd, ai_company_daily_question_limit, ai_context_history_limit', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:43:56'),
(36, NULL, 1, 'superadmin.openia.reporte.actualizar', 'Configuración de Reporte OpenIA actualizada. Claves: ai_budget_daily_usd, ai_budget_monthly_usd, ai_company_daily_question_limit, ai_context_history_limit', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 20:44:55'),
(37, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:10:37'),
(38, 2, 9, 'configuracion.impuestos.crear', 'Impuesto creado ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:14:20'),
(39, 2, 9, 'configuracion.impuestos.crear', 'Impuesto creado ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:14:39'),
(40, 2, 9, 'configuracion.empresa.actualizar', 'Empresa actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:15:22'),
(41, 2, 9, 'configuracion.empresa.actualizar', 'Empresa actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:16:15'),
(42, 2, 9, 'configuracion.unidades_medida.crear', 'Unidad de medida creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:16:46'),
(43, 2, 9, 'configuracion.unidades_medida.crear', 'Unidad de medida creada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Safari/605.1.15', '2026-04-03 21:17:06'),
(44, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 21:31:44'),
(45, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 21:32:02'),
(46, 2, 9, 'configuracion.empresa.actualizar', 'Empresa actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 21:49:26'),
(47, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 21:57:23'),
(48, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 21:58:40'),
(49, 1, 8, 'proveedores.crear', 'Proveedor creado ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:00:43'),
(50, 1, 8, 'configuracion.empresa.actualizar', 'Empresa actualizada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:02:12'),
(51, 1, 8, 'configuracion.impuestos.crear', 'Impuesto creado ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:02:53'),
(52, 1, 8, 'configuracion.metodos_pago.crear', 'Metodo de pago creado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:04:45'),
(53, 1, 8, 'configuracion.unidades_medida.crear', 'Unidad de medida creada ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:05:10'),
(54, 1, 8, 'productos.crear', 'Producto creado ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:07:13'),
(55, 1, 8, 'productos.crear', 'Producto creado ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:08:10'),
(56, 1, 8, 'productos.crear', 'Producto creado ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:08:11'),
(57, 1, 8, 'productos.crear', 'Producto creado ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:08:12'),
(58, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:08:45'),
(59, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:09:05'),
(60, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:09:50'),
(61, 1, 8, 'productos.crear', 'Producto creado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:10:38'),
(62, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:10:54'),
(63, 1, 8, 'categorias.crear', 'Categoría creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:11:31'),
(64, 1, 8, 'categorias.crear', 'Categoría creada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:12:08'),
(65, 1, 8, 'categorias.crear', 'Categoría creada ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:12:18'),
(66, 1, 8, 'categorias.crear', 'Categoría creada ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:12:42'),
(67, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:12:56'),
(68, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:13:39'),
(69, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:13:46'),
(70, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:14:03'),
(71, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:14:39'),
(72, 1, 8, 'compras.crear', 'Compra registrada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:16:49'),
(73, 1, 8, 'compras.pago', 'Pago registrado ID: 1 para compra ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:18:10'),
(74, 1, 8, 'compras.orden.crear', 'Orden de compra creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:19:16'),
(75, 1, 8, 'sucursales.crear', 'Sucursal creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:32:00'),
(76, 1, 8, 'sucursales.usuario.asignar', 'Usuario ID: 8 asignado a sucursal ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:32:19'),
(77, 1, 8, 'sucursales.caja.crear', 'Caja creada ID: 1 en sucursal ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:32:34'),
(78, 1, 8, 'sucursales.caja.crear', 'Caja creada ID: 2 en sucursal ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:32:45'),
(79, 1, 8, 'sucursales.crear', 'Sucursal creada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:33:38'),
(80, 1, 8, 'usuarios.crear', 'Usuario creado ID: 10', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:34:57'),
(81, 1, 8, 'usuarios.crear', 'Usuario creado ID: 11', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:36:23'),
(82, 1, 8, 'usuarios.crear', 'Usuario creado ID: 12', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:37:15'),
(83, 1, 8, 'sucursales.caja.crear', 'Caja creada ID: 3 en sucursal ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:39:02'),
(84, 1, 8, 'sucursales.actualizar', 'Sucursal actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:39:24'),
(85, 1, 8, 'sucursales.usuario.asignar', 'Usuario ID: 8 asignado a sucursal ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:41:07'),
(86, 1, 8, 'caja.abrir', 'Caja abierta con monto: 450000', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:42:12'),
(87, 1, 8, 'pos.venta', 'Venta registrada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:43:59'),
(88, 1, 8, 'pos.venta', 'Venta registrada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:47:53'),
(89, 1, 8, 'pos.venta', 'Venta registrada ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:56:56'),
(90, 1, 8, 'compras.orden.crear', 'Orden de compra creada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 22:59:21'),
(91, 1, 8, 'compras.orden.recibir', 'Recepción registrada. Orden #1, recepción #1, compra #2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:00:50'),
(92, 1, 8, 'compras.orden.recibir', 'Recepción registrada. Orden #2, recepción #2, compra #3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:01:08'),
(93, 1, 8, 'compras.pago', 'Pago registrado ID: 2 para compra ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:07:36'),
(94, 1, 8, 'compras.pago', 'Pago registrado ID: 3 para compra ID: 3', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:08:26'),
(95, 1, 8, 'configuracion.metodos_pago.crear', 'Metodo de pago creado ID: 6', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:11:56'),
(96, 1, 8, 'configuracion.metodos_pago.crear', 'Metodo de pago creado ID: 7', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:12:11'),
(97, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-03 23:44:26'),
(98, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 10:51:03'),
(99, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 10:51:41'),
(100, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 10:52:05'),
(101, 1, 8, 'pos.venta', 'Venta registrada ID: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 11:20:39'),
(102, 1, 8, 'pos.venta', 'Venta registrada ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 21:12:42'),
(103, 1, 8, 'pos.venta', 'Venta registrada ID: 6', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 21:22:45'),
(104, 1, 8, 'configuracion.empresa.actualizar', 'Empresa actualizada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-04 21:34:07'),
(105, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 11:37:51'),
(106, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:37:57'),
(107, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:47:01'),
(108, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:47:09'),
(109, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:47:22'),
(110, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:48:26'),
(111, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:51:45'),
(112, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 5', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 12:54:25'),
(113, 1, 8, 'productos.crear', 'Producto creado ID: 6', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 13:32:30'),
(114, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 6', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 13:36:03'),
(115, 1, 8, 'pos.venta', 'Venta registrada ID: 9', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 13:56:14'),
(116, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 16:36:54'),
(117, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 22:41:47'),
(118, 1, 8, 'proveedores.crear', 'Proveedor creado ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-05 22:43:27'),
(119, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 07:28:11'),
(120, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 07:37:18'),
(121, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 07:37:29'),
(122, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 07:57:31'),
(123, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 07:58:50'),
(124, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:14:45'),
(125, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:17:11'),
(126, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:17:27'),
(127, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:17:38'),
(128, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:18:01'),
(129, 1, 8, 'pos.venta', 'Venta registrada ID: 10', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:18:12'),
(130, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:19:40'),
(131, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:19:50'),
(132, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:20:07'),
(133, 1, 8, 'configuracion.numeraciones.crear', 'Numeración creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:21:28'),
(134, 1, 8, 'configuracion.resoluciones.crear', 'Resolución DIAN creada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:22:34'),
(135, 1, 8, 'pos.venta', 'Venta registrada ID: 11', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:22:56'),
(136, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:24:19'),
(137, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:24:26'),
(138, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:25:11'),
(139, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 13:25:27'),
(140, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 19:31:02'),
(141, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 20:57:32'),
(142, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 21:07:18'),
(143, 1, 8, 'pos.venta', 'Venta registrada ID: 12', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 21:07:29'),
(144, 1, 8, 'configuracion.fiscal.actualizar', 'Configuracion fiscal actualizada.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 21:21:35'),
(145, 1, 8, 'clientes.crear.pos', 'Cliente creado desde POS ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 21:23:32'),
(146, 1, 8, 'pos.venta', 'Venta registrada ID: 13', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-08 21:27:52'),
(147, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 07:57:23'),
(148, 1, 8, 'pos.venta', 'Venta registrada ID: 14', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 08:24:08'),
(149, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 26_4_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/146.0.7680.151 Mobile/15E148 Safari/604.1', '2026-04-09 08:34:15'),
(150, 1, 8, 'configuracion.fiscal.fe.actualizar', 'Módulo de facturación electrónica actualizado.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 10:18:42'),
(151, 1, 8, 'configuracion.fiscal.factus.probar', 'Prueba conexión Factus exitosa.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 10:27:01'),
(152, 1, 8, 'configuracion.fiscal.factus.probar_factura', 'Factura de prueba FE fallida.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 10:27:07'),
(153, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 10:35:35'),
(154, 1, 8, 'configuracion.fiscal.factus.probar_factura', 'Factura de prueba FE fallida.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 10:35:50'),
(155, 1, 8, 'configuracion.fiscal.factus.probar', 'Prueba conexión Factus exitosa.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 11:18:39'),
(156, 1, 8, 'configuracion.fiscal.fe.actualizar', 'Módulo de facturación electrónica actualizado.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 11:18:53'),
(157, 1, 8, 'configuracion.fiscal.factus.probar_factura', 'Factura de prueba FE emitida en Factus.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 11:19:05'),
(158, 1, 8, 'pos.venta', 'Venta registrada ID: 16', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 11:22:09'),
(159, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:29:04'),
(160, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:29:21'),
(161, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:31:23'),
(162, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:31:43'),
(163, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:49:32'),
(164, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 13:49:50'),
(165, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:07:59'),
(166, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:08:12'),
(167, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:08:20'),
(168, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:08:34'),
(169, 1, 8, 'pos.venta', 'Venta registrada ID: 17', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:09:32'),
(170, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:12:46'),
(171, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:13:01'),
(172, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:57:59'),
(173, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 14:58:17'),
(174, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 19:05:47'),
(175, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 19:06:20'),
(176, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 19:29:11'),
(177, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 19:29:30'),
(178, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 26_4_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/146.0.7680.151 Mobile/15E148 Safari/604.1', '2026-04-09 20:15:22'),
(179, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (iPhone; CPU iPhone OS 26_4_0 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/146.0.7680.151 Mobile/15E148 Safari/604.1', '2026-04-09 22:49:18'),
(180, 1, 8, 'productos.actualizar', 'Producto actualizado ID: 6', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 22:53:47'),
(181, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 23:28:54'),
(182, 1, 8, 'integraciones.bold.probar', 'Prueba Bold fallida para empresa ID: 1 (ref: 34233524)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 23:30:19'),
(183, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 23:51:41'),
(184, 1, 8, 'integraciones.bold.probar', 'Prueba Bold fallida para empresa ID: 1 (ref: 234223413)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-09 23:52:02'),
(185, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:01:41'),
(186, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:07:17'),
(187, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: dataphone)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:09:00'),
(188, 1, 8, 'integraciones.bold.probar', 'Prueba Bold fallida para empresa ID: 1 (ref: 425435)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:09:13'),
(189, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:42:34'),
(190, 1, 8, 'integraciones.bold.probar_boton', 'Prueba Botón de pagos Bold exitosa para empresa ID: 1 (ref: VX-20260410004243-8269)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 00:42:45'),
(191, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 08:05:55'),
(192, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 08:59:46'),
(193, 1, 8, 'integraciones.bold.probar_boton', 'Prueba Botón de pagos Bold fallida para empresa ID: 1 (ref: VX-20260410092311-5857)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 09:23:12'),
(194, 1, 8, 'integraciones.bold.probar', 'Prueba Bold fallida para empresa ID: 1 (ref: Vol_2354435234)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:01:02'),
(195, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:21:04'),
(196, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:21:26'),
(197, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:21:42'),
(198, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: dataphone)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:22:46'),
(199, 1, 8, 'integraciones.bold.probar', 'Prueba API datáfono Bold fallida para empresa ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:22:59'),
(200, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: dataphone)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:44:07'),
(201, 1, 8, 'integraciones.bold.probar', 'Prueba API datáfono Bold fallida para empresa ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 10:44:14'),
(202, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: dataphone)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:01:28'),
(203, 1, 8, 'integraciones.bold.probar', 'Prueba API datáfono Bold fallida para empresa ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:02:27'),
(204, 1, 8, 'integraciones.bold.probar', 'Prueba API datáfono Bold fallida para empresa ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:03:38'),
(205, 1, 8, 'integraciones.bold.probar', 'Prueba API datáfono Bold exitosa para empresa ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:10:31'),
(206, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: activa, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:26:26'),
(207, 1, 8, 'integraciones.bold.probar_boton', 'Prueba Botón de pagos Bold exitosa para empresa ID: 1 (ref: VX-20260410112646-7581)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 11:26:50'),
(208, 1, 8, 'pos.venta', 'Venta registrada ID: 18', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 13:10:32'),
(209, 1, 8, 'integraciones.bold.actualizar', 'Integración Bold actualizada para empresa ID: 1 (estado: inactiva, modo: button)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-10 13:13:22'),
(210, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-12 12:08:34'),
(211, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-12 12:08:38'),
(212, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-12 12:08:49'),
(213, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-14 06:45:51'),
(214, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-14 08:38:37'),
(215, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2026-04-14 08:39:28'),
(216, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 13:45:29'),
(217, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 15:06:18');
INSERT INTO `logs_actividad` (`id`, `empresa_id`, `usuario_id`, `accion`, `descripcion`, `ip`, `user_agent`, `created_at`) VALUES
(218, 1, 8, 'integraciones.credibanco.actualizar', 'Integración Credibanco actualizada para empresa ID: 1 (estado: inactiva)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:09:28'),
(219, 1, 8, 'integraciones.credibanco.actualizar', 'Integración Credibanco actualizada para empresa ID: 1 (estado: activa)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:10:19'),
(220, 1, 8, 'integraciones.credibanco.probar', 'Prueba token/consulta Credibanco fallida para empresa ID: 1 (CU: 010601557)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:10:37'),
(221, 1, 8, 'integraciones.credibanco.probar', 'Prueba token/consulta Credibanco fallida para empresa ID: 1 (CU: 010601557)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:22:12'),
(222, 1, 8, 'integraciones.credibanco.actualizar', 'Integración Credibanco actualizada para empresa ID: 1 (estado: activa)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:23:11'),
(223, 1, 8, 'integraciones.credibanco.probar', 'Prueba token/consulta Credibanco fallida para empresa ID: 1 (CU: 010601557)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:23:29'),
(224, 1, 8, 'integraciones.credibanco.actualizar', 'Integración Credibanco actualizada para empresa ID: 1 (estado: inactiva)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 16:30:52'),
(225, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:28:27'),
(226, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:29:13'),
(227, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:29:27'),
(228, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:30:02'),
(229, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_access_token, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:49:49'),
(230, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_access_token, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 21:52:35'),
(231, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:09:28'),
(232, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:09:38'),
(233, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:11:22'),
(234, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:16:25'),
(235, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:16:30'),
(236, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:18:37'),
(237, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:18:42'),
(238, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:22:23'),
(239, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:22:27'),
(240, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:27:49'),
(241, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:28:06'),
(242, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:28:21'),
(243, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp exitosa vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:28:26'),
(244, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp exitosa vía meta hacia 3122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 22:29:27'),
(245, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp aceptada vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 23:35:29'),
(246, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp aceptada vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-14 23:36:13'),
(247, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 00:53:33'),
(248, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:03:57'),
(249, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_access_token, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:05:23'),
(250, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:06:05'),
(251, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:06:58'),
(252, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:07:19'),
(253, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:07:25'),
(254, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_access_token, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:07:40'),
(255, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía manychat hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:07:55'),
(256, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía manychat hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:15:11'),
(257, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:15:48'),
(258, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía manychat hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:16:17'),
(259, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp fallida vía manychat hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:28:42'),
(260, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_email_from_name, notify_email_from_address, notify_email_reply_to, notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_access_token, notify_whatsapp_default_country_code, notify_manychat_api_url, notify_manychat_message_tag, notify_retry_max_attempts, notify_retry_backoff_minutes, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:43:58'),
(261, NULL, 1, 'superadmin.notificaciones.whatsapp.probar', 'Prueba WhatsApp aceptada vía meta hacia 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 01:45:09'),
(262, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 07:42:57'),
(263, 2, 9, 'auth.login', 'Inicio de sesión exitoso: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 07:43:13'),
(264, 2, 9, 'auth.logout', 'Cierre de sesión: d.rios@hunolabs.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 07:43:27'),
(265, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 07:43:48'),
(266, NULL, 1, 'superadmin.suscripciones.actualizar', 'Suscripción actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 08:09:57'),
(267, NULL, 1, 'superadmin.suscripciones.automatizacion', 'Automatización ejecutada. Vencidas: 0, Morosas: 0, Empresas bloqueadas: 0, Avisos creados: 0, Enviados: 0, Reprogramados: 0.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 08:10:02'),
(268, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_business_account_id, notify_whatsapp_default_country_code, notify_whatsapp_template_enabled, notify_whatsapp_template_language, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:12:08'),
(269, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_business_account_id, notify_whatsapp_default_country_code, notify_whatsapp_template_enabled, notify_whatsapp_template_language, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:15:58'),
(270, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_business_account_id, notify_whatsapp_default_country_code, notify_whatsapp_template_enabled, notify_whatsapp_template_language, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:18:41'),
(271, NULL, 1, 'superadmin.notificaciones.actualizar', 'Configuración de notificaciones actualizada. Claves: notify_whatsapp_provider, notify_whatsapp_api_url, notify_whatsapp_phone_number_id, notify_whatsapp_business_account_id, notify_whatsapp_default_country_code, notify_whatsapp_template_enabled, notify_whatsapp_template_language, notify_channel_email, notify_channel_whatsapp', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:22:56'),
(272, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 0, fallidas: 4', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:24:50'),
(273, NULL, 1, 'superadmin.whatsapp.template.enlazar', 'Plantilla enlazada a aviso 10 días antes de vencer: aviso_10_dias (previo_10_dias)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:35:57'),
(274, NULL, 1, 'superadmin.whatsapp.template.enlazar', 'Plantilla enlazada a aviso 3 días antes de vencer: aviso_3_dias (previo_3_dias)', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:36:03'),
(275, NULL, 1, 'superadmin.whatsapp.template.sincronizar', 'Plantilla sincronizada con Meta. ID local: 2, estado: APPROVED', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:36:17'),
(276, NULL, 1, 'superadmin.whatsapp.template.sincronizar', 'Plantilla sincronizada con Meta. ID local: 1, estado: APPROVED', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-15 16:36:23'),
(277, NULL, 1, 'superadmin.whatsapp.template.programacion', 'Horarios de salida actualizados: notify_whatsapp_dispatch_time_default, notify_whatsapp_dispatch_time_previo_10_dias, notify_whatsapp_dispatch_time_previo_3_dias, notify_whatsapp_dispatch_time_previo_1_dia, notify_whatsapp_dispatch_time_vence_hoy, notify_whatsapp_dispatch_time_vencida, notify_whatsapp_dispatch_time_morosa', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 14:22:58'),
(278, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 14:23:32'),
(279, NULL, 1, 'superadmin.whatsapp.template.programacion', 'Horarios de salida actualizados: notify_whatsapp_dispatch_time_default, notify_whatsapp_dispatch_time_previo_10_dias, notify_whatsapp_dispatch_time_previo_3_dias, notify_whatsapp_dispatch_time_previo_1_dia, notify_whatsapp_dispatch_time_vence_hoy, notify_whatsapp_dispatch_time_vencida, notify_whatsapp_dispatch_time_morosa', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 14:48:37'),
(280, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 14:48:57'),
(281, NULL, 1, 'superadmin.suscripciones.actualizar', 'Suscripción actualizada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 15:03:13'),
(282, NULL, 1, 'superadmin.suscripciones.automatizacion', 'Automatización ejecutada. Vencidas: 0, Morosas: 0, Empresas bloqueadas: 0, Avisos creados: 0, Enviados: 0, Reprogramados: 0.', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 15:03:16'),
(283, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573246802685', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 18:20:31'),
(284, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573246802685', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 18:40:10'),
(285, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 2 destino: 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 18:41:22'),
(286, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:07:51'),
(287, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:08:13'),
(288, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:21:02'),
(289, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:27:48'),
(290, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:32:30'),
(291, NULL, 1, 'superadmin.whatsapp.template.enviar_ahora', 'Plantilla enviada manualmente. ID local: 1 destino: 573122644576', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:32:45'),
(292, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:45:56'),
(293, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:46:03'),
(294, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:47:15'),
(295, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 19:49:37'),
(296, NULL, 1, 'superadmin.whatsapp.template.catalogo.sincronizar', 'Sincronización de catálogo Meta. Total: 4, creadas: 0, actualizadas: 4, fallidas: 0', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-16 20:03:56'),
(297, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 18:46:28'),
(298, NULL, 1, 'superadmin.suscripciones.actualizar', 'Suscripción actualizada ID: 1', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 18:46:52'),
(299, NULL, 1, 'superadmin.suscripciones.actualizar', 'Suscripción actualizada ID: 2', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 18:47:08'),
(300, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:03:08'),
(301, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:03:19'),
(302, 1, 8, 'pos.venta', 'Venta registrada ID: 19', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:04:12'),
(303, 1, 8, 'pos.venta', 'Venta registrada ID: 20', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:48:51'),
(304, 1, 8, 'ventas.anular', 'Venta anulada ID: 20', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:49:38'),
(305, 1, 8, 'pos.venta', 'Venta registrada ID: 21', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 19:53:52'),
(306, 1, 8, 'pos.venta', 'Venta registrada ID: 22', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 20:04:40'),
(307, 1, 8, 'pos.venta', 'Venta registrada ID: 23', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-21 21:09:14'),
(308, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-22 19:43:01'),
(309, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-23 14:48:45'),
(310, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-23 15:56:06'),
(311, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-23 18:15:49'),
(312, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-23 18:16:43'),
(313, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 14:24:36'),
(314, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 18:46:42'),
(315, 1, 8, 'auth.logout', 'Cierre de sesión: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 19:40:44'),
(316, NULL, 1, 'auth.login', 'Inicio de sesión exitoso: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 19:41:04'),
(317, NULL, 1, 'auth.logout', 'Cierre de sesión: admin@veltrix.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 20:32:03'),
(318, 1, 8, 'auth.login', 'Inicio de sesión exitoso: luisaconcha93@gmail.com', '::1', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/147.0.0.0 Safari/537.36', '2026-04-24 20:32:18');

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

--
-- Estructura de tabla para la tabla `marcas`
--

CREATE TABLE `marcas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `metodos_pago`
--

CREATE TABLE `metodos_pago` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nombre` varchar(80) NOT NULL,
  `codigo` varchar(40) NOT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `metodos_pago` (`id`, `empresa_id`, `nombre`, `codigo`, `activo`, `created_at`) VALUES
(1, NULL, 'Efectivo', 'efectivo', 1, '2026-04-01 09:34:36'),
(2, NULL, 'Tarjeta', 'tarjeta', 1, '2026-04-01 09:34:36'),
(3, NULL, 'Transferencia', 'transferencia', 1, '2026-04-01 09:34:36'),
(4, NULL, 'Crédito', 'credito', 1, '2026-04-01 09:34:36'),
(5, 1, 'Nequi', 'nequi', 1, '2026-04-03 22:04:45'),
(6, 1, 'Bancolombia Luisa', 'bcluisa', 1, '2026-04-03 23:11:56'),
(7, 1, 'Bancolombia Daniel', 'bcdaniel', 1, '2026-04-03 23:12:11'),
(8, 1, 'Bold', 'bold', 0, '2026-04-09 23:28:54'),
(9, 1, 'Bold Datáfono', 'bold_dataphone', 0, '2026-04-10 08:59:46'),
(10, 1, 'Bold Botón', 'bold_button', 0, '2026-04-10 08:59:46'),
(11, 1, 'Credibanco Datáfono', 'credibanco_datafono', 0, '2026-04-14 16:09:28'),
(12, 1, 'Credibanco Dataphone', 'credibanco_dataphone', 0, '2026-04-14 16:09:28'),
(13, 1, 'Credibanco', 'credibanco', 0, '2026-04-14 16:09:28');

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

--
-- Estructura de tabla para la tabla `monedas`
--

CREATE TABLE `monedas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `codigo` varchar(10) NOT NULL,
  `nombre` varchar(50) NOT NULL,
  `simbolo` varchar(10) NOT NULL,
  `decimales` tinyint(4) NOT NULL DEFAULT 2,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `monedas` (`id`, `codigo`, `nombre`, `simbolo`, `decimales`, `created_at`) VALUES
(1, 'COP', 'Peso Colombiano', '$', 2, '2026-04-01 09:34:36'),
(2, 'USD', 'Dolar Estadounidense', '$', 2, '2026-04-03 21:48:33'),
(3, 'EUR', 'Euro', '€', 2, '2026-04-03 21:48:33'),
(4, 'MXN', 'Peso Mexicano', '$', 2, '2026-04-03 21:48:33'),
(5, 'PEN', 'Sol Peruano', 'S/', 2, '2026-04-03 21:48:33'),
(6, 'CLP', 'Peso Chileno', '$', 0, '2026-04-03 21:48:33'),
(7, 'ARS', 'Peso Argentino', '$', 2, '2026-04-03 21:48:33'),
(8, 'BRL', 'Real Brasileno', 'R$', 2, '2026-04-03 21:48:33'),
(9, 'BOB', 'Boliviano', 'Bs', 2, '2026-04-03 21:48:33'),
(10, 'PYG', 'Guarani', 'Gs', 0, '2026-04-03 21:48:33'),
(11, 'UYU', 'Peso Uruguayo', '$U', 2, '2026-04-03 21:48:33'),
(12, 'VES', 'Bolivar', 'Bs', 2, '2026-04-03 21:48:33'),
(13, 'DOP', 'Peso Dominicano', 'RD$', 2, '2026-04-03 21:48:33'),
(14, 'CRC', 'Colon Costarricense', '₡', 2, '2026-04-03 21:48:33'),
(15, 'PAB', 'Balboa Panameno', 'B/.', 2, '2026-04-03 21:48:33'),
(16, 'GTQ', 'Quetzal', 'Q', 2, '2026-04-03 21:48:33'),
(17, 'HNL', 'Lempira', 'L', 2, '2026-04-03 21:48:33'),
(18, 'NIO', 'Cordoba', 'C$', 2, '2026-04-03 21:48:33'),
(19, 'SVC', 'Colon Salvadoreno', '₡', 2, '2026-04-03 21:48:33'),
(20, 'CUP', 'Peso Cubano', '$', 2, '2026-04-03 21:48:33'),
(21, 'GBP', 'Libra Esterlina', '£', 2, '2026-04-03 21:48:33'),
(22, 'CHF', 'Franco Suizo', 'CHF', 2, '2026-04-03 21:48:33'),
(23, 'CAD', 'Dolar Canadiense', 'C$', 2, '2026-04-03 21:48:33'),
(24, 'AUD', 'Dolar Australiano', 'A$', 2, '2026-04-03 21:48:33'),
(25, 'JPY', 'Yen Japones', '¥', 0, '2026-04-03 21:48:33'),
(26, 'CNY', 'Yuan Chino', '¥', 2, '2026-04-03 21:48:33'),
(27, 'INR', 'Rupia India', '₹', 2, '2026-04-03 21:48:33'),
(28, 'KRW', 'Won Surcoreano', '₩', 0, '2026-04-03 21:48:33'),
(29, 'TRY', 'Lira Turca', '₺', 2, '2026-04-03 21:48:33'),
(30, 'AED', 'Dirham de Emiratos Arabes Unidos', 'د.إ', 2, '2026-04-03 21:48:33');

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

--
-- Estructura de tabla para la tabla `movimientos_caja`
--

CREATE TABLE `movimientos_caja` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `apertura_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `tipo` enum('ingreso','egreso') NOT NULL,
  `concepto` varchar(160) NOT NULL,
  `monto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `observacion` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `movimientos_caja` (`id`, `empresa_id`, `apertura_id`, `usuario_id`, `tipo`, `concepto`, `monto`, `observacion`, `created_at`) VALUES
(1, 1, 1, 8, 'ingreso', 'Venta POS #24', 29750.00, 'origen=venta_pos;metodo=bcdaniel', NULL),
(2, 1, 1, 8, 'ingreso', 'Venta POS #25', 59500.00, 'origen=venta_pos;metodo=bcdaniel', NULL),
(3, 1, 1, 8, 'ingreso', 'Venta POS #26', 29750.00, 'origen=venta_pos;metodo=efectivo', NULL),
(4, 1, 1, 8, 'ingreso', 'Venta POS #27', 38080.00, 'origen=venta_pos;metodo=efectivo', NULL),
(5, 1, 1, 8, 'ingreso', 'Venta POS #28', 38080.00, 'origen=venta_pos;metodo=nequi', NULL),
(6, 1, 1, 8, 'ingreso', 'Venta POS #31', 107100.00, 'origen=venta_pos;metodo=efectivo', NULL),
(7, 1, 1, 8, 'ingreso', 'Venta POS #32', 29750.00, 'origen=venta_pos;metodo=efectivo', NULL),
(8, 1, 1, 8, 'ingreso', 'Venta POS #33', 29750.00, 'origen=venta_pos;metodo=efectivo', '2026-04-25 00:23:37'),
(9, 1, 1, 8, 'ingreso', 'Venta POS #34', 107100.00, 'origen=venta_pos;metodo=efectivo', '2026-04-25 00:26:32'),
(10, 1, 1, 8, 'ingreso', 'Venta POS #35', 29750.00, 'origen=venta_pos;metodo=transferencia', '2026-04-25 00:27:10'),
(11, 1, 1, 8, 'ingreso', 'Venta POS #36', 29750.00, 'origen=venta_pos;metodo=transferencia', '2026-04-25 01:15:49'),
(12, 1, 1, 8, 'ingreso', 'Venta POS #37', 59500.00, 'origen=venta_pos;metodo=nequi', '2026-04-25 01:30:59');

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

--
-- Estructura de tabla para la tabla `movimientos_inventario`
--

CREATE TABLE `movimientos_inventario` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `variante_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tipo` enum('entrada','salida','ajuste') NOT NULL,
  `referencia` varchar(120) DEFAULT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `costo_unitario` decimal(12,2) NOT NULL DEFAULT 0.00,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `movimientos_inventario` (`id`, `empresa_id`, `sucursal_id`, `producto_id`, `variante_id`, `tipo`, `referencia`, `cantidad`, `costo_unitario`, `created_at`) VALUES
(1, 1, NULL, 5, NULL, 'entrada', 'COMPRA#1', 9.00, 20000.00, '2026-04-03 22:16:49'),
(2, 1, NULL, 4, NULL, 'entrada', 'COMPRA#1', 8.00, 8000.00, '2026-04-03 22:16:49'),
(3, 1, 2, 3, NULL, 'salida', 'VENTA#1', 1.00, 12000.00, '2026-04-03 22:43:59'),
(4, 1, 2, 5, NULL, 'salida', 'VENTA#1', 1.00, 20000.00, '2026-04-03 22:43:59'),
(5, 1, 2, 2, NULL, 'salida', 'VENTA#2', 3.00, 8000.00, '2026-04-03 22:47:53'),
(6, 1, 2, 5, NULL, 'salida', 'VENTA#2', 1.00, 20000.00, '2026-04-03 22:47:53'),
(7, 1, 2, 1, NULL, 'salida', 'VENTA#2', 2.00, 19000.00, '2026-04-03 22:47:53'),
(8, 1, 2, 4, NULL, 'salida', 'VENTA#3', 27.00, 8000.00, '2026-04-03 22:56:55'),
(9, 1, 2, 1, NULL, 'entrada', 'RECEPCION_OC#1-1', 10.00, 19000.00, '2026-04-03 23:00:50'),
(10, 1, 2, 4, NULL, 'entrada', 'RECEPCION_OC#2-2', 15.00, 8000.00, '2026-04-03 23:01:08'),
(11, 1, 2, 4, NULL, 'salida', 'VENTA#4', 1.00, 8000.00, '2026-04-04 11:20:39'),
(12, 1, 2, 2, NULL, 'salida', 'VENTA#5', 1.00, 8000.00, '2026-04-04 21:12:42'),
(13, 1, 2, 5, NULL, 'salida', 'VENTA#5', 1.00, 20000.00, '2026-04-04 21:12:42'),
(14, 1, 2, 2, NULL, 'salida', 'VENTA#6', 1.00, 8000.00, '2026-04-04 21:22:45'),
(17, 1, 2, 5, NULL, 'salida', 'VENTA#9', 1.00, 20000.00, '2026-04-05 13:56:13'),
(18, 1, 2, 3, NULL, 'salida', 'VENTA#10', 1.00, 12000.00, '2026-04-08 13:18:12'),
(19, 1, 2, 4, NULL, 'salida', 'VENTA#10', 1.00, 8000.00, '2026-04-08 13:18:12'),
(20, 1, 2, 2, NULL, 'salida', 'VENTA#10', 1.00, 8000.00, '2026-04-08 13:18:12'),
(21, 1, 2, 3, NULL, 'salida', 'VENTA#11', 1.00, 12000.00, '2026-04-08 13:22:56'),
(22, 1, 2, 6, NULL, 'salida', 'VENTA#11', 1.00, 30000.00, '2026-04-08 13:22:56'),
(23, 1, 2, 4, NULL, 'salida', 'VENTA#12', 1.00, 8000.00, '2026-04-08 21:07:29'),
(24, 1, 2, 1, NULL, 'salida', 'VENTA#13', 1.00, 19000.00, '2026-04-08 21:27:52'),
(25, 1, 2, 4, NULL, 'salida', 'VENTA#13', 1.00, 8000.00, '2026-04-08 21:27:52'),
(26, 1, 2, 3, NULL, 'salida', 'VENTA#14', 1.00, 12000.00, '2026-04-09 08:24:08'),
(28, 1, 2, 3, NULL, 'salida', 'VENTA#16', 1.00, 12000.00, '2026-04-09 11:22:05'),
(29, 1, 2, 3, NULL, 'salida', 'VENTA#17', 2.00, 12000.00, '2026-04-09 14:09:25'),
(30, 1, 2, 3, NULL, 'salida', 'VENTA#18', 1.00, 12000.00, '2026-04-10 13:10:27'),
(31, 1, 2, 4, NULL, 'salida', 'VENTA#19', 1.00, 8000.00, '2026-04-21 19:04:07'),
(32, 1, 2, 4, NULL, 'salida', 'VENTA#20', 1.00, 8000.00, '2026-04-21 19:48:46'),
(33, 1, 2, 3, NULL, 'salida', 'VENTA#21', 1.00, 12000.00, '2026-04-21 19:53:48'),
(34, 1, 2, 3, NULL, 'salida', 'VENTA#22', 1.00, 12000.00, '2026-04-21 20:04:36'),
(35, 1, 2, 3, NULL, 'salida', 'VENTA#23', 1.00, 12000.00, '2026-04-21 21:09:10'),
(36, 1, 2, 2, NULL, 'salida', 'POS-VENTA-24', 1.00, 0.00, NULL),
(37, 1, 2, 2, NULL, 'salida', 'POS-VENTA-25', 1.00, 0.00, NULL),
(38, 1, 2, 4, NULL, 'salida', 'POS-VENTA-25', 1.00, 0.00, NULL),
(39, 1, 2, 4, NULL, 'salida', 'POS-VENTA-26', 1.00, 0.00, NULL),
(40, 1, 2, 3, NULL, 'salida', 'POS-VENTA-27', 1.00, 0.00, NULL),
(41, 1, 2, 3, NULL, 'salida', 'POS-VENTA-28', 1.00, 0.00, NULL),
(44, 1, 2, 6, NULL, 'salida', 'POS-VENTA-31', 1.00, 0.00, NULL),
(45, 1, 2, 2, NULL, 'salida', 'POS-VENTA-32', 1.00, 0.00, NULL),
(46, 1, 2, 4, NULL, 'salida', 'POS-VENTA-33', 1.00, 0.00, NULL),
(47, 1, 2, 6, NULL, 'salida', 'POS-VENTA-34', 1.00, 0.00, NULL),
(48, 1, 2, 2, NULL, 'salida', 'POS-VENTA-35', 1.00, 0.00, NULL),
(49, 1, 2, 4, NULL, 'salida', 'POS-VENTA-36', 1.00, 0.00, NULL),
(50, 1, 2, 2, NULL, 'salida', 'POS-VENTA-37', 2.00, 0.00, NULL);

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

--
-- Estructura de tabla para la tabla `notificacion_vistas`
--

CREATE TABLE `notificacion_vistas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0,
  `notification_key` varchar(255) NOT NULL,
  `leido_at` datetime NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `notificacion_vistas` (`id`, `usuario_id`, `empresa_id`, `notification_key`, `leido_at`, `created_at`, `updated_at`) VALUES
(1, 8, 1, 'stock|producto-6|2|2', '2026-04-10 07:22:22', '2026-04-10 07:22:22', '2026-04-10 07:22:22');

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

--
-- Estructura de tabla para la tabla `numeraciones_documentos`
--

CREATE TABLE `numeraciones_documentos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tipo_documento` varchar(40) NOT NULL,
  `prefijo` varchar(20) DEFAULT NULL,
  `consecutivo_actual` bigint(20) NOT NULL DEFAULT 1,
  `consecutivo_final` bigint(20) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `numeraciones_documentos` (`id`, `empresa_id`, `sucursal_id`, `tipo_documento`, `prefijo`, `consecutivo_actual`, `consecutivo_final`, `activo`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 'factura', 'VOLT', 5000014, 10000000, 1, '2026-04-08 13:21:28', '2026-04-25 01:30:59');

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

--
-- Estructura de tabla para la tabla `ordenes_compra`
--

CREATE TABLE `ordenes_compra` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `proveedor_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `numero` varchar(80) NOT NULL,
  `fecha` datetime NOT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `impuestos` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('abierta','parcial','completa','anulada') NOT NULL DEFAULT 'abierta',
  `observacion` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `ordenes_compra` (`id`, `empresa_id`, `sucursal_id`, `proveedor_id`, `usuario_id`, `numero`, `fecha`, `subtotal`, `impuestos`, `total`, `estado`, `observacion`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 1, 8, 'OC-20260403-00001', '2026-04-03 22:19:16', 285000.00, 0.00, 285000.00, 'parcial', 'tela algodon verde', '2026-04-03 22:19:16', '2026-04-03 23:00:50'),
(2, 1, 2, 1, 8, 'OC-20260403-00002', '2026-04-03 22:59:21', 120000.00, 0.00, 120000.00, 'completa', NULL, '2026-04-03 22:59:21', '2026-04-03 23:01:08');

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

--
-- Estructura de tabla para la tabla `orden_compra_detalles`
--

CREATE TABLE `orden_compra_detalles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `orden_compra_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `variante_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `cantidad_recibida` decimal(12,2) NOT NULL DEFAULT 0.00,
  `costo_unitario` decimal(12,2) NOT NULL,
  `impuesto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_linea` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `orden_compra_detalles` (`id`, `orden_compra_id`, `empresa_id`, `producto_id`, `variante_id`, `cantidad`, `cantidad_recibida`, `costo_unitario`, `impuesto`, `total_linea`) VALUES
(1, 1, 1, 1, NULL, 15.00, 10.00, 19000.00, 0.00, 285000.00),
(2, 2, 1, 4, NULL, 15.00, 15.00, 8000.00, 0.00, 120000.00);

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

--
-- Estructura de tabla para la tabla `pagos_compra`
--

CREATE TABLE `pagos_compra` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `compra_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `monto` decimal(12,2) NOT NULL,
  `fecha_pago` datetime NOT NULL,
  `metodo_pago` varchar(50) NOT NULL,
  `referencia` varchar(120) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `pagos_compra` (`id`, `compra_id`, `empresa_id`, `monto`, `fecha_pago`, `metodo_pago`, `referencia`, `created_at`) VALUES
(1, 1, 1, 244000.00, '2026-04-03 22:18:10', 'transferencia', '123456789', '2026-04-03 22:18:10'),
(2, 2, 1, 190000.00, '2026-04-03 23:07:36', 'transferencia', '778899000', '2026-04-03 23:07:36'),
(3, 3, 1, 120000.00, '2026-04-03 23:08:26', 'transferencia', '6665554446', '2026-04-03 23:08:26');

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

--
-- Estructura de tabla para la tabla `pagos_suscripcion`
--

CREATE TABLE `pagos_suscripcion` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `suscripcion_id` bigint(20) UNSIGNED NOT NULL,
  `pasarela` varchar(80) NOT NULL,
  `referencia` varchar(120) DEFAULT NULL,
  `monto` decimal(12,2) NOT NULL,
  `moneda` varchar(10) NOT NULL DEFAULT 'COP',
  `estado` enum('pendiente','pagado','fallido','reembolsado') NOT NULL DEFAULT 'pagado',
  `fecha_pago` datetime NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `pagos_suscripcion` (`id`, `empresa_id`, `suscripcion_id`, `pasarela`, `referencia`, `monto`, `moneda`, `estado`, `fecha_pago`, `created_at`) VALUES
(1, 1, 1, 'wompi', '1791091-1775233102-88157', 299000.00, 'COP', 'pagado', '2026-04-03 11:18:37', '2026-04-03 11:18:37'),
(2, 2, 2, 'wompi', '1791091-1775235100-93248', 149000.00, 'COP', 'pagado', '2026-04-03 11:51:44', '2026-04-03 11:51:44');

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

--
-- Estructura de tabla para la tabla `paises`
--

CREATE TABLE `paises` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `codigo_iso2` char(2) NOT NULL,
  `codigo_iso3` char(3) NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `paises` (`id`, `nombre`, `codigo_iso2`, `codigo_iso3`, `created_at`) VALUES
(1, 'Colombia', 'CO', 'COL', '2026-04-01 09:34:36'),
(2, 'Mexico', 'MX', 'MEX', '2026-04-02 21:41:47'),
(3, 'Peru', 'PE', 'PER', '2026-04-02 21:41:47'),
(4, 'Ecuador', 'EC', 'ECU', '2026-04-02 21:41:47'),
(5, 'Chile', 'CL', 'CHL', '2026-04-02 21:41:47'),
(6, 'Argentina', 'AR', 'ARG', '2026-04-02 21:41:47'),
(7, 'Estados Unidos', 'US', 'USA', '2026-04-02 21:41:47'),
(8, 'Espana', 'ES', 'ESP', '2026-04-02 21:41:47');

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

--
-- Estructura de tabla para la tabla `permisos`
--

CREATE TABLE `permisos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `codigo` varchar(150) NOT NULL,
  `modulo` varchar(80) NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `permisos` (`id`, `nombre`, `codigo`, `modulo`, `created_at`) VALUES
(1, 'Ver dashboard', 'dashboard.ver', 'dashboard', '2026-04-01 09:34:36'),
(2, 'Ver empresas', 'empresas.ver', 'empresas', '2026-04-01 09:34:36'),
(3, 'Crear empresas', 'empresas.crear', 'empresas', '2026-04-01 09:34:36'),
(4, 'Ver usuarios', 'usuarios.ver', 'usuarios', '2026-04-01 09:34:36'),
(5, 'Crear usuarios', 'usuarios.crear', 'usuarios', '2026-04-01 09:34:36'),
(6, 'Gestionar roles', 'roles.gestionar', 'usuarios', '2026-04-01 09:34:36'),
(7, 'Ver productos', 'productos.ver', 'productos', '2026-04-01 09:34:36'),
(8, 'Crear productos', 'productos.crear', 'productos', '2026-04-01 09:34:36'),
(9, 'Ver categorias', 'categorias.ver', 'productos', '2026-04-01 09:34:36'),
(10, 'Crear categorias', 'categorias.crear', 'productos', '2026-04-01 09:34:36'),
(11, 'Ver clientes', 'clientes.ver', 'clientes', '2026-04-01 09:34:36'),
(12, 'Crear clientes', 'clientes.crear', 'clientes', '2026-04-01 09:34:36'),
(13, 'Abrir caja', 'caja.abrir', 'caja', '2026-04-01 09:34:36'),
(14, 'Cerrar caja', 'caja.cerrar', 'caja', '2026-04-01 09:34:36'),
(15, 'Ver caja', 'caja.ver', 'caja', '2026-04-01 09:34:36'),
(16, 'Vender en POS', 'pos.vender', 'pos', '2026-04-01 09:34:36'),
(17, 'Ver ventas', 'ventas.ver', 'ventas', '2026-04-01 09:34:36'),
(18, 'Anular ventas', 'ventas.anular', 'ventas', '2026-04-01 09:34:36'),
(19, 'Ver reportes', 'reportes.ver', 'reportes', '2026-04-01 09:34:36'),
(20, 'Ver suscripciones', 'suscripciones.ver', 'suscripciones', '2026-04-01 09:34:36'),
(21, 'Acceso superadmin', 'superadmin.acceso', 'superadmin', '2026-04-01 09:34:36'),
(22, 'Ver inventario', 'inventario.ver', 'inventario', '2026-04-01 10:06:44'),
(23, 'Ver movimientos inventario', 'movimientos_inventario.ver', 'inventario', '2026-04-01 10:06:44'),
(24, 'Ver proveedores', 'proveedores.ver', 'proveedores', '2026-04-01 10:06:44'),
(25, 'Crear proveedores', 'proveedores.crear', 'proveedores', '2026-04-01 10:06:44'),
(26, 'Ver compras', 'compras.ver', 'compras', '2026-04-01 10:06:44'),
(27, 'Crear compras', 'compras.crear', 'compras', '2026-04-01 10:06:44'),
(49, 'Pagar compras', 'compras.pagar', 'compras', '2026-04-01 10:25:27'),
(50, 'Ver cuentas por pagar', 'cuentas_pagar.ver', 'compras', '2026-04-01 10:25:27'),
(78, 'Anular compras', 'compras.anular', 'compras', '2026-04-01 10:32:36'),
(108, 'Ver sucursales', 'sucursales.ver', 'sucursales', '2026-04-01 12:46:41'),
(109, 'Crear sucursales', 'sucursales.crear', 'sucursales', '2026-04-01 12:46:41'),
(110, 'Editar sucursales', 'sucursales.editar', 'sucursales', '2026-04-01 12:46:41'),
(111, 'Ver configuracion', 'configuracion.ver', 'configuracion', '2026-04-01 12:46:41'),
(112, 'Editar configuracion', 'configuracion.editar', 'configuracion', '2026-04-01 12:46:41'),
(113, 'Solicitar ajustes de inventario', 'inventario.ajustar', 'inventario', '2026-04-01 14:43:57'),
(114, 'Aprobar ajustes de inventario', 'inventario.aprobar_ajuste', 'inventario', '2026-04-01 14:43:57'),
(115, 'Gestionar ordenes de compra', 'compras.ordenes', 'compras', '2026-04-01 14:43:57'),
(116, 'Registrar recepciones de compra', 'compras.recibir', 'compras', '2026-04-01 14:43:57'),
(117, 'Emitir notas contables', 'facturacion.notas', 'facturacion', '2026-04-01 14:43:57'),
(118, 'Anular documento fiscal', 'facturacion.anular_documento', 'facturacion', '2026-04-01 14:43:57'),
(120, 'Desactivar empresas', 'empresas.desactivar', 'empresas', '2026-04-22 13:59:42'),
(121, 'Eliminar empresas', 'empresas.eliminar', 'empresas', '2026-04-22 13:59:42'),
(122, 'Desactivar sucursales', 'sucursales.desactivar', 'sucursales', '2026-04-22 13:59:42'),
(123, 'Eliminar sucursales', 'sucursales.eliminar', 'sucursales', '2026-04-22 13:59:42'),
(124, 'Desactivar usuarios', 'usuarios.desactivar', 'usuarios', '2026-04-22 13:59:42'),
(125, 'Eliminar usuarios', 'usuarios.eliminar', 'usuarios', '2026-04-22 13:59:42'),
(126, 'Reactivar empresas', 'empresas.reactivar', 'empresas', '2026-04-22 14:09:51'),
(127, 'Reactivar sucursales', 'sucursales.reactivar', 'sucursales', '2026-04-22 14:09:51'),
(128, 'Reactivar usuarios', 'usuarios.reactivar', 'usuarios', '2026-04-22 14:09:51'),
(129, 'Ver cuentas por cobrar', 'cuentas_cobrar.ver', 'ventas', '2026-04-24 14:06:52'),
(130, 'Registrar abonos de cartera', 'cuentas_cobrar.abonar', 'ventas', '2026-04-24 14:06:52');

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

--
-- Estructura de tabla para la tabla `planes`
--

CREATE TABLE `planes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `precio_mensual` decimal(12,2) NOT NULL DEFAULT 0.00,
  `max_usuarios` int(11) NOT NULL DEFAULT 1,
  `max_sucursales` int(11) NOT NULL DEFAULT 1,
  `max_productos` int(11) NOT NULL DEFAULT 500,
  `permite_facturacion_electronica` tinyint(1) NOT NULL DEFAULT 0,
  `permite_reportes_avanzados` tinyint(1) NOT NULL DEFAULT 0,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `planes` (`id`, `nombre`, `slug`, `precio_mensual`, `max_usuarios`, `max_sucursales`, `max_productos`, `permite_facturacion_electronica`, `permite_reportes_avanzados`, `activo`, `created_at`, `updated_at`) VALUES
(1, 'Plan Básico', 'basico', 59000.00, 3, 1, 500, 0, 0, 1, '2026-04-01 09:34:36', NULL),
(2, 'Plan Profesional', 'profesional', 149000.00, 15, 5, 5000, 1, 1, 1, '2026-04-01 09:34:36', NULL),
(3, 'Plan Premium', 'premium', 299000.00, 999, 999, 999999, 1, 1, 1, '2026-04-01 09:34:36', NULL),
(4, 'Prueba', 'prueba', 0.00, 3, 1, 500, 0, 0, 1, '2026-04-01 18:56:28', '2026-04-01 18:56:28');

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

--
-- Estructura de tabla para la tabla `productos`
--

CREATE TABLE `productos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `categoria_id` bigint(20) UNSIGNED DEFAULT NULL,
  `proveedor_id` bigint(20) UNSIGNED DEFAULT NULL,
  `marca_id` bigint(20) UNSIGNED DEFAULT NULL,
  `unidad_medida_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nombre` varchar(180) NOT NULL,
  `sku` varchar(80) DEFAULT NULL,
  `codigo_barras` varchar(80) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `imagen` varchar(255) DEFAULT NULL,
  `precio_compra` decimal(12,2) NOT NULL DEFAULT 0.00,
  `precio_venta` decimal(12,2) NOT NULL DEFAULT 0.00,
  `impuesto_porcentaje` decimal(5,2) NOT NULL DEFAULT 0.00,
  `stock_actual` decimal(12,2) NOT NULL DEFAULT 0.00,
  `stock_minimo` decimal(12,2) NOT NULL DEFAULT 0.00,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `productos` (`id`, `empresa_id`, `sucursal_id`, `categoria_id`, `proveedor_id`, `marca_id`, `unidad_medida_id`, `nombre`, `sku`, `codigo_barras`, `descripcion`, `imagen`, `precio_compra`, `precio_venta`, `impuesto_porcentaje`, `stock_actual`, `stock_minimo`, `activo`, `created_at`, `updated_at`) VALUES
(1, 1, NULL, 1, 1, NULL, 3, 'Short Algodon', 'Short001', NULL, NULL, 'assets/img/default-producto.jpg', 19000.00, 45000.00, 19.00, 27.00, 2.00, 1, '2026-04-03 22:07:13', '2026-04-03 22:14:39'),
(2, 1, NULL, 1, 1, NULL, 3, 'Camiseta V', 'Camisetav001', NULL, NULL, 'assets/img/default-producto.jpg', 8000.00, 25000.00, 19.00, 8.00, 2.00, 1, '2026-04-03 22:08:10', '2026-04-25 01:30:59'),
(3, 1, NULL, 1, 1, NULL, 3, 'Camiseta manga larga', 'Camisetav003', NULL, NULL, 'assets/img/default-producto.jpg', 12000.00, 32000.00, 19.00, 7.00, 2.00, 1, '2026-04-03 22:08:11', '2026-04-24 19:08:37'),
(4, 1, NULL, 1, 1, NULL, 3, 'Camiseta U', 'Camisetav002', NULL, NULL, 'assets/img/default-producto.jpg', 8000.00, 25000.00, 19.00, 6.00, 2.00, 1, '2026-04-03 22:08:12', '2026-04-25 01:15:49'),
(5, 1, NULL, 1, 1, NULL, 3, 'Pantalon B/Ancha', 'pantalon001', NULL, NULL, 'assets/img/default-producto.jpg', 20000.00, 60000.00, 19.00, 7.00, 0.00, 1, '2026-04-03 22:10:38', '2026-04-05 13:56:13'),
(6, 1, NULL, 3, 1, NULL, 3, 'Body', 'pantalon0019', NULL, NULL, 'assets/img/default-producto.jpg', 30000.00, 90000.00, 19.00, 7.00, 2.00, 1, '2026-04-05 13:32:30', '2026-04-25 00:26:32');

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

--
-- Estructura de tabla para la tabla `producto_variantes`
--

CREATE TABLE `producto_variantes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `sku` varchar(80) DEFAULT NULL,
  `cantidad` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `stock_minimo` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `precio_venta` decimal(12,2) NOT NULL DEFAULT 0.00,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `producto_variantes` (`id`, `empresa_id`, `producto_id`, `nombre`, `sku`, `cantidad`, `stock_minimo`, `precio_venta`, `activo`, `created_at`, `updated_at`) VALUES
(19, 1, 5, 'Talla: S / Color: Verde', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(20, 1, 5, 'Talla: S / Color: Morado', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(21, 1, 5, 'Talla: M / Color: Azul', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(22, 1, 5, 'Talla: M / Color: Verde', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(23, 1, 5, 'Talla: M / Color: Morado', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(24, 1, 5, 'Talla: L / Color: Azul', NULL, 0, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 13:56:13'),
(25, 1, 5, 'Talla: L / Color: Verde', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25'),
(26, 1, 5, 'Talla: L / Color: Morado', NULL, 1, 0, 60000.00, 1, '2026-04-05 12:54:25', '2026-04-05 12:54:25');

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

--
-- Estructura de tabla para la tabla `proveedores`
--

CREATE TABLE `proveedores` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `documento` varchar(60) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `telefono` varchar(40) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `proveedores` (`id`, `empresa_id`, `nombre`, `documento`, `email`, `telefono`, `direccion`, `activo`, `created_at`, `updated_at`) VALUES
(1, 1, 'DPI', '901888888888', 'DPI@gmail.com', '32468033333', 'Calle 78c #140-54', 1, '2026-04-03 22:00:43', NULL),
(2, 1, 'Daniel', '1088299637', 'danielamaya774@gmail.com', '3122644576', 'Calle 78C #130-55', 1, '2026-04-05 22:43:27', NULL);

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

--
-- Estructura de tabla para la tabla `recepciones_compra`
--

CREATE TABLE `recepciones_compra` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `orden_compra_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `numero_recepcion` varchar(80) NOT NULL,
  `fecha_recepcion` datetime NOT NULL,
  `estado` enum('recibida','anulada') NOT NULL DEFAULT 'recibida',
  `observacion` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `recepciones_compra` (`id`, `empresa_id`, `orden_compra_id`, `sucursal_id`, `usuario_id`, `numero_recepcion`, `fecha_recepcion`, `estado`, `observacion`, `created_at`) VALUES
(1, 1, 1, 2, 8, 'RC-20260403-0001-01', '2026-04-03 23:00:50', 'recibida', NULL, '2026-04-03 23:00:50'),
(2, 1, 2, 2, 8, 'RC-20260403-0002-01', '2026-04-03 23:01:08', 'recibida', NULL, '2026-04-03 23:01:08');

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

--
-- Estructura de tabla para la tabla `recepcion_compra_detalles`
--

CREATE TABLE `recepcion_compra_detalles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `recepcion_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `orden_detalle_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `variante_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `costo_unitario` decimal(12,2) NOT NULL,
  `impuesto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_linea` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `recepcion_compra_detalles` (`id`, `recepcion_id`, `empresa_id`, `orden_detalle_id`, `producto_id`, `variante_id`, `cantidad`, `costo_unitario`, `impuesto`, `total_linea`) VALUES
(1, 1, 1, 1, 1, NULL, 10.00, 19000.00, 0.00, 190000.00),
(2, 2, 1, 2, 4, NULL, 15.00, 8000.00, 0.00, 120000.00);

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

--
-- Estructura de tabla para la tabla `resoluciones_dian`
--

CREATE TABLE `resoluciones_dian` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `numero_resolucion` varchar(80) NOT NULL,
  `fecha_desde` date NOT NULL,
  `fecha_hasta` date NOT NULL,
  `prefijo` varchar(20) DEFAULT NULL,
  `rango_desde` bigint(20) NOT NULL,
  `rango_hasta` bigint(20) NOT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `resoluciones_dian` (`id`, `empresa_id`, `sucursal_id`, `numero_resolucion`, `fecha_desde`, `fecha_hasta`, `prefijo`, `rango_desde`, `rango_hasta`, `activo`, `created_at`) VALUES
(1, 1, NULL, '18764095110448', '2025-07-02', '2027-07-02', 'VOLT', 5000001, 10000000, 1, '2026-04-08 13:22:34');

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

--
-- Estructura de tabla para la tabla `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(80) NOT NULL,
  `slug` varchar(80) NOT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `roles` (`id`, `nombre`, `slug`, `descripcion`, `activo`, `created_at`, `updated_at`) VALUES
(1, 'Superadmin', 'superadmin', 'Acceso global a todo el SaaS', 1, '2026-04-01 09:34:36', NULL),
(2, 'Admin Empresa', 'admin_empresa', 'Administrador de la empresa cliente', 1, '2026-04-01 09:34:36', NULL),
(3, 'Supervisor', 'supervisor', 'Supervisor operativo', 1, '2026-04-01 09:34:36', NULL),
(4, 'Cajero', 'cajero', 'Perfil operativo de caja y ventas.', 1, '2026-04-01 09:34:36', '2026-04-22 13:59:42'),
(5, 'Inventario', 'inventario', 'Gestión de inventario', 1, '2026-04-01 09:34:36', NULL),
(6, 'Contabilidad', 'contabilidad', 'Módulos de contabilidad y reportes', 1, '2026-04-01 09:34:36', NULL),
(7, 'Consulta', 'consulta', 'Acceso de solo lectura', 1, '2026-04-01 09:34:36', NULL),
(30, 'Administrador', 'admin', 'Perfil administrativo con acceso ampliado.', 1, '2026-04-22 13:59:42', '2026-04-22 13:59:42'),
(31, 'Bodega', 'bodega', 'Perfil operativo de inventario y compras.', 1, '2026-04-22 13:59:42', '2026-04-22 13:59:42');

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

--
-- Estructura de tabla para la tabla `rol_permiso`
--

CREATE TABLE `rol_permiso` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `rol_id` bigint(20) UNSIGNED NOT NULL,
  `permiso_id` bigint(20) UNSIGNED NOT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `rol_permiso` (`id`, `rol_id`, `permiso_id`, `created_at`) VALUES
(1, 2, 13, '2026-04-01 09:34:36'),
(3, 2, 14, '2026-04-01 09:34:36'),
(5, 2, 15, '2026-04-01 09:34:36'),
(7, 2, 10, '2026-04-01 09:34:36'),
(9, 2, 9, '2026-04-01 09:34:36'),
(11, 2, 12, '2026-04-01 09:34:36'),
(13, 2, 11, '2026-04-01 09:34:36'),
(15, 2, 1, '2026-04-01 09:34:36'),
(21, 2, 16, '2026-04-01 09:34:36'),
(23, 2, 8, '2026-04-01 09:34:36'),
(25, 2, 7, '2026-04-01 09:34:36'),
(27, 2, 19, '2026-04-01 09:34:36'),
(29, 2, 6, '2026-04-01 09:34:36'),
(33, 2, 20, '2026-04-01 09:34:36'),
(35, 2, 5, '2026-04-01 09:34:36'),
(37, 2, 4, '2026-04-01 09:34:36'),
(39, 2, 18, '2026-04-01 09:34:36'),
(41, 2, 17, '2026-04-01 09:34:36'),
(79, 2, 27, '2026-04-01 10:06:44'),
(81, 2, 26, '2026-04-01 10:06:44'),
(83, 2, 22, '2026-04-01 10:06:44'),
(85, 2, 23, '2026-04-01 10:06:44'),
(87, 2, 25, '2026-04-01 10:06:44'),
(89, 2, 24, '2026-04-01 10:06:44'),
(95, 5, 27, '2026-04-01 10:06:44'),
(96, 5, 26, '2026-04-01 10:06:44'),
(97, 5, 1, '2026-04-01 10:06:44'),
(98, 5, 22, '2026-04-01 10:06:44'),
(99, 5, 23, '2026-04-01 10:06:44'),
(100, 5, 8, '2026-04-01 10:06:44'),
(101, 5, 7, '2026-04-01 10:06:44'),
(102, 5, 25, '2026-04-01 10:06:44'),
(103, 5, 24, '2026-04-01 10:06:44'),
(111, 2, 49, '2026-04-01 10:25:27'),
(112, 2, 50, '2026-04-01 10:25:27'),
(119, 5, 49, '2026-04-01 10:25:27'),
(120, 5, 50, '2026-04-01 10:25:27'),
(122, 2, 78, '2026-04-01 10:32:36'),
(126, 5, 78, '2026-04-01 10:32:36'),
(129, 2, 112, '2026-04-01 12:46:41'),
(131, 2, 111, '2026-04-01 12:46:41'),
(133, 2, 109, '2026-04-01 12:46:41'),
(135, 2, 110, '2026-04-01 12:46:41'),
(137, 2, 108, '2026-04-01 12:46:41'),
(144, 3, 111, '2026-04-01 12:46:41'),
(145, 3, 108, '2026-04-01 12:46:41'),
(182, 2, 115, '2026-04-01 14:43:57'),
(184, 2, 116, '2026-04-01 14:43:57'),
(186, 2, 118, '2026-04-01 14:43:57'),
(188, 2, 117, '2026-04-01 14:43:57'),
(190, 2, 113, '2026-04-01 14:43:57'),
(192, 2, 114, '2026-04-01 14:43:57'),
(198, 5, 115, '2026-04-01 14:43:57'),
(199, 5, 116, '2026-04-01 14:43:57'),
(200, 5, 113, '2026-04-01 14:43:57'),
(201, 5, 114, '2026-04-01 14:43:57'),
(205, 3, 15, '2026-04-01 14:43:57'),
(206, 3, 1, '2026-04-01 14:43:57'),
(207, 3, 19, '2026-04-01 14:43:57'),
(208, 3, 17, '2026-04-01 14:43:57'),
(432, 30, 13, '2026-04-24 14:06:52'),
(433, 30, 14, '2026-04-24 14:06:52'),
(434, 30, 15, '2026-04-24 14:06:52'),
(435, 30, 10, '2026-04-24 14:06:52'),
(436, 30, 9, '2026-04-24 14:06:52'),
(437, 30, 12, '2026-04-24 14:06:52'),
(438, 30, 11, '2026-04-24 14:06:52'),
(439, 30, 78, '2026-04-24 14:06:52'),
(440, 30, 27, '2026-04-24 14:06:52'),
(441, 30, 115, '2026-04-24 14:06:52'),
(442, 30, 49, '2026-04-24 14:06:52'),
(443, 30, 116, '2026-04-24 14:06:52'),
(444, 30, 26, '2026-04-24 14:06:52'),
(445, 30, 112, '2026-04-24 14:06:52'),
(446, 30, 111, '2026-04-24 14:06:52'),
(447, 30, 130, '2026-04-24 14:06:52'),
(448, 30, 129, '2026-04-24 14:06:52'),
(449, 30, 50, '2026-04-24 14:06:52'),
(450, 30, 1, '2026-04-24 14:06:52'),
(451, 30, 3, '2026-04-24 14:06:52'),
(452, 30, 120, '2026-04-24 14:06:52'),
(453, 30, 121, '2026-04-24 14:06:52'),
(454, 30, 126, '2026-04-24 14:06:52'),
(455, 30, 2, '2026-04-24 14:06:52'),
(456, 30, 118, '2026-04-24 14:06:52'),
(457, 30, 117, '2026-04-24 14:06:52'),
(458, 30, 113, '2026-04-24 14:06:52'),
(459, 30, 114, '2026-04-24 14:06:52'),
(460, 30, 22, '2026-04-24 14:06:52'),
(461, 30, 23, '2026-04-24 14:06:52'),
(462, 30, 16, '2026-04-24 14:06:52'),
(463, 30, 8, '2026-04-24 14:06:52'),
(464, 30, 7, '2026-04-24 14:06:52'),
(465, 30, 25, '2026-04-24 14:06:52'),
(466, 30, 24, '2026-04-24 14:06:52'),
(467, 30, 19, '2026-04-24 14:06:52'),
(468, 30, 6, '2026-04-24 14:06:52'),
(469, 30, 109, '2026-04-24 14:06:52'),
(470, 30, 122, '2026-04-24 14:06:52'),
(471, 30, 110, '2026-04-24 14:06:52'),
(472, 30, 123, '2026-04-24 14:06:52'),
(473, 30, 127, '2026-04-24 14:06:52'),
(474, 30, 108, '2026-04-24 14:06:52'),
(475, 30, 21, '2026-04-24 14:06:52'),
(476, 30, 20, '2026-04-24 14:06:52'),
(477, 30, 5, '2026-04-24 14:06:52'),
(478, 30, 124, '2026-04-24 14:06:52'),
(479, 30, 125, '2026-04-24 14:06:52'),
(480, 30, 128, '2026-04-24 14:06:52'),
(481, 30, 4, '2026-04-24 14:06:52'),
(482, 30, 18, '2026-04-24 14:06:52'),
(483, 30, 17, '2026-04-24 14:06:52'),
(484, 4, 13, '2026-04-24 14:06:52'),
(485, 4, 14, '2026-04-24 14:06:52'),
(486, 4, 15, '2026-04-24 14:06:52'),
(487, 4, 9, '2026-04-24 14:06:52'),
(488, 4, 12, '2026-04-24 14:06:52'),
(489, 4, 11, '2026-04-24 14:06:52'),
(490, 4, 130, '2026-04-24 14:06:52'),
(491, 4, 129, '2026-04-24 14:06:52'),
(492, 4, 1, '2026-04-24 14:06:52'),
(493, 4, 16, '2026-04-24 14:06:52'),
(494, 4, 7, '2026-04-24 14:06:52'),
(495, 4, 19, '2026-04-24 14:06:52'),
(496, 4, 17, '2026-04-24 14:06:52'),
(497, 31, 9, '2026-04-24 14:06:52'),
(498, 31, 115, '2026-04-24 14:06:52'),
(499, 31, 116, '2026-04-24 14:06:52'),
(500, 31, 26, '2026-04-24 14:06:52'),
(501, 31, 1, '2026-04-24 14:06:52'),
(502, 31, 113, '2026-04-24 14:06:52'),
(503, 31, 22, '2026-04-24 14:06:52'),
(504, 31, 23, '2026-04-24 14:06:52'),
(505, 31, 7, '2026-04-24 14:06:52'),
(506, 31, 24, '2026-04-24 14:06:52'),
(507, 31, 19, '2026-04-24 14:06:52'),
(560, 1, 13, '2026-04-24 14:13:43'),
(561, 1, 14, '2026-04-24 14:13:43'),
(562, 1, 15, '2026-04-24 14:13:43'),
(563, 1, 10, '2026-04-24 14:13:43'),
(564, 1, 9, '2026-04-24 14:13:43'),
(565, 1, 12, '2026-04-24 14:13:43'),
(566, 1, 11, '2026-04-24 14:13:43'),
(567, 1, 78, '2026-04-24 14:13:43'),
(568, 1, 27, '2026-04-24 14:13:43'),
(569, 1, 115, '2026-04-24 14:13:43'),
(570, 1, 49, '2026-04-24 14:13:43'),
(571, 1, 116, '2026-04-24 14:13:43'),
(572, 1, 26, '2026-04-24 14:13:43'),
(573, 1, 112, '2026-04-24 14:13:43'),
(574, 1, 111, '2026-04-24 14:13:43'),
(575, 1, 130, '2026-04-24 14:13:43'),
(576, 1, 129, '2026-04-24 14:13:43'),
(577, 1, 50, '2026-04-24 14:13:43'),
(578, 1, 1, '2026-04-24 14:13:43'),
(579, 1, 3, '2026-04-24 14:13:43'),
(580, 1, 120, '2026-04-24 14:13:43'),
(581, 1, 121, '2026-04-24 14:13:43'),
(582, 1, 126, '2026-04-24 14:13:43'),
(583, 1, 2, '2026-04-24 14:13:43'),
(584, 1, 118, '2026-04-24 14:13:43'),
(585, 1, 117, '2026-04-24 14:13:43'),
(586, 1, 113, '2026-04-24 14:13:43'),
(587, 1, 114, '2026-04-24 14:13:43'),
(588, 1, 22, '2026-04-24 14:13:43'),
(589, 1, 23, '2026-04-24 14:13:43'),
(590, 1, 16, '2026-04-24 14:13:43'),
(591, 1, 8, '2026-04-24 14:13:43'),
(592, 1, 7, '2026-04-24 14:13:43'),
(593, 1, 25, '2026-04-24 14:13:43'),
(594, 1, 24, '2026-04-24 14:13:43'),
(595, 1, 19, '2026-04-24 14:13:43'),
(596, 1, 6, '2026-04-24 14:13:43'),
(597, 1, 109, '2026-04-24 14:13:43'),
(598, 1, 122, '2026-04-24 14:13:43'),
(599, 1, 110, '2026-04-24 14:13:43'),
(600, 1, 123, '2026-04-24 14:13:43'),
(601, 1, 127, '2026-04-24 14:13:43'),
(602, 1, 108, '2026-04-24 14:13:43'),
(603, 1, 20, '2026-04-24 14:13:43'),
(604, 1, 5, '2026-04-24 14:13:43'),
(605, 1, 124, '2026-04-24 14:13:43'),
(606, 1, 125, '2026-04-24 14:13:43'),
(607, 1, 128, '2026-04-24 14:13:43'),
(608, 1, 4, '2026-04-24 14:13:43'),
(609, 1, 18, '2026-04-24 14:13:43'),
(610, 1, 17, '2026-04-24 14:13:43'),
(611, 2, 129, '2026-04-24 16:04:38'),
(612, 2, 130, '2026-04-24 16:04:38'),
(613, 3, 129, '2026-04-24 16:04:38'),
(614, 3, 130, '2026-04-24 16:04:38'),
(615, 1, 21, '2026-04-24 20:03:01');

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

--
-- Estructura de tabla para la tabla `saas_checkout_intents`
--

CREATE TABLE `saas_checkout_intents` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reference` varchar(80) NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_nombre` varchar(150) NOT NULL,
  `empresa_slug` varchar(120) NOT NULL,
  `empresa_email` varchar(180) DEFAULT NULL,
  `admin_nombre` varchar(150) NOT NULL,
  `admin_email` varchar(180) NOT NULL,
  `admin_password_hash` varchar(255) NOT NULL,
  `currency` varchar(10) NOT NULL DEFAULT 'COP',
  `amount_in_cents` int(10) UNSIGNED NOT NULL,
  `estado` enum('pending','approved','declined','error','voided','provisioned','failed') NOT NULL DEFAULT 'pending',
  `wompi_transaction_id` varchar(80) DEFAULT NULL,
  `wompi_status` varchar(40) DEFAULT NULL,
  `last_event_at` datetime DEFAULT NULL,
  `paid_at` datetime DEFAULT NULL,
  `empresa_id` bigint(20) UNSIGNED DEFAULT NULL,
  `suscripcion_id` bigint(20) UNSIGNED DEFAULT NULL,
  `provisioned_at` datetime DEFAULT NULL,
  `failure_reason` varchar(255) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `saas_checkout_intents` (`id`, `reference`, `plan_id`, `empresa_nombre`, `empresa_slug`, `empresa_email`, `admin_nombre`, `admin_email`, `admin_password_hash`, `currency`, `amount_in_cents`, `estado`, `wompi_transaction_id`, `wompi_status`, `last_event_at`, `paid_at`, `empresa_id`, `suscripcion_id`, `provisioned_at`, `failure_reason`, `created_at`, `updated_at`) VALUES
(1, 'VX-20260403111658-7A5C54', 3, 'Volta', 'volta', 'luisaconcha93@gmail.com', 'Luisa', 'luisaconcha93@gmail.com', '$2y$10$usXYyV5pMqzg61TeQYWDDecLVPLIkOZ8Z.WuPGY6siCeqUYnQXnbm', 'COP', 29900000, 'provisioned', '1791091-1775233102-88157', 'APPROVED', '2026-04-03 11:18:35', '2026-04-03 11:18:37', 1, 1, '2026-04-03 11:18:37', NULL, '2026-04-03 11:16:58', '2026-04-03 11:18:37'),
(2, 'VX-20260403115017-B8F3D7', 2, 'Huno Labs', 'hunolabs', 'd.rios@hunolabs.com', 'Daniel', 'd.rios@hunolabs.com', '$2y$10$Fqlf4k3g0hv08tFbX0dQbORjCagpw7rthTK6GVmv4oNVsrKFi/8OW', 'COP', 14900000, 'provisioned', '1791091-1775235100-93248', 'APPROVED', '2026-04-03 11:51:42', '2026-04-03 11:51:44', 2, 2, '2026-04-03 11:51:44', NULL, '2026-04-03 11:50:17', '2026-04-03 11:51:44');

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

--
-- Estructura de tabla para la tabla `soporte_tickets`
--

CREATE TABLE `soporte_tickets` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `creado_por_usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `asignado_a_usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `asunto` varchar(180) NOT NULL,
  `descripcion` text NOT NULL,
  `prioridad` enum('baja','media','alta','critica') NOT NULL DEFAULT 'media',
  `estado` enum('abierto','en_proceso','pendiente_cliente','resuelto','cerrado') NOT NULL DEFAULT 'abierto',
  `canal` varchar(40) NOT NULL DEFAULT 'panel',
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  `primera_respuesta_at` datetime DEFAULT NULL,
  `primera_respuesta_limite_at` datetime DEFAULT NULL,
  `resolucion_limite_at` datetime DEFAULT NULL,
  `objetivo_primera_respuesta_min` smallint(5) UNSIGNED NOT NULL DEFAULT 120,
  `objetivo_resolucion_horas` smallint(5) UNSIGNED NOT NULL DEFAULT 24,
  `sla_primera_respuesta_estado` enum('pendiente','cumplido','incumplido') NOT NULL DEFAULT 'pendiente',
  `sla_resolucion_estado` enum('pendiente','cumplido','incumplido') NOT NULL DEFAULT 'pendiente',
  `cerrado_at` datetime DEFAULT NULL,
  `resuelto_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `soporte_ticket_eventos`
--

CREATE TABLE `soporte_ticket_eventos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `ticket_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `tipo` enum('creacion','comentario','estado','asignacion','interno') NOT NULL DEFAULT 'comentario',
  `mensaje` text NOT NULL,
  `estado_anterior` varchar(40) DEFAULT NULL,
  `estado_nuevo` varchar(40) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `sucursales`
--

CREATE TABLE `sucursales` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `codigo` varchar(50) DEFAULT NULL,
  `telefono` varchar(40) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `ciudad_id` bigint(20) UNSIGNED DEFAULT NULL,
  `activa` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `sucursales` (`id`, `empresa_id`, `nombre`, `codigo`, `telefono`, `direccion`, `ciudad_id`, `activa`, `created_at`, `updated_at`) VALUES
(1, 1, 'Principal', '001', '3254929', 'calle 6 34 5', 1049, 1, '2026-04-03 22:31:59', '2026-04-03 22:31:59'),
(2, 1, 'Bogota', '002', '3457689', 'AV 109 22 105', 172, 1, '2026-04-03 22:33:38', '2026-04-03 22:39:24'),
(3, 3, 'Sucursal Demo Principal', 'DEMO-01', '3000000000', 'Punto principal demo', NULL, 1, '2026-04-22 14:09:51', '2026-04-22 14:09:51');

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

--
-- Estructura de tabla para la tabla `suscripciones`
--

CREATE TABLE `suscripciones` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `fecha_inicio` date NOT NULL,
  `fecha_vencimiento` date NOT NULL,
  `estado` enum('activa','vencida','cancelada','morosa') NOT NULL DEFAULT 'activa',
  `trial` tinyint(1) NOT NULL DEFAULT 0,
  `auto_renovacion` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `suscripciones` (`id`, `empresa_id`, `plan_id`, `fecha_inicio`, `fecha_vencimiento`, `estado`, `trial`, `auto_renovacion`, `created_at`, `updated_at`) VALUES
(1, 1, 1, '2026-04-03', '2026-06-01', 'activa', 0, 1, '2026-04-03 11:18:35', '2026-04-25 01:14:47'),
(2, 2, 2, '2026-04-03', '2026-05-01', 'morosa', 0, 1, '2026-04-03 11:51:42', '2026-05-05 10:00:02');

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

--
-- Estructura de tabla para la tabla `traspasos_caja`
--

CREATE TABLE `traspasos_caja` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `apertura_origen_id` bigint(20) UNSIGNED NOT NULL,
  `apertura_destino_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_origen_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_destino_id` bigint(20) UNSIGNED NOT NULL,
  `monto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('pendiente','aprobado','rechazado') NOT NULL DEFAULT 'pendiente',
  `concepto` varchar(160) NOT NULL,
  `observacion` text DEFAULT NULL,
  `respondido_por_id` bigint(20) UNSIGNED DEFAULT NULL,
  `respondido_at` datetime DEFAULT NULL,
  `observacion_respuesta` text DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estructura de tabla para la tabla `unidades_medida`
--

CREATE TABLE `unidades_medida` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `abreviatura` varchar(20) NOT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `unidades_medida` (`id`, `empresa_id`, `nombre`, `abreviatura`, `activo`, `created_at`, `updated_at`) VALUES
(1, 2, 'Unidad', 'UND', 1, '2026-04-03 21:16:46', '2026-04-03 21:16:46'),
(2, 2, 'Kilogramos', 'KG', 1, '2026-04-03 21:17:06', '2026-04-03 21:17:06'),
(3, 1, 'unidad', 'UND', 1, '2026-04-03 22:05:10', '2026-04-03 22:05:10');

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

--
-- Estructura de tabla para la tabla `usuarios`
--

CREATE TABLE `usuarios` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED DEFAULT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `rol_id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `email` varchar(180) NOT NULL,
  `password` varchar(255) NOT NULL,
  `telefono` varchar(40) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `ultimo_login` datetime DEFAULT NULL,
  `activo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `usuarios` (`id`, `empresa_id`, `sucursal_id`, `rol_id`, `nombre`, `email`, `password`, `telefono`, `foto`, `ultimo_login`, `activo`, `created_at`, `updated_at`) VALUES
(1, NULL, NULL, 1, 'Super Admin', 'admin@veltrix.com', '$2y$10$tkGlumxZ2QYyPL1qjmCU3OXQRQV4Xq0CJO8Z1wLlbWyroq5N1ggKi', NULL, NULL, NULL, 1, '2026-04-01 09:44:36', NULL),
(8, 1, 2, 2, 'Luisa', 'luisaconcha93@gmail.com', '$2y$12$NjGA1a8HWFxelx0LRaIOkO0EOKRk0uvLwbwMmIbutIzqMHZ5Pj9sO', NULL, NULL, '2026-05-02 17:20:59', 1, '2026-04-03 11:18:35', '2026-05-02 17:20:59'),
(9, NULL, NULL, 1, 'D. Rios', 'd.rios@hunolabs.com', '$2y$12$rvBhnJsiaM.9DB8/OGHTLeM5f45FxvKU9rouHVRQ9rDl1bOwXZ1Ua', NULL, NULL, '2026-04-28 14:56:24', 1, '2026-04-03 11:51:42', '2026-04-28 14:56:24'),
(10, 1, 2, 4, 'Daniel Amaya', 'danielamaya774@gmail.com', '$2y$10$DSeq0imjB8ZmG03eF1jd9uzkguZt6ynkYXaCZHC6sKwvDUdmKrRDi', NULL, NULL, NULL, 1, '2026-04-03 22:34:57', NULL),
(11, 1, 2, 5, 'Pepito Perez', 'pepitoperez@gmail.com', '$2y$10$iZ6iZWl5wEFz464QKcouw.Rct0GI1JYlGUjBNHCipgsk6H/8PKaeG', NULL, NULL, NULL, 1, '2026-04-03 22:36:23', NULL),
(12, 1, 1, 4, 'Perencejita Lopez', 'perencejita@gmail.com', '$2y$10$rreaUZCn2rdfhmz5TAj6seOW7V/bsnPPLXEpnYztV9Q6Tg6ue2YFS', NULL, NULL, NULL, 1, '2026-04-03 22:37:15', NULL),
(13, 3, 3, 30, 'Admin Demo', 'admin.demo@veltrix.local', '$2y$12$mRWicEa6sO.C4.y.jIr2G.wkXCUuT6auIy5oc2bn4Iy7aUIrB4RzK', NULL, NULL, '2026-04-24 00:04:41', 1, '2026-04-22 14:09:52', '2026-04-24 00:04:41'),
(14, 3, 3, 4, 'Cajero Demo', 'cajero.demo@veltrix.local', '$2y$12$mRWicEa6sO.C4.y.jIr2G.wkXCUuT6auIy5oc2bn4Iy7aUIrB4RzK', NULL, NULL, '2026-04-22 15:06:00', 1, '2026-04-22 14:09:52', '2026-04-22 15:12:12'),
(15, 3, 3, 31, 'Bodega Demo', 'bodega.demo@veltrix.local', '$2y$12$mRWicEa6sO.C4.y.jIr2G.wkXCUuT6auIy5oc2bn4Iy7aUIrB4RzK', NULL, NULL, NULL, 1, '2026-04-22 14:09:52', '2026-04-22 15:12:12');

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

--
-- Estructura de tabla para la tabla `usuario_empresa`
--

CREATE TABLE `usuario_empresa` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `es_principal` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `usuario_empresa` (`id`, `usuario_id`, `empresa_id`, `es_principal`, `created_at`) VALUES
(1, 8, 1, 1, '2026-04-03 11:18:35'),
(2, 9, 2, 1, '2026-04-03 11:51:42'),
(3, 13, 3, 1, '2026-04-22 15:12:12'),
(4, 14, 3, 1, '2026-04-22 15:12:12'),
(5, 15, 3, 1, '2026-04-22 15:12:12'),
(6, 9, 1, 1, '2026-04-23 16:19:37');

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

--
-- Estructura de tabla para la tabla `ventas`
--

CREATE TABLE `ventas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `sucursal_id` bigint(20) UNSIGNED DEFAULT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `cliente_id` bigint(20) UNSIGNED DEFAULT NULL,
  `apertura_caja_id` bigint(20) UNSIGNED DEFAULT NULL,
  `subtotal` decimal(12,2) NOT NULL DEFAULT 0.00,
  `descuento` decimal(12,2) NOT NULL DEFAULT 0.00,
  `impuestos` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total` decimal(12,2) NOT NULL DEFAULT 0.00,
  `estado` enum('pagada','pendiente','anulada') NOT NULL DEFAULT 'pagada',
  `fecha` datetime NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `ventas` (`id`, `empresa_id`, `sucursal_id`, `usuario_id`, `cliente_id`, `apertura_caja_id`, `subtotal`, `descuento`, `impuestos`, `total`, `estado`, `fecha`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 8, NULL, 1, 92000.00, 0.00, 0.00, 92000.00, 'pagada', '2026-04-03 22:43:59', '2026-04-03 22:43:59', NULL),
(2, 1, 2, 8, NULL, 1, 225000.00, 20000.00, 0.00, 205000.00, 'pagada', '2026-04-03 22:47:53', '2026-04-03 22:47:53', NULL),
(3, 1, 2, 8, NULL, 1, 675000.00, 75000.00, 0.00, 600000.00, 'pagada', '2026-04-03 22:56:55', '2026-04-03 22:56:55', NULL),
(4, 1, 2, 8, NULL, 1, 25000.00, 3750.00, 4037.50, 25287.50, 'pagada', '2026-04-04 11:20:39', '2026-04-04 11:20:39', '2026-04-04 11:20:39'),
(5, 1, 2, 8, NULL, 1, 85000.00, 1150.00, 15931.50, 99781.50, 'pagada', '2026-04-04 21:12:42', '2026-04-04 21:12:42', '2026-04-04 21:12:42'),
(6, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-04 21:22:45', '2026-04-04 21:22:45', '2026-04-04 21:22:45'),
(9, 1, 2, 8, NULL, 1, 60000.00, 400.00, 11324.00, 70924.00, 'pagada', '2026-04-05 13:56:13', '2026-04-05 13:56:13', '2026-04-05 13:56:13'),
(10, 1, 2, 8, NULL, 1, 82000.00, 0.00, 15580.00, 97580.00, 'pagada', '2026-04-08 13:18:12', '2026-04-08 13:18:12', '2026-04-08 13:18:12'),
(11, 1, 2, 8, NULL, 1, 122000.00, 0.00, 23180.00, 145180.00, 'pagada', '2026-04-08 13:22:56', '2026-04-08 13:22:56', '2026-04-08 13:22:56'),
(12, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-08 21:07:29', '2026-04-08 21:07:29', '2026-04-08 21:07:29'),
(13, 1, 2, 8, 1, 1, 70000.00, 0.00, 13300.00, 83300.00, 'pagada', '2026-04-08 21:27:52', '2026-04-08 21:27:52', '2026-04-08 21:27:52'),
(14, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-09 08:24:08', '2026-04-09 08:24:08', '2026-04-09 08:24:08'),
(16, 1, 2, 8, 1, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-09 11:22:05', '2026-04-09 11:22:05', '2026-04-09 11:22:05'),
(17, 1, 2, 8, NULL, 1, 64000.00, 0.00, 12160.00, 76160.00, 'pagada', '2026-04-09 14:09:25', '2026-04-09 14:09:25', '2026-04-09 14:09:25'),
(18, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-10 13:10:27', '2026-04-10 13:10:27', '2026-04-10 13:10:27'),
(19, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-21 19:04:07', '2026-04-21 19:04:07', '2026-04-21 19:04:07'),
(20, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'anulada', '2026-04-21 19:48:46', '2026-04-21 19:48:46', '2026-04-21 19:48:46'),
(21, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-21 19:53:48', '2026-04-21 19:53:48', '2026-04-21 19:53:48'),
(22, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-21 20:04:36', '2026-04-21 20:04:36', '2026-04-21 20:04:36'),
(23, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-21 21:09:10', '2026-04-21 21:09:10', '2026-04-21 21:09:10'),
(24, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-24 00:05:32', '2026-04-24 00:05:32', '2026-04-24 00:05:32'),
(25, 1, 2, 8, NULL, 1, 50000.00, 0.00, 9500.00, 59500.00, 'pagada', '2026-04-24 00:05:52', '2026-04-24 00:05:52', '2026-04-24 00:05:52'),
(26, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-24 14:39:07', '2026-04-24 14:39:07', '2026-04-24 14:39:07'),
(27, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-24 19:08:10', '2026-04-24 19:08:10', '2026-04-24 19:08:10'),
(28, 1, 2, 8, NULL, 1, 32000.00, 0.00, 6080.00, 38080.00, 'pagada', '2026-04-24 19:08:37', '2026-04-24 19:08:37', '2026-04-24 19:08:37'),
(31, 1, 2, 8, NULL, 1, 90000.00, 0.00, 17100.00, 107100.00, 'pagada', '2026-04-24 19:23:58', '2026-04-24 19:23:58', '2026-04-24 19:23:58'),
(32, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-25 00:18:59', '2026-04-25 00:18:59', '2026-04-25 00:18:59'),
(33, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-25 00:23:37', '2026-04-25 00:23:37', '2026-04-25 00:23:37'),
(34, 1, 2, 8, NULL, 1, 90000.00, 0.00, 17100.00, 107100.00, 'pagada', '2026-04-25 00:26:32', '2026-04-25 00:26:32', '2026-04-25 00:26:32'),
(35, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-25 00:27:10', '2026-04-25 00:27:10', '2026-04-25 00:27:10'),
(36, 1, 2, 8, NULL, 1, 25000.00, 0.00, 4750.00, 29750.00, 'pagada', '2026-04-25 01:15:49', '2026-04-25 01:15:49', '2026-04-25 01:15:49'),
(37, 1, 2, 8, NULL, 1, 50000.00, 0.00, 9500.00, 59500.00, 'pagada', '2026-04-25 01:30:59', '2026-04-25 01:30:59', '2026-04-25 01:30:59');

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

--
-- Estructura de tabla para la tabla `venta_detalles`
--

CREATE TABLE `venta_detalles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `venta_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `producto_id` bigint(20) UNSIGNED NOT NULL,
  `cantidad` decimal(12,2) NOT NULL,
  `precio_unitario` decimal(12,2) NOT NULL,
  `impuesto` decimal(12,2) NOT NULL DEFAULT 0.00,
  `descuento` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_linea` decimal(12,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `venta_detalles` (`id`, `venta_id`, `empresa_id`, `producto_id`, `cantidad`, `precio_unitario`, `impuesto`, `descuento`, `total_linea`) VALUES
(1, 1, 1, 3, 1.00, 32000.00, 0.00, 0.00, 32000.00),
(2, 1, 1, 5, 1.00, 60000.00, 0.00, 0.00, 60000.00),
(3, 2, 1, 2, 3.00, 25000.00, 0.00, 0.00, 75000.00),
(4, 2, 1, 5, 1.00, 60000.00, 0.00, 0.00, 60000.00),
(5, 2, 1, 1, 2.00, 45000.00, 0.00, 0.00, 90000.00),
(6, 3, 1, 4, 27.00, 25000.00, 0.00, 0.00, 675000.00),
(7, 4, 1, 4, 1.00, 25000.00, 4037.50, 3750.00, 25287.50),
(8, 5, 1, 2, 1.00, 25000.00, 4607.50, 750.00, 28857.50),
(9, 5, 1, 5, 1.00, 60000.00, 11324.00, 400.00, 70924.00),
(10, 6, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(13, 9, 1, 5, 1.00, 60000.00, 11324.00, 400.00, 70924.00),
(14, 10, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(15, 10, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(16, 10, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(17, 11, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(18, 11, 1, 6, 1.00, 90000.00, 17100.00, 0.00, 107100.00),
(19, 12, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(20, 13, 1, 1, 1.00, 45000.00, 8550.00, 0.00, 53550.00),
(21, 13, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(22, 14, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(24, 16, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(25, 17, 1, 3, 2.00, 32000.00, 12160.00, 0.00, 76160.00),
(26, 18, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(27, 19, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(28, 20, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(29, 21, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(30, 22, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(31, 23, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(32, 24, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(33, 25, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(34, 25, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(35, 26, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(36, 27, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(37, 28, 1, 3, 1.00, 32000.00, 6080.00, 0.00, 38080.00),
(40, 31, 1, 6, 1.00, 90000.00, 17100.00, 0.00, 107100.00),
(41, 32, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(42, 33, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(43, 34, 1, 6, 1.00, 90000.00, 17100.00, 0.00, 107100.00),
(44, 35, 1, 2, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(45, 36, 1, 4, 1.00, 25000.00, 4750.00, 0.00, 29750.00),
(46, 37, 1, 2, 2.00, 25000.00, 9500.00, 0.00, 59500.00);

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

--
-- Estructura de tabla para la tabla `venta_pagos`
--

CREATE TABLE `venta_pagos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `venta_id` bigint(20) UNSIGNED NOT NULL,
  `empresa_id` bigint(20) UNSIGNED NOT NULL,
  `metodo_pago` varchar(50) NOT NULL,
  `monto` decimal(12,2) NOT NULL,
  `referencia` varchar(120) DEFAULT NULL,
  `created_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `venta_pagos` (`id`, `venta_id`, `empresa_id`, `metodo_pago`, `monto`, `referencia`, `created_at`) VALUES
(1, 1, 1, 'tarjeta', 92000.00, NULL, '2026-04-03 22:43:59'),
(2, 2, 1, 'efectivo', 205000.00, NULL, '2026-04-03 22:47:53'),
(3, 3, 1, 'tarjeta', 600000.00, NULL, '2026-04-03 22:56:56'),
(4, 4, 1, 'efectivo', 25287.50, NULL, '2026-04-04 11:20:39'),
(5, 5, 1, 'efectivo', 99781.50, NULL, '2026-04-04 21:12:42'),
(6, 6, 1, 'efectivo', 29750.00, NULL, '2026-04-04 21:22:45'),
(7, 9, 1, 'efectivo', 70924.00, NULL, '2026-04-05 13:56:14'),
(8, 10, 1, 'efectivo', 97580.00, NULL, '2026-04-08 13:18:12'),
(9, 11, 1, 'efectivo', 145180.00, NULL, '2026-04-08 13:22:56'),
(10, 12, 1, 'efectivo', 29750.00, NULL, '2026-04-08 21:07:29'),
(11, 13, 1, 'efectivo', 83300.00, NULL, '2026-04-08 21:27:52'),
(12, 14, 1, 'efectivo', 38080.00, NULL, '2026-04-09 08:24:08'),
(14, 16, 1, 'efectivo', 38080.00, NULL, '2026-04-09 11:22:05'),
(15, 17, 1, 'efectivo', 76160.00, NULL, '2026-04-09 14:09:26'),
(16, 18, 1, 'bold_button', 38080.00, 'e23432', '2026-04-10 13:10:27'),
(17, 19, 1, 'efectivo', 29750.00, NULL, '2026-04-21 19:04:07'),
(18, 20, 1, 'efectivo', 29750.00, NULL, '2026-04-21 19:48:46'),
(19, 21, 1, 'efectivo', 38080.00, NULL, '2026-04-21 19:53:48'),
(20, 22, 1, 'efectivo', 38080.00, NULL, '2026-04-21 20:04:36'),
(21, 23, 1, 'efectivo', 38080.00, NULL, '2026-04-21 21:09:10'),
(22, 24, 1, 'bcdaniel', 29750.00, NULL, NULL),
(23, 25, 1, 'bcdaniel', 59500.00, NULL, NULL),
(24, 26, 1, 'efectivo', 29750.00, NULL, NULL),
(25, 27, 1, 'efectivo', 38080.00, NULL, NULL),
(26, 28, 1, 'nequi', 38080.00, NULL, NULL),
(29, 31, 1, 'efectivo', 107100.00, NULL, NULL),
(30, 32, 1, 'efectivo', 29750.00, NULL, NULL),
(31, 33, 1, 'efectivo', 29750.00, NULL, NULL),
(32, 34, 1, 'efectivo', 107100.00, NULL, NULL),
(33, 35, 1, 'transferencia', 29750.00, NULL, NULL),
(34, 36, 1, 'transferencia', 29750.00, NULL, NULL),
(35, 37, 1, 'nequi', 59500.00, NULL, NULL);

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

--
-- Estructura de tabla para la tabla `whatsapp_meta_templates`
--

CREATE TABLE `whatsapp_meta_templates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nombre` varchar(120) NOT NULL,
  `idioma` varchar(10) NOT NULL DEFAULT 'es_CO',
  `categoria` enum('UTILITY','MARKETING','AUTHENTICATION') NOT NULL DEFAULT 'UTILITY',
  `uso` varchar(80) NOT NULL DEFAULT 'libre',
  `encabezado_texto` varchar(120) DEFAULT NULL,
  `cuerpo_texto` text NOT NULL,
  `pie_texto` varchar(120) DEFAULT NULL,
  `boton_texto` varchar(30) DEFAULT NULL,
  `boton_url` varchar(255) DEFAULT NULL,
  `ejemplos_variables` text DEFAULT NULL,
  `meta_template_id` varchar(120) DEFAULT NULL,
  `meta_estado` enum('pendiente','aprobada','rechazada','error') NOT NULL DEFAULT 'pendiente',
  `meta_estado_detalle` varchar(255) DEFAULT NULL,
  `meta_last_sync_at` datetime DEFAULT NULL,
  `meta_response_json` longtext DEFAULT NULL,
  `creado_por_usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `whatsapp_meta_templates` (`id`, `nombre`, `idioma`, `categoria`, `uso`, `encabezado_texto`, `cuerpo_texto`, `pie_texto`, `boton_texto`, `boton_url`, `ejemplos_variables`, `meta_template_id`, `meta_estado`, `meta_estado_detalle`, `meta_last_sync_at`, `meta_response_json`, `creado_por_usuario_id`, `created_at`, `updated_at`) VALUES
(1, 'aviso_3_dias', 'es_CO', 'UTILITY', 'previo_3_dias', '¡Atención,  {{1}}!', 'Tu suscripción de {{1}} está por vencer.\n\n📅 Pago oportuno: {{2}}\n⏳ Fecha de suspensión: {{3}}\n💰 Valor a pagar: {{4}}\n\nRealiza tu pago aquí ⬇️', NULL, 'Pagar Ahora!', 'https://checkout.wompi.co/p/{{1}}', 'Daniel Fernando\nAbril\n14 de abril de 2026\n15 de abril de 2026\n$58.000 COP', '1508241490897174', 'aprobada', 'NONE', '2026-04-16 20:03:56', '{\"id\":\"1508241490897174\",\"name\":\"aviso_3_dias\",\"status\":\"APPROVED\",\"language\":\"es_CO\",\"category\":\"UTILITY\",\"rejected_reason\":\"NONE\",\"components\":[{\"type\":\"HEADER\",\"format\":\"TEXT\",\"text\":\"¡Atención,  {{1}}!\",\"example\":{\"header_text\":[\"Daniel Fernando\"]}},{\"type\":\"BODY\",\"text\":\"Tu suscripción de {{1}} está por vencer.\\n\\n📅 Pago oportuno: {{2}}\\n⏳ Fecha de suspensión: {{3}}\\n💰 Valor a pagar: {{4}}\\n\\nRealiza tu pago aquí ⬇️\",\"example\":{\"body_text\":[[\"Abril\",\"14 de abril de 2026\",\"15 de abril de 2026\",\"$58.000 COP\"]]}},{\"type\":\"BUTTONS\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Pagar Ahora!\",\"url\":\"https://checkout.wompi.co/p/{{1}}\",\"example\":[\"https://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=29900000&reference=VXREN-299&signature%3Aintegrity=f0ded925bcf5906348054eec6771f287a2001735f33dd8a9fe6982efc6c1b6d7&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin\"]}]}]}', 1, '2026-04-15 16:34:47', '2026-04-16 20:03:56'),
(2, 'aviso_10_dias', 'es', 'UTILITY', 'previo_10_dias', '¡Hola, {{1}}', 'Recuerda que en Veltrix, tu suscripción se paga por adelantado. Realiza el pago de {{1}} para seguir disfrutando de tu suscripción, sin interrupciones.\n\n📅 Fecha de pago oportuno: {{2}}\n⏳ Fecha de suspensión: {{3}}\n💰 Total a pagar: {{4}}\n\nHaz tu pago fácil y rápido aquí ⬇️', NULL, 'Pagar Ahora!', 'https://checkout.wompi.co/p/{{1}}', 'Daniel Fernando\nAbril\n15 de abril de 2026\n17 de abril de 2026\n$48.500 COP', '1946488239564915', 'aprobada', 'NONE', '2026-04-16 20:03:56', '{\"id\":\"1946488239564915\",\"name\":\"aviso_10_dias\",\"status\":\"APPROVED\",\"language\":\"es\",\"category\":\"UTILITY\",\"rejected_reason\":\"NONE\",\"components\":[{\"type\":\"HEADER\",\"format\":\"TEXT\",\"text\":\"¡Hola, {{1}}\",\"example\":{\"header_text\":[\"Daniel Fernando\"]}},{\"type\":\"BODY\",\"text\":\"Recuerda que en Veltrix, tu suscripción se paga por adelantado. Realiza el pago de {{1}} para seguir disfrutando de tu suscripción, sin interrupciones.\\n\\n📅 Fecha de pago oportuno: {{2}}\\n⏳ Fecha de suspensión: {{3}}\\n💰 Total a pagar: {{4}}\\n\\nHaz tu pago fácil y rápido aquí ⬇️\",\"example\":{\"body_text\":[[\"Abril\",\"15 de abril de 2026\",\"17 de abril de 2026\",\"$48.500 COP\"]]}},{\"type\":\"BUTTONS\",\"buttons\":[{\"type\":\"URL\",\"text\":\"Pagar Ahora!\",\"url\":\"https://checkout.wompi.co/p/{{1}}\",\"example\":[\"https://checkout.wompi.co/p/?public-key=pub_test_wIQUESQk5YWMaBFh0XXd0dAqaKG1yxbn&currency=COP&amount-in-cents=14900000&reference=VXREN-149&signature%3Aintegrity=67c1d1f7b2c1fa2c3c5fc2e4376988badf8fa7f52823d2de2f007ae447fc2195&redirect-url=https%3A%2F%2F1178-38-19-82-84.ngrok-free.app%2Fveltrix%2Fpublic%2Flogin\"]}]}]}', 1, '2026-04-15 16:34:47', '2026-04-16 20:03:56'),
(3, 'bienvenida_chatgpt', 'es_CO', 'MARKETING', 'libre', NULL, '¡Hola {{1}}! 👋\n\nBienvenido a Huno Labs 🤖. Soy Dani. Estoy aquí para ayudarte con cualquier duda, solicitud o servicio que necesites.\n\n¿Te gustaría empezar ahora?', NULL, NULL, NULL, 'nombre del cliente', '671728699078664', 'aprobada', 'NONE', '2026-04-16 20:03:56', '{\"id\":\"671728699078664\",\"name\":\"bienvenida_chatgpt\",\"status\":\"APPROVED\",\"language\":\"es_CO\",\"category\":\"MARKETING\",\"rejected_reason\":\"NONE\",\"components\":[{\"type\":\"BODY\",\"text\":\"¡Hola {{1}}! 👋\\n\\nBienvenido a Huno Labs 🤖. Soy Dani. Estoy aquí para ayudarte con cualquier duda, solicitud o servicio que necesites.\\n\\n¿Te gustaría empezar ahora?\",\"example\":{\"body_text\":[[\"nombre del cliente\"]]}}]}', 1, '2026-04-15 16:34:47', '2026-04-16 20:03:56'),
(4, 'hello_world', 'en_US', 'UTILITY', 'libre', 'Hello World', 'Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta. Thank you for taking the time to test with us.', 'WhatsApp Business Platform sample message', NULL, NULL, NULL, '1192887242582402', 'aprobada', 'NONE', '2026-04-16 20:03:56', '{\"id\":\"1192887242582402\",\"name\":\"hello_world\",\"status\":\"APPROVED\",\"language\":\"en_US\",\"category\":\"UTILITY\",\"rejected_reason\":\"NONE\",\"components\":[{\"type\":\"HEADER\",\"format\":\"TEXT\",\"text\":\"Hello World\"},{\"type\":\"BODY\",\"text\":\"Welcome and congratulations!! This message demonstrates your ability to send a WhatsApp message notification from the Cloud API, hosted by Meta. Thank you for taking the time to test with us.\"},{\"type\":\"FOOTER\",\"text\":\"WhatsApp Business Platform sample message\"}]}', 1, '2026-04-15 16:34:47', '2026-04-16 20:03:56');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `ai_help_messages`
--
ALTER TABLE `ai_help_messages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_ai_help_messages_empresa_usuario` (`empresa_id`,`usuario_id`,`id`),
  ADD KEY `idx_ai_help_messages_created_at` (`created_at`),
  ADD KEY `fk_ai_help_messages_usuario` (`usuario_id`),
  ADD KEY `idx_ai_help_messages_session` (`session_id`,`id`);

--
-- Indices de la tabla `ai_help_sessions`
--
ALTER TABLE `ai_help_sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_ai_help_sessions_empresa_usuario_estado` (`empresa_id`,`usuario_id`,`estado`,`id`),
  ADD KEY `idx_ai_help_sessions_closed_at` (`closed_at`),
  ADD KEY `fk_ai_help_sessions_usuario` (`usuario_id`);

--
-- Indices de la tabla `ajustes_inventario`
--
ALTER TABLE `ajustes_inventario`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_ajustes_producto` (`producto_id`),
  ADD KEY `fk_ajustes_usuario` (`usuario_id`),
  ADD KEY `idx_ajustes_empresa_estado` (`empresa_id`,`estado`),
  ADD KEY `idx_ajustes_empresa_sucursal` (`empresa_id`,`sucursal_id`),
  ADD KEY `idx_ajustes_variante` (`empresa_id`,`variante_id`),
  ADD KEY `fk_ajustes_variante` (`variante_id`);

--
-- Indices de la tabla `aperturas_caja`
--
ALTER TABLE `aperturas_caja`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_aperturas_empresa_estado` (`empresa_id`,`estado`),
  ADD KEY `fk_aperturas_caja` (`caja_id`),
  ADD KEY `fk_aperturas_usuario` (`usuario_id`);

--
-- Indices de la tabla `avisos_cobro_suscripcion`
--
ALTER TABLE `avisos_cobro_suscripcion`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_aviso_cobro_dia_canal` (`suscripcion_id`,`tipo`,`fecha_referencia`,`canal`),
  ADD KEY `idx_aviso_cobro_empresa_fecha` (`empresa_id`,`fecha_referencia`),
  ADD KEY `idx_aviso_cobro_estado_retry` (`estado`,`proximo_intento_at`),
  ADD KEY `idx_aviso_cobro_intentos` (`intentos`,`max_intentos`);

--
-- Indices de la tabla `cajas`
--
ALTER TABLE `cajas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cajas_empresa` (`empresa_id`),
  ADD KEY `fk_cajas_sucursal` (`sucursal_id`);

--
-- Indices de la tabla `categorias`
--
ALTER TABLE `categorias`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_categorias_empresa` (`empresa_id`);

--
-- Indices de la tabla `cierres_caja`
--
ALTER TABLE `cierres_caja`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_cierres_empresa` (`empresa_id`),
  ADD KEY `fk_cierres_apertura` (`apertura_id`),
  ADD KEY `fk_cierres_usuario` (`usuario_id`);

--
-- Indices de la tabla `ciudades`
--
ALTER TABLE `ciudades`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uq_ciudades_pais_codigo_dane` (`pais_id`,`codigo_dane`),
  ADD KEY `idx_ciudades_pais_departamento_nombre` (`pais_id`,`departamento`,`nombre`);

--
-- Indices de la tabla `clientes`
--
ALTER TABLE `clientes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_clientes_empresa` (`empresa_id`);

--
-- Indices de la tabla `compras`
--
ALTER TABLE `compras`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_compras_proveedor` (`proveedor_id`),
  ADD KEY `fk_compras_usuario` (`usuario_id`),
  ADD KEY `idx_compras_orden` (`empresa_id`,`orden_compra_id`);

--
-- Indices de la tabla `compra_detalles`
--
ALTER TABLE `compra_detalles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_compra_detalle_compra` (`compra_id`),
  ADD KEY `fk_compra_detalle_empresa` (`empresa_id`),
  ADD KEY `fk_compra_detalle_producto` (`producto_id`),
  ADD KEY `fk_compra_detalle_variante` (`variante_id`);

--
-- Indices de la tabla `configuracion_empresa`
--
ALTER TABLE `configuracion_empresa`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_config_empresa` (`empresa_id`,`clave`);

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

--
-- Indices de la tabla `devoluciones`
--
ALTER TABLE `devoluciones`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_devoluciones_empresa` (`empresa_id`),
  ADD KEY `fk_devoluciones_venta` (`venta_id`),
  ADD KEY `fk_devoluciones_usuario` (`usuario_id`);

--
-- Indices de la tabla `empresas`
--
ALTER TABLE `empresas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_empresas_slug` (`slug`),
  ADD KEY `fk_empresas_pais` (`pais_id`),
  ADD KEY `fk_empresas_ciudad` (`ciudad_id`);

--
-- Indices de la tabla `facturas`
--
ALTER TABLE `facturas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_factura_empresa_numero` (`empresa_id`,`numero`),
  ADD KEY `fk_facturas_venta` (`venta_id`),
  ADD KEY `fk_facturas_cliente` (`cliente_id`),
  ADD KEY `idx_facturas_sucursal` (`sucursal_id`),
  ADD KEY `idx_facturas_referencia` (`empresa_id`,`documento_referencia_id`);

--
-- Indices de la tabla `factura_detalles`
--
ALTER TABLE `factura_detalles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_factura_detalles_factura` (`factura_id`),
  ADD KEY `fk_factura_detalles_producto` (`producto_id`);

--
-- Indices de la tabla `impresoras`
--
ALTER TABLE `impresoras`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_impresoras_empresa` (`empresa_id`),
  ADD KEY `fk_impresoras_sucursal` (`sucursal_id`);

--
-- Indices de la tabla `impuestos`
--
ALTER TABLE `impuestos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_impuestos_empresa` (`empresa_id`);

--
-- Indices de la tabla `inventario`
--
ALTER TABLE `inventario`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_inventario` (`empresa_id`,`sucursal_id`,`producto_id`),
  ADD KEY `fk_inventario_sucursal` (`sucursal_id`),
  ADD KEY `fk_inventario_producto` (`producto_id`);

--
-- Indices de la tabla `logs_actividad`
--
ALTER TABLE `logs_actividad`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_logs_empresa_fecha` (`empresa_id`,`created_at`),
  ADD KEY `fk_logs_usuario` (`usuario_id`);

--
-- Indices de la tabla `marcas`
--
ALTER TABLE `marcas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_marcas_empresa` (`empresa_id`);

--
-- Indices de la tabla `metodos_pago`
--
ALTER TABLE `metodos_pago`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_metodos_pago_empresa` (`empresa_id`);

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

--
-- Indices de la tabla `movimientos_caja`
--
ALTER TABLE `movimientos_caja`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_movimientos_caja_apertura` (`empresa_id`,`apertura_id`),
  ADD KEY `fk_movimientos_caja_apertura` (`apertura_id`),
  ADD KEY `fk_movimientos_caja_usuario` (`usuario_id`);

--
-- Indices de la tabla `movimientos_inventario`
--
ALTER TABLE `movimientos_inventario`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_movimientos_empresa_producto` (`empresa_id`,`producto_id`),
  ADD KEY `fk_movimientos_sucursal` (`sucursal_id`),
  ADD KEY `fk_movimientos_producto` (`producto_id`),
  ADD KEY `idx_movimientos_variante` (`empresa_id`,`variante_id`),
  ADD KEY `fk_movimientos_variante` (`variante_id`);

--
-- Indices de la tabla `notificacion_vistas`
--
ALTER TABLE `notificacion_vistas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_notificacion_vistas_usuario_empresa_key` (`usuario_id`,`empresa_id`,`notification_key`),
  ADD KEY `idx_notificacion_vistas_empresa_usuario` (`empresa_id`,`usuario_id`),
  ADD KEY `idx_notificacion_vistas_leido_at` (`leido_at`);

--
-- Indices de la tabla `numeraciones_documentos`
--
ALTER TABLE `numeraciones_documentos`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_num_doc` (`empresa_id`,`tipo_documento`,`prefijo`,`sucursal_id`),
  ADD KEY `idx_numdoc_empresa` (`empresa_id`),
  ADD KEY `idx_num_doc_sucursal` (`sucursal_id`);

--
-- Indices de la tabla `ordenes_compra`
--
ALTER TABLE `ordenes_compra`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_ordenes_compra_numero` (`empresa_id`,`numero`),
  ADD KEY `idx_ordenes_compra_estado` (`empresa_id`,`estado`),
  ADD KEY `fk_ordenes_compra_sucursal` (`sucursal_id`),
  ADD KEY `fk_ordenes_compra_proveedor` (`proveedor_id`),
  ADD KEY `fk_ordenes_compra_usuario` (`usuario_id`);

--
-- Indices de la tabla `orden_compra_detalles`
--
ALTER TABLE `orden_compra_detalles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_orden_detalle_orden` (`orden_compra_id`,`empresa_id`),
  ADD KEY `fk_orden_detalle_producto` (`producto_id`),
  ADD KEY `idx_orden_detalle_variante` (`empresa_id`,`variante_id`),
  ADD KEY `fk_orden_detalle_variante` (`variante_id`);

--
-- Indices de la tabla `pagos_compra`
--
ALTER TABLE `pagos_compra`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_pagos_compra_compra` (`compra_id`),
  ADD KEY `fk_pagos_compra_empresa` (`empresa_id`);

--
-- Indices de la tabla `pagos_suscripcion`
--
ALTER TABLE `pagos_suscripcion`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_pagos_suscripcion_empresa` (`empresa_id`),
  ADD KEY `fk_pagos_suscripcion` (`suscripcion_id`);

--
-- Indices de la tabla `paises`
--
ALTER TABLE `paises`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `codigo_iso2` (`codigo_iso2`),
  ADD UNIQUE KEY `codigo_iso3` (`codigo_iso3`);

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

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

--
-- Indices de la tabla `productos`
--
ALTER TABLE `productos`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_productos_empresa_sku` (`empresa_id`,`sku`),
  ADD KEY `idx_productos_empresa_nombre` (`empresa_id`,`nombre`),
  ADD KEY `idx_productos_codigo_barras` (`codigo_barras`),
  ADD KEY `fk_productos_sucursal` (`sucursal_id`),
  ADD KEY `fk_productos_categoria` (`categoria_id`),
  ADD KEY `fk_productos_marca` (`marca_id`),
  ADD KEY `fk_productos_unidad` (`unidad_medida_id`),
  ADD KEY `idx_productos_proveedor` (`proveedor_id`);

--
-- Indices de la tabla `producto_variantes`
--
ALTER TABLE `producto_variantes`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_producto_variante_nombre` (`empresa_id`,`producto_id`,`nombre`),
  ADD KEY `idx_producto_variantes_producto` (`empresa_id`,`producto_id`),
  ADD KEY `fk_producto_variantes_producto` (`producto_id`);

--
-- Indices de la tabla `proveedores`
--
ALTER TABLE `proveedores`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_proveedores_empresa` (`empresa_id`);

--
-- Indices de la tabla `recepciones_compra`
--
ALTER TABLE `recepciones_compra`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_recepcion_numero` (`empresa_id`,`numero_recepcion`),
  ADD KEY `idx_recepcion_orden` (`empresa_id`,`orden_compra_id`),
  ADD KEY `fk_recepciones_orden` (`orden_compra_id`),
  ADD KEY `fk_recepciones_sucursal` (`sucursal_id`),
  ADD KEY `fk_recepciones_usuario` (`usuario_id`);

--
-- Indices de la tabla `recepcion_compra_detalles`
--
ALTER TABLE `recepcion_compra_detalles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_recepcion_detalle_recepcion` (`recepcion_id`,`empresa_id`),
  ADD KEY `fk_recepcion_detalle_empresa` (`empresa_id`),
  ADD KEY `fk_recepcion_detalle_orden` (`orden_detalle_id`),
  ADD KEY `fk_recepcion_detalle_producto` (`producto_id`),
  ADD KEY `fk_recepcion_detalle_variante` (`variante_id`);

--
-- Indices de la tabla `resoluciones_dian`
--
ALTER TABLE `resoluciones_dian`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_resoluciones_empresa` (`empresa_id`),
  ADD KEY `idx_resoluciones_sucursal` (`sucursal_id`);

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

--
-- Indices de la tabla `rol_permiso`
--
ALTER TABLE `rol_permiso`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_rol_permiso` (`rol_id`,`permiso_id`),
  ADD KEY `fk_rol_permiso_permiso` (`permiso_id`);

--
-- Indices de la tabla `saas_checkout_intents`
--
ALTER TABLE `saas_checkout_intents`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_saas_checkout_reference` (`reference`),
  ADD KEY `idx_saas_checkout_plan` (`plan_id`),
  ADD KEY `idx_saas_checkout_admin_email` (`admin_email`),
  ADD KEY `idx_saas_checkout_status` (`estado`),
  ADD KEY `fk_saas_checkout_empresa` (`empresa_id`),
  ADD KEY `fk_saas_checkout_suscripcion` (`suscripcion_id`);

--
-- Indices de la tabla `soporte_tickets`
--
ALTER TABLE `soporte_tickets`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_soporte_tickets_empresa_estado` (`empresa_id`,`estado`),
  ADD KEY `idx_soporte_tickets_asignado` (`asignado_a_usuario_id`),
  ADD KEY `fk_soporte_tickets_creado_por` (`creado_por_usuario_id`),
  ADD KEY `idx_soporte_sla_primer` (`sla_primera_respuesta_estado`,`primera_respuesta_limite_at`),
  ADD KEY `idx_soporte_sla_resolucion` (`sla_resolucion_estado`,`resolucion_limite_at`),
  ADD KEY `idx_soporte_created_at` (`created_at`);

--
-- Indices de la tabla `soporte_ticket_eventos`
--
ALTER TABLE `soporte_ticket_eventos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_soporte_eventos_ticket` (`ticket_id`,`created_at`),
  ADD KEY `fk_soporte_eventos_usuario` (`usuario_id`);

--
-- Indices de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_sucursales_empresa` (`empresa_id`),
  ADD KEY `fk_sucursales_ciudad` (`ciudad_id`);

--
-- Indices de la tabla `suscripciones`
--
ALTER TABLE `suscripciones`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_suscripciones_empresa` (`empresa_id`),
  ADD KEY `fk_suscripciones_plan` (`plan_id`);

--
-- Indices de la tabla `traspasos_caja`
--
ALTER TABLE `traspasos_caja`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_traspasos_empresa_fecha` (`empresa_id`,`created_at`),
  ADD KEY `fk_traspasos_apertura_origen` (`apertura_origen_id`),
  ADD KEY `fk_traspasos_apertura_destino` (`apertura_destino_id`),
  ADD KEY `fk_traspasos_usuario_origen` (`usuario_origen_id`),
  ADD KEY `fk_traspasos_usuario_destino` (`usuario_destino_id`),
  ADD KEY `idx_traspasos_estado_destino` (`empresa_id`,`estado`,`apertura_destino_id`),
  ADD KEY `fk_traspasos_respondido_por` (`respondido_por_id`);

--
-- Indices de la tabla `unidades_medida`
--
ALTER TABLE `unidades_medida`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_unidades_empresa` (`empresa_id`);

--
-- Indices de la tabla `usuarios`
--
ALTER TABLE `usuarios`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `email` (`email`),
  ADD KEY `idx_usuarios_empresa` (`empresa_id`),
  ADD KEY `idx_usuarios_sucursal` (`sucursal_id`),
  ADD KEY `fk_usuarios_rol` (`rol_id`);

--
-- Indices de la tabla `usuario_empresa`
--
ALTER TABLE `usuario_empresa`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_usuario_empresa` (`usuario_id`,`empresa_id`),
  ADD KEY `fk_usuario_empresa_empresa` (`empresa_id`);

--
-- Indices de la tabla `ventas`
--
ALTER TABLE `ventas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `idx_ventas_empresa_fecha` (`empresa_id`,`fecha`),
  ADD KEY `fk_ventas_sucursal` (`sucursal_id`),
  ADD KEY `fk_ventas_usuario` (`usuario_id`),
  ADD KEY `fk_ventas_cliente` (`cliente_id`),
  ADD KEY `fk_ventas_apertura` (`apertura_caja_id`);

--
-- Indices de la tabla `venta_detalles`
--
ALTER TABLE `venta_detalles`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_venta_detalles_venta` (`venta_id`),
  ADD KEY `fk_venta_detalles_empresa` (`empresa_id`),
  ADD KEY `fk_venta_detalles_producto` (`producto_id`);

--
-- Indices de la tabla `venta_pagos`
--
ALTER TABLE `venta_pagos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fk_venta_pagos_venta` (`venta_id`),
  ADD KEY `fk_venta_pagos_empresa` (`empresa_id`);

--
-- Indices de la tabla `whatsapp_meta_templates`
--
ALTER TABLE `whatsapp_meta_templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `uk_whatsapp_meta_templates_nombre` (`nombre`),
  ADD KEY `idx_whatsapp_meta_templates_estado` (`meta_estado`,`meta_last_sync_at`),
  ADD KEY `idx_whatsapp_meta_templates_uso` (`uso`),
  ADD KEY `fk_whatsapp_meta_templates_usuario` (`creado_por_usuario_id`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `ai_help_messages`
--
ALTER TABLE `ai_help_messages`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `ai_help_sessions`
--
ALTER TABLE `ai_help_sessions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `ajustes_inventario`
--
ALTER TABLE `ajustes_inventario`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `aperturas_caja`
--
ALTER TABLE `aperturas_caja`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `avisos_cobro_suscripcion`
--
ALTER TABLE `avisos_cobro_suscripcion`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

--
-- AUTO_INCREMENT de la tabla `cajas`
--
ALTER TABLE `cajas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `categorias`
--
ALTER TABLE `categorias`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `cierres_caja`
--
ALTER TABLE `cierres_caja`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `ciudades`
--
ALTER TABLE `ciudades`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1146;

--
-- AUTO_INCREMENT de la tabla `clientes`
--
ALTER TABLE `clientes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `compras`
--
ALTER TABLE `compras`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `compra_detalles`
--
ALTER TABLE `compra_detalles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `configuracion_empresa`
--
ALTER TABLE `configuracion_empresa`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=211;

--
-- AUTO_INCREMENT de la tabla `configuracion_global`
--
ALTER TABLE `configuracion_global`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=296;

--
-- AUTO_INCREMENT de la tabla `devoluciones`
--
ALTER TABLE `devoluciones`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `empresas`
--
ALTER TABLE `empresas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `facturas`
--
ALTER TABLE `facturas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;

--
-- AUTO_INCREMENT de la tabla `factura_detalles`
--
ALTER TABLE `factura_detalles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=33;

--
-- AUTO_INCREMENT de la tabla `impresoras`
--
ALTER TABLE `impresoras`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `impuestos`
--
ALTER TABLE `impuestos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `inventario`
--
ALTER TABLE `inventario`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `logs_actividad`
--
ALTER TABLE `logs_actividad`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=319;

--
-- AUTO_INCREMENT de la tabla `marcas`
--
ALTER TABLE `marcas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `metodos_pago`
--
ALTER TABLE `metodos_pago`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT de la tabla `monedas`
--
ALTER TABLE `monedas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT de la tabla `movimientos_caja`
--
ALTER TABLE `movimientos_caja`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT de la tabla `movimientos_inventario`
--
ALTER TABLE `movimientos_inventario`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=51;

--
-- AUTO_INCREMENT de la tabla `notificacion_vistas`
--
ALTER TABLE `notificacion_vistas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `numeraciones_documentos`
--
ALTER TABLE `numeraciones_documentos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `ordenes_compra`
--
ALTER TABLE `ordenes_compra`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `orden_compra_detalles`
--
ALTER TABLE `orden_compra_detalles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `pagos_compra`
--
ALTER TABLE `pagos_compra`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `pagos_suscripcion`
--
ALTER TABLE `pagos_suscripcion`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `paises`
--
ALTER TABLE `paises`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de la tabla `permisos`
--
ALTER TABLE `permisos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=131;

--
-- AUTO_INCREMENT de la tabla `planes`
--
ALTER TABLE `planes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de la tabla `productos`
--
ALTER TABLE `productos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT de la tabla `producto_variantes`
--
ALTER TABLE `producto_variantes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT de la tabla `proveedores`
--
ALTER TABLE `proveedores`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `recepciones_compra`
--
ALTER TABLE `recepciones_compra`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `recepcion_compra_detalles`
--
ALTER TABLE `recepcion_compra_detalles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `resoluciones_dian`
--
ALTER TABLE `resoluciones_dian`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT de la tabla `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=32;

--
-- AUTO_INCREMENT de la tabla `rol_permiso`
--
ALTER TABLE `rol_permiso`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=616;

--
-- AUTO_INCREMENT de la tabla `saas_checkout_intents`
--
ALTER TABLE `saas_checkout_intents`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `soporte_tickets`
--
ALTER TABLE `soporte_tickets`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `soporte_ticket_eventos`
--
ALTER TABLE `soporte_ticket_eventos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `sucursales`
--
ALTER TABLE `sucursales`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `suscripciones`
--
ALTER TABLE `suscripciones`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de la tabla `traspasos_caja`
--
ALTER TABLE `traspasos_caja`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de la tabla `unidades_medida`
--
ALTER TABLE `unidades_medida`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de la tabla `usuarios`
--
ALTER TABLE `usuarios`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

--
-- AUTO_INCREMENT de la tabla `usuario_empresa`
--
ALTER TABLE `usuario_empresa`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT de la tabla `ventas`
--
ALTER TABLE `ventas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=38;

--
-- AUTO_INCREMENT de la tabla `venta_detalles`
--
ALTER TABLE `venta_detalles`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=47;

--
-- AUTO_INCREMENT de la tabla `venta_pagos`
--
ALTER TABLE `venta_pagos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=36;

--
-- AUTO_INCREMENT de la tabla `whatsapp_meta_templates`
--
ALTER TABLE `whatsapp_meta_templates`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Restricciones para tablas volcadas
--

--
-- Filtros para la tabla `ai_help_messages`
--
ALTER TABLE `ai_help_messages`
  ADD CONSTRAINT `fk_ai_help_messages_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_ai_help_messages_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `ai_help_sessions`
--
ALTER TABLE `ai_help_sessions`
  ADD CONSTRAINT `fk_ai_help_sessions_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_ai_help_sessions_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `ajustes_inventario`
--
ALTER TABLE `ajustes_inventario`
  ADD CONSTRAINT `fk_ajustes_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_ajustes_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_ajustes_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_ajustes_variante` FOREIGN KEY (`variante_id`) REFERENCES `producto_variantes` (`id`);

--
-- Filtros para la tabla `aperturas_caja`
--
ALTER TABLE `aperturas_caja`
  ADD CONSTRAINT `fk_aperturas_caja` FOREIGN KEY (`caja_id`) REFERENCES `cajas` (`id`),
  ADD CONSTRAINT `fk_aperturas_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_aperturas_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `avisos_cobro_suscripcion`
--
ALTER TABLE `avisos_cobro_suscripcion`
  ADD CONSTRAINT `fk_aviso_cobro_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_aviso_cobro_suscripcion` FOREIGN KEY (`suscripcion_id`) REFERENCES `suscripciones` (`id`);

--
-- Filtros para la tabla `cajas`
--
ALTER TABLE `cajas`
  ADD CONSTRAINT `fk_cajas_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_cajas_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `categorias`
--
ALTER TABLE `categorias`
  ADD CONSTRAINT `fk_categorias_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `cierres_caja`
--
ALTER TABLE `cierres_caja`
  ADD CONSTRAINT `fk_cierres_apertura` FOREIGN KEY (`apertura_id`) REFERENCES `aperturas_caja` (`id`),
  ADD CONSTRAINT `fk_cierres_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_cierres_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `ciudades`
--
ALTER TABLE `ciudades`
  ADD CONSTRAINT `fk_ciudades_pais` FOREIGN KEY (`pais_id`) REFERENCES `paises` (`id`);

--
-- Filtros para la tabla `clientes`
--
ALTER TABLE `clientes`
  ADD CONSTRAINT `fk_clientes_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `compras`
--
ALTER TABLE `compras`
  ADD CONSTRAINT `fk_compras_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_compras_proveedor` FOREIGN KEY (`proveedor_id`) REFERENCES `proveedores` (`id`),
  ADD CONSTRAINT `fk_compras_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `compra_detalles`
--
ALTER TABLE `compra_detalles`
  ADD CONSTRAINT `fk_compra_detalle_compra` FOREIGN KEY (`compra_id`) REFERENCES `compras` (`id`),
  ADD CONSTRAINT `fk_compra_detalle_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_compra_detalle_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_compra_detalle_variante` FOREIGN KEY (`variante_id`) REFERENCES `producto_variantes` (`id`);

--
-- Filtros para la tabla `configuracion_empresa`
--
ALTER TABLE `configuracion_empresa`
  ADD CONSTRAINT `fk_config_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `devoluciones`
--
ALTER TABLE `devoluciones`
  ADD CONSTRAINT `fk_devoluciones_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_devoluciones_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_devoluciones_venta` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`);

--
-- Filtros para la tabla `empresas`
--
ALTER TABLE `empresas`
  ADD CONSTRAINT `fk_empresas_ciudad` FOREIGN KEY (`ciudad_id`) REFERENCES `ciudades` (`id`),
  ADD CONSTRAINT `fk_empresas_pais` FOREIGN KEY (`pais_id`) REFERENCES `paises` (`id`);

--
-- Filtros para la tabla `facturas`
--
ALTER TABLE `facturas`
  ADD CONSTRAINT `fk_facturas_cliente` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`),
  ADD CONSTRAINT `fk_facturas_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_facturas_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_facturas_venta` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`);

--
-- Filtros para la tabla `factura_detalles`
--
ALTER TABLE `factura_detalles`
  ADD CONSTRAINT `fk_factura_detalles_factura` FOREIGN KEY (`factura_id`) REFERENCES `facturas` (`id`),
  ADD CONSTRAINT `fk_factura_detalles_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`);

--
-- Filtros para la tabla `impresoras`
--
ALTER TABLE `impresoras`
  ADD CONSTRAINT `fk_impresoras_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_impresoras_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `impuestos`
--
ALTER TABLE `impuestos`
  ADD CONSTRAINT `fk_impuestos_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `inventario`
--
ALTER TABLE `inventario`
  ADD CONSTRAINT `fk_inventario_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_inventario_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_inventario_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `logs_actividad`
--
ALTER TABLE `logs_actividad`
  ADD CONSTRAINT `fk_logs_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_logs_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `marcas`
--
ALTER TABLE `marcas`
  ADD CONSTRAINT `fk_marcas_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `metodos_pago`
--
ALTER TABLE `metodos_pago`
  ADD CONSTRAINT `fk_metodos_pago_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `movimientos_caja`
--
ALTER TABLE `movimientos_caja`
  ADD CONSTRAINT `fk_movimientos_caja_apertura` FOREIGN KEY (`apertura_id`) REFERENCES `aperturas_caja` (`id`),
  ADD CONSTRAINT `fk_movimientos_caja_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_movimientos_caja_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `movimientos_inventario`
--
ALTER TABLE `movimientos_inventario`
  ADD CONSTRAINT `fk_movimientos_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_movimientos_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_movimientos_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_movimientos_variante` FOREIGN KEY (`variante_id`) REFERENCES `producto_variantes` (`id`);

--
-- Filtros para la tabla `numeraciones_documentos`
--
ALTER TABLE `numeraciones_documentos`
  ADD CONSTRAINT `fk_numdoc_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_numdoc_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `ordenes_compra`
--
ALTER TABLE `ordenes_compra`
  ADD CONSTRAINT `fk_ordenes_compra_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_ordenes_compra_proveedor` FOREIGN KEY (`proveedor_id`) REFERENCES `proveedores` (`id`),
  ADD CONSTRAINT `fk_ordenes_compra_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_ordenes_compra_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `orden_compra_detalles`
--
ALTER TABLE `orden_compra_detalles`
  ADD CONSTRAINT `fk_orden_detalle_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_orden_detalle_orden` FOREIGN KEY (`orden_compra_id`) REFERENCES `ordenes_compra` (`id`),
  ADD CONSTRAINT `fk_orden_detalle_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_orden_detalle_variante` FOREIGN KEY (`variante_id`) REFERENCES `producto_variantes` (`id`);

--
-- Filtros para la tabla `pagos_compra`
--
ALTER TABLE `pagos_compra`
  ADD CONSTRAINT `fk_pagos_compra_compra` FOREIGN KEY (`compra_id`) REFERENCES `compras` (`id`),
  ADD CONSTRAINT `fk_pagos_compra_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `pagos_suscripcion`
--
ALTER TABLE `pagos_suscripcion`
  ADD CONSTRAINT `fk_pagos_suscripcion` FOREIGN KEY (`suscripcion_id`) REFERENCES `suscripciones` (`id`),
  ADD CONSTRAINT `fk_pagos_suscripcion_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `productos`
--
ALTER TABLE `productos`
  ADD CONSTRAINT `fk_productos_categoria` FOREIGN KEY (`categoria_id`) REFERENCES `categorias` (`id`),
  ADD CONSTRAINT `fk_productos_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_productos_marca` FOREIGN KEY (`marca_id`) REFERENCES `marcas` (`id`),
  ADD CONSTRAINT `fk_productos_proveedor` FOREIGN KEY (`proveedor_id`) REFERENCES `proveedores` (`id`),
  ADD CONSTRAINT `fk_productos_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_productos_unidad` FOREIGN KEY (`unidad_medida_id`) REFERENCES `unidades_medida` (`id`);

--
-- Filtros para la tabla `producto_variantes`
--
ALTER TABLE `producto_variantes`
  ADD CONSTRAINT `fk_producto_variantes_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_producto_variantes_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`);

--
-- Filtros para la tabla `proveedores`
--
ALTER TABLE `proveedores`
  ADD CONSTRAINT `fk_proveedores_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `recepciones_compra`
--
ALTER TABLE `recepciones_compra`
  ADD CONSTRAINT `fk_recepciones_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_recepciones_orden` FOREIGN KEY (`orden_compra_id`) REFERENCES `ordenes_compra` (`id`),
  ADD CONSTRAINT `fk_recepciones_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_recepciones_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `recepcion_compra_detalles`
--
ALTER TABLE `recepcion_compra_detalles`
  ADD CONSTRAINT `fk_recepcion_detalle_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_recepcion_detalle_orden` FOREIGN KEY (`orden_detalle_id`) REFERENCES `orden_compra_detalles` (`id`),
  ADD CONSTRAINT `fk_recepcion_detalle_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_recepcion_detalle_recepcion` FOREIGN KEY (`recepcion_id`) REFERENCES `recepciones_compra` (`id`),
  ADD CONSTRAINT `fk_recepcion_detalle_variante` FOREIGN KEY (`variante_id`) REFERENCES `producto_variantes` (`id`);

--
-- Filtros para la tabla `resoluciones_dian`
--
ALTER TABLE `resoluciones_dian`
  ADD CONSTRAINT `fk_resoluciones_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_resoluciones_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `rol_permiso`
--
ALTER TABLE `rol_permiso`
  ADD CONSTRAINT `fk_rol_permiso_permiso` FOREIGN KEY (`permiso_id`) REFERENCES `permisos` (`id`),
  ADD CONSTRAINT `fk_rol_permiso_rol` FOREIGN KEY (`rol_id`) REFERENCES `roles` (`id`);

--
-- Filtros para la tabla `saas_checkout_intents`
--
ALTER TABLE `saas_checkout_intents`
  ADD CONSTRAINT `fk_saas_checkout_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_saas_checkout_plan` FOREIGN KEY (`plan_id`) REFERENCES `planes` (`id`),
  ADD CONSTRAINT `fk_saas_checkout_suscripcion` FOREIGN KEY (`suscripcion_id`) REFERENCES `suscripciones` (`id`);

--
-- Filtros para la tabla `soporte_tickets`
--
ALTER TABLE `soporte_tickets`
  ADD CONSTRAINT `fk_soporte_tickets_asignado` FOREIGN KEY (`asignado_a_usuario_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_soporte_tickets_creado_por` FOREIGN KEY (`creado_por_usuario_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_soporte_tickets_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `soporte_ticket_eventos`
--
ALTER TABLE `soporte_ticket_eventos`
  ADD CONSTRAINT `fk_soporte_eventos_ticket` FOREIGN KEY (`ticket_id`) REFERENCES `soporte_tickets` (`id`),
  ADD CONSTRAINT `fk_soporte_eventos_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `sucursales`
--
ALTER TABLE `sucursales`
  ADD CONSTRAINT `fk_sucursales_ciudad` FOREIGN KEY (`ciudad_id`) REFERENCES `ciudades` (`id`),
  ADD CONSTRAINT `fk_sucursales_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `suscripciones`
--
ALTER TABLE `suscripciones`
  ADD CONSTRAINT `fk_suscripciones_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_suscripciones_plan` FOREIGN KEY (`plan_id`) REFERENCES `planes` (`id`);

--
-- Filtros para la tabla `traspasos_caja`
--
ALTER TABLE `traspasos_caja`
  ADD CONSTRAINT `fk_traspasos_apertura_destino` FOREIGN KEY (`apertura_destino_id`) REFERENCES `aperturas_caja` (`id`),
  ADD CONSTRAINT `fk_traspasos_apertura_origen` FOREIGN KEY (`apertura_origen_id`) REFERENCES `aperturas_caja` (`id`),
  ADD CONSTRAINT `fk_traspasos_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_traspasos_respondido_por` FOREIGN KEY (`respondido_por_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_traspasos_usuario_destino` FOREIGN KEY (`usuario_destino_id`) REFERENCES `usuarios` (`id`),
  ADD CONSTRAINT `fk_traspasos_usuario_origen` FOREIGN KEY (`usuario_origen_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `unidades_medida`
--
ALTER TABLE `unidades_medida`
  ADD CONSTRAINT `fk_unidades_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`);

--
-- Filtros para la tabla `usuarios`
--
ALTER TABLE `usuarios`
  ADD CONSTRAINT `fk_usuarios_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_usuarios_rol` FOREIGN KEY (`rol_id`) REFERENCES `roles` (`id`),
  ADD CONSTRAINT `fk_usuarios_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`);

--
-- Filtros para la tabla `usuario_empresa`
--
ALTER TABLE `usuario_empresa`
  ADD CONSTRAINT `fk_usuario_empresa_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_usuario_empresa_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `ventas`
--
ALTER TABLE `ventas`
  ADD CONSTRAINT `fk_ventas_apertura` FOREIGN KEY (`apertura_caja_id`) REFERENCES `aperturas_caja` (`id`),
  ADD CONSTRAINT `fk_ventas_cliente` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`),
  ADD CONSTRAINT `fk_ventas_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_ventas_sucursal` FOREIGN KEY (`sucursal_id`) REFERENCES `sucursales` (`id`),
  ADD CONSTRAINT `fk_ventas_usuario` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`);

--
-- Filtros para la tabla `venta_detalles`
--
ALTER TABLE `venta_detalles`
  ADD CONSTRAINT `fk_venta_detalles_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_venta_detalles_producto` FOREIGN KEY (`producto_id`) REFERENCES `productos` (`id`),
  ADD CONSTRAINT `fk_venta_detalles_venta` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`);

--
-- Filtros para la tabla `venta_pagos`
--
ALTER TABLE `venta_pagos`
  ADD CONSTRAINT `fk_venta_pagos_empresa` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`),
  ADD CONSTRAINT `fk_venta_pagos_venta` FOREIGN KEY (`venta_id`) REFERENCES `ventas` (`id`);

--
-- Filtros para la tabla `whatsapp_meta_templates`
--
ALTER TABLE `whatsapp_meta_templates`
  ADD CONSTRAINT `fk_whatsapp_meta_templates_usuario` FOREIGN KEY (`creado_por_usuario_id`) REFERENCES `usuarios` (`id`);
COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
