--
-- Host: localhost    Database: mania_smartweb
-- ------------------------------------------------------


--
-- Current Database: `mania_smartweb`
--


--
-- Table structure for table `activos`
--

CREATE TABLE `activos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `numero_serie` varchar(255) DEFAULT NULL,
  `categoria` varchar(255) DEFAULT NULL,
  `fecha_adquisicion` date DEFAULT NULL,
  `valor_adquisicion` decimal(10,2) DEFAULT NULL,
  `estado` varchar(255) DEFAULT NULL,
  `ubicacion` varchar(255) DEFAULT NULL,
  `responsable` varchar(255) DEFAULT NULL,
  `fecha_creacion` timestamp NOT NULL DEFAULT current_timestamp(),
  `fecha_actualizacion` timestamp NULL DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `activos`
--


--
-- Table structure for table `activos_tecnologicos`
--

CREATE TABLE `activos_tecnologicos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(120) DEFAULT NULL,
  `tipo` varchar(60) DEFAULT NULL,
  `serial` varchar(120) DEFAULT NULL,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `fecha_compra` date DEFAULT NULL,
  `valor` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `activos_tecnologicos`
--


--
-- Table structure for table `admins`
--

CREATE TABLE `admins` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `admins`
--


--
-- Table structure for table `ai_ratings`
--

CREATE TABLE `ai_ratings` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `ai_id` int(10) unsigned NOT NULL,
  `rating` tinyint(3) unsigned NOT NULL,
  `ip_hash` char(64) NOT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `rating_day` date NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_ai_ip_day` (`ai_id`,`ip_hash`,`rating_day`),
  KEY `idx_ai` (`ai_id`),
  CONSTRAINT `fk_ai_ratings_ai` FOREIGN KEY (`ai_id`) REFERENCES `ai_tools` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ai_ratings`
--

INSERT INTO `ai_ratings` (`id`, `ai_id`, `rating`, `ip_hash`, `user_agent`, `rating_day`, `created_at`) VALUES (1,1,3,'dad6f9d2248cf52405601d9cf3b2a392aa19f594d2fe83c464ce99f91ff7a485','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-19','2025-10-19 21:58:38'),(2,2,4,'dad6f9d2248cf52405601d9cf3b2a392aa19f594d2fe83c464ce99f91ff7a485','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-19','2025-10-19 22:25:29'),(3,3,5,'dad6f9d2248cf52405601d9cf3b2a392aa19f594d2fe83c464ce99f91ff7a485','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-19','2025-10-19 22:32:21'),(4,4,4,'dad6f9d2248cf52405601d9cf3b2a392aa19f594d2fe83c464ce99f91ff7a485','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-19','2025-10-19 22:41:07'),(5,3,4,'423a79c7d4c961db8f15994579bd4b4816902af78f5ebd4fb81b3ec899358486','Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36','2025-10-19','2025-10-19 22:54:12'),(6,2,5,'423a79c7d4c961db8f15994579bd4b4816902af78f5ebd4fb81b3ec899358486','Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36','2025-10-19','2025-10-19 22:54:19'),(7,1,5,'423a79c7d4c961db8f15994579bd4b4816902af78f5ebd4fb81b3ec899358486','Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Mobile Safari/537.36','2025-10-19','2025-10-19 22:54:25'),(8,5,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:09:19'),(9,1,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:14:58'),(10,4,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:15:02'),(11,3,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:15:05'),(12,2,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:15:09'),(13,6,5,'3bb3431323bceddb4a73cd67eedf28bc961c6b1a89a1ececfb4f20cf42eef43b','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-10-22','2025-10-22 14:15:12');

--
-- Table structure for table `ai_tools`
--

CREATE TABLE `ai_tools` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(160) NOT NULL,
  `url` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `category` varchar(120) NOT NULL DEFAULT 'General',
  `tags` varchar(255) DEFAULT NULL,
  `icon_path` varchar(255) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `visits` int(10) unsigned NOT NULL DEFAULT 0,
  `visits_total` int(10) unsigned NOT NULL DEFAULT 0,
  `platform` enum('web','mobile','both') DEFAULT NULL,
  `is_web` tinyint(1) NOT NULL DEFAULT 0,
  `is_mobile` tinyint(1) NOT NULL DEFAULT 0,
  `platform_web` tinyint(1) NOT NULL DEFAULT 0,
  `platform_mobile` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_ai_tools_category` (`category`),
  KEY `idx_ai_tools_published` (`published`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ai_tools`
--

INSERT INTO `ai_tools` (`id`, `name`, `url`, `description`, `category`, `tags`, `icon_path`, `published`, `sort_order`, `created_at`, `updated_at`, `visits`, `visits_total`, `platform`, `is_web`, `is_mobile`, `platform_web`, `platform_mobile`) VALUES (1,'Chatgpt','https://chatgpt.com/','ChatGPT es un sistema de chat basado en el modelo de lenguaje por Inteligencia Artificial GPT, desarrollado por la empresa OpenAI.','AI Chatbots','chatbot','/uploads/ai-directory/644f796e7aeb785c.webp',1,0,'2025-10-19 21:23:56','2025-10-28 16:58:23',1,1,'both',1,1,1,1),(2,'Gemini 2.5 Pro','https://deepmind.google/models/gemini/pro/','Gemini 2.5 Pro es el modelo más reciente de Google DeepMind, integrado en el ecosistema de Google Workspace. Ofrece una experiencia optimizada para usuarios que trabajan en entornos colaborativos y de productividad digital.','Inteligencia Artificial Multimodal','Asistente integral','/uploads/ai-directory/adae0167410c72af.webp',1,0,'2025-10-19 22:21:25','2025-10-20 00:35:45',2,0,NULL,0,0,0,0),(3,'DALL·E','https://openai.com/es-ES/index/dall-e-2/','Genera imágenes a partir de descripciones escritas. Permite crear ilustraciones, diseños o conceptos visuales con solo escribir una idea en texto.','Generador de imágenes','Arte digital','/uploads/ai-directory/0afe47109f3f5a7a.webp',1,0,'2025-10-19 22:32:15','2025-11-13 13:29:47',1,2,NULL,0,0,0,0),(4,'Craiyon','https://www.craiyon.com/en','Versión gratuita y accesible para crear imágenes a partir de texto, aunque con menor detalle y realismo.','Generador de imágenes','arte simple','/uploads/ai-directory/a709705514de99d8.webp',1,0,'2025-10-19 22:40:49','2025-10-20 05:58:06',1,1,NULL,0,0,0,0),(5,'Nano Banana','https://aistudio.google.com/prompts/new_chat?model=gemini-2.5-flash-image','','General','General','',1,0,'2025-10-22 14:08:45','2025-11-15 03:56:59',0,0,'',0,0,0,0),(6,'UDIO','https://www.udio.com/','','Música','Música','',1,0,'2025-10-22 14:14:33','2025-11-15 03:57:11',0,1,'',0,0,0,0),(7,'Chatterbox','https://www.resemble.ai/chatterbox/','','General','General','',1,0,'2025-10-28 23:45:54','2025-11-15 03:57:22',0,1,'',0,0,0,0);

--
-- Table structure for table `ai_visits`
--

CREATE TABLE `ai_visits` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `ai_id` int(10) unsigned NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `referrer` varchar(255) DEFAULT NULL,
  `ip_hash` char(64) DEFAULT NULL,
  `ua_hash` char(64) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_ai` (`ai_id`),
  KEY `idx_created` (`created_at`),
  KEY `idx_ip_ai` (`ip_hash`,`ai_id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `ai_visits`
--

INSERT INTO `ai_visits` (`id`, `ai_id`, `created_at`, `referrer`, `ip_hash`, `ua_hash`) VALUES (1,1,'2025-10-20 05:58:00','https://mania.mx/directorio-ia.html','4a816219382e1689618fbde70963bc6afd7282d999b9cb42377891c33c42b095','8d3a4310782ed11654708481a971289b2b41320c78fe2ca10c0be5d9c3af9b5b'),(2,4,'2025-10-20 05:58:06','https://mania.mx/directorio-ia.html?tag=arte+simple','4a816219382e1689618fbde70963bc6afd7282d999b9cb42377891c33c42b095','8d3a4310782ed11654708481a971289b2b41320c78fe2ca10c0be5d9c3af9b5b'),(3,6,'2025-10-28 03:21:09','https://mania.mx/directorio-ia.html','4a816219382e1689618fbde70963bc6afd7282d999b9cb42377891c33c42b095','8d3a4310782ed11654708481a971289b2b41320c78fe2ca10c0be5d9c3af9b5b'),(4,3,'2025-11-13 13:29:47','https://mania.mx/directorio-ia.html','bb591ea28f6fadfccab2ec544aaec837121e32631d1d9765de6d7352bed9b791','902f048bfbd414566ff43c23c1da4fd0834220200f3c7ce639d9d8f0f77f2506'),(5,3,'2025-11-13 13:29:47',NULL,'bb591ea28f6fadfccab2ec544aaec837121e32631d1d9765de6d7352bed9b791','902f048bfbd414566ff43c23c1da4fd0834220200f3c7ce639d9d8f0f77f2506'),(6,7,'2025-11-15 03:56:17','https://mania.mx/directorio-ia.html','4a816219382e1689618fbde70963bc6afd7282d999b9cb42377891c33c42b095','d713dadbf3d0ca255287b277ab4d36ce7d711d34f197e05966270e2160e6da6c');

--
-- Table structure for table `almacenes`
--

CREATE TABLE `almacenes` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `responsable` varchar(255) DEFAULT NULL,
  `telefono` varchar(20) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `almacenes`
--


--
-- Table structure for table `articulos`
--

CREATE TABLE `articulos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) NOT NULL,
  `destacado` tinyint(1) NOT NULL DEFAULT 0,
  `alias` varchar(255) DEFAULT NULL,
  `contenido` text DEFAULT NULL,
  `categoria_id` int(11) DEFAULT NULL,
  `imagenes` text DEFAULT NULL,
  `video` varchar(255) DEFAULT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` varchar(255) DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_destacado` (`destacado`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `articulos`
--


--
-- Table structure for table `articulos_tags`
--

CREATE TABLE `articulos_tags` (
  `articulo_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  PRIMARY KEY (`articulo_id`,`tag_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `articulos_tags`
--


--
-- Table structure for table `asesores`
--

CREATE TABLE `asesores` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  `puesto` varchar(100) NOT NULL,
  `telefono` varchar(20) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `ubicacion` varchar(255) DEFAULT NULL,
  `map_html` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `asesores`
--


--
-- Table structure for table `banners`
--

CREATE TABLE `banners` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `image_path` varchar(255) NOT NULL,
  `alt_text` varchar(255) DEFAULT NULL,
  `link_url` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `banners`
--


--
-- Table structure for table `botones_legales`
--

CREATE TABLE `botones_legales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `url` varchar(255) NOT NULL,
  `orden` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `botones_legales`
--


--
-- Table structure for table `calendario_publicaciones`
--

CREATE TABLE `calendario_publicaciones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date DEFAULT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `campana_id` int(10) unsigned DEFAULT NULL,
  `responsable_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `calendario_publicaciones`
--


--
-- Table structure for table `campañas`
--

CREATE TABLE `campañas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `campañas`
--

INSERT INTO `campañas` (`id`, `nombre`) VALUES (1,'Redes Sociales');

--
-- Table structure for table `capacitacion`
--

CREATE TABLE `capacitacion` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `curso` varchar(255) DEFAULT NULL,
  `proveedor` varchar(120) DEFAULT NULL,
  `fecha_inicio` date DEFAULT NULL,
  `fecha_fin` date DEFAULT NULL,
  `costo` decimal(12,2) DEFAULT NULL,
  `estatus` enum('planeado','en_curso','completado') DEFAULT NULL,
  `nota` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `capacitacion`
--


--
-- Table structure for table `categoria_negocio`
--

CREATE TABLE `categoria_negocio` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `categoria` varchar(255) NOT NULL,
  `icono` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `categoria_negocio`
--

INSERT INTO `categoria_negocio` (`id`, `categoria`, `icono`, `created_at`, `updated_at`) VALUES (1,'Noticiero',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(2,'Agencia de diseño',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(3,'Software',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(4,'Negocios',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(5,'Agencia de marketing',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(6,'Publicidad',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(7,'Restaurante',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(8,'Cafetería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(9,'Panadería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(10,'Heladería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(11,'Bar',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(12,'Pub',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(13,'Pizzería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(14,'Pastelería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(15,'Tienda de Ropa',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(16,'Zapatería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(17,'Ferretería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(18,'Papelería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(19,'Joyería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(20,'Tienda de Muebles',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(21,'Farmacia',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(22,'Clínica Médica',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(23,'Consultorio Dental',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(24,'Óptica',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(25,'Gimnasio',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(26,'Spa',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(27,'Salón de Belleza',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(28,'Peluquería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(29,'Barbería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(30,'Manicura',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(31,'Guardería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(32,'Academia de Idiomas',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(33,'Clases Particulares',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(34,'Librería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(35,'Floristería',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(36,'Tienda de Electrónica',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(37,'Soporte Informático',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(38,'Reparación de PCs',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(39,'Taller Mecánico',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(40,'Venta de Repuestos',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(41,'Lavado de Autos',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(42,'Estación de Servicio',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(43,'Agencia Inmobiliaria',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(44,'Contaduría',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(45,'Asesoría Legal',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(46,'Agencia de Viajes',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(47,'Hotel',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(48,'Hostal',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(49,'Apart Hotel',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(50,'Agencia de Eventos',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(51,'Decoración de Eventos',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(52,'Fotografía Profesional',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(53,'Videografía',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(54,'Discoteca',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(55,'Cine',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(56,'Teatro',NULL,'2025-05-20 03:38:56','2025-05-20 03:38:56'),(58,'Fiestas','','2025-05-25 16:41:54','2025-05-25 16:41:54'),(59,'Arte','','2025-05-25 16:42:03','2025-05-25 16:42:03'),(60,'Comida','','2025-05-25 16:42:20','2025-05-25 16:42:20'),(61,'Comida Rápida','','2025-05-25 16:42:37','2025-05-25 16:42:37'),(62,'Desarrollador','','2025-05-25 16:42:48','2025-05-25 16:42:48'),(63,'Aplicaciones','','2025-05-25 16:42:57','2025-05-25 16:42:57'),(64,'Consultoría','','2025-05-25 16:43:15','2025-05-25 16:43:15'),(65,'Abarrotes','','2025-05-25 16:43:30','2025-05-25 16:43:30'),(66,'Médico','','2025-05-25 16:43:49','2025-05-25 16:43:49'),(67,'Escuela','','2025-05-25 16:43:57','2025-05-25 16:43:57'),(68,'Taxi','','2025-05-25 16:44:03','2025-05-25 16:44:09'),(69,'Música','','2025-05-25 16:44:20','2025-05-25 16:44:20'),(70,'Imprenta','','2025-05-25 16:44:28','2025-05-25 16:44:28'),(71,'Figuras de Yeso','','2025-05-25 16:45:04','2025-05-25 16:45:04'),(72,'Repostería','','2025-05-25 16:45:28','2025-05-25 16:45:28'),(73,'Eventos Sociales','','2025-05-25 16:45:38','2025-05-25 16:45:38'),(74,'Exportaciones','','2025-05-25 16:46:00','2025-05-25 16:46:00');

--
-- Table structure for table `categorias_articulos`
--

CREATE TABLE `categorias_articulos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` varchar(255) DEFAULT NULL,
  `meta_keywords` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `alias` (`alias`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `categorias_articulos`
--


--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `photos` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `categories`
--

INSERT INTO `categories` (`id`, `name`, `alias`, `description`, `photos`) VALUES (2,'Aplicaciones','aplicaciones','','');

--
-- Table structure for table `chat_messages`
--

CREATE TABLE `chat_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `session_id` varchar(255) NOT NULL,
  `sender` enum('client','admin','ai') NOT NULL,
  `message` text NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `chat_messages`
--


--
-- Table structure for table `citas`
--

CREATE TABLE `citas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` datetime NOT NULL,
  `fecha_fin` datetime NOT NULL,
  `cliente_id` int(10) unsigned NOT NULL,
  `lugar` varchar(255) DEFAULT NULL,
  `motivo` text DEFAULT NULL,
  `asistente_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_citas_cliente` (`cliente_id`),
  KEY `idx_citas_asistente` (`asistente_id`),
  CONSTRAINT `fk_citas_asistente` FOREIGN KEY (`asistente_id`) REFERENCES `users` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
  CONSTRAINT `fk_citas_cliente` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `citas`
--


--
-- Table structure for table `clientes`
--

CREATE TABLE `clientes` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) NOT NULL,
  `rfc` varchar(20) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `ciudad` varchar(100) DEFAULT NULL,
  `estado` varchar(100) DEFAULT NULL,
  `pais` varchar(100) DEFAULT NULL,
  `cp` varchar(10) DEFAULT NULL,
  `telefono` varchar(30) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `tiktok` varchar(255) DEFAULT NULL,
  `youtube` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `sitioweb` varchar(255) DEFAULT NULL,
  `tipo_cliente` varchar(100) DEFAULT NULL,
  `percepcion_satisfaccion` decimal(2,1) NOT NULL DEFAULT 0.0,
  `observaciones` text DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `contacto` varchar(120) DEFAULT NULL,
  `contacto_telefono` varchar(30) DEFAULT NULL,
  `contacto_whatsapp` varchar(20) DEFAULT NULL,
  `contacto_email` varchar(120) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `clientes`
--


--
-- Table structure for table `cms_form_responses`
--

CREATE TABLE `cms_form_responses` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(10) unsigned DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `answers` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`answers`)),
  `email` varchar(190) DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `ua` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_form` (`form_id`),
  KEY `idx_slug` (`slug`),
  KEY `idx_created` (`created_at`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cms_form_responses`
--

INSERT INTO `cms_form_responses` (`id`, `form_id`, `slug`, `answers`, `email`, `ip`, `ua`, `created_at`) VALUES (17,9,'contacta-con-nosotros','{\"f_0\":\"\",\"f_1\":\"sabiss_12@hotmail.com\",\"f_2\":\"\"}','sabiss_12@hotmail.com','189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-02 08:33:40'),(19,9,'contacta-con-nosotros','{\"f_0\":\"melisa\",\"f_1\":\"\",\"f_2\":\"aaa\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-02 18:08:08'),(20,9,'contacta-con-nosotros','{\"f_0\":\"melisa\",\"f_1\":\"\",\"f_2\":\"123\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-02 18:15:25'),(21,9,'contacta-con-nosotros','{\"f_0\":\"a\",\"f_1\":\"aaakl@hotmail.com\",\"f_2\":\"a\"}','aaakl@hotmail.com','189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-02 18:15:36'),(23,10,'prueba-admininistrador-rejilla','{\"f_0\":\"melisa\",\"f_1\":\"ramon\",\"f_2\":\"8142824484\",\"f_3\":\"asasd@hotmail.com\",\"f_4\":\"1.2.3.4\"}','asasd@hotmail.com','189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 01:38:15'),(24,10,'prueba-admininistrador-rejilla','{\"f_0\":\"melisa\",\"f_1\":\"ramon\",\"f_2\":\"3312466990\",\"f_3\":\"asasd@hotmail.com\",\"f_4\":\"funciona?\"}','asasd@hotmail.com','189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 01:52:29'),(25,10,'prueba-admininistrador-rejilla','{\"short_text_0\":\"Daniel\",\"short_text_1\":\"Beas\",\"phone_2\":\"1298371321\",\"email_3\":\"asdkj@hotmail.com\",\"long_text_4\":\"funcionará\\r\\n?\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 04:29:12'),(26,10,'prueba-admininistrador-rejilla','{\"short_text_0\":\"Daniel\",\"short_text_1\":\"Beas\",\"phone_2\":\"1298371321\",\"email_3\":\"asdkj@hotmail.com\",\"long_text_4\":\"funciona? 1..233..44\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 04:40:13'),(27,10,'prueba-admininistrador-rejilla','{\"short_text_0\":\"Daniel\",\"short_text_1\":\"Beas\",\"phone_2\":\"1298371321\",\"email_3\":\"asdkj@hotmail.com\",\"long_text_4\":\"aaaa\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 04:40:26'),(28,10,'prueba-admininistrador-rejilla','{\"short_text_0\":\"Melissa \",\"short_text_1\":\"Ramon\",\"phone_2\":\"8142824484\",\"email_3\":\"asdkj@hotmail.com\",\"long_text_4\":\"si funciona\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 04:43:41'),(29,10,'prueba-admininistrador-rejilla','{\"short_text_0\":\"Daniel\",\"short_text_1\":\"Beas\",\"phone_2\":\"1298371321\",\"email_3\":\"asdkj@hotmail.com\",\"long_text_4\":\"1111111\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 06:09:14'),(30,11,'contact-us','{\"short_text_0\":\"Melissa \",\"short_text_1\":\"Ramon\",\"email_2\":\"corremania@hotmail.com\",\"short_text_3\":\"Mania\",\"long_text_4\":\"Buen día, quisiera solicitar una cotización para logo de empresa.\"}',NULL,'189.219.64.168','Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/141.0.0.0 Safari/537.36','2025-11-03 06:57:16');

--
-- Table structure for table `cms_form_submissions`
--

CREATE TABLE `cms_form_submissions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(10) unsigned DEFAULT NULL,
  `slug` varchar(190) NOT NULL,
  `data_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`data_json`)),
  `files_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`files_json`)),
  `ip` varchar(45) DEFAULT NULL,
  `ua` text DEFAULT NULL,
  `referer` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `read_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_slug_created` (`slug`,`created_at`),
  KEY `idx_formid_created` (`form_id`,`created_at`),
  KEY `idx_read_at` (`read_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cms_form_submissions`
--


--
-- Table structure for table `cms_forms`
--

CREATE TABLE `cms_forms` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `notify_email` varchar(190) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `status` enum('public','private') NOT NULL DEFAULT 'public',
  `fields` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`fields`)),
  `theme` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`theme`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_status` (`status`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cms_forms`
--

INSERT INTO `cms_forms` (`id`, `title`, `slug`, `description`, `notify_email`, `logo`, `status`, `fields`, `theme`, `created_at`, `updated_at`) VALUES (9,'Contacta con Nosotros','contacta-con-nosotros',NULL,NULL,NULL,'private','[{\"type\":\"short_text\",\"label\":\"Nombre\",\"placeholder\":\"\",\"required\":true},{\"type\":\"email\",\"label\":\"\",\"placeholder\":\"\",\"required\":false},{\"type\":\"long_text\",\"label\":\"Mensaje\",\"placeholder\":\"\",\"required\":true}]','{\"id\":\"classic\",\"vars\":{\"--t-bg\":\"#fafbfc\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#eef2f6\",\"--t-primary\":\"#0d6efd\",\"--t-text\":\"#111\",\"--t-muted\":\"#667085\"}}','2025-11-02 08:33:05','2025-11-03 06:49:45'),(10,'Prueba admininistrador rejilla','prueba-admininistrador-rejilla','probando la rejilla',NULL,NULL,'private','[{\"width\":6,\"type\":\"short_text\",\"label\":\"nombre\",\"placeholder\":\"\",\"required\":false},{\"width\":6,\"type\":\"short_text\",\"label\":\"apellido\",\"placeholder\":\"\",\"required\":false},{\"width\":6,\"type\":\"phone\",\"label\":\"\",\"placeholder\":\"\",\"required\":true},{\"width\":6,\"type\":\"email\",\"label\":\"\",\"placeholder\":\"\",\"required\":false},{\"width\":12,\"type\":\"long_text\",\"label\":\"comentarios\",\"placeholder\":\"\",\"required\":false}]','{\"id\":\"classic\",\"vars\":{\"--t-bg\":\"#fafbfc\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#eef2f6\",\"--t-primary\":\"#0d6efd\",\"--t-text\":\"#111\",\"--t-muted\":\"#667085\"}}','2025-11-02 19:00:59','2025-11-03 06:49:43'),(11,'Contact Us','contact-us','Completa el formulario y nos pondremos en contacto contigo lo antes posible.','sabisss_12@hotmail.com',NULL,'public','[{\"width\":6,\"type\":\"short_text\",\"label\":\"Nombre\",\"placeholder\":\"\",\"required\":true},{\"width\":6,\"type\":\"short_text\",\"label\":\"Apellido\",\"placeholder\":\"\",\"required\":true},{\"type\":\"email\",\"label\":\"Email\",\"placeholder\":\"\",\"required\":false,\"width\":12},{\"width\":12,\"type\":\"short_text\",\"label\":\"Compañia\",\"placeholder\":\"\",\"required\":true},{\"width\":12,\"type\":\"long_text\",\"label\":\"Mensaje\",\"placeholder\":\"\",\"required\":true}]','{\"id\":\"classic\",\"vars\":{\"--t-bg\":\"#fafbfc\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#eef2f6\",\"--t-primary\":\"#0d6efd\",\"--t-text\":\"#111\",\"--t-muted\":\"#667085\"}}','2025-11-03 06:54:12','2025-11-03 06:56:50');

--
-- Table structure for table `cms_settings`
--

CREATE TABLE `cms_settings` (
  `k` varchar(190) NOT NULL,
  `v` text DEFAULT NULL,
  PRIMARY KEY (`k`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cms_settings`
--

INSERT INTO `cms_settings` (`k`, `v`) VALUES ('site_featured_form_slug','contact-us');

--
-- Table structure for table `comisiones`
--

CREATE TABLE `comisiones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `monto` decimal(12,2) DEFAULT NULL,
  `concepto` varchar(255) DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `comisiones`
--


--
-- Table structure for table `compras`
--

CREATE TABLE `compras` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `proveedor_id` int(10) unsigned DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `total` decimal(12,2) DEFAULT NULL,
  `estado` enum('pendiente','pagado','cancelado') DEFAULT 'pendiente',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `compras`
--


--
-- Table structure for table `configuracion`
--

CREATE TABLE `configuracion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clave` varchar(255) NOT NULL,
  `valor` text NOT NULL,
  `direccion` varchar(255) NOT NULL DEFAULT '',
  `enlace_direccion` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  UNIQUE KEY `clave` (`clave`)
) ENGINE=InnoDB AUTO_INCREMENT=8660 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `configuracion`
--

INSERT INTO `configuracion` (`id`, `clave`, `valor`, `direccion`, `enlace_direccion`) VALUES (1,'logo','../uploads/logo_empresa.webp','',''),(3,'header_color','#ffffff','',''),(6,'header_height','100px','',''),(7,'font_color','#3e3c86','',''),(22,'highlight_color','#00c9fe','',''),(43,'telefono','8135618086','',''),(44,'whatsapp','8135618086','',''),(112,'direccion','Monterrey, Nuevo León','',''),(113,'enlace_direccion','','',''),(155,'slide_autoplay','1','',''),(156,'slide_width','1600','',''),(157,'slide_height','300','',''),(158,'slide_animation','cube','',''),(159,'slide_duration','3000','',''),(463,'secondary_color','#3e3c86','',''),(468,'facebook','https://www.facebook.com/AgenciaNVMDigital','',''),(469,'instagram','https://www.instagram.com/agencianvmdigital','',''),(470,'youtube','https://www.youtube.com/channel/UCOqdG2ZSRS4AGuOgrurImzQ','',''),(471,'linkedin','https://www.linkedin.com/in/miguelangelgutierrezrojas/','',''),(472,'x','https://x.com/?lang=es','',''),(473,'tiktok','https://www.tiktok.com/','',''),(535,'bottom_color','#0e0e20','',''),(572,'bottom_font_color','#ffffff','',''),(986,'mostrar_carrito','1','',''),(1066,'telegram','https://t.me/+8LNDrHlzFo04NmYx','',''),(1067,'messenger','https://m.me','',''),(1069,'footer_col1_title','Síguenos','',''),(1070,'footer_col2_title','Contáctanos','',''),(1071,'footer_col3_title','Legal','',''),(1072,'enable_llamar','1','',''),(1073,'enable_email','1','',''),(1074,'enable_whatsapp','1','',''),(1075,'enable_ubicacion','0','',''),(1076,'enable_telegram','1','',''),(1077,'enable_messenger','1','',''),(1120,'email','yo@miguelangelgutierrez.com.mx','',''),(1135,'footer_col1_switch','1','',''),(1136,'footer_col1_option','llamar','',''),(1137,'footer_col2_switch','1','',''),(1138,'footer_col2_option','whatsapp','',''),(1139,'footer_col3_switch','1','',''),(1140,'footer_col3_option','telegram','',''),(1494,'logo_dimensions','','',''),(2128,'enable_copyright','1','',''),(2129,'enable_developer','0','',''),(2284,'principal_text_color','#0e0e20','',''),(2285,'principal_bg_color','#ffffff','',''),(2288,'footer_link_color','#00c9fe','',''),(2289,'footer_bg_color','#00c9fe','',''),(2290,'footer_text_color','#f7f7f7','',''),(2696,'enable_chat','1','',''),(2697,'enable_direccion','1','',''),(2743,'enable_cookie_notice','0','',''),(2744,'cookie_notice_text','Información. Le informamos que  [empresa] utiliza en su sitio de internet Cookies, a través de estos mecanismos se recaban datos de manera automática y simultánea para monitorear su comportamiento como usuario de los servicios de internet.\r\n\r\nAsimismo, le informamos que usted puede deshabilitar el uso de estos mecanismos siguiendo el procedimiento de desactivación establecido para su navegador de internet.','',''),(2900,'principal_bg_image','','',''),(3021,'mostrar_productos_sin_stock','1','',''),(3244,'habilitar_filtro','1','',''),(3245,'filtro_mostrar_categoria','1','',''),(3246,'filtro_nombre_categoria','Categoría','',''),(3247,'filtro_mostrar_subcategoria','1','',''),(3248,'filtro_nombre_subcategoria','Subcategoría','',''),(3249,'filtro_mostrar_etiquetas','1','',''),(3250,'filtro_nombre_etiquetas','Etiquetas','',''),(3251,'filtro_habilitar_buscador','1','',''),(3262,'detalle_producto_mostrar_descripcion','1','',''),(3263,'detalle_producto_mostrar_categoria','1','',''),(3264,'detalle_producto_mostrar_subcategoria','1','',''),(3265,'detalle_producto_mostrar_stock','1','',''),(3266,'detalle_producto_mostrar_anaquel','0','',''),(3267,'detalle_producto_mostrar_etiquetas','1','',''),(3284,'carrito_mostrar_impuestos','0','',''),(3285,'carrito_mostrar_nombre','1','',''),(3286,'carrito_mostrar_telefono','1','',''),(3287,'carrito_mostrar_email','1','',''),(3288,'carrito_mostrar_direccion','1','',''),(3289,'carrito_mostrar_boton_whatsapp','1','',''),(3290,'carrito_mostrar_boton_pagar','1','',''),(3291,'carrito_mostrar_boton_cotizacion','1','',''),(3292,'carrito_nombre','Carrito de Compras','',''),(3293,'carrito_pagina_productos','','',''),(3294,'mp_public_key','','',''),(3295,'mp_access_token','','',''),(3296,'mp_client_id','','',''),(3297,'mp_client_secret','','',''),(3298,'habilitar_paqueteria','1','',''),(3299,'pakke_api_key','bWCD50IDC6yANWOjTxbmTJnfjt688nYaYNvB76OfL2jrJDs6WYLIssV6flgTIcJI','',''),(3556,'app_mode','1','',''),(3558,'pwa_cache_name','mania','',''),(3559,'pwa_nombre','manIA','',''),(3560,'pwa_nombre_corto','manIA','',''),(3561,'pwa_display','standalone','',''),(3562,'pwa_background_color','#f7f7f7','',''),(3563,'pwa_theme_color','#0f87d0','',''),(3620,'pwa_app_mode','0','',''),(3655,'pwa_icon_192','icon-192x192.png','',''),(3656,'pwa_icon_512','icon-512x512.png','',''),(3808,'favicon','../favicon.ico','',''),(3883,'pwa_description','','',''),(3884,'pwa_start_url','/','',''),(3938,'horario_lunes_de','07:00','',''),(3939,'horario_lunes_hasta','19:00','',''),(3940,'horario_martes_de','07:00','',''),(3941,'horario_martes_hasta','19:00','',''),(3942,'horario_miercoles_de','07:00','',''),(3943,'horario_miercoles_hasta','19:00','',''),(3944,'horario_jueves_de','07:00','',''),(3945,'horario_jueves_hasta','19:00','',''),(3946,'horario_viernes_de','07:00','',''),(3947,'horario_viernes_hasta','19:00','',''),(3948,'horario_sabado_de','07:00','',''),(3949,'horario_sabado_hasta','19:00','',''),(3950,'horario_domingo_de','','',''),(3951,'horario_domingo_hasta','','',''),(3952,'cerrado_lunes','0','',''),(3953,'cerrado_martes','0','',''),(3954,'cerrado_miercoles','0','',''),(3955,'cerrado_jueves','0','',''),(3956,'cerrado_viernes','0','',''),(3957,'cerrado_sabado','0','',''),(3958,'cerrado_domingo','1','',''),(4183,'slogan','','',''),(4198,'canal_whatsapp','','',''),(4220,'info_legal',' ','',''),(4593,'logo_width','320','',''),(4594,'logo_height','100','',''),(4595,'qr','0','',''),(5429,'items_per_row_divisiones','2','',''),(5430,'image_height_divisiones','300','',''),(5431,'show_image_divisiones','1','',''),(5432,'show_desc_divisiones','0','',''),(5433,'items_per_row_categorias','3','',''),(5434,'image_height_categorias','400','',''),(5435,'show_image_categorias','1','',''),(5436,'show_desc_categorias','1','',''),(5437,'items_per_row_servicios','3','',''),(5438,'image_height_servicios','300','',''),(5439,'show_image_servicios','1','',''),(5440,'show_desc_servicios','1','',''),(5505,'title_align_divisiones','left','',''),(5506,'desc_align_divisiones','left','',''),(5511,'title_align_categorias','left','',''),(5512,'desc_align_categorias','left','',''),(6259,'principal_bg_video','','','');

--
-- Table structure for table `configuracion_busqueda`
--

CREATE TABLE `configuracion_busqueda` (
  `clave` varchar(60) NOT NULL,
  `valor` text NOT NULL,
  PRIMARY KEY (`clave`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `configuracion_busqueda`
--

INSERT INTO `configuracion_busqueda` (`clave`, `valor`) VALUES ('gsc_client_id','435702381951-so2seno96vpll298tcpu652pmr2cfgq5.apps.googleusercontent.com'),('gsc_client_secret','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'),('gsc_refresh_token','1//04S4kgcpwpRmLCgYIARAAGAQSNwF-L9Irt3KMI6dgRCfWgDAh7cT95X9KqF62oIPf9dgR1fgLPcoCz3c84ad36Pg9ZBVwHrCxe0I'),('gsc_site_url','https://enpolanco.com/');

--
-- Table structure for table `configuracion_comunicacion`
--

CREATE TABLE `configuracion_comunicacion` (
  `clave` varchar(50) NOT NULL,
  `valor` text NOT NULL,
  PRIMARY KEY (`clave`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `configuracion_comunicacion`
--

INSERT INTO `configuracion_comunicacion` (`clave`, `valor`) VALUES ('ai_api_key','sk-oLOkj1P913y05cFxujeJpuN4aSq-EaGYy1U1Cak79vT3BlbkFJRlHj4nCYyCXFfbzmj-_pE6v4Z0zeLxAP6plBddKY0A'),('ai_instructions','Eres un asistente virtual con inteligencia artificial '),('ai_tables_access','configuracion'),('enable_ai_chat','0'),('enable_human_chat','0');

--
-- Table structure for table `configuracion_ia`
--

CREATE TABLE `configuracion_ia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `clave` varchar(255) NOT NULL,
  `valor` text NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `clave` (`clave`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `configuracion_ia`
--

INSERT INTO `configuracion_ia` (`id`, `clave`, `valor`) VALUES (1,'ia_habilitada','1'),(2,'openai_api_key','sk-oLOkj1P913y05cFxujeJpuN4aSq-EaGYy1U1Cak79vT3BlbkFJRlHj4nCYyCXFfbzmj-_pE6v4Z0zeLxAP6plBddKY0A'),(3,'openai_model','gpt-4o-mini'),(4,'openai_temperature','0.0'),(5,'openai_max_tokens','1000'),(6,'ia_logs_activos','1');

--
-- Table structure for table `contabilidad`
--

CREATE TABLE `contabilidad` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date NOT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `cuenta` varchar(60) NOT NULL,
  `subcuenta` varchar(60) DEFAULT NULL,
  `monto` decimal(14,2) NOT NULL,
  `tipo` enum('cargo','abono') NOT NULL,
  `proyecto_id` int(10) unsigned DEFAULT NULL,
  `cliente_id` int(10) unsigned DEFAULT NULL,
  `factura_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `contabilidad`
--


--
-- Table structure for table `contactos`
--

CREATE TABLE `contactos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `telefono` varchar(50) NOT NULL,
  `email` varchar(255) NOT NULL,
  `comentarios` text DEFAULT NULL,
  `fecha` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `contactos`
--


--
-- Table structure for table `contexto_empresarial`
--

CREATE TABLE `contexto_empresarial` (
  `clave` varchar(100) NOT NULL,
  `valor` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`clave`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `contexto_empresarial`
--

INSERT INTO `contexto_empresarial` (`clave`, `valor`, `created_at`) VALUES ('areas_mejorar','','2025-07-25 13:58:18'),('ayuda_ia','','2025-07-25 13:58:18'),('canales_de_contacto','','2025-07-25 13:58:18'),('cliente_ideal','','2025-07-25 13:58:18'),('diferenciador','','2025-07-25 13:58:18'),('mayor_reto','','2025-07-25 13:58:18'),('mision','','2025-04-17 14:07:38'),('objetivos_corto_plazo','','2025-07-25 13:58:18'),('porque_decidiste_empezar_negocio','','2025-07-25 13:58:18'),('procesos_administrativos','','2025-07-25 13:58:18'),('que_ofreces','','2025-07-25 13:58:18'),('que_problema_resuelves','','2025-07-25 13:58:18'),('valores','','2025-04-17 14:03:53'),('vision','','2025-04-17 14:03:53'),('vision_futuro','','2025-07-25 13:58:18');

--
-- Table structure for table `contratos`
--

CREATE TABLE `contratos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `parte_a` varchar(120) DEFAULT NULL,
  `parte_b` varchar(120) DEFAULT NULL,
  `tipo` varchar(120) DEFAULT NULL,
  `fecha_firma` date DEFAULT NULL,
  `fecha_vencimiento` date DEFAULT NULL,
  `archivo_pdf` varchar(255) DEFAULT NULL,
  `estado` enum('activo','terminado','renegociacion') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `contratos`
--


--
-- Table structure for table `contratos_laborales`
--

CREATE TABLE `contratos_laborales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `puesto_id` int(10) unsigned DEFAULT NULL,
  `fecha_inicio` date DEFAULT NULL,
  `fecha_fin` date DEFAULT NULL,
  `tipo` enum('indefinido','determinado','temporal') DEFAULT NULL,
  `archivo_pdf` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `contratos_laborales`
--


--
-- Table structure for table `cotizaciones`
--

CREATE TABLE `cotizaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `uuid` varchar(64) NOT NULL,
  `fecha_cotizacion` datetime DEFAULT current_timestamp(),
  `cliente_nombre` varchar(255) NOT NULL,
  `cliente_telefono` varchar(50) NOT NULL,
  `cliente_correo` varchar(255) NOT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `items_json` text DEFAULT NULL,
  `cotizacion_html` longtext NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `cotizaciones`
--


--
-- Table structure for table `cuentas`
--

CREATE TABLE `cuentas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cuentas`
--


--
-- Table structure for table `cuentas_redes_sociales`
--

CREATE TABLE `cuentas_redes_sociales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `plataforma` varchar(60) DEFAULT NULL,
  `usuario` varchar(120) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `campana_id` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `cuentas_redes_sociales`
--


--
-- Table structure for table `custom_tags`
--

CREATE TABLE `custom_tags` (
  `id` int(11) NOT NULL,
  `position` enum('before_head_end','after_body_start','before_body_end') NOT NULL,
  `code` text NOT NULL,
  `active` tinyint(1) DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `custom_tags`
--


--
-- Table structure for table `departamentos`
--

CREATE TABLE `departamentos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(120) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `gerente_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `departamentos`
--


--
-- Table structure for table `despliegues`
--

CREATE TABLE `despliegues` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `proyecto` varchar(150) DEFAULT NULL,
  `version` varchar(60) DEFAULT NULL,
  `fecha` datetime DEFAULT NULL,
  `responsable_id` int(10) unsigned DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `despliegues`
--


--
-- Table structure for table `deudas`
--

CREATE TABLE `deudas` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `proveedor_id` int(10) unsigned DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `monto` decimal(12,2) DEFAULT NULL,
  `saldo` decimal(12,2) DEFAULT NULL,
  `vencimiento` date DEFAULT NULL,
  `estatus` enum('pendiente','pagada','vencida') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `deudas`
--


--
-- Table structure for table `divisions`
--

CREATE TABLE `divisions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `description` text DEFAULT NULL,
  `photos` text DEFAULT NULL,
  `slug` varchar(160) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `color` varchar(7) NOT NULL DEFAULT '#f0f0f0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `divisions`
--


--
-- Table structure for table `documentos_legales`
--

CREATE TABLE `documentos_legales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `tipo` varchar(120) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `archivo` varchar(255) DEFAULT NULL,
  `estado` enum('vigente','expirado','en_revision') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `documentos_legales`
--


--
-- Table structure for table `email_accounts`
--

CREATE TABLE `email_accounts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `admin_id` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `email` varchar(255) NOT NULL,
  `smtp_host` varchar(255) NOT NULL,
  `smtp_port` int(11) NOT NULL DEFAULT 587,
  `smtp_user` varchar(255) NOT NULL,
  `smtp_pass` varchar(255) NOT NULL,
  `smtp_secure` enum('','ssl','tls') NOT NULL DEFAULT 'tls',
  `imap_host` varchar(255) NOT NULL,
  `imap_port` int(11) NOT NULL DEFAULT 993,
  `imap_user` varchar(255) NOT NULL,
  `imap_pass` varchar(255) NOT NULL,
  `imap_secure` enum('','ssl','tls') NOT NULL DEFAULT 'ssl',
  `last_uid` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_email_accounts_admin` (`admin_id`),
  CONSTRAINT `fk_email_accounts_user` FOREIGN KEY (`admin_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `email_accounts`
--


--
-- Table structure for table `email_messages`
--

CREATE TABLE `email_messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_id` int(11) NOT NULL,
  `direction` enum('in','out') NOT NULL,
  `subject` varchar(255) NOT NULL,
  `from_name` varchar(255) DEFAULT NULL,
  `from_email` varchar(255) DEFAULT NULL,
  `to_name` varchar(255) DEFAULT NULL,
  `to_email` varchar(255) DEFAULT NULL,
  `date` datetime NOT NULL,
  `body_file` varchar(255) NOT NULL,
  `imap_uid` int(11) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_email_messages_account` (`account_id`),
  CONSTRAINT `fk_email_messages_account` FOREIGN KEY (`account_id`) REFERENCES `email_accounts` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `email_messages`
--


--
-- Table structure for table `empleados`
--

CREATE TABLE `empleados` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `departamento_id` int(10) unsigned DEFAULT NULL,
  `nombre` varchar(120) DEFAULT NULL,
  `apellidos` varchar(120) DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `telefono` varchar(30) DEFAULT NULL,
  `puesto` varchar(120) DEFAULT NULL,
  `salario` decimal(12,2) DEFAULT NULL,
  `fecha_contratacion` date DEFAULT NULL,
  `fecha_baja` date DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `usuario_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `empleados`
--


--
-- Table structure for table `estados`
--

CREATE TABLE `estados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `estados`
--

INSERT INTO `estados` (`id`, `nombre`) VALUES (1,'Aguascalientes'),(2,'Baja California'),(3,'Baja California Sur'),(4,'Campeche'),(5,'Chiapas'),(6,'Chihuahua'),(7,'Ciudad de México'),(8,'Coahuila'),(9,'Colima'),(10,'Durango'),(11,'Estado de México'),(12,'Guanajuato'),(13,'Guerrero'),(14,'Hidalgo'),(15,'Jalisco'),(16,'Michoacán de Ocampo'),(17,'Morelos'),(18,'Nayarit'),(19,'Nuevo León'),(20,'Oaxaca'),(21,'Puebla'),(22,'Querétaro'),(23,'Quintana Roo'),(24,'San Luis Potosí'),(25,'Sinaloa'),(26,'Sonora'),(27,'Tabasco'),(28,'Tamaulipas'),(29,'Tlaxcala'),(30,'Veracruz de Ignacio de la Llave'),(31,'Yucatán'),(32,'Zacatecas');

--
-- Table structure for table `facturas`
--

CREATE TABLE `facturas` (
  `id_factura` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `public_token` varchar(64) NOT NULL,
  `numero_factura` varchar(50) NOT NULL,
  `id_cliente` int(10) unsigned NOT NULL,
  `id_vendedor` int(10) unsigned DEFAULT NULL,
  `fecha_emision` date NOT NULL,
  `fecha_vencimiento` date DEFAULT NULL,
  `forma_pago` varchar(50) DEFAULT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `impuestos` decimal(10,2) NOT NULL DEFAULT 0.00,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `estatus` varchar(20) NOT NULL DEFAULT 'Pendiente',
  `pagada` tinyint(1) NOT NULL DEFAULT 0,
  `notas` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id_factura`),
  UNIQUE KEY `u_public_token` (`public_token`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `facturas`
--


--
-- Table structure for table `faqs`
--

CREATE TABLE `faqs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `question` text NOT NULL,
  `answer` text NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `ordering` int(11) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `faqs`
--


--
-- Table structure for table `fb_forms`
--

CREATE TABLE `fb_forms` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `form_uid` varchar(64) NOT NULL,
  `page_id` varchar(128) DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `schema_json` longtext NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_form_uid` (`form_uid`),
  KEY `idx_updated_at` (`updated_at`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fb_forms`
--


--
-- Table structure for table `fb_submissions`
--

CREATE TABLE `fb_submissions` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `form_uid` varchar(64) NOT NULL,
  `submitted_at` datetime NOT NULL DEFAULT current_timestamp(),
  `ip` varchar(64) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `data_json` longtext NOT NULL,
  `files_json` longtext DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_form_uid` (`form_uid`),
  KEY `idx_submitted_at` (`submitted_at`),
  CONSTRAINT `fk_fb_submissions_form` FOREIGN KEY (`form_uid`) REFERENCES `fb_forms` (`form_uid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `fb_submissions`
--


--
-- Table structure for table `features`
--

CREATE TABLE `features` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `description` text DEFAULT NULL,
  `is_highlighted` tinyint(1) NOT NULL DEFAULT 0,
  `category` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  KEY `idx_features_category` (`category`),
  KEY `idx_features_is_highlighted` (`is_highlighted`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `features`
--

INSERT INTO `features` (`id`, `name`, `description`, `is_highlighted`, `category`, `created_at`, `updated_at`) VALUES (1,'200 MB',NULL,1,NULL,'2025-04-20 18:48:26','2025-04-20 18:48:26'),(2,'Sin límite de consumo',NULL,0,NULL,'2025-04-22 19:34:50','2025-04-22 19:34:50'),(3,'Internet ilimitado',NULL,0,NULL,'2025-04-22 19:35:02','2025-04-22 19:35:02'),(5,'Sin contratos forzosos',NULL,0,NULL,'2025-04-22 19:35:20','2025-04-22 19:35:20'),(6,'Uso justo de consumo',NULL,0,NULL,'2025-04-22 19:35:29','2025-04-22 19:35:29'),(7,'Conexiones Simétricas',NULL,0,NULL,'2025-04-22 19:35:52','2025-04-22 19:35:52');

--
-- Table structure for table `file_downloads`
--

CREATE TABLE `file_downloads` (
  `path` varchar(255) NOT NULL,
  `downloads` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`path`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `file_downloads`
--


--
-- Table structure for table `foda_results`
--

CREATE TABLE `foda_results` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `strengths` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`strengths`)),
  `weaknesses` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`weaknesses`)),
  `opportunities` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`opportunities`)),
  `threats` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`threats`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `foda_results`
--

INSERT INTO `foda_results` (`id`, `strengths`, `weaknesses`, `opportunities`, `threats`, `created_at`) VALUES (1,'[\"-\"]','[\"-\"]','[\"-\"]','[\"-\"]','2025-05-14 19:09:19');

--
-- Table structure for table `form_fields`
--

CREATE TABLE `form_fields` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(10) unsigned NOT NULL,
  `position` int(10) unsigned NOT NULL,
  `type` varchar(50) NOT NULL,
  `label` varchar(255) DEFAULT NULL,
  `placeholder` varchar(255) DEFAULT NULL,
  `required` tinyint(1) NOT NULL DEFAULT 0,
  `options_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`options_json`)),
  `settings_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings_json`)),
  PRIMARY KEY (`id`),
  KEY `idx_form_fields_form` (`form_id`),
  KEY `idx_form_fields_pos` (`position`),
  CONSTRAINT `fk_form_fields_form` FOREIGN KEY (`form_id`) REFERENCES `forms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_fields`
--

INSERT INTO `form_fields` (`id`, `form_id`, `position`, `type`, `label`, `placeholder`, `required`, `options_json`, `settings_json`) VALUES (1,1,0,'short_text','Texto corto','',0,NULL,NULL),(2,1,1,'short_text','Sitio web','https://',0,NULL,NULL),(3,2,0,'short_text','Texto corto','',0,NULL,NULL),(4,2,1,'short_text','Sitio web','https://',0,NULL,NULL),(5,2,2,'short_text','Texto corto','',0,NULL,NULL),(6,2,3,'email','Email','',0,NULL,NULL),(7,3,0,'short_text','Texto corto','',0,NULL,NULL),(8,3,1,'short_text','Sitio web','https://',0,NULL,NULL),(9,3,2,'short_text','Texto corto','',0,NULL,NULL),(10,3,3,'email','Email','',0,NULL,NULL),(11,4,0,'short_text','Texto corto','',0,NULL,NULL),(12,4,1,'short_text','Sitio web','https://',0,NULL,NULL),(13,4,2,'short_text','Texto corto','',0,NULL,NULL),(14,4,3,'email','Email','',0,NULL,NULL),(15,6,0,'short_text','Texto corto','',0,NULL,NULL),(16,6,1,'file','Subir archivo','',0,NULL,NULL),(17,7,0,'short_text','Texto corto','',0,NULL,NULL),(18,7,1,'file','Subir archivo','',0,NULL,NULL),(19,7,2,'rating','Rating (1–5)','',0,NULL,'{\"max\":5}'),(20,8,0,'short_text','Texto corto','',0,NULL,NULL),(21,8,1,'file','Subir archivo','',0,NULL,NULL),(22,8,2,'rating','Rating (1–5)','',0,NULL,'{\"max\":5}'),(23,8,3,'yesno','¿Sí o No?','',0,NULL,NULL),(24,10,0,'statement','','',0,NULL,'{\"content\":\"text saksakasasas\"}'),(25,10,1,'long_text','añade aki','',0,NULL,NULL),(26,10,2,'phone','AÑADIR TELEFONO','',1,NULL,NULL),(27,10,3,'multiple','que prefieres','',0,'[\"pizza\",\"burger\"]',NULL),(28,11,0,'multiple','Se muestran formularios','',0,'[\"si\",\"no\",\"poco\"]',NULL),(29,13,0,'short_text','escribe','aaa',0,NULL,NULL),(30,13,1,'multiple','si o no','',0,'[\"Opción 1\",\"Opción 2\"]',NULL),(31,14,0,'short_text','escribe','aaa',0,NULL,NULL),(32,14,1,'multiple','si o no','',0,'[\"Opción 1\",\"Opción 2\"]',NULL),(33,15,0,'checkbox','','',0,'[\"Opción 1\",\"Opción 2\"]',NULL),(34,16,0,'short_text','Funciona','tal vez',0,NULL,NULL),(35,17,0,'short_text','Funciona','tal vez',0,NULL,NULL),(36,18,0,'checkbox','','',0,'[\"Opción 1\",\"Opción 2\"]',NULL),(37,19,0,'checkbox','que te gusta','',0,'[\"pizza\",\"burger\"]',NULL),(38,20,0,'multiple','te gusta la pizza','',0,'[\"Opción 1\",\"Opción 2\"]',NULL),(39,22,0,'date','dia de prueba','',0,NULL,NULL),(40,23,0,'multiple','funciona','',0,'[\"si\",\"no\"]',NULL);

--
-- Table structure for table `form_responses`
--

CREATE TABLE `form_responses` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `form_id` int(10) unsigned NOT NULL,
  `payload` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`payload`)),
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_responses_form` (`form_id`),
  CONSTRAINT `fk_responses_form` FOREIGN KEY (`form_id`) REFERENCES `forms` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `form_responses`
--


--
-- Table structure for table `forms`
--

CREATE TABLE `forms` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `slug` varchar(160) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `logo_url` varchar(1024) DEFAULT NULL,
  `theme_json` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`theme_json`)),
  `status` enum('public','private') NOT NULL DEFAULT 'public',
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `forms`
--

INSERT INTO `forms` (`id`, `slug`, `title`, `description`, `logo_url`, `theme_json`, `status`, `created_at`, `updated_at`) VALUES (1,'formulario-prueba-sql','Formulario prueba sql','probando db','/modulos/formBuilder/uploads/202510/img_640b5b399b39.webp','{\"id\":\"washed-jungle\",\"vars\":{\"--t-bg\":\"#ecfccb\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#d9f99d\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#47624c\"}}','public','2025-10-31 03:37:30','2025-10-31 03:37:30'),(2,'formulario-prueba-sql-2','Formulario prueba sql 2','probando db2',NULL,'{\"id\":\"washed-jungle\",\"vars\":{\"--t-bg\":\"#ecfccb\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#d9f99d\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#47624c\"}}','public','2025-10-31 03:38:08','2025-10-31 03:38:08'),(3,'formulario-prueba-sql-2-f9d6','Formulario prueba sql 2','probando db2',NULL,'{\"id\":\"washed-jungle\",\"vars\":{\"--t-bg\":\"#ecfccb\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#d9f99d\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#47624c\"}}','public','2025-10-31 03:41:12','2025-10-31 03:41:12'),(4,'formulario-prueba-sql-2-af4e','Formulario prueba sql 2','probando db2',NULL,'{\"id\":\"washed-jungle\",\"vars\":{\"--t-bg\":\"#ecfccb\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#d9f99d\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#47624c\"}}','public','2025-10-31 03:52:05','2025-10-31 03:52:05'),(5,'formulario-sin-titulo','Formulario sin título',NULL,NULL,'{\"id\":\"plain-dark\",\"vars\":{\"--t-bg\":\"#0f172a\",\"--t-card\":\"#111827\",\"--t-border\":\"#1f2937\",\"--t-primary\":\"#60a5fa\",\"--t-text\":\"#e5e7eb\",\"--t-muted\":\"#94a3b8\"}}','public','2025-10-31 03:58:55','2025-10-31 03:58:55'),(6,'formulario-sin-titulo-1400','Formulario sin título',NULL,NULL,'{\"id\":\"plain-dark\",\"vars\":{\"--t-bg\":\"#0f172a\",\"--t-card\":\"#111827\",\"--t-border\":\"#1f2937\",\"--t-primary\":\"#60a5fa\",\"--t-text\":\"#e5e7eb\",\"--t-muted\":\"#94a3b8\"}}','public','2025-10-31 03:59:41','2025-10-31 03:59:41'),(7,'formulario-sin-titulo-2f6a','Formulario sin título',NULL,NULL,'{\"id\":\"plain-dark\",\"vars\":{\"--t-bg\":\"#0f172a\",\"--t-card\":\"#111827\",\"--t-border\":\"#1f2937\",\"--t-primary\":\"#60a5fa\",\"--t-text\":\"#e5e7eb\",\"--t-muted\":\"#94a3b8\"}}','public','2025-10-31 04:01:09','2025-10-31 04:01:09'),(8,'formulario-sin-titulo-f6dd','Formulario sin título',NULL,NULL,'{\"id\":\"washed-raspberry\",\"vars\":{\"--t-bg\":\"#fff1f4\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#ffe4e8\",\"--t-primary\":\"#f43f5e\",\"--t-text\":\"#111827\",\"--t-muted\":\"#6b7280\"}}','public','2025-10-31 04:02:11','2025-10-31 04:02:11'),(9,'formulario-sin-titulo-fdb0','Formulario sin título',NULL,NULL,'{\"id\":\"mono\",\"vars\":{\"--t-bg\":\"#f5f5f5\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#e5e7eb\",\"--t-primary\":\"#111827\",\"--t-text\":\"#111827\",\"--t-muted\":\"#6b7280\"}}','public','2025-10-31 18:59:54','2025-10-31 18:59:54'),(10,'prueba-admin','Prueba admin','probando constructor admin',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-10-31 19:02:12','2025-10-31 19:02:12'),(11,'prueba-admininistrador','Prueba admininistrador','Probando formularios',NULL,'{\"id\":\"forest\",\"vars\":{\"--t-bg\":\"#f0fdf4\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#bbf7d0\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#166534\"}}','public','2025-10-31 21:19:54','2025-10-31 21:19:54'),(12,'formulario-sin-titulo-1e64','Formulario sin título',NULL,NULL,'{\"id\":\"classic\",\"vars\":[]}','public','2025-10-31 22:14:06','2025-10-31 22:14:06'),(13,'prueba-admininistrador-fea1','Prueba admininistrador','probando bd hub admin',NULL,'{\"id\":\"classic\",\"vars\":[]}','public','2025-10-31 22:14:32','2025-10-31 22:14:32'),(14,'prueba-admininistrador-3ba0','Prueba admininistrador','probando bd hub admin',NULL,'{\"id\":\"classic\",\"vars\":[]}','public','2025-10-31 22:15:43','2025-10-31 22:15:43'),(15,'prueba-admininistrador-d286','Prueba admininistrador','prueba administrativa',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-10-31 22:26:37','2025-10-31 22:26:37'),(16,'prueba-admininistrador-65ba','Prueba admininistrador','Probando administrador',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 00:12:22','2025-11-01 00:12:22'),(17,'prueba-admininistrador-22da','Prueba admininistrador','Probando administrador',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 00:12:54','2025-11-01 00:12:54'),(18,'prueba-admininistrador-3821','Prueba admininistrador','1 2 3 4',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 00:29:11','2025-11-01 00:29:11'),(19,'prueba-admin-7022','Prueba admin','1..2...3.',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 00:50:44','2025-11-01 00:50:44'),(20,'prueba-admininistrador-0bb5','Prueba admininistrador','1..2...3',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 00:54:32','2025-11-01 00:54:32'),(21,'formulario-sin-titulo-9fd8','Formulario sin título',NULL,NULL,'{\"id\":\"classic\",\"vars\":{\"--t-bg\":\"#fafbfc\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#eef2f6\",\"--t-primary\":\"#0d6efd\",\"--t-text\":\"#111\",\"--t-muted\":\"#667085\"}}','public','2025-11-01 01:22:12','2025-11-01 01:22:12'),(22,'prueba-admininistrador-8950','Prueba admininistrador','1...2...3..',NULL,'{\"id\":\"sunset\",\"vars\":{\"--t-bg\":\"#fff7ed\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#fed7aa\",\"--t-primary\":\"#ea580c\",\"--t-text\":\"#1f2937\",\"--t-muted\":\"#6b7280\"}}','public','2025-11-01 01:37:05','2025-11-01 01:37:05'),(23,'prueba-admininistrador-1c77','Prueba admininistrador','1...2...3...',NULL,'{\"id\":\"forest\",\"vars\":{\"--t-bg\":\"#f0fdf4\",\"--t-card\":\"#ffffff\",\"--t-border\":\"#bbf7d0\",\"--t-primary\":\"#16a34a\",\"--t-text\":\"#052e16\",\"--t-muted\":\"#166534\"}}','public','2025-11-01 04:10:48','2025-11-01 04:10:48');

--
-- Table structure for table `galleries`
--

CREATE TABLE `galleries` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `galleries`
--

INSERT INTO `galleries` (`id`, `name`, `created_at`) VALUES (1,'carrusel 1','2025-09-12 03:07:43');

--
-- Table structure for table `gallery_photos`
--

CREATE TABLE `gallery_photos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `gallery_id` int(11) NOT NULL,
  `photo_filename` varchar(255) NOT NULL,
  `photo_title` varchar(255) DEFAULT NULL,
  `photo_desc` text DEFAULT NULL,
  `photo_url` varchar(500) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `gallery_id` (`gallery_id`),
  CONSTRAINT `gallery_photos_ibfk_1` FOREIGN KEY (`gallery_id`) REFERENCES `galleries` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `gallery_photos`
--

INSERT INTO `gallery_photos` (`id`, `gallery_id`, `photo_filename`, `photo_title`, `photo_desc`, `photo_url`, `created_at`) VALUES (1,1,'carrusel-1-1.webp','','','','2025-09-12 03:07:43'),(2,1,'carrusel-1-2.webp','','','','2025-09-12 03:07:43'),(3,1,'carrusel-1-3.webp','','','','2025-09-12 03:07:43'),(4,1,'carrusel-1-4.webp','','','','2025-09-12 03:07:44'),(5,1,'carrusel-1-5.webp','','','','2025-09-12 03:07:44');

--
-- Table structure for table `google_reviews_cache`
--

CREATE TABLE `google_reviews_cache` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `place_id` varchar(255) DEFAULT NULL,
  `name` varchar(255) DEFAULT NULL,
  `rating` decimal(3,1) DEFAULT NULL,
  `user_ratings_total` int(11) DEFAULT 0,
  `reviews_json` mediumtext DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `place_id` (`place_id`),
  KEY `idx_updated_at` (`updated_at`),
  KEY `idx_place` (`place_id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `google_reviews_cache`
--

INSERT INTO `google_reviews_cache` (`id`, `place_id`, `name`, `rating`, `user_ratings_total`, `reviews_json`, `updated_at`) VALUES (1,'PRUEBA-123','Clínica Sonrisas MX',4.9,97,'[{\"author_name\":\"Andrea R.\",\"rating\":5,\"text\":\"¡Excelente atención!\",\"relative_time_description\":\"hace 2 semanas\"}]','2025-11-04 18:02:09'),(2,'TEST-AURORA-001','Clínica Dental Aurora',4.8,134,'[\r\n    {\"author_name\":\"María P.\",\"profile_photo_url\":\"https://i.pravatar.cc/80?img=8\",\"rating\":5,\"text\":\"Excelente atención y trabajo muy profesional. Volveré sin duda.\",\"relative_time_description\":\"hace 2 semanas\"},\r\n    {\"author_name\":\"Jorge L.\",\"profile_photo_url\":\"https://i.pravatar.cc/80?img=14\",\"rating\":5,\"text\":\"Me explicaron todo con claridad y el trato fue increíble.\",\"relative_time_description\":\"hace 1 mes\"},\r\n    {\"author_name\":\"Paulina V.\",\"profile_photo_url\":\"https://i.pravatar.cc/80?img=21\",\"rating\":4,\"text\":\"Buen servicio y precio justo. Un poco de espera al llegar.\",\"relative_time_description\":\"hace 3 meses\"}\r\n  ]','2025-11-04 18:07:18');

--
-- Table structure for table `ia_categories`
--

CREATE TABLE `ia_categories` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(120) NOT NULL,
  `slug` varchar(140) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_ia_cat_slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ia_categories`
--


--
-- Table structure for table `ia_ratings`
--

CREATE TABLE `ia_ratings` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `tool_id` int(10) unsigned NOT NULL,
  `rating` tinyint(3) unsigned NOT NULL,
  `user_id` int(10) unsigned DEFAULT NULL,
  `user_ip` varbinary(16) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_ratings_tool` (`tool_id`),
  KEY `idx_ratings_rating` (`rating`),
  CONSTRAINT `fk_ratings_tool` FOREIGN KEY (`tool_id`) REFERENCES `ia_tools` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ia_ratings`
--


--
-- Table structure for table `ia_tags`
--

CREATE TABLE `ia_tags` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(120) NOT NULL,
  `slug` varchar(140) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_ia_tag_slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ia_tags`
--


--
-- Table structure for table `ia_tool_tag`
--

CREATE TABLE `ia_tool_tag` (
  `tool_id` int(10) unsigned NOT NULL,
  `tag_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`tool_id`,`tag_id`),
  KEY `idx_tt_tag` (`tag_id`),
  CONSTRAINT `fk_tt_tag` FOREIGN KEY (`tag_id`) REFERENCES `ia_tags` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_tt_tool` FOREIGN KEY (`tool_id`) REFERENCES `ia_tools` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ia_tool_tag`
--


--
-- Table structure for table `ia_tools`
--

CREATE TABLE `ia_tools` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `category_id` int(10) unsigned NOT NULL,
  `name` varchar(180) NOT NULL,
  `alias` varchar(200) NOT NULL,
  `url` varchar(500) NOT NULL,
  `description` text DEFAULT NULL,
  `icon_path` varchar(500) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `published` tinyint(1) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_ia_tools_alias` (`alias`),
  KEY `idx_ia_tools_cat` (`category_id`),
  KEY `idx_ia_tools_pub` (`published`),
  CONSTRAINT `fk_ia_tools_cat` FOREIGN KEY (`category_id`) REFERENCES `ia_categories` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `ia_tools`
--


--
-- Table structure for table `imagenes_generadas`
--

CREATE TABLE `imagenes_generadas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `prompt` varchar(255) NOT NULL,
  `file` varchar(255) NOT NULL,
  `fecha` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `imagenes_generadas`
--


--
-- Table structure for table `imagenes_publicitarias`
--

CREATE TABLE `imagenes_publicitarias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `prompt` text NOT NULL,
  `image_path` varchar(255) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `imagenes_publicitarias`
--


--
-- Table structure for table `images`
--

CREATE TABLE `images` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) DEFAULT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `thumbnail_path` varchar(255) DEFAULT NULL,
  `image_data` longblob NOT NULL,
  PRIMARY KEY (`id`),
  KEY `images_ibfk_1` (`product_id`),
  CONSTRAINT `images_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `images`
--


--
-- Table structure for table `informacion`
--

CREATE TABLE `informacion` (
  `clave` varchar(100) NOT NULL,
  `valor` text DEFAULT NULL,
  PRIMARY KEY (`clave`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `informacion`
--

INSERT INTO `informacion` (`clave`, `valor`) VALUES ('canal_whatsapp',''),('cerrado_domingo','1'),('cerrado_jueves','0'),('cerrado_lunes','0'),('cerrado_martes','0'),('cerrado_miercoles','0'),('cerrado_sabado','0'),('cerrado_viernes','0'),('direccion',''),('email','yo@miguelangelgutierrez.com.mx'),('empresa','ManIA'),('enlace_direccion',''),('facebook','https://www.facebook.com/'),('horario_domingo_de',''),('horario_domingo_hasta',''),('horario_jueves_de','09:00'),('horario_jueves_hasta','18:00'),('horario_lunes_de','09:00'),('horario_lunes_hasta','18:00'),('horario_martes_de','09:00'),('horario_martes_hasta','18:00'),('horario_miercoles_de','09:00'),('horario_miercoles_hasta','18:00'),('horario_sabado_de','09:00'),('horario_sabado_hasta','14:00'),('horario_viernes_de','09:00'),('horario_viernes_hasta','18:00'),('instagram','https://www.instagram.com/'),('linkedin',''),('messenger',''),('slogan','obsesión Inteligente'),('telefono','8135618086'),('telegram',''),('tiktok',''),('url_base','https://mania.mx/'),('whatsapp','8135618086'),('x','https://x.com/'),('youtube','https://www.youtube.com/channel/');

--
-- Table structure for table `inventario`
--

CREATE TABLE `inventario` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `sku` varchar(80) NOT NULL,
  `nombre` varchar(150) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `categoria` varchar(120) DEFAULT NULL,
  `cantidad` int(11) DEFAULT 0,
  `stock_minimo` int(11) DEFAULT 0,
  `costo` decimal(12,2) DEFAULT NULL,
  `precio` decimal(12,2) DEFAULT NULL,
  `ubicacion` varchar(120) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventario`
--


--
-- Table structure for table `keywords_google`
--

CREATE TABLE `keywords_google` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `query` varchar(255) NOT NULL,
  `clicks` int(11) DEFAULT 0,
  `impressions` int(11) DEFAULT 0,
  `ctr` decimal(5,2) DEFAULT NULL,
  `position` decimal(6,2) DEFAULT NULL,
  `fetch_date` date NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_query_date` (`query`,`fetch_date`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `keywords_google`
--


--
-- Table structure for table `links`
--

CREATE TABLE `links` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `url` varchar(1024) NOT NULL,
  `target` enum('_self','_blank') NOT NULL DEFAULT '_self',
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `links`
--


--
-- Table structure for table `litigios`
--

CREATE TABLE `litigios` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `contrato_id` int(10) unsigned DEFAULT NULL,
  `juzgado` varchar(150) DEFAULT NULL,
  `expediente` varchar(120) DEFAULT NULL,
  `estado` enum('abierto','en_proceso','cerrado') DEFAULT NULL,
  `fecha_inicio` date DEFAULT NULL,
  `fecha_cierre` date DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `litigios`
--


--
-- Table structure for table `membresias`
--

CREATE TABLE `membresias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  `tipo_membresia` varchar(50) NOT NULL,
  `tarjeta` varchar(50) NOT NULL,
  `fecha_inicio` date NOT NULL,
  `plan` varchar(50) NOT NULL,
  `proxima_renovacion` date NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `membresias`
--


--
-- Table structure for table `menu_administracion`
--

CREATE TABLE `menu_administracion` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `parent_id` int(11) NOT NULL DEFAULT 0,
  `nombre` varchar(100) NOT NULL,
  `icono` varchar(100) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `archivos` varchar(255) DEFAULT NULL,
  `orden` int(11) NOT NULL DEFAULT 1,
  `es_menu_padre` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=183 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `menu_administracion`
--

INSERT INTO `menu_administracion` (`id`, `parent_id`, `nombre`, `icono`, `link`, `archivos`, `orden`, `es_menu_padre`) VALUES (1,0,'Panel de Control','fas fa-tachometer-alt','index.php','index.php',0,0),(2,0,'Sitio Web','fa fa-desktop','#submenusitioweb','',0,1),(3,2,'Páginas','fas fa-file-alt','lista_paginas.php','lista_paginas.php',1,0),(4,2,'Artículos','fas fa-newspaper','lista_articulos.php','lista_articulos.php',2,0),(6,2,'Etiquetas','fas fa-tags','lista_tags.php','lista_tags.php',5,0),(7,80,'Información','fa fa-file','informacion.php','informacion.php',3,0),(8,0,'Productos','fas fa-boxes','#submenuproductos','',6,0),(9,8,'Lista de Productos','fas fa-list','lista_productos.php','lista_productos.php',1,0),(11,8,'Categorías de Producto','fas fa-folder','lista_categorias_productos.php','lista_categorias_productos.php',3,0),(12,8,'Subcategorías de Producto','fas fa-folder-open','lista_subcategorias_productos.php','lista_subcategorias_productos.php',4,0),(15,13,'Administrar Cotizaciones','fas fa-file-invoice-dollar','admin_cotizaciones.php','admin_cotizaciones.php',2,0),(18,80,'Usuarios','fas fa-users-cog','manage_auth.php','manage_auth.php',6,0),(19,2,'SEO','fas fa-search','#submenuSEO','',9,1),(21,0,'Clientes','fas fa-users','#submenuClientes','',3,1),(22,21,'Clientes','fas fa-user','clientes.php','clientes.php',1,0),(24,21,'Prospectos','fas fa-address-book','prospectos.php','prospectos.php',3,0),(30,0,'Producción','fas fa-industry','#submenuproducción','',6,1),(32,30,'Proyectos','fas fa-project-diagram','proyectos.php','proyectos.php',2,0),(33,30,'Tareas','fas fa-tasks','tareas.php','tareas.php',3,0),(36,0,'Ventas','fas fa-money-bill-wave','#submenuventas','',9,0),(37,36,'Cotizaciones','fas fa-file-invoice','cotizaciones.php','cotizaciones.php',1,0),(39,36,'Facturas','fas fa-file-invoice-dollar','lista_facturas.php','lista_facturas.php',3,0),(40,36,'Pagos','fas fa-credit-card','lista_pagos.php','lista_pagos.php',4,0),(41,36,'Contratos','fas fa-file-signature','contratos_venta.php','contratos_venta.php',5,0),(42,36,'Suscripciones','fas fa-receipt','suscripciones.php','suscripciones.php',6,0),(43,36,'Entregas','fas fa-shipping-fast','entregas.php','entregas.php',7,0),(44,0,'Contabilidad','fas fa-balance-scale','#submenucontabilidad','',10,1),(45,44,'Gastos','fas fa-money-check-alt','gastos.php','gastos.php',1,0),(46,44,'Cuentas','fas fa-wallet','lista_cuentas.php','lista_cuentas.php',2,0),(47,44,'Transferencias','fas fa-exchange-alt','lista_transferencias.php','lista_transferencias.php',3,0),(48,44,'Facturación','fas fa-file-invoice','facturacion_contable.php','facturacion_contable.php',4,0),(49,44,'Configuración','fas fa-sliders-h','config_contabilidad.php','config_contabilidad.php',5,0),(50,0,'Inventario','fas fa-warehouse','#submenuInventario','',12,1),(51,50,'Productos','fas fa-box','inventario_productos.php','inventario_productos.php',1,0),(53,50,'Activos','fas fa-dolly','lista_activos.php','lista_activos.php',3,0),(54,50,'Almacenes','fas fa-map-marker-alt','lista_almacenes.php','lista_almacenes.php',4,0),(55,50,'Inventarios','fas fa-clipboard-check','inventario.php','inventario.php',5,0),(56,0,'Recursos Humanos','fas fa-user-tie','#submenuRH','',8,1),(57,56,'Personal','fas fa-id-badge','empleados.php','empleados.php',1,0),(58,56,'Comisiones','fas fa-hand-holding-usd','comisiones.php','comisiones.php',2,0),(59,56,'Tiempos','fas fa-clock','rh_tiempos.php','rh_tiempos.php',3,0),(60,56,'Contratos','fas fa-file-signature','contratos_laborales.php','contratos_laborales.php',4,0),(61,56,'Reclutamiento','fas fa-user-plus','rh_reclutamiento.php','rh_reclutamiento.php',5,0),(62,56,'Capacitación','fas fa-chalkboard-teacher','capacitacion.php','capacitacion.php',6,0),(63,56,'Prestaciones','fas fa-briefcase-medical','rh_prestaciones.php','rh_prestaciones.php',7,0),(64,56,'Configuración','fas fa-sliders-h','rh_configuracion.php','rh_configuracion.php',8,0),(65,0,'Compras','fas fa-shopping-cart','#submenuCompras','',14,1),(67,65,'Órdenes de Compras','fas fa-file-invoice','compras_ordenes.php','compras_ordenes.php',2,0),(68,65,'Compras','fas fa-cart-arrow-down','compras.php','compras.php',3,0),(69,65,'Facturas','fas fa-file-invoice-dollar','compras_facturas.php','compras_facturas.php',4,0),(70,65,'Pagos','fas fa-credit-card','compras_pagos.php','compras_pagos.php',5,0),(71,65,'Reportes','fas fa-chart-bar','compras_reportes.php','compras_reportes.php',6,0),(72,65,'Configuración','fas fa-sliders-h','compras_configuracion.php','compras_configuracion.php',7,0),(73,0,'Comunicación','fas fa-comment-dots','#submenucomunicación','',4,1),(74,73,'Chat','fas fa-comments','chat.php','chat.php',1,0),(77,0,'Marketing','fas fa-bullhorn','#submenuMarketing','',9,1),(78,77,'Redes Sociales','fas fa-hashtag','metricool_like.php','metricool_like.php',1,0),(79,77,'Google Ads','fab fa-google','marketing_ads.php','marketing_ads.php',2,0),(80,0,'Configuracion','fa fa-cog','#submenuconfiguracion','',100,1),(81,80,'Menu Administración','fa fa-sitemap','menu_administracion.php','',0,0),(82,0,'Servicios','fa fa-cogs','#submenuservicios','',4,0),(83,82,'Lista de Servicios','fa fa-list-ul','lista_servicios.php','lista_servicios.php',3,0),(86,82,'Divisiones','fa fa-server','lista_divisiones.php','lista_divisiones.php',1,0),(87,82,'Categorías','fas fa-folder','lista_categorias_servicio.php','lista_categorias_servicio.php',2,0),(88,2,'Galerías','fa fa-object-group','list_galerias.php','list_galerias.php',6,0),(89,2,'Apariencia','fa fa-pencil','apariencia.php','apariencia.php',10,0),(90,73,'Configuración','fa fa-cog','configuracion_comunicacion.php','configuracion_comunicacion.php',5,0),(91,0,'Legal','fa fa-graduation-cap','#submenulegal','',6,1),(92,91,'Botones Legales','fa fa-sitemap','botones_legales.php','botones_legales.php',0,0),(93,91,'Aaviso de cookies','fa fa-cookie','aviso-cookies.php','aviso-cookies.php',3,0),(94,56,'Departamentos','fa fa-building','departamentos.php','departamentos.php',0,0),(95,2,'Código Personalizado','fa fa-code','etiquetas_codigo.php','etiquetas_codigo.php',7,0),(96,2,'Revista','fa fa-book','revista.php','revista.php',8,0),(97,2,'Configuracion Tienda','fa fa-gears','configuracion_tienda.php','configuracion_tienda.php',11,0),(98,21,'Tipos de Cliente','fa fa-male','lista_tipo_cliente.php','lista_tipo_cliente.php',8,0),(99,0,'App','fa fa-cubes','#submenuapp','',3,0),(100,99,'Configuración App','fa fa-cogs','configuracion_app.php','configuracion_app.php',0,0),(101,80,'Ubicaciones','fa fa-map-signs','ubicaciones.php','ubicaciones.php',3,0),(102,0,'Servicio al Cliente','fa fa-check-circle','','',7,1),(103,102,'Preguntas Frecuentes','fa fa-question','lista_faq.php','lista_faq.php',0,0),(104,102,'Reseñas','fa fa-star','lista_resenas.php','lista_resenas.php',0,0),(105,77,'Propuesta de valor','fa fa-star','propuesta_valor.php','propuesta_valor.php',0,0),(106,107,'Generar Imagen','fa fa-image','generar_imagen.php','generar_imagen.php',0,0),(107,0,'Diseño','fa fa-pencil-square','#submenudiseno','',6,1),(108,77,'Cuentas de Redes Sociales','','´pages/manage_social_accounts.php','pages/manage_social_accounts.php',0,0),(109,80,'Configuracion AI','fa fa-robot','configuracion_ia.php','configuracion_ia.php',0,0),(110,111,'Contexto Empresarial','fa fa-building','contexto_empresarial.php','contexto_empresarial.php',0,0),(111,0,'Planeación Estratégica','fa fa-map-signs','#planeacionestrategica','',0,1),(113,111,'Filosofía Empresarial','fa fa-compass','filosofia_empresarial.php','filosofia_empresarial.php',2,0),(114,0,'Suscripciones','fa fa-calendar','#submenuSuscripciones','',5,1),(115,111,'Trayectoria','fa fa-briefcase','trayectoria.php','trayectoria.php',3,0),(116,114,'Paquetes','fa fa-archive','admin_packages.php','admin_packages.php',0,0),(117,2,'Configuracion Servicios','fa fa-cog','configuracion_servicios.php','configuracion_servicios.php',20,0),(119,0,'Calendario','fa fa-calendar-check','calendario.php','calendario.php',5,0),(121,80,'Roles','','roles.php','roles.php',8,0),(129,50,'Activos Tecnológicos','fa fa-server','activos_tecnologicos.php','activos_tecnologicos.php',3,0),(130,56,'Asesores','fa fa-briefcase','agentes.php','agentes.php',0,0),(131,0,'Directorio de Negocios','fa fa-map-marked-alt','#','#',20,1),(132,131,'Negocios','fa fa-store','lista_negocios.php','lista_negocios.php',0,0),(133,19,'Mapa del Sitio','fa fa-sitemap','mapa_del_sitio.php','mapa_del_sitio.php',0,0),(134,111,'Análisis FODA','fa fa-chart-pie','foda.php','foda.php',3,0),(135,111,'Análisis PESTEL','fa fa-layer-group','pestel.php','pestel.php',4,0),(136,0,'Archivos','fa fa-file','archivos.php?path=&view=thumb','archivos.php?path=&view=thumb',0,0),(137,107,'Editor','fa fa-pencil-square','editor.php','editor.php',1,0),(138,30,'Manuales de Procedimientos','fa fa-book','list_procedures.php','list_procedures.php',0,0),(139,131,'Categorias','fa fa-sitemap','categorias_negocios_list.php','categorias_negocios_list.php',0,0),(140,2,'Enlaces','fa fa-link','lista_enlaces.php','lista_enlaces.php',0,0),(141,0,'Prompts AI','','','',0,1),(142,141,'Listado de Prompts','','lista_prompts.php','lista_prompts.php',0,0),(143,141,'Crear Prompt','','prompt.php','prompt.php',0,0),(144,141,'Prompt upload','','prompts_upload.php','prompts_upload.php',0,0),(145,141,'Delete Prompt','','borrar_prompt.php','borrar_prompt.php',0,0),(146,141,'Borrar directorio AI','','delete_file.php','delete_file.php',0,0),(147,141,'Nueva Categoria','','prompt_category_quick_add.php','prompt_category_quick_add.php',0,0),(156,0,'Directorio IA','','','',0,1),(163,156,'IA Borrado','','ai_borrar.php','ai_borrar.php',0,0),(164,156,'IA Eliminar Archivo','','ai_eliminar_archivo.php','ai_eliminar_archivo.php',0,0),(165,156,'IA Nueva Entrada','','ai_form.php','ai_form.php',0,0),(166,156,'IA Lista','','ai_lista.php','ai_lista.php',0,0),(167,156,'IA Upload','','ai_upload.php','ai_upload.php',0,0),(168,156,'IA Guardado','','ai_save.php','ai_save.php',0,0),(174,0,'Constructor de Formularios','','','',0,1),(176,174,'Nuevo Formulario','','formbuilder.php','formbuilder.php',0,0),(177,174,'Editar formularios','','fb_forms_lista.php','fb_forms_lista.php',0,0),(178,174,'Respuestas Formularios','','fb_respuestas.php','fb_respuestas.php',0,0),(179,0,'Galería de Videos','','','',0,1),(180,179,'Agregar Video','','videoGallery_upload.php','videoGallery_upload.php',0,0);

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from_entity` enum('admin','client') NOT NULL,
  `from_id` int(11) NOT NULL,
  `to_entity` enum('admin','client') NOT NULL,
  `to_id` int(11) NOT NULL,
  `subject` varchar(255) NOT NULL,
  `body_filename` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `messages`
--


--
-- Table structure for table `negocio_galeria`
--

CREATE TABLE `negocio_galeria` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `negocio_id` int(11) NOT NULL,
  `archivo` varchar(255) NOT NULL,
  `titulo` varchar(255) NOT NULL DEFAULT '',
  `orden` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `negocio_id` (`negocio_id`),
  CONSTRAINT `negocio_galeria_ibfk_1` FOREIGN KEY (`negocio_id`) REFERENCES `negocios` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `negocio_galeria`
--


--
-- Table structure for table `negocio_tags`
--

CREATE TABLE `negocio_tags` (
  `negocio_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  PRIMARY KEY (`negocio_id`,`tag_id`),
  KEY `idx_nt_negocio` (`negocio_id`),
  KEY `idx_nt_tag` (`tag_id`),
  CONSTRAINT `fk_nt_negocio` FOREIGN KEY (`negocio_id`) REFERENCES `negocios` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_nt_tag` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `negocio_tags`
--


--
-- Table structure for table `negocios`
--

CREATE TABLE `negocios` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `categoria` varchar(100) NOT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `banner` varchar(255) DEFAULT NULL,
  `gallery` text DEFAULT NULL,
  `telefono` varchar(50) DEFAULT NULL,
  `whatsapp` varchar(50) DEFAULT NULL,
  `sitioweb` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `direccion` text DEFAULT NULL,
  `pais` varchar(100) NOT NULL DEFAULT 'México',
  `estado` varchar(100) DEFAULT NULL,
  `delegacion_municipio` varchar(100) DEFAULT NULL,
  `colonia` varchar(100) DEFAULT NULL,
  `cp` varchar(10) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `horarios` text DEFAULT NULL,
  `horarios_json` text DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `tiktok` varchar(255) DEFAULT NULL,
  `youtube` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `video` varchar(255) DEFAULT NULL,
  `video_url` varchar(255) DEFAULT NULL,
  `x_social` varchar(255) DEFAULT NULL,
  `grupo_whatsapp` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `lat` decimal(10,7) DEFAULT NULL,
  `lng` decimal(10,7) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `negocios`
--


--
-- Table structure for table `opiniones`
--

CREATE TABLE `opiniones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(100) NOT NULL,
  `user_email` varchar(150) NOT NULL,
  `rating` tinyint(1) NOT NULL,
  `comment` text NOT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `opiniones`
--


--
-- Table structure for table `package_features`
--

CREATE TABLE `package_features` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `package_id` int(11) NOT NULL,
  `feature_id` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `unique_package_feature` (`package_id`,`feature_id`),
  KEY `idx_package_features_feature_id` (`feature_id`),
  CONSTRAINT `package_features_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE,
  CONSTRAINT `package_features_ibfk_2` FOREIGN KEY (`feature_id`) REFERENCES `features` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `package_features`
--


--
-- Table structure for table `package_prices`
--

CREATE TABLE `package_prices` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `package_id` int(11) NOT NULL,
  `duration` varchar(20) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `currency` varchar(3) NOT NULL DEFAULT 'MXN',
  `is_offer` tinyint(1) NOT NULL DEFAULT 0,
  `offer_price` decimal(10,2) DEFAULT NULL,
  `offer_description` varchar(255) DEFAULT NULL,
  `stripe_price_id` varchar(100) DEFAULT NULL,
  `paypal_plan_id` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `stripe_price_id` (`stripe_price_id`),
  UNIQUE KEY `paypal_plan_id` (`paypal_plan_id`),
  KEY `package_id` (`package_id`),
  KEY `idx_package_prices_duration` (`duration`),
  KEY `idx_package_prices_currency` (`currency`),
  KEY `idx_package_prices_is_offer` (`is_offer`),
  KEY `idx_package_prices_is_active` (`is_active`),
  CONSTRAINT `package_prices_ibfk_1` FOREIGN KEY (`package_id`) REFERENCES `packages` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `package_prices`
--


--
-- Table structure for table `packages`
--

CREATE TABLE `packages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(110) NOT NULL,
  `description` text DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `display_order` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `color` varchar(9) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `slug` (`slug`),
  KEY `idx_packages_is_active` (`is_active`),
  KEY `idx_packages_display_order` (`display_order`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `packages`
--


--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `layout_data` text NOT NULL,
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `og_title` varchar(255) DEFAULT NULL,
  `og_description` text DEFAULT NULL,
  `og_image` varchar(255) DEFAULT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  `menu_label` varchar(255) DEFAULT NULL,
  `menu_order` int(11) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `alias` varchar(255) NOT NULL,
  `is_homepage` tinyint(1) NOT NULL DEFAULT 0,
  `menu_parent` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `alias` (`alias`)
) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`id`, `title`, `layout_data`, `meta_title`, `meta_description`, `meta_keywords`, `og_title`, `og_description`, `og_image`, `created_at`, `updated_at`, `menu_label`, `menu_order`, `published`, `alias`, `is_homepage`, `menu_parent`) VALUES (9,'Inicio','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"buscadorSmart\",\"folder\":\"buscadorSmart\",\"name\":\"Buscador SmartWeb\",\"settings\":{\"placeholder\":\"Buscar en el sitio...\",\"minChars\":2,\"maxResults\":20,\"showCategory\":true,\"showImage\":false,\"emptyStateImage\":\"\",\"noResultsText\":\"No encontramos resultados para tu búsqueda.\",\"ariaLabel\":\"Buscar en el sitio\",\"sitemap\":\"/sitemap.xml\"}}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-10-15 05:20:40','2025-11-19 15:51:00','Inicio',1,1,'inicio',1,0),(13,'Directorio IA','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"directorioIA\",\"folder\":\"directorioIA\",\"name\":\"Directorio de IAs\",\"heading\":\"Directorio de Inteligencias Artificiales\",\"showSearch\":true,\"showTagFilters\":true,\"perPage\":40}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-10-15 05:33:19','2025-10-19 22:54:45','Directorio IA',2,1,'directorio-ia',0,0),(14,'Noticias','[]','','','',NULL,NULL,'','2025-10-15 05:33:33','2025-10-15 05:33:33','Noticias',3,1,'noticias',0,0),(16,'Prompts','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"prompts\",\"folder\":\"prompts\",\"name\":\"Listado de Prompts\",\"categorySlug\":\"\",\"tagSlug\":\"\",\"limit\":12,\"showSearch\":true,\"showTags\":true,\"order\":\"recent\"}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-10-15 18:43:57','2025-10-19 22:55:03','Prompts',4,1,'prueba-prompts',0,0),(21,'Formularios usuarios','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"formHub\",\"folder\":\"formHub\",\"name\":\"Hub de Formularios\",\"options\":{\"slug\":\"\",\"buscar\":\"\",\"mostrarBuscador\":true,\"alto\":700}}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-10-31 20:49:18','2025-11-02 04:16:22','Formularios',5,1,'formularios-usuarios',0,0),(22,'Reseñas','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"googleReviews\",\"folder\":\"googleReviews\",\"name\":\"Google Reviews\",\"placeId\":\"ChIJSRALIxRD6oYRPqZJecaI0pg\",\"maxReviews\":6,\"showAvatars\":true,\"lang\":\"es\",\"settings\":{\"placeId\":\"TEST-AURORA-001\",\"language\":\"es\",\"maxReviews\":10,\"refreshHours\":24,\"showAuthorPhoto\":true,\"headingText\":\"Las opiniones de nuestros pacientes\",\"ctaText\":\"Déjanos una reseña en Google\",\"ctaVariant\":\"outline\",\"showHeaderBar\":true,\"customWriteUrl\":\"https://www.google.com/search?hl=en-MX&gl=mx&q=Endodoncia+-+Especialista+con+Maestr%C3%ADa+en+Endodoncia,+Plaza+Cristal,+Perif.+de+la+Juventud+5100-Local+6,+Colinas+del+Sol+I+Etapa,+31110+Chihuahua,+Chih.&ludocid=11012014424894055998&lsig=AB86z5VirBw-LV429IJLUMFO_D5T#lrd=0x86ea4314230b1049:0x98d288c67949a63e,3\"}}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-11-04 16:32:23','2025-11-11 18:37:33','',0,0,'reviews',0,NULL),(23,'cursos IA','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"videoGallery\",\"folder\":\"videoGallery\",\"name\":\"Galería de Videos\",\"items\":[],\"options\":{\"grid\":true,\"columns\":4,\"preload\":\"metadata\",\"mutedAutoplay\":false}}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-11-11 19:25:20','2025-11-15 18:51:57','cursos IA',6,1,'videos',0,0),(30,'Tienda','[{\"type\":\"row\",\"layout\":\"12\",\"columns\":[{\"width\":12,\"modules\":[{\"type\":\"includeSimple\",\"folder\":\"includeSimple\",\"name\":\"Incluir un archivo PHP\",\"filename\":\"productos.php\"}],\"colSettings\":{}}],\"rowSettings\":{\"isFullWidth\":false,\"backgroundColor\":\"\",\"backgroundImage\":\"\",\"backgroundVideo\":\"\",\"rowTitle\":\"\",\"margin\":\"\",\"padding\":\"\",\"textColor\":\"\",\"linkColor\":\"\"}}]','','','',NULL,NULL,'','2025-11-27 17:35:31','2025-11-27 17:35:31','Tienda',7,1,'tienda',0,0);

--
-- Table structure for table `pagos`
--

CREATE TABLE `pagos` (
  `id_pago` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id_factura` int(10) unsigned NOT NULL,
  `fecha_pago` datetime NOT NULL,
  `monto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `metodo_pago` varchar(50) NOT NULL DEFAULT 'Efectivo',
  `referencia` varchar(100) DEFAULT NULL,
  `notas` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT NULL ON UPDATE current_timestamp(),
  PRIMARY KEY (`id_pago`),
  KEY `idx_factura` (`id_factura`),
  CONSTRAINT `fk_pagos_facturas` FOREIGN KEY (`id_factura`) REFERENCES `facturas` (`id_factura`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pagos`
--


--
-- Table structure for table `pagos_compras`
--

CREATE TABLE `pagos_compras` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `factura_id` int(10) unsigned DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `monto` decimal(12,2) DEFAULT NULL,
  `metodo` varchar(60) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pagos_compras`
--


--
-- Table structure for table `paises`
--

CREATE TABLE `paises` (
  `pais` varchar(100) NOT NULL,
  `codigo_pais` varchar(10) NOT NULL,
  `prefijo` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `paises`
--

INSERT INTO `paises` (`pais`, `codigo_pais`, `prefijo`) VALUES ('México','MX','+52'),('Estados Unidos','US','+1'),('Canadá','CA','+1'),('Perú','PE','+51'),('España','ES','+34'),('Colombia','CO','+57'),('Argentina','AR','+54'),('Brasil','BR','+55');

--
-- Table structure for table `pedidos`
--

CREATE TABLE `pedidos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `codigo_pedido` varchar(50) NOT NULL,
  `fecha` datetime NOT NULL DEFAULT current_timestamp(),
  `nombre` varchar(255) DEFAULT NULL,
  `telefono` varchar(50) DEFAULT NULL,
  `correo` varchar(255) DEFAULT NULL,
  `calle_numero` varchar(255) DEFAULT NULL,
  `colonia` varchar(255) DEFAULT NULL,
  `ciudad` varchar(255) DEFAULT NULL,
  `estado` varchar(255) DEFAULT NULL,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `tipo_pedido` enum('WHATSAPP','COTIZACION','COMPRA') NOT NULL,
  `status` varchar(50) NOT NULL DEFAULT 'pendiente',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `pedidos`
--


--
-- Table structure for table `pedidos_productos`
--

CREATE TABLE `pedidos_productos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `pedido_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `nombre_producto` varchar(255) NOT NULL,
  `precio` decimal(10,2) NOT NULL DEFAULT 0.00,
  `cantidad` int(11) NOT NULL DEFAULT 1,
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`),
  KEY `pedido_id` (`pedido_id`),
  CONSTRAINT `pedidos_productos_ibfk_1` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `pedidos_productos`
--


--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `description`) VALUES (1,'admin.access','Acceso al panel de administración'),(4,'user.view','Ver listado de usuarios'),(5,'user.manage','Crear/editar usuarios'),(6,'permissions.manage','Gestionar permisos del sistema'),(7,'product.view','Ver productos'),(8,'product.manage','Crear/editar productos'),(11,'usuario.app','Acceso a la Aplicacion de Front'),(12,'member.access','Acceso a Miembros');

--
-- Table structure for table `pestel_results`
--

CREATE TABLE `pestel_results` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `dimension` varchar(20) NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `impact` enum('Alto','Medio','Bajo') NOT NULL,
  `urgency` enum('Inmediato','Corto plazo','Largo plazo') NOT NULL,
  `owner` varchar(100) DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pestel_results`
--


--
-- Table structure for table `planeacion_estrategica`
--

CREATE TABLE `planeacion_estrategica` (
  `clave` varchar(100) NOT NULL,
  `valor` text NOT NULL,
  `imagen` varchar(255) DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`clave`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `planeacion_estrategica`
--

INSERT INTO `planeacion_estrategica` (`clave`, `valor`, `imagen`, `updated_at`) VALUES ('codigo_conducta','',NULL,'2025-07-25 13:58:50'),('compromiso_comunidad','',NULL,'2025-07-25 13:58:50'),('cultura_organizacional','',NULL,'2025-07-25 13:58:50'),('lema','',NULL,'2025-07-25 13:58:50'),('manifiesto','',NULL,'2025-07-25 13:58:50'),('mision','',NULL,'2025-07-25 14:16:47'),('principios','',NULL,'2025-07-25 13:58:50'),('proposito','',NULL,'2025-07-25 14:16:45'),('valores','',NULL,'2025-07-25 14:16:49'),('vision','',NULL,'2025-07-25 14:16:51');

--
-- Table structure for table `poderes_notariales`
--

CREATE TABLE `poderes_notariales` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `otorgante` varchar(150) DEFAULT NULL,
  `apoderado` varchar(150) DEFAULT NULL,
  `alcance` text DEFAULT NULL,
  `fecha` date DEFAULT NULL,
  `archivo` varchar(255) DEFAULT NULL,
  `estado` enum('vigente','revocado') DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `poderes_notariales`
--


--
-- Table structure for table `prestaciones`
--

CREATE TABLE `prestaciones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `tipo` varchar(100) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `valor` decimal(12,2) DEFAULT NULL,
  `fecha_otorgada` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prestaciones`
--


--
-- Table structure for table `procedure_departments`
--

CREATE TABLE `procedure_departments` (
  `procedure_id` int(11) NOT NULL,
  `department_id` int(11) NOT NULL,
  PRIMARY KEY (`procedure_id`,`department_id`),
  KEY `fk_proc_dep_dept` (`department_id`),
  CONSTRAINT `fk_proc_dep_dept` FOREIGN KEY (`department_id`) REFERENCES `departamentos` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_proc_dep_proc` FOREIGN KEY (`procedure_id`) REFERENCES `procedures` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `procedure_departments`
--


--
-- Table structure for table `procedures`
--

CREATE TABLE `procedures` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `department_id` int(11) DEFAULT NULL,
  `bpmn_xml` longtext NOT NULL,
  `description` text DEFAULT NULL,
  `video_data` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `procedures`
--


--
-- Table structure for table `product_tags`
--

CREATE TABLE `product_tags` (
  `product_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  PRIMARY KEY (`product_id`,`tag_id`),
  KEY `tag_id` (`tag_id`),
  CONSTRAINT `product_tags_ibfk_1` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  CONSTRAINT `product_tags_ibfk_2` FOREIGN KEY (`tag_id`) REFERENCES `tags` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `product_tags`
--


--
-- Table structure for table `products`
--

CREATE TABLE `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  `subcategory_id` int(11) DEFAULT NULL,
  `date_added` timestamp NOT NULL DEFAULT current_timestamp(),
  `color` varchar(100) NOT NULL DEFAULT '',
  `stock` int(11) NOT NULL DEFAULT 0,
  `anaquel` varchar(100) NOT NULL DEFAULT '',
  `promotion` tinyint(1) DEFAULT 0,
  `promotion_price` decimal(10,2) DEFAULT NULL,
  `promotion_expiry` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `alias` (`alias`),
  KEY `fk_products_category` (`category_id`),
  CONSTRAINT `fk_products_category` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `name`, `alias`, `description`, `price`, `category_id`, `subcategory_id`, `date_added`, `color`, `stock`, `anaquel`, `promotion`, `promotion_price`, `promotion_expiry`) VALUES (1,'SmartBiz','smartbiz','',30000.00,NULL,NULL,'2025-11-27 17:34:49','',0,'',0,0.00,'0000-00-00');

--
-- Table structure for table `prompt_categories`
--

CREATE TABLE `prompt_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(120) NOT NULL,
  `slug` varchar(150) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prompt_categories`
--

INSERT INTO `prompt_categories` (`id`, `name`, `slug`, `created_at`) VALUES (1,'General','general','2025-10-15 19:14:15'),(2,'Marketing','marketing','2025-10-15 19:14:15'),(3,'Programación','programacion','2025-10-15 19:14:15'),(4,'Diseño','diseno','2025-10-15 19:14:15'),(5,'ventas','ventas','2025-10-15 20:24:19'),(6,'Video Juegos','video-juegos','2025-10-16 19:17:42');

--
-- Table structure for table `prompt_tag_map`
--

CREATE TABLE `prompt_tag_map` (
  `prompt_id` int(11) NOT NULL,
  `tag_id` int(11) NOT NULL,
  PRIMARY KEY (`prompt_id`,`tag_id`),
  KEY `fk_ptm_tag` (`tag_id`),
  CONSTRAINT `fk_ptm_prompt` FOREIGN KEY (`prompt_id`) REFERENCES `prompts` (`id`) ON DELETE CASCADE,
  CONSTRAINT `fk_ptm_tag` FOREIGN KEY (`tag_id`) REFERENCES `prompt_tags` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prompt_tag_map`
--

INSERT INTO `prompt_tag_map` (`prompt_id`, `tag_id`) VALUES (3,1),(3,2),(3,3),(3,4),(4,5),(4,6),(4,7);

--
-- Table structure for table `prompt_tags`
--

CREATE TABLE `prompt_tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `slug` varchar(120) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prompt_tags`
--

INSERT INTO `prompt_tags` (`id`, `name`, `slug`) VALUES (1,'redes sociales','redes-sociales'),(2,'tiktok','tiktok'),(3,'marketing','marketing'),(4,'video','video'),(5,'ventas','ventas'),(6,'comercio','comercio'),(7,'clientes','clientes');

--
-- Table structure for table `prompts`
--

CREATE TABLE `prompts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `category_id` int(11) NOT NULL,
  `title` varchar(160) NOT NULL,
  `prompt_text` text NOT NULL,
  `image_path` varchar(255) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `idx_prompts_published` (`published`),
  KEY `idx_prompts_category` (`category_id`),
  CONSTRAINT `fk_prompts_category` FOREIGN KEY (`category_id`) REFERENCES `prompt_categories` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prompts`
--

INSERT INTO `prompts` (`id`, `category_id`, `title`, `prompt_text`, `image_path`, `published`, `created_at`, `updated_at`) VALUES (3,2,'Marketing','Escribe un guion para un vídeo de TikTok de 30 segundos para una marca de [sector]. El guion del vídeo debe ser divertido y atraer a la audiencia de [número] años.','uploads/img_20251016_191220_3fe67f1f.webp',1,'2025-10-15 19:40:07','2025-10-16 19:12:22'),(4,5,'Ventas','Quiero frases para animar a los clientes a contratar [servicio].','uploads/img_20251016_191207_47154dff.webp',1,'2025-10-15 20:47:15','2025-10-16 19:12:09');

--
-- Table structure for table `propuestas_valor`
--

CREATE TABLE `propuestas_valor` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) DEFAULT 0,
  `trayectoria` varchar(255) NOT NULL,
  `diferenciador` varchar(255) NOT NULL,
  `resultado` varchar(255) NOT NULL,
  `propuesta_final` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `propuestas_valor`
--


--
-- Table structure for table `prospectos`
--

CREATE TABLE `prospectos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(100) NOT NULL,
  `empresa` varchar(100) NOT NULL,
  `telefono` varchar(20) NOT NULL,
  `email` varchar(100) NOT NULL,
  `sitio_web` varchar(255) DEFAULT NULL,
  `fuente` varchar(50) DEFAULT NULL,
  `idioma` varchar(50) DEFAULT NULL,
  `asignado_a` varchar(50) DEFAULT NULL,
  `status` enum('Pendiente','En Progreso','Cerrado','Otro') NOT NULL DEFAULT 'Pendiente',
  `descripcion` text DEFAULT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `prospectos`
--


--
-- Table structure for table `proveedores`
--

CREATE TABLE `proveedores` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) DEFAULT NULL,
  `contacto` varchar(120) DEFAULT NULL,
  `telefono` varchar(30) DEFAULT NULL,
  `email` varchar(120) DEFAULT NULL,
  `direccion` varchar(255) DEFAULT NULL,
  `ciudad` varchar(100) DEFAULT NULL,
  `estado` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `proveedores`
--


--
-- Table structure for table `proyectos`
--

CREATE TABLE `proyectos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(150) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `cliente_id` int(10) unsigned DEFAULT NULL,
  `fecha_inicio` date DEFAULT NULL,
  `fecha_fin` date DEFAULT NULL,
  `presupuesto` decimal(14,2) DEFAULT NULL,
  `estado` enum('planificado','en_progreso','completado','en_pausa','cancelado') DEFAULT 'planificado',
  `gerente_id` int(10) unsigned DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `proyectos`
--


--
-- Table structure for table `publicaciones`
--

CREATE TABLE `publicaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` datetime NOT NULL,
  `copy` text DEFAULT NULL,
  `media` varchar(255) DEFAULT NULL,
  `campana_id` int(11) NOT NULL,
  `red_social_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `campana_id` (`campana_id`),
  KEY `red_social_id` (`red_social_id`),
  CONSTRAINT `publicaciones_ibfk_1` FOREIGN KEY (`campana_id`) REFERENCES `campañas` (`id`),
  CONSTRAINT `publicaciones_ibfk_2` FOREIGN KEY (`red_social_id`) REFERENCES `redes_sociales` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `publicaciones`
--


--
-- Table structure for table `puestos`
--

CREATE TABLE `puestos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(120) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `nivel` varchar(60) DEFAULT NULL,
  `salario_base` decimal(12,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `puestos`
--


--
-- Table structure for table `reclutamiento`
--

CREATE TABLE `reclutamiento` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `puesto_id` int(10) unsigned DEFAULT NULL,
  `candidato` varchar(120) DEFAULT NULL,
  `estatus` enum('aplicado','entrevista','oferta','contratado','rechazado') DEFAULT 'aplicado',
  `fecha_aplicacion` date DEFAULT NULL,
  `nota` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `reclutamiento`
--


--
-- Table structure for table `redes_sociales`
--

CREATE TABLE `redes_sociales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `redes_sociales`
--

INSERT INTO `redes_sociales` (`id`, `nombre`) VALUES (1,'Facebook'),(2,'Instagram'),(3,'TikTok');

--
-- Table structure for table `remember_tokens`
--

CREATE TABLE `remember_tokens` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `user_id` bigint(20) NOT NULL,
  `selector` char(12) NOT NULL,
  `validator` char(64) NOT NULL,
  `expires_at` datetime NOT NULL,
  `created_at` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `selector` (`selector`),
  KEY `user_id` (`user_id`),
  KEY `expires_at` (`expires_at`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `remember_tokens`
--

INSERT INTO `remember_tokens` (`id`, `user_id`, `selector`, `validator`, `expires_at`, `created_at`) VALUES (1,1,'5794e281f681','6ab443b0e659ffb56d434fcb028c73e09abda150ce8c6d3a042ca32fe8a628f5','2025-06-20 04:12:11','2025-05-17 05:03:23'),(2,1,'f802fa7a140d','a97f803299296ca01974dc6dca025c2bf905522b1b77dfae18a756f229ea206d','2025-08-23 19:39:46','2025-07-15 19:31:42'),(3,1,'38f11cc9aac7','87a4a601b0f0e15eb8410953ca7c86ddf8d76c2dd569033b42f70d7d4d1ea79c','2025-09-19 15:10:47','2025-08-07 15:53:31');

--
-- Table structure for table `resenas`
--

CREATE TABLE `resenas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(100) NOT NULL,
  `user_email` varchar(150) NOT NULL,
  `rating` tinyint(1) NOT NULL,
  `comment` text NOT NULL,
  `photo` varchar(255) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `resenas`
--


--
-- Table structure for table `revistas`
--

CREATE TABLE `revistas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `titulo` varchar(255) NOT NULL,
  `archivo_pdf` varchar(255) NOT NULL,
  `fecha_subida` datetime DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `revistas`
--


--
-- Table structure for table `role_permissions`
--

CREATE TABLE `role_permissions` (
  `role_id` int(11) NOT NULL,
  `permission_id` int(11) NOT NULL,
  PRIMARY KEY (`role_id`,`permission_id`),
  KEY `permission_id` (`permission_id`),
  CONSTRAINT `role_permissions_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  CONSTRAINT `role_permissions_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `role_permissions`
--

INSERT INTO `role_permissions` (`role_id`, `permission_id`) VALUES (1,1),(1,4),(1,5),(1,6),(1,7),(1,8),(1,11),(8,11),(8,12);

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `description`) VALUES (1,'admin','Rol de administrador completo'),(4,'editor','Puede editar contenido'),(5,'vendedor','Puede gestionar ventas'),(8,'miembros','Miembros del GYM');

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `product_id` int(11) NOT NULL,
  `client_id` int(11) NOT NULL,
  `customer_name` varchar(100) NOT NULL,
  `sale_date` date NOT NULL,
  `quantity` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `sales`
--


--
-- Table structure for table `search_index`
--

CREATE TABLE `search_index` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
  `content_type` varchar(64) NOT NULL,
  `ref_id` varchar(128) NOT NULL,
  `title` text DEFAULT NULL,
  `excerpt` text DEFAULT NULL,
  `body` longtext DEFAULT NULL,
  `url` varchar(512) DEFAULT NULL,
  `slug` varchar(255) DEFAULT NULL,
  `tags` text DEFAULT NULL,
  `category` varchar(255) DEFAULT NULL,
  `published_at` datetime DEFAULT NULL,
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `norm_title` text DEFAULT NULL,
  `norm_body` longtext DEFAULT NULL,
  `norm_tags` text DEFAULT NULL,
  `norm_category` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_type` (`content_type`),
  KEY `idx_slug` (`slug`),
  KEY `idx_updated` (`updated_at`),
  FULLTEXT KEY `ft_title` (`title`,`excerpt`),
  FULLTEXT KEY `ft_body` (`body`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `search_index`
--

INSERT INTO `search_index` (`id`, `content_type`, `ref_id`, `title`, `excerpt`, `body`, `url`, `slug`, `tags`, `category`, `published_at`, `updated_at`, `norm_title`, `norm_body`, `norm_tags`, `norm_category`) VALUES (1,'pages','https://mania.mx/','https://mania.mx/','','','https://mania.mx/','tema','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/','','','pages'),(2,'pages','https://mania.mx/carrito.html','https://mania.mx/carrito.html','','','https://mania.mx/carrito.html','carrito-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/carrito.html','','','pages'),(3,'pages','https://mania.mx/directorio-ia.html','https://mania.mx/directorio-ia.html','','','https://mania.mx/directorio-ia.html','directorio-ia-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/directorio-ia.html','','','pages'),(4,'pages','https://mania.mx/noticias.html','https://mania.mx/noticias.html','','','https://mania.mx/noticias.html','noticias-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/noticias.html','','','pages'),(5,'pages','https://mania.mx/prueba-prompts.html','https://mania.mx/prueba-prompts.html','','','https://mania.mx/prueba-prompts.html','prueba-prompts-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/prueba-prompts.html','','','pages'),(6,'pages','https://mania.mx/formularios-usuarios.html','https://mania.mx/formularios-usuarios.html','','','https://mania.mx/formularios-usuarios.html','formularios-usuarios-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/formularios-usuarios.html','','','pages'),(7,'pages','https://mania.mx/videos.html','https://mania.mx/videos.html','','','https://mania.mx/videos.html','videos-html','','pages',NULL,'2025-11-16 03:38:20','https://mania.mx/videos.html','','','pages'),(8,'pages','https://mania.mx/','https://mania.mx/','','','https://mania.mx/','tema','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/','','','pages'),(9,'pages','https://mania.mx/carrito.html','https://mania.mx/carrito.html','','','https://mania.mx/carrito.html','carrito-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/carrito.html','','','pages'),(10,'pages','https://mania.mx/directorio-ia.html','https://mania.mx/directorio-ia.html','','','https://mania.mx/directorio-ia.html','directorio-ia-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/directorio-ia.html','','','pages'),(11,'pages','https://mania.mx/noticias.html','https://mania.mx/noticias.html','','','https://mania.mx/noticias.html','noticias-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/noticias.html','','','pages'),(12,'pages','https://mania.mx/prueba-prompts.html','https://mania.mx/prueba-prompts.html','','','https://mania.mx/prueba-prompts.html','prueba-prompts-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/prueba-prompts.html','','','pages'),(13,'pages','https://mania.mx/formularios-usuarios.html','https://mania.mx/formularios-usuarios.html','','','https://mania.mx/formularios-usuarios.html','formularios-usuarios-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/formularios-usuarios.html','','','pages'),(14,'pages','https://mania.mx/videos.html','https://mania.mx/videos.html','','','https://mania.mx/videos.html','videos-html','','pages',NULL,'2025-11-16 03:39:04','https://mania.mx/videos.html','','','pages');

--
-- Table structure for table `service_categories`
--

CREATE TABLE `service_categories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(150) NOT NULL,
  `description` text DEFAULT NULL,
  `slug` varchar(160) DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `published` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `photos` text NOT NULL DEFAULT '[]',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `service_categories`
--


--
-- Table structure for table `servicios`
--

CREATE TABLE `servicios` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `division_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `photos` text DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `meta_title` varchar(255) DEFAULT NULL,
  `meta_description` text DEFAULT NULL,
  `meta_keywords` text DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `servicios`
--


--
-- Table structure for table `sitemap_stats`
--

CREATE TABLE `sitemap_stats` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `generated_at` datetime NOT NULL DEFAULT current_timestamp(),
  `count_divisiones` int(11) NOT NULL,
  `count_serv_cat` int(11) NOT NULL,
  `count_serv_det` int(11) NOT NULL,
  `count_articulos` int(11) NOT NULL,
  `count_tags` int(11) NOT NULL,
  `count_productos` int(11) NOT NULL,
  `count_paginas` int(11) NOT NULL,
  `count_asesores` int(11) NOT NULL,
  `count_negocios` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sitemap_stats`
--

INSERT INTO `sitemap_stats` (`id`, `generated_at`, `count_divisiones`, `count_serv_cat`, `count_serv_det`, `count_articulos`, `count_tags`, `count_productos`, `count_paginas`, `count_asesores`, `count_negocios`) VALUES (1,'2025-08-27 21:12:48',0,0,0,0,0,0,5,0,0),(2,'2025-11-15 17:09:31',0,0,0,0,0,0,5,0,0),(3,'2025-11-15 17:09:43',0,0,0,0,0,0,5,0,0),(4,'2025-11-15 17:13:18',0,0,0,0,0,0,5,0,0),(5,'2025-11-15 17:31:15',0,0,0,0,0,0,5,0,0),(6,'2025-11-15 21:10:28',0,0,0,0,0,0,5,0,0),(7,'2025-11-16 00:20:43',0,0,0,0,0,0,5,0,0),(8,'2025-11-16 00:22:31',0,0,0,0,0,0,5,0,0),(9,'2025-11-16 03:12:50',0,0,0,0,0,0,5,0,0),(10,'2025-11-17 02:36:00',0,0,0,0,0,0,5,0,0);

--
-- Table structure for table `slides`
--

CREATE TABLE `slides` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `image` varchar(255) NOT NULL,
  `url` varchar(255) DEFAULT NULL,
  `animation` varchar(50) NOT NULL DEFAULT 'fade',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `slides`
--


--
-- Table structure for table `subcategories`
--

CREATE TABLE `subcategories` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `alias` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `photos` text DEFAULT NULL,
  `category_id` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_alias` (`alias`),
  KEY `category_id` (`category_id`),
  CONSTRAINT `subcategories_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `subcategories`
--

INSERT INTO `subcategories` (`id`, `name`, `alias`, `description`, `photos`, `category_id`) VALUES (1,'CRM','crm','','',2);

--
-- Table structure for table `sueldos`
--

CREATE TABLE `sueldos` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `empleado_id` int(10) unsigned DEFAULT NULL,
  `periodo` varchar(20) DEFAULT NULL,
  `bruto` decimal(12,2) DEFAULT NULL,
  `deducciones` decimal(12,2) DEFAULT NULL,
  `neto` decimal(12,2) DEFAULT NULL,
  `fecha_pago` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `sueldos`
--


--
-- Table structure for table `svg_files`
--

CREATE TABLE `svg_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `content` longtext NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `svg_files`
--


--
-- Table structure for table `tags`
--

CREATE TABLE `tags` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL DEFAULT current_timestamp(),
  `updated_at` datetime NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tags`
--


--
-- Table structure for table `tareas`
--

CREATE TABLE `tareas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha` datetime NOT NULL,
  `fecha_fin` datetime NOT NULL,
  `descripcion` text DEFAULT NULL,
  `asignado_id` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `asignado_id` (`asignado_id`),
  CONSTRAINT `tareas_ibfk_1` FOREIGN KEY (`asignado_id`) REFERENCES `users` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tareas`
--


--
-- Table structure for table `tickets_soporte`
--

CREATE TABLE `tickets_soporte` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `titulo` varchar(150) DEFAULT NULL,
  `descripcion` text DEFAULT NULL,
  `reportado_por` int(10) unsigned DEFAULT NULL,
  `asignado_a` int(10) unsigned DEFAULT NULL,
  `prioridad` enum('baja','media','alta','critica') DEFAULT NULL,
  `estado` enum('abierto','en_proceso','resuelto','cerrado') DEFAULT NULL,
  `fecha_reporte` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `tickets_soporte`
--


--
-- Table structure for table `tipo_cliente`
--

CREATE TABLE `tipo_cliente` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `tipo_cliente` varchar(255) NOT NULL,
  `descuento_productos` decimal(5,2) NOT NULL DEFAULT 0.00,
  `descuento_servicios` decimal(5,2) NOT NULL DEFAULT 0.00,
  `color` varchar(7) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `updated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `prioridad_atencion` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tipo_cliente`
--

INSERT INTO `tipo_cliente` (`id`, `tipo_cliente`, `descuento_productos`, `descuento_servicios`, `color`, `created_at`, `updated_at`, `prioridad_atencion`) VALUES (1,'Regular',0.00,0.00,'#3d9e1a','2025-04-01 13:28:46','2025-04-01 14:02:34',3),(2,'Revendedor',15.00,30.00,'#107dc1','2025-04-01 13:30:55','2025-04-01 14:02:41',2),(3,'VIP',10.00,15.00,'#b626c9','2025-04-01 14:03:04','2025-04-01 14:03:04',1);

--
-- Table structure for table `tmp_memberships`
--

CREATE TABLE `tmp_memberships` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `tmp_memberships`
--


--
-- Table structure for table `transacciones`
--

CREATE TABLE `transacciones` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date NOT NULL,
  `descripcion` varchar(255) DEFAULT NULL,
  `cuenta_debito` int(10) unsigned DEFAULT NULL,
  `cuenta_credito` int(10) unsigned DEFAULT NULL,
  `monto` decimal(14,2) DEFAULT NULL,
  `referencia` varchar(120) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transacciones`
--


--
-- Table structure for table `transferencias`
--

CREATE TABLE `transferencias` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `from_account_id` int(11) NOT NULL,
  `to_account_id` int(11) NOT NULL,
  `amount` decimal(15,2) NOT NULL,
  `transfer_date` datetime NOT NULL,
  `description` text DEFAULT NULL,
  `created_at` datetime DEFAULT current_timestamp(),
  `updated_at` datetime DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  PRIMARY KEY (`id`),
  KEY `from_account_id` (`from_account_id`),
  KEY `to_account_id` (`to_account_id`),
  CONSTRAINT `transferencias_ibfk_1` FOREIGN KEY (`from_account_id`) REFERENCES `cuentas` (`id`),
  CONSTRAINT `transferencias_ibfk_2` FOREIGN KEY (`to_account_id`) REFERENCES `cuentas` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `transferencias`
--


--
-- Table structure for table `trayectoria`
--

CREATE TABLE `trayectoria` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `fecha` date NOT NULL,
  `logro` varchar(255) NOT NULL,
  `descripcion` text DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `trayectoria`
--


--
-- Table structure for table `ubicaciones`
--

CREATE TABLE `ubicaciones` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) NOT NULL,
  `direccion` varchar(255) NOT NULL,
  `codigo_mapa` text NOT NULL,
  `telefono` varchar(50) DEFAULT NULL,
  `whatsapp` varchar(50) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_general_ci;

--
-- Dumping data for table `ubicaciones`
--

INSERT INTO `ubicaciones` (`id`, `nombre`, `direccion`, `codigo_mapa`, `telefono`, `whatsapp`, `created_at`) VALUES (1,'Mexico','Av. Silvestre Terrazas # 10801 Col. Hidalgo . C.P. 31414 Chihuahua, Chih., México','<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3503.1212618062095!2d-106.11042402508404!3d28.596138785733455!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x86ea5cfd06f77ebd%3A0x9a8ac03c9d3f88ea!2sIndustrias%20Montilla!5e0!3m2!1ses-419!2smx!4v1755098092145!5m2!1ses-419!2smx\" width=\"100%\" height=\"450\" style=\"border:0;\" allowfullscreen=\"\" loading=\"lazy\" referrerpolicy=\"no-referrer-when-downgrade\"></iframe>','614 418 1900','614 418 1911','2025-08-13 15:15:15'),(2,'Colombia','Avenida El Dorado, calle 26 #69-76, Edificio, Elemento, Oficina 1501, Bogotá D.C.','<iframe src=\"https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d3976.633021713634!2d-74.10866292557196!3d4.659354242015769!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x8e3f9b9bd703d387%3A0x1742d47a66c98577!2sEdificio%20Elemento!5e0!3m2!1ses-419!2smx!4v1755098209007!5m2!1ses-419!2smx\" width=\"100%\" height=\"450\" style=\"border:0;\" allowfullscreen=\"\" loading=\"lazy\" referrerpolicy=\"no-referrer-when-downgrade\"></iframe>','5714849181','573007835370','2025-08-13 15:17:03');

--
-- Table structure for table `user_permissions`
--

CREATE TABLE `user_permissions` (
  `user_id` bigint(20) unsigned NOT NULL,
  `permission_id` bigint(20) unsigned NOT NULL,
  PRIMARY KEY (`user_id`,`permission_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `user_permissions`
--

INSERT INTO `user_permissions` (`user_id`, `permission_id`) VALUES (1,1),(1,4),(1,5),(1,6),(1,7),(1,8),(1,11),(1,12),(3,11),(4,11);

--
-- Table structure for table `user_roles`
--

CREATE TABLE `user_roles` (
  `user_id` int(11) NOT NULL,
  `role_id` int(11) NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `idx_user_roles_role_id` (`role_id`),
  CONSTRAINT `user_roles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `user_roles_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `user_roles`
--

INSERT INTO `user_roles` (`user_id`, `role_id`) VALUES (1,1),(1,4),(1,5);

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `username` varchar(100) NOT NULL,
  `nombre` varchar(255) NOT NULL,
  `correo` varchar(255) NOT NULL,
  `password` varchar(255) NOT NULL,
  `role` varchar(50) DEFAULT 'admin',
  `foto` varchar(255) DEFAULT NULL,
  `fecha_nacimiento` date DEFAULT NULL,
  `telefono` varchar(20) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  PRIMARY KEY (`id`),
  UNIQUE KEY `uq_users_correo` (`correo`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `nombre`, `correo`, `password`, `role`, `foto`, `fecha_nacimiento`, `telefono`, `created_at`) VALUES (1,'mgutierrez','Miguel Angel','yo@miguelangelgutierrez.com.mx','$2y$12$/3e9A9vriKIVDqhqqwHljOSgK.accwEIeuyTXOsEkDEVod33NxB.i','admin','uploads/usuarios/20250430163036_app.jpg','0000-00-00','8135618086','2025-01-15 05:04:57'),(3,'demo','DEMO','demo@g-sportfitness.online','$2y$12$VO/NGNv0BnaQ/57l2ARB9OxtS6Z0FJgTQwPply5zIpyZzEVHvcALm','admin',NULL,'0000-00-00','','2025-05-03 15:44:14'),(4,'juan','Juan','juansd@jusdan.com.mx','$2y$12$7VNtfbvvwE9Y1IMKmXyDN.P5KQDf9jsoClWY0Q4VCNce4ZxuSgChy','miembros',NULL,NULL,NULL,'2025-05-03 17:04:04');

--
-- Table structure for table `visits`
--

CREATE TABLE `visits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(255) NOT NULL,
  `visit_time` datetime NOT NULL DEFAULT current_timestamp(),
  `ip_address` varchar(45) NOT NULL,
  `device_type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `visits`
--


--
-- Table structure for table `visits_archive`
--

CREATE TABLE `visits_archive` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `url` varchar(255) NOT NULL,
  `visit_time` datetime NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `device_type` varchar(50) NOT NULL,
  `archive_date` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Dumping data for table `visits_archive`
--


--
-- Dumping events for database 'mania_smartweb'
--

--
-- Dumping routines for database 'mania_smartweb'
--


