-- phpMyAdmin SQL Dump
-- version 5.1.1
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 15-01-2026 a las 14:41:15
-- Versión del servidor: 10.4.21-MariaDB
-- Versión de PHP: 7.3.31

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

--
-- Base de datos: `whatsappboot`
--
CREATE DATABASE whatsappboot
CHARACTER SET utf8mb4
COLLATE utf8mb4_spanish2_ci;
-- --------------------------------------------------------

USE whatsappboot;

-- -----------------------------------------------------------
-- Estructura de tabla para la tabla `whatsappboot_chat`
--
CREATE TABLE `whatsappboot_chat` (
  `whatboot_numero` int(11) NOT NULL,
  `whatboot_telefono` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `whatboot_flujo` int(2) NOT NULL,
  `whatboot_paso` int(2) NOT NULL DEFAULT '0',
  `whatboot_sesion` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `whatboot_documento` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatboot_finalizado` tinyint(1) NOT NULL DEFAULT '0',
  `whatboot_respuesta` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatboot_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Estructura de tabla para la tabla `whatsappboot_chats`
--

CREATE TABLE `whatsappboot_chats` (
  `whatboot_numero` int(11) NOT NULL,
  `whatboot_tel` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `whatboot_doc` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatboot_flow` int(2) NOT NULL,
  `whatboot_sesion` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
  `whatboot_chat_end` tinyint(1) NOT NULL DEFAULT '0',
  `whatboot_step` int(2) NOT NULL DEFAULT '0',
  `whatboot_message` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatboot_message_before` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatboot_response` text COLLATE utf8_unicode_ci,
  `whatboot_lstitems` text COLLATE utf8_unicode_ci,
  `whatboot_lstitems_aux` text COLLATE utf8_unicode_ci,
  `whatboot_lstitems_aux_before` text COLLATE utf8_unicode_ci,
  `whatboot_lstitems_before` text COLLATE utf8_unicode_ci,
  `whatboot_lstitems_before_aux` text COLLATE utf8_unicode_ci,
  `whatboot_params` text COLLATE utf8_unicode_ci,
  `whatboot_params_before` text COLLATE utf8_unicode_ci,
  `whatboot_params_before_aux` text COLLATE utf8_unicode_ci,
  `whatboot_params_aux` text COLLATE utf8_unicode_ci,
  `whatboot_params_end` tinyint(1) NOT NULL DEFAULT '0',
  `whatboot_recordatorio` tinyint(4) DEFAULT '0',
  `whatboot_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Estructura de tabla para la tabla `whatsappboot_chats_session`
--

CREATE TABLE `whatsappboot_chats_session` (
  `whatbootses_numero` int(11) NOT NULL,
  `whatboot_sesion` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `whatbootses_message` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatprotses_fecha` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Estructura de tabla para la tabla `whatsappboot_chat_respuesta_listado`
--

CREATE TABLE `whatsappboot_chat_respuesta_listado` (
  `whatbootres_numero` int(11) NOT NULL,
  `whatboot_sesion` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
  `whatbootres_flujo` int(2) NOT NULL,
  `whatbootres_paso` int(2) NOT NULL DEFAULT '0',
  `whatboot_listado` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Estructura de tabla para la tabla `whatsappboot_status`
--

CREATE TABLE `whatsappboot_status` (
  `whatbootst_numero` int(11) NOT NULL,
  `whatbootst_tel` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
  `whatbootst_message` varchar(500) COLLATE utf8_unicode_ci DEFAULT NULL,
  `whatbootst_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `whatsappboot_chat`
--
ALTER TABLE `whatsappboot_chat`
  ADD PRIMARY KEY (`whatboot_numero`);

--
-- Indices de la tabla `whatsappboot_chats`
--
ALTER TABLE `whatsappboot_chats`
  ADD PRIMARY KEY (`whatboot_numero`);

--
-- Indices de la tabla `whatsappboot_chats_session`
--
ALTER TABLE `whatsappboot_chats_session`
  ADD PRIMARY KEY (`whatbootses_numero`);

--
-- Indices de la tabla `whatsappboot_chat_respuesta_listado`
--
ALTER TABLE `whatsappboot_chat_respuesta_listado`
  ADD PRIMARY KEY (`whatbootres_numero`);

--
-- Indices de la tabla `whatsappboot_status`
--
ALTER TABLE `whatsappboot_status`
  ADD PRIMARY KEY (`whatbootst_numero`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `whatsappboot_chat`
--
ALTER TABLE `whatsappboot_chat`
  MODIFY `whatboot_numero` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `whatsappboot_chats`
--
ALTER TABLE `whatsappboot_chats`
  MODIFY `whatboot_numero` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `whatsappboot_chats_session`
--
ALTER TABLE `whatsappboot_chats_session`
  MODIFY `whatbootses_numero` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `whatsappboot_chat_respuesta_listado`
--
ALTER TABLE `whatsappboot_chat_respuesta_listado`
  MODIFY `whatbootres_numero` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `whatsappboot_status`
--
ALTER TABLE `whatsappboot_status`
  MODIFY `whatbootst_numero` int(11) NOT NULL AUTO_INCREMENT;