
-- Volcando estructura para tabla chatbot_empeno.asesors
CREATE TABLE IF NOT EXISTS `asesors` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `user_id` bigint unsigned NOT NULL,
  `estado` enum('disponible','ocupado','desconectado') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'desconectado',
  `conversaciones_atendidas` int NOT NULL DEFAULT '0',
  `tiempo_respuesta` int NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `asesors_empresa_id_foreign` (`empresa_id`),
  KEY `asesors_user_id_foreign` (`user_id`),
  CONSTRAINT `asesors_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `asesors_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.asesors: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.auditorias
CREATE TABLE IF NOT EXISTS `auditorias` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `accion` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `descripcion` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `auditorias_empresa_id_foreign` (`empresa_id`),
  KEY `auditorias_user_id_foreign` (`user_id`),
  CONSTRAINT `auditorias_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE,
  CONSTRAINT `auditorias_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.auditorias: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.cache
CREATE TABLE IF NOT EXISTS `cache` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.cache: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.cache_locks
CREATE TABLE IF NOT EXISTS `cache_locks` (
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `owner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `expiration` int NOT NULL,
  PRIMARY KEY (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.cache_locks: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.clientes
CREATE TABLE IF NOT EXISTS `clientes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `telefono` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `dni` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `historial_json` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `clientes_empresa_id_foreign` (`empresa_id`),
  CONSTRAINT `clientes_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.clientes: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.configuracion_metas
CREATE TABLE IF NOT EXISTS `configuracion_metas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `app_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `app_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `business_account_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `phone_number_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `access_token` text COLLATE utf8mb4_unicode_ci,
  `verify_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `webhook_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `configuracion_metas_empresa_id_foreign` (`empresa_id`),
  CONSTRAINT `configuracion_metas_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.configuracion_metas: ~0 rows (aproximadamente)
INSERT INTO `configuracion_metas` (`id`, `empresa_id`, `app_id`, `app_secret`, `business_account_id`, `phone_number_id`, `access_token`, `verify_token`, `webhook_url`, `created_at`, `updated_at`) VALUES
	(2, 1, NULL, NULL, NULL, NULL, 'EAANlkhsKhwoBRnvBGo0HbZAmJz6sOn4i274vKhDP6Pm3nIvbvdWaIPACrhwRJoDGMwYxBBlRPOJgZCsRTuAHTxqfgyZCAIaoBldOHmUpniZBwSCm8tZAeizieshOPyFasSWS4jAFuqM4XUmqjJXFiKHFcoAjgsZAFTWMbdumZCOz3XSM8EmrETZAmrtHWBIuyO7Tje3kA2LaLIfnr93tuCOHhtICv74CfP8sgbXfNZCkq4LfZAEf7WnMSIoohTZB43HbaQFbGRgNPH3BGXL7ud2t1pIWNYZD', 'CES_VALI_2026', NULL, '2026-06-16 21:13:31', '2026-06-16 21:13:31');

-- Volcando estructura para tabla chatbot_empeno.conversacions
CREATE TABLE IF NOT EXISTS `conversacions` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `cliente_id` bigint unsigned NOT NULL,
  `asesor_id` bigint unsigned DEFAULT NULL,
  `estado` enum('activa','pendiente','finalizada') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pendiente',
  `ultima_interaccion` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `conversacions_empresa_id_foreign` (`empresa_id`),
  KEY `conversacions_cliente_id_foreign` (`cliente_id`),
  KEY `conversacions_asesor_id_foreign` (`asesor_id`),
  CONSTRAINT `conversacions_asesor_id_foreign` FOREIGN KEY (`asesor_id`) REFERENCES `asesors` (`id`) ON DELETE SET NULL,
  CONSTRAINT `conversacions_cliente_id_foreign` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `conversacions_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.conversacions: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.empresas
CREATE TABLE IF NOT EXISTS `empresas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `ruc` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `direccion` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `horario` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `mensaje_bienvenida` text COLLATE utf8mb4_unicode_ci,
  `mensaje_fuera_horario` text COLLATE utf8mb4_unicode_ci,
  `mensaje_derivacion` text COLLATE utf8mb4_unicode_ci,
  `mensaje_despedida` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.empresas: ~0 rows (aproximadamente)
INSERT INTO `empresas` (`id`, `nombre`, `ruc`, `direccion`, `horario`, `mensaje_bienvenida`, `mensaje_fuera_horario`, `mensaje_derivacion`, `mensaje_despedida`, `created_at`, `updated_at`) VALUES
	(1, 'Casa de Empeño Demo', '12345678901', NULL, NULL, NULL, NULL, NULL, NULL, '2026-06-16 21:13:31', '2026-06-16 21:13:31');

-- Volcando estructura para tabla chatbot_empeno.failed_jobs
CREATE TABLE IF NOT EXISTS `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.failed_jobs: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.foto_leads
CREATE TABLE IF NOT EXISTS `foto_leads` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `lead_id` bigint unsigned NOT NULL,
  `ruta_archivo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `foto_leads_lead_id_foreign` (`lead_id`),
  CONSTRAINT `foto_leads_lead_id_foreign` FOREIGN KEY (`lead_id`) REFERENCES `leads` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.foto_leads: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.jobs
CREATE TABLE IF NOT EXISTS `jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` tinyint unsigned NOT NULL,
  `reserved_at` int unsigned DEFAULT NULL,
  `available_at` int unsigned NOT NULL,
  `created_at` int unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `jobs_queue_index` (`queue`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.jobs: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.job_batches
CREATE TABLE IF NOT EXISTS `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.job_batches: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.leads
CREATE TABLE IF NOT EXISTS `leads` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `cliente_id` bigint unsigned NOT NULL,
  `tipo_empeno` enum('joya','electronico','varios') COLLATE utf8mb4_unicode_ci NOT NULL,
  `estado` enum('nuevo','contactado','cotizado','cerrado') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'nuevo',
  `datos_recopilados` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `leads_empresa_id_foreign` (`empresa_id`),
  KEY `leads_cliente_id_foreign` (`cliente_id`),
  CONSTRAINT `leads_cliente_id_foreign` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`) ON DELETE CASCADE,
  CONSTRAINT `leads_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.leads: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.mensajes
CREATE TABLE IF NOT EXISTS `mensajes` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `conversacion_id` bigint unsigned NOT NULL,
  `tipo` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'texto',
  `contenido` text COLLATE utf8mb4_unicode_ci,
  `direccion` enum('entrante','saliente') COLLATE utf8mb4_unicode_ci NOT NULL,
  `meta_message_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `leido` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `mensajes_conversacion_id_foreign` (`conversacion_id`),
  CONSTRAINT `mensajes_conversacion_id_foreign` FOREIGN KEY (`conversacion_id`) REFERENCES `conversacions` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.mensajes: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.migrations
CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.migrations: ~1 rows (aproximadamente)
INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
	(1, '0001_01_01_000000_create_users_table', 1),
	(2, '0001_01_01_000001_create_cache_table', 1),
	(3, '0001_01_01_000002_create_jobs_table', 1),
	(4, '2026_06_15_221218_create_empresas_table', 1),
	(5, '2026_06_15_221220_create_configuracion_metas_table', 1),
	(6, '2026_06_15_221221_create_asesors_table', 1),
	(7, '2026_06_15_221223_create_clientes_table', 1),
	(8, '2026_06_15_221225_create_conversacions_table', 1),
	(9, '2026_06_15_221227_create_mensajes_table', 1),
	(10, '2026_06_15_221229_create_sesion_bots_table', 1),
	(11, '2026_06_15_221231_create_plantillas_table', 1),
	(12, '2026_06_15_221233_create_leads_table', 1),
	(13, '2026_06_15_221235_create_foto_leads_table', 1),
	(14, '2026_06_15_221238_create_auditorias_table', 1),
	(15, '2026_06_15_221359_add_fields_to_users_table', 1);

-- Volcando estructura para tabla chatbot_empeno.password_reset_tokens
CREATE TABLE IF NOT EXISTS `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.password_reset_tokens: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.plantillas
CREATE TABLE IF NOT EXISTS `plantillas` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `empresa_id` bigint unsigned NOT NULL,
  `meta_template_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `nombre` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `categoria` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `idioma` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'es',
  `estado` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'aprobada',
  `variables` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `plantillas_empresa_id_foreign` (`empresa_id`),
  CONSTRAINT `plantillas_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.plantillas: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.sesion_bots
CREATE TABLE IF NOT EXISTS `sesion_bots` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `cliente_id` bigint unsigned NOT NULL,
  `estado_actual` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `variables_temporales` json DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `sesion_bots_cliente_id_foreign` (`cliente_id`),
  CONSTRAINT `sesion_bots_cliente_id_foreign` FOREIGN KEY (`cliente_id`) REFERENCES `clientes` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.sesion_bots: ~0 rows (aproximadamente)

-- Volcando estructura para tabla chatbot_empeno.sessions
CREATE TABLE IF NOT EXISTS `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint unsigned DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sessions_user_id_index` (`user_id`),
  KEY `sessions_last_activity_index` (`last_activity`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.sessions: ~3 rows (aproximadamente)
INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
	('eLBgdutSzpEY3kF8VcJknnL8BvmL937shsSzLFkT', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoianRScWJ2bGNZelY2TXJyN2w0NjBwU2M2ZnU5RHBUeHBvVGxlMG1NUiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6MjE6Imh0dHA6Ly8xMjcuMC4wLjE6ODAwMCI7fXM6NjoiX2ZsYXNoIjthOjI6e3M6Mzoib2xkIjthOjA6e31zOjM6Im5ldyI7YTowOnt9fX0=', 1781561974),
	('IP0r0ftDDxhglvWMgLN1GZZM1atLikIDwHAVBs0U', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoiRnJ4YzR4MllSSzIwSGJWREJoTzg1a3oxdDFlWkxFRzg4Vzl6ZmIyNiI7czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDc6Imh0dHA6Ly9jaGF0Ym90LWxhcmF2ZWwudGVzdC9hZG1pbi9jb25maWd1cmFjaW9uIjt9czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319fQ==', 1781563162),
	('ysd2IsfC4SDmOcBQ89R7USvZhUfGOZf3Y4JOxXmf', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/149.0.0.0 Safari/537.36', 'YTozOntzOjY6Il90b2tlbiI7czo0MDoid1l4T3RzUUZISDE3QVdVT2wydzI2Wm8zTmJhWHZHckZrTjBzZUs0WiI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6MTp7czozOiJ1cmwiO3M6NDM6Imh0dHA6Ly9jaGF0Ym90LWxhcmF2ZWwudGVzdC9hZG1pbi9kYXNoYm9hcmQiO319', 1781626442);

-- Volcando estructura para tabla chatbot_empeno.users
CREATE TABLE IF NOT EXISTS `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `empresa_id` bigint unsigned DEFAULT NULL,
  `role` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'asesor',
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`),
  KEY `users_empresa_id_foreign` (`empresa_id`),
  CONSTRAINT `users_empresa_id_foreign` FOREIGN KEY (`empresa_id`) REFERENCES `empresas` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- Volcando datos para la tabla chatbot_empeno.users: ~0 rows (aproximadamente)


