-- phpMyAdmin SQL Dump
-- version 5.2.2
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Tempo de geração: 10-Maio-2026 às 17:44
-- Versão do servidor: 11.4.10-MariaDB
-- versão do PHP: 8.4.20

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


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

--
-- Base de dados: `nanodelivery_2026`
--

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

--
-- Estrutura da tabela `adicionais`
--

CREATE TABLE `adicionais` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `grupo_id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(100) NOT NULL,
  `descricao` text DEFAULT NULL,
  `preco` decimal(10,2) NOT NULL DEFAULT 0.00,
  `estoque` int(11) DEFAULT NULL,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `adicionais`
--

INSERT INTO `adicionais` (`id`, `grupo_id`, `nome`, `descricao`, `preco`, `estoque`, `ativo`, `ordem`, `created_at`, `updated_at`) VALUES
(1, 1, 'Mal passado', NULL, 0.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(2, 1, 'Ao ponto', NULL, 0.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(3, 1, 'Bem passado', NULL, 0.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(4, 2, 'Queijo extra', NULL, 2.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(5, 2, 'Bacon extra', NULL, 3.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(6, 2, 'Ovo frito', NULL, 2.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(7, 2, 'Milho', NULL, 1.00, NULL, 1, 4, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(8, 2, 'Batata palha', NULL, 1.50, NULL, 1, 5, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(9, 2, 'Cebola crispy', NULL, 2.00, NULL, 1, 6, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(10, 3, 'Mal passado', NULL, 0.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(11, 3, 'Ao ponto', NULL, 0.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(12, 3, 'Bem passado', NULL, 0.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(13, 4, 'Queijo extra', NULL, 2.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(14, 4, 'Bacon extra', NULL, 3.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(15, 4, 'Ovo frito', NULL, 2.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(16, 4, 'Milho', NULL, 1.00, NULL, 1, 4, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(17, 4, 'Batata palha', NULL, 1.50, NULL, 1, 5, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(18, 4, 'Cebola crispy', NULL, 2.00, NULL, 1, 6, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(19, 5, 'Queijo extra', NULL, 2.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(20, 5, 'Bacon extra', NULL, 3.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(21, 5, 'Ovo frito', NULL, 2.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(22, 5, 'Milho', NULL, 1.00, NULL, 1, 4, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(23, 5, 'Batata palha', NULL, 1.50, NULL, 1, 5, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(24, 5, 'Cebola crispy', NULL, 2.00, NULL, 1, 6, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(25, 6, 'Mal passado', NULL, 0.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(26, 6, 'Ao ponto', NULL, 0.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(27, 6, 'Bem passado', NULL, 0.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(28, 7, 'Queijo extra', NULL, 2.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(29, 7, 'Bacon extra', NULL, 3.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(30, 7, 'Ovo frito', NULL, 2.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(31, 7, 'Milho', NULL, 1.00, NULL, 1, 4, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(32, 7, 'Batata palha', NULL, 1.50, NULL, 1, 5, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(33, 7, 'Cebola crispy', NULL, 2.00, NULL, 1, 6, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(34, 8, 'Queijo extra', NULL, 2.00, NULL, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(35, 8, 'Bacon extra', NULL, 3.00, NULL, 1, 2, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(36, 8, 'Ovo frito', NULL, 2.00, NULL, 1, 3, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(37, 8, 'Milho', NULL, 1.00, NULL, 1, 4, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(38, 8, 'Batata palha', NULL, 1.50, NULL, 1, 5, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(39, 8, 'Cebola crispy', NULL, 2.00, NULL, 1, 6, '2026-03-18 05:20:19', '2026-03-18 05:20:19');

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

--
-- Estrutura da tabela `assinaturas`
--

CREATE TABLE `assinaturas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `plano_id` bigint(20) UNSIGNED NOT NULL,
  `status` enum('trial','ativa','cancelada','suspensa','expirada') NOT NULL DEFAULT 'trial',
  `data_inicio` date NOT NULL,
  `data_fim` date DEFAULT NULL,
  `trial_expira_em` date DEFAULT NULL,
  `periodo` enum('mensal','anual') NOT NULL DEFAULT 'mensal',
  `valor_pago` decimal(10,2) DEFAULT NULL,
  `metodo_pagamento` varchar(50) DEFAULT NULL,
  `gateway_id` varchar(100) DEFAULT NULL,
  `notas` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `avaliacoes`
--

CREATE TABLE `avaliacoes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pedido_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `nota_loja` int(11) DEFAULT NULL,
  `nota_entrega` int(11) DEFAULT NULL,
  `nota_comida` int(11) DEFAULT NULL,
  `comentario` text DEFAULT NULL,
  `tags` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`tags`)),
  `fotos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`fotos`)),
  `aprovado` tinyint(1) NOT NULL DEFAULT 1,
  `anonimo` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `bairros_entrega`
--

CREATE TABLE `bairros_entrega` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(100) NOT NULL,
  `cidade` varchar(100) NOT NULL,
  `estado` varchar(2) NOT NULL DEFAULT 'SP',
  `taxa` decimal(10,2) NOT NULL DEFAULT 0.00,
  `tempo_estimado_min` int(11) NOT NULL DEFAULT 30,
  `tempo_estimado_max` int(11) NOT NULL DEFAULT 60,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `bairros_entrega`
--

INSERT INTO `bairros_entrega` (`id`, `loja_id`, `nome`, `cidade`, `estado`, `taxa`, `tempo_estimado_min`, `tempo_estimado_max`, `ativo`, `created_at`, `updated_at`) VALUES
(1, 1, 'Bela Vista', 'São Paulo', 'SP', 4.00, 20, 35, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(2, 1, 'Consolação', 'São Paulo', 'SP', 4.00, 20, 35, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(3, 1, 'Jardins', 'São Paulo', 'SP', 5.00, 25, 40, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(4, 1, 'Pinheiros', 'São Paulo', 'SP', 6.00, 30, 45, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(5, 1, 'Itaim Bibi', 'São Paulo', 'SP', 6.00, 30, 45, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(6, 1, 'Vila Mariana', 'São Paulo', 'SP', 5.50, 25, 40, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(7, 1, 'Centro', 'São Paulo', 'SP', 3.50, 15, 30, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18'),
(8, 1, 'Paraíso', 'São Paulo', 'SP', 4.50, 20, 35, 1, '2026-03-18 05:20:18', '2026-03-18 05:20:18');

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

--
-- Estrutura da tabela `banners`
--

CREATE TABLE `banners` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `titulo` varchar(150) DEFAULT NULL,
  `imagem` varchar(255) NOT NULL,
  `url` varchar(500) DEFAULT NULL,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `valido_de` timestamp NULL DEFAULT NULL,
  `valido_ate` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `categorias`
--

CREATE TABLE `categorias` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `categoria_pai_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nome` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `descricao` text DEFAULT NULL,
  `imagem` varchar(255) DEFAULT NULL,
  `icone` varchar(50) DEFAULT NULL,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `destaque` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `categorias`
--

INSERT INTO `categorias` (`id`, `loja_id`, `categoria_pai_id`, `nome`, `slug`, `descricao`, `imagem`, `icone`, `ordem`, `ativo`, `destaque`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, NULL, 'Lanches', 'lanches', NULL, NULL, 'burger', 1, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(2, 1, NULL, 'Pizzas', 'pizzas', NULL, NULL, 'circle', 2, 1, 0, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(3, 1, NULL, 'Porções', 'porcoes', NULL, NULL, 'box-seam', 3, 1, 0, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(4, 1, NULL, 'Bebidas', 'bebidas', NULL, NULL, 'cup-straw', 4, 1, 0, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(5, 1, NULL, 'Sobremesas', 'sobremesas', NULL, NULL, 'cake2', 5, 1, 0, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(6, 1, NULL, 'Combos', 'combos', NULL, NULL, 'bag-check', 6, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(7, 1, NULL, 'Promoções', 'promocoes', NULL, NULL, 'tag', 7, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL);

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

--
-- Estrutura da tabela `contadores_visitas`
--

CREATE TABLE `contadores_visitas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tipo` varchar(255) NOT NULL,
  `entidade_id` bigint(20) UNSIGNED NOT NULL,
  `data` date NOT NULL,
  `total_visitas` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `visitas_unicas` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `contadores_visitas`
--

INSERT INTO `contadores_visitas` (`id`, `tipo`, `entidade_id`, `data`, `total_visitas`, `visitas_unicas`, `created_at`, `updated_at`) VALUES
(1, 'produto', 1, '2026-03-18', 2, 2, '2026-03-18 06:31:32', '2026-03-18 22:14:12'),
(2, 'loja', 1, '2026-03-18', 7, 2, '2026-03-18 06:32:05', '2026-03-18 22:14:09'),
(3, 'produto', 16, '2026-03-18', 2, 1, '2026-03-18 06:39:09', '2026-03-18 22:12:32'),
(4, 'produto', 4, '2026-03-18', 4, 1, '2026-03-18 14:52:55', '2026-03-18 22:08:51'),
(5, 'produto', 5, '2026-03-18', 2, 2, '2026-03-18 16:51:08', '2026-03-18 22:14:25'),
(6, 'produto', 3, '2026-03-18', 2, 2, '2026-03-18 16:59:39', '2026-03-18 17:08:44'),
(7, 'produto', 2, '2026-03-18', 1, 1, '2026-03-18 17:35:55', '2026-03-18 17:35:55'),
(8, 'produto', 6, '2026-03-18', 1, 1, '2026-03-18 17:58:27', '2026-03-18 17:58:27'),
(9, 'loja', 1, '2026-03-19', 3, 2, '2026-03-19 10:02:05', '2026-03-19 14:32:59'),
(10, 'produto', 6, '2026-03-19', 1, 1, '2026-03-19 10:03:11', '2026-03-19 10:03:11'),
(11, 'produto', 13, '2026-03-19', 1, 1, '2026-03-19 10:03:17', '2026-03-19 10:03:17'),
(12, 'produto', 16, '2026-03-19', 1, 1, '2026-03-19 10:04:03', '2026-03-19 10:04:03'),
(13, 'produto', 2, '2026-03-19', 1, 1, '2026-03-19 10:04:40', '2026-03-19 10:04:40'),
(14, 'produto', 11, '2026-03-19', 1, 1, '2026-03-19 10:05:52', '2026-03-19 10:05:52'),
(15, 'produto', 3, '2026-03-19', 1, 1, '2026-03-19 10:06:14', '2026-03-19 10:06:14'),
(16, 'produto', 12, '2026-03-19', 1, 1, '2026-03-19 10:07:48', '2026-03-19 10:07:48'),
(17, 'produto', 7, '2026-03-19', 1, 1, '2026-03-19 10:08:07', '2026-03-19 10:08:07'),
(18, 'produto', 9, '2026-03-19', 1, 1, '2026-03-19 10:09:14', '2026-03-19 10:09:14'),
(19, 'produto', 4, '2026-03-19', 2, 2, '2026-03-19 10:12:50', '2026-03-19 14:15:31'),
(20, 'produto', 1, '2026-03-19', 1, 1, '2026-03-19 10:14:12', '2026-03-19 10:14:12'),
(21, 'produto', 8, '2026-03-19', 1, 1, '2026-03-19 10:24:40', '2026-03-19 10:24:40'),
(22, 'produto', 10, '2026-03-19', 1, 1, '2026-03-19 14:14:40', '2026-03-19 14:14:40'),
(23, 'loja', 1, '2026-03-20', 5, 0, '2026-03-20 12:36:37', '2026-03-21 00:09:15'),
(24, 'produto', 9, '2026-03-20', 3, 3, '2026-03-20 12:36:53', '2026-03-20 18:12:23'),
(25, 'produto', 8, '2026-03-20', 3, 3, '2026-03-20 12:36:54', '2026-03-20 18:12:30'),
(26, 'produto', 1, '2026-03-20', 3, 3, '2026-03-20 12:36:54', '2026-03-20 18:12:21'),
(27, 'produto', 13, '2026-03-20', 3, 3, '2026-03-20 12:36:55', '2026-03-20 18:12:24'),
(28, 'produto', 7, '2026-03-20', 3, 3, '2026-03-20 12:36:55', '2026-03-20 18:12:26'),
(29, 'produto', 16, '2026-03-20', 3, 3, '2026-03-20 12:36:56', '2026-03-20 18:12:22'),
(30, 'produto', 6, '2026-03-20', 3, 3, '2026-03-20 12:36:56', '2026-03-20 18:12:31'),
(31, 'produto', 11, '2026-03-20', 3, 3, '2026-03-20 12:36:57', '2026-03-20 18:12:24'),
(32, 'produto', 12, '2026-03-20', 3, 3, '2026-03-20 12:36:58', '2026-03-20 18:12:25'),
(33, 'produto', 4, '2026-03-20', 3, 3, '2026-03-20 12:36:58', '2026-03-20 18:12:26'),
(34, 'produto', 10, '2026-03-20', 3, 3, '2026-03-20 12:36:59', '2026-03-20 18:12:33'),
(35, 'produto', 15, '2026-03-20', 3, 3, '2026-03-20 12:36:59', '2026-03-20 18:12:32'),
(36, 'produto', 14, '2026-03-20', 3, 3, '2026-03-20 12:37:00', '2026-03-20 18:12:32'),
(37, 'produto', 2, '2026-03-20', 3, 3, '2026-03-20 12:37:00', '2026-03-20 18:12:29'),
(38, 'produto', 5, '2026-03-20', 3, 3, '2026-03-20 12:37:01', '2026-03-20 18:12:33'),
(39, 'produto', 3, '2026-03-20', 3, 3, '2026-03-20 12:37:02', '2026-03-20 18:12:29'),
(40, 'loja', 1, '2026-03-22', 1, 0, '2026-03-22 15:22:56', '2026-03-22 15:22:56'),
(41, 'loja', 1, '2026-03-24', 4, 0, '2026-03-24 16:48:29', '2026-03-24 23:50:19'),
(42, 'produto', 6, '2026-03-24', 1, 1, '2026-03-25 01:17:54', '2026-03-25 01:17:54'),
(43, 'produto', 11, '2026-03-25', 1, 1, '2026-03-25 05:33:38', '2026-03-25 05:33:38'),
(44, 'produto', 8, '2026-03-25', 1, 1, '2026-03-25 08:08:22', '2026-03-25 08:08:22'),
(45, 'produto', 16, '2026-03-25', 1, 1, '2026-03-25 10:40:00', '2026-03-25 10:40:00'),
(46, 'produto', 3, '2026-03-26', 1, 1, '2026-03-26 07:47:56', '2026-03-26 07:47:56'),
(47, 'produto', 4, '2026-03-26', 1, 1, '2026-03-26 10:59:24', '2026-03-26 10:59:24'),
(48, 'loja', 1, '2026-03-26', 2, 0, '2026-03-26 20:11:36', '2026-03-26 22:06:08'),
(49, 'produto', 2, '2026-03-27', 1, 1, '2026-03-27 08:32:37', '2026-03-27 08:32:37'),
(50, 'loja', 1, '2026-03-27', 1, 0, '2026-03-27 20:53:27', '2026-03-27 20:53:27'),
(51, 'produto', 1, '2026-03-27', 1, 1, '2026-03-27 20:53:46', '2026-03-27 20:53:46'),
(52, 'produto', 7, '2026-03-27', 1, 1, '2026-03-28 01:49:16', '2026-03-28 01:49:16'),
(53, 'produto', 8, '2026-03-28', 1, 1, '2026-03-28 22:29:26', '2026-03-28 22:29:26'),
(54, 'produto', 13, '2026-03-29', 1, 1, '2026-03-29 07:39:24', '2026-03-29 07:39:24'),
(55, 'produto', 4, '2026-03-29', 1, 1, '2026-03-29 07:39:27', '2026-03-29 07:39:27'),
(56, 'produto', 1, '2026-03-29', 1, 1, '2026-03-29 18:12:44', '2026-03-29 18:12:44'),
(57, 'produto', 2, '2026-03-29', 1, 1, '2026-03-29 20:39:07', '2026-03-29 20:39:07'),
(58, 'produto', 16, '2026-03-29', 1, 1, '2026-03-29 22:13:05', '2026-03-29 22:13:05'),
(59, 'produto', 6, '2026-03-29', 1, 1, '2026-03-30 00:04:36', '2026-03-30 00:04:36'),
(60, 'produto', 14, '2026-03-30', 1, 1, '2026-03-30 04:03:57', '2026-03-30 04:03:57'),
(61, 'loja', 1, '2026-03-31', 2, 0, '2026-03-31 10:01:22', '2026-03-31 14:04:10'),
(62, 'produto', 9, '2026-03-31', 1, 1, '2026-03-31 18:28:09', '2026-03-31 18:28:09'),
(63, 'produto', 12, '2026-03-31', 2, 2, '2026-03-31 20:17:42', '2026-03-31 21:48:27'),
(64, 'produto', 11, '2026-03-31', 1, 1, '2026-03-31 22:43:46', '2026-03-31 22:43:46'),
(65, 'produto', 13, '2026-03-31', 1, 1, '2026-03-31 22:45:35', '2026-03-31 22:45:35'),
(66, 'produto', 1, '2026-03-31', 1, 1, '2026-04-01 00:17:08', '2026-04-01 00:17:08'),
(67, 'loja', 1, '2026-04-03', 1, 0, '2026-04-03 05:20:05', '2026-04-03 05:20:05'),
(68, 'produto', 1, '2026-04-03', 1, 1, '2026-04-03 05:20:15', '2026-04-03 05:20:15'),
(69, 'produto', 9, '2026-04-03', 1, 1, '2026-04-03 20:13:21', '2026-04-03 20:13:21'),
(70, 'produto', 7, '2026-04-03', 1, 1, '2026-04-03 23:32:16', '2026-04-03 23:32:16'),
(71, 'produto', 15, '2026-04-03', 1, 1, '2026-04-03 23:33:57', '2026-04-03 23:33:57'),
(72, 'produto', 10, '2026-04-03', 1, 1, '2026-04-04 01:59:40', '2026-04-04 01:59:40'),
(73, 'produto', 15, '2026-04-04', 1, 1, '2026-04-04 08:12:29', '2026-04-04 08:12:29'),
(74, 'loja', 1, '2026-04-05', 1, 0, '2026-04-05 20:34:24', '2026-04-05 20:34:24'),
(75, 'produto', 10, '2026-04-06', 1, 1, '2026-04-06 19:52:06', '2026-04-06 19:52:06'),
(76, 'loja', 1, '2026-04-06', 2, 0, '2026-04-07 02:43:48', '2026-04-07 02:54:20'),
(77, 'produto', 3, '2026-04-07', 1, 1, '2026-04-07 03:07:33', '2026-04-07 03:07:33'),
(78, 'produto', 6, '2026-04-07', 1, 1, '2026-04-07 03:08:55', '2026-04-07 03:08:55'),
(79, 'produto', 9, '2026-04-07', 1, 1, '2026-04-07 03:09:02', '2026-04-07 03:09:02'),
(80, 'produto', 8, '2026-04-07', 1, 1, '2026-04-07 03:11:11', '2026-04-07 03:11:11'),
(81, 'produto', 7, '2026-04-07', 1, 1, '2026-04-07 03:11:40', '2026-04-07 03:11:40'),
(82, 'produto', 4, '2026-04-07', 1, 1, '2026-04-07 03:12:38', '2026-04-07 03:12:38'),
(83, 'produto', 1, '2026-04-07', 1, 1, '2026-04-07 03:12:59', '2026-04-07 03:12:59'),
(84, 'produto', 16, '2026-04-07', 1, 1, '2026-04-07 03:14:08', '2026-04-07 03:14:08'),
(85, 'loja', 1, '2026-04-07', 2, 0, '2026-04-07 06:35:45', '2026-04-07 13:59:07'),
(86, 'loja', 1, '2026-04-08', 1, 0, '2026-04-08 08:17:08', '2026-04-08 08:17:08'),
(87, 'produto', 14, '2026-04-09', 1, 1, '2026-04-09 18:44:15', '2026-04-09 18:44:15'),
(88, 'produto', 3, '2026-04-09', 1, 1, '2026-04-09 21:47:42', '2026-04-09 21:47:42'),
(89, 'produto', 5, '2026-04-09', 1, 1, '2026-04-09 21:54:01', '2026-04-09 21:54:01'),
(90, 'loja', 1, '2026-04-11', 2, 0, '2026-04-11 06:02:05', '2026-04-11 08:02:12'),
(91, 'produto', 5, '2026-04-12', 1, 1, '2026-04-12 14:38:40', '2026-04-12 14:38:40'),
(92, 'produto', 12, '2026-04-13', 1, 1, '2026-04-13 10:03:40', '2026-04-13 10:03:40'),
(93, 'produto', 7, '2026-04-13', 1, 1, '2026-04-13 10:04:22', '2026-04-13 10:04:22'),
(94, 'produto', 1, '2026-04-13', 1, 1, '2026-04-13 10:05:48', '2026-04-13 10:05:48'),
(95, 'produto', 4, '2026-04-13', 1, 1, '2026-04-13 10:07:51', '2026-04-13 10:07:51'),
(96, 'produto', 16, '2026-04-13', 1, 1, '2026-04-13 10:07:51', '2026-04-13 10:07:51'),
(97, 'produto', 9, '2026-04-13', 1, 1, '2026-04-13 10:08:42', '2026-04-13 10:08:42'),
(98, 'produto', 8, '2026-04-13', 1, 1, '2026-04-13 10:09:08', '2026-04-13 10:09:08'),
(99, 'produto', 6, '2026-04-13', 1, 1, '2026-04-13 10:09:08', '2026-04-13 10:09:08'),
(100, 'produto', 13, '2026-04-13', 1, 1, '2026-04-13 10:09:41', '2026-04-13 10:09:41'),
(101, 'produto', 2, '2026-04-13', 1, 1, '2026-04-13 10:10:36', '2026-04-13 10:10:36'),
(102, 'produto', 3, '2026-04-13', 1, 1, '2026-04-13 10:11:01', '2026-04-13 10:11:01'),
(103, 'produto', 11, '2026-04-13', 1, 1, '2026-04-13 10:12:05', '2026-04-13 10:12:05'),
(104, 'produto', 14, '2026-04-13', 1, 1, '2026-04-13 11:41:27', '2026-04-13 11:41:27'),
(105, 'produto', 10, '2026-04-13', 1, 1, '2026-04-13 11:41:40', '2026-04-13 11:41:40'),
(106, 'produto', 5, '2026-04-13', 1, 1, '2026-04-13 11:44:53', '2026-04-13 11:44:53'),
(107, 'produto', 15, '2026-04-13', 1, 1, '2026-04-13 11:45:42', '2026-04-13 11:45:42'),
(108, 'loja', 1, '2026-04-13', 1, 0, '2026-04-14 00:13:42', '2026-04-14 00:13:42'),
(109, 'loja', 1, '2026-04-16', 2, 0, '2026-04-16 09:06:54', '2026-04-16 16:00:16'),
(110, 'produto', 8, '2026-04-16', 2, 2, '2026-04-16 11:09:25', '2026-04-16 12:29:35'),
(111, 'produto', 3, '2026-04-16', 3, 3, '2026-04-16 11:10:30', '2026-04-16 22:50:05'),
(112, 'produto', 7, '2026-04-16', 3, 3, '2026-04-16 11:11:31', '2026-04-17 02:01:50'),
(113, 'produto', 6, '2026-04-16', 3, 3, '2026-04-16 11:11:36', '2026-04-17 02:46:31'),
(114, 'produto', 12, '2026-04-16', 2, 2, '2026-04-16 11:11:36', '2026-04-16 12:25:28'),
(115, 'produto', 16, '2026-04-16', 2, 2, '2026-04-16 11:12:29', '2026-04-16 12:34:25'),
(116, 'produto', 13, '2026-04-16', 2, 2, '2026-04-16 11:12:30', '2026-04-16 12:30:58'),
(117, 'produto', 2, '2026-04-16', 3, 3, '2026-04-16 11:12:30', '2026-04-17 01:17:08'),
(118, 'produto', 4, '2026-04-16', 3, 3, '2026-04-16 11:13:16', '2026-04-17 00:27:19'),
(119, 'produto', 11, '2026-04-16', 2, 2, '2026-04-16 11:14:04', '2026-04-16 12:25:28'),
(120, 'produto', 1, '2026-04-16', 3, 3, '2026-04-16 11:15:06', '2026-04-16 23:34:49'),
(121, 'produto', 9, '2026-04-16', 1, 1, '2026-04-16 12:29:35', '2026-04-16 12:29:35'),
(122, 'produto', 5, '2026-04-16', 2, 2, '2026-04-16 12:36:57', '2026-04-16 14:14:10'),
(123, 'produto', 10, '2026-04-16', 2, 2, '2026-04-16 12:37:38', '2026-04-16 14:08:31'),
(124, 'produto', 14, '2026-04-16', 2, 2, '2026-04-16 12:43:03', '2026-04-16 14:14:10'),
(125, 'produto', 15, '2026-04-16', 2, 2, '2026-04-16 12:44:27', '2026-04-16 14:07:06'),
(126, 'produto', 9, '2026-04-17', 1, 1, '2026-04-17 03:08:26', '2026-04-17 03:08:26'),
(127, 'produto', 16, '2026-04-17', 1, 1, '2026-04-17 03:29:51', '2026-04-17 03:29:51'),
(128, 'produto', 11, '2026-04-17', 1, 1, '2026-04-17 03:49:00', '2026-04-17 03:49:00'),
(129, 'produto', 12, '2026-04-17', 1, 1, '2026-04-17 04:13:53', '2026-04-17 04:13:53'),
(130, 'produto', 13, '2026-04-17', 1, 1, '2026-04-17 04:28:24', '2026-04-17 04:28:24'),
(131, 'produto', 8, '2026-04-17', 1, 1, '2026-04-17 04:41:18', '2026-04-17 04:41:18'),
(132, 'produto', 5, '2026-04-17', 1, 1, '2026-04-17 06:05:07', '2026-04-17 06:05:07'),
(133, 'produto', 10, '2026-04-17', 1, 1, '2026-04-17 06:20:29', '2026-04-17 06:20:29'),
(134, 'produto', 14, '2026-04-17', 1, 1, '2026-04-17 06:34:53', '2026-04-17 06:34:53'),
(135, 'produto', 15, '2026-04-17', 1, 1, '2026-04-17 06:49:09', '2026-04-17 06:49:09'),
(136, 'produto', 9, '2026-04-18', 1, 1, '2026-04-18 08:41:39', '2026-04-18 08:41:39'),
(137, 'loja', 1, '2026-04-22', 2, 0, '2026-04-22 09:11:27', '2026-04-23 00:22:03'),
(138, 'loja', 1, '2026-04-23', 2, 0, '2026-04-23 15:39:47', '2026-04-23 20:30:45'),
(139, 'produto', 8, '2026-04-23', 2, 2, '2026-04-23 15:40:02', '2026-04-23 20:31:04'),
(140, 'produto', 13, '2026-04-23', 2, 2, '2026-04-23 15:40:03', '2026-04-23 20:31:07'),
(141, 'produto', 3, '2026-04-23', 2, 2, '2026-04-23 15:40:04', '2026-04-23 20:31:10'),
(142, 'produto', 6, '2026-04-23', 2, 2, '2026-04-23 15:40:05', '2026-04-23 20:31:08'),
(143, 'produto', 1, '2026-04-23', 2, 2, '2026-04-23 15:40:05', '2026-04-23 20:31:09'),
(144, 'produto', 16, '2026-04-23', 2, 2, '2026-04-23 15:40:06', '2026-04-23 20:31:06'),
(145, 'produto', 2, '2026-04-23', 2, 2, '2026-04-23 15:40:07', '2026-04-23 20:31:00'),
(146, 'produto', 4, '2026-04-23', 2, 2, '2026-04-23 15:40:09', '2026-04-23 20:31:02'),
(147, 'produto', 9, '2026-04-23', 2, 2, '2026-04-23 15:40:10', '2026-04-23 20:31:03'),
(148, 'produto', 7, '2026-04-23', 2, 2, '2026-04-23 15:40:11', '2026-04-23 20:31:01'),
(149, 'produto', 12, '2026-04-23', 2, 2, '2026-04-23 15:40:11', '2026-04-23 20:31:02'),
(150, 'produto', 11, '2026-04-23', 2, 2, '2026-04-23 15:40:12', '2026-04-23 20:31:08'),
(151, 'produto', 14, '2026-04-23', 2, 2, '2026-04-23 15:40:14', '2026-04-23 20:31:12'),
(152, 'produto', 5, '2026-04-23', 2, 2, '2026-04-23 15:40:15', '2026-04-23 20:31:11'),
(153, 'produto', 15, '2026-04-23', 2, 2, '2026-04-23 15:40:15', '2026-04-23 20:31:13'),
(154, 'produto', 10, '2026-04-23', 2, 2, '2026-04-23 15:40:16', '2026-04-23 20:31:12'),
(155, 'loja', 1, '2026-04-30', 1, 0, '2026-04-30 15:08:33', '2026-04-30 15:08:33'),
(156, 'loja', 1, '2026-05-02', 1, 0, '2026-05-02 21:28:55', '2026-05-02 21:28:55'),
(157, 'loja', 1, '2026-05-03', 2, 0, '2026-05-03 12:52:56', '2026-05-03 13:56:21'),
(158, 'loja', 1, '2026-05-08', 3, 0, '2026-05-08 07:26:34', '2026-05-08 21:26:44'),
(159, 'produto', 6, '2026-05-08', 3, 3, '2026-05-08 07:26:51', '2026-05-08 21:27:05'),
(160, 'produto', 13, '2026-05-08', 3, 3, '2026-05-08 07:26:52', '2026-05-08 21:27:03'),
(161, 'produto', 2, '2026-05-08', 3, 3, '2026-05-08 07:26:53', '2026-05-08 21:27:04'),
(162, 'produto', 8, '2026-05-08', 3, 3, '2026-05-08 07:26:54', '2026-05-08 21:27:07'),
(163, 'produto', 11, '2026-05-08', 3, 3, '2026-05-08 07:26:55', '2026-05-08 21:26:59'),
(164, 'produto', 12, '2026-05-08', 3, 3, '2026-05-08 07:26:56', '2026-05-08 21:27:04'),
(165, 'produto', 16, '2026-05-08', 3, 3, '2026-05-08 07:26:57', '2026-05-08 21:27:02'),
(166, 'produto', 7, '2026-05-08', 3, 3, '2026-05-08 07:26:59', '2026-05-08 21:27:06'),
(167, 'produto', 9, '2026-05-08', 3, 3, '2026-05-08 07:26:59', '2026-05-08 21:27:07'),
(168, 'produto', 4, '2026-05-08', 3, 3, '2026-05-08 07:27:00', '2026-05-08 21:27:08'),
(169, 'produto', 1, '2026-05-08', 3, 3, '2026-05-08 07:27:01', '2026-05-08 21:27:09'),
(170, 'produto', 3, '2026-05-08', 3, 3, '2026-05-08 07:27:01', '2026-05-08 21:27:00'),
(171, 'produto', 10, '2026-05-08', 3, 3, '2026-05-08 07:27:03', '2026-05-08 21:27:10'),
(172, 'produto', 15, '2026-05-08', 3, 3, '2026-05-08 07:27:04', '2026-05-08 21:27:11'),
(173, 'produto', 14, '2026-05-08', 3, 3, '2026-05-08 07:27:04', '2026-05-08 21:27:11'),
(174, 'produto', 5, '2026-05-08', 3, 3, '2026-05-08 07:27:05', '2026-05-08 21:27:12');

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

--
-- Estrutura da tabela `cupons`
--

CREATE TABLE `cupons` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `codigo` varchar(50) NOT NULL,
  `descricao` text DEFAULT NULL,
  `tipo` enum('percentual','fixo','frete_gratis') NOT NULL DEFAULT 'fixo',
  `valor` decimal(10,2) NOT NULL DEFAULT 0.00,
  `valor_minimo_pedido` decimal(10,2) NOT NULL DEFAULT 0.00,
  `desconto_maximo` decimal(10,2) DEFAULT NULL,
  `usos_maximos` int(11) DEFAULT NULL,
  `usos_por_usuario` int(11) NOT NULL DEFAULT 1,
  `usos_realizados` int(11) NOT NULL DEFAULT 0,
  `valido_de` timestamp NULL DEFAULT NULL,
  `valido_ate` timestamp NULL DEFAULT NULL,
  `primeiro_pedido` tinyint(1) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `enderecos`
--

CREATE TABLE `enderecos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `apelido` varchar(50) NOT NULL DEFAULT 'Casa',
  `destinatario` varchar(150) DEFAULT NULL,
  `cep` varchar(9) NOT NULL,
  `logradouro` varchar(200) NOT NULL,
  `numero` varchar(20) NOT NULL,
  `complemento` varchar(100) DEFAULT NULL,
  `bairro` varchar(100) NOT NULL,
  `cidade` varchar(100) NOT NULL,
  `estado` varchar(2) NOT NULL,
  `latitude` decimal(10,8) DEFAULT NULL,
  `longitude` decimal(11,8) DEFAULT NULL,
  `principal` tinyint(1) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `entregas`
--

CREATE TABLE `entregas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pedido_id` bigint(20) UNSIGNED NOT NULL,
  `entregador_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` enum('aguardando','aceito','coletado','em_rota','entregue','cancelado') NOT NULL DEFAULT 'aguardando',
  `distancia_km` decimal(8,3) DEFAULT NULL,
  `tempo_estimado_min` int(11) DEFAULT NULL,
  `taxa_entrega` decimal(10,2) NOT NULL DEFAULT 0.00,
  `latitude_coleta` decimal(10,8) DEFAULT NULL,
  `longitude_coleta` decimal(11,8) DEFAULT NULL,
  `latitude_destino` decimal(10,8) DEFAULT NULL,
  `longitude_destino` decimal(11,8) DEFAULT NULL,
  `latitude_atual` decimal(10,8) DEFAULT NULL,
  `longitude_atual` decimal(11,8) DEFAULT NULL,
  `token_rastreamento` varchar(64) NOT NULL,
  `link_rastreamento_whatsapp` varchar(255) DEFAULT NULL,
  `aceito_em` timestamp NULL DEFAULT NULL,
  `coletado_em` timestamp NULL DEFAULT NULL,
  `entregue_em` timestamp NULL DEFAULT NULL,
  `localizacao_atualizada_em` timestamp NULL DEFAULT NULL,
  `observacoes` text DEFAULT NULL,
  `rota_historico` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`rota_historico`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `funcionarios`
--

CREATE TABLE `funcionarios` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `tipo` enum('funcionario','freelancer','autonomo','terceirizado') NOT NULL DEFAULT 'funcionario',
  `cargo` varchar(100) DEFAULT NULL,
  `salario` decimal(10,2) DEFAULT NULL,
  `data_admissao` date DEFAULT NULL,
  `data_demissao` date DEFAULT NULL,
  `e_entregador` tinyint(1) NOT NULL DEFAULT 0,
  `veiculo` varchar(100) DEFAULT NULL,
  `placa_veiculo` varchar(10) DEFAULT NULL,
  `cnh` varchar(11) DEFAULT NULL,
  `latitude_atual` decimal(10,8) DEFAULT NULL,
  `longitude_atual` decimal(11,8) DEFAULT NULL,
  `localizacao_atualizada_em` timestamp NULL DEFAULT NULL,
  `disponivel_entregas` tinyint(1) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `configuracoes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`configuracoes`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `funcionarios`
--

INSERT INTO `funcionarios` (`id`, `usuario_id`, `loja_id`, `tipo`, `cargo`, `salario`, `data_admissao`, `data_demissao`, `e_entregador`, `veiculo`, `placa_veiculo`, `cnh`, `latitude_atual`, `longitude_atual`, `localizacao_atualizada_em`, `disponivel_entregas`, `ativo`, `configuracoes`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 3, 1, 'funcionario', 'Atendente', NULL, '2026-03-18', NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(2, 4, 1, 'funcionario', 'Entregador', NULL, '2026-03-18', NULL, 1, 'Moto Honda CG 160', 'ABC-1234', NULL, NULL, NULL, NULL, 1, 1, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL);

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

--
-- Estrutura da tabela `grupos_adicionais`
--

CREATE TABLE `grupos_adicionais` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `produto_id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(100) NOT NULL,
  `descricao` text DEFAULT NULL,
  `min_selecao` int(11) NOT NULL DEFAULT 0,
  `max_selecao` int(11) NOT NULL DEFAULT 1,
  `obrigatorio` tinyint(1) NOT NULL DEFAULT 0,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `grupos_adicionais`
--

INSERT INTO `grupos_adicionais` (`id`, `produto_id`, `nome`, `descricao`, `min_selecao`, `max_selecao`, `obrigatorio`, `ordem`, `ativo`, `created_at`, `updated_at`) VALUES
(1, 1, 'Ponto do Hambúrguer', NULL, 1, 1, 1, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(2, 1, 'Adicionais', NULL, 0, 5, 0, 2, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(3, 2, 'Ponto do Hambúrguer', NULL, 1, 1, 1, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(4, 2, 'Adicionais', NULL, 0, 5, 0, 2, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(5, 3, 'Adicionais', NULL, 0, 5, 0, 2, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(6, 4, 'Ponto do Hambúrguer', NULL, 1, 1, 1, 1, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(7, 4, 'Adicionais', NULL, 0, 5, 0, 2, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19'),
(8, 5, 'Adicionais', NULL, 0, 5, 0, 2, 1, '2026-03-18 05:20:19', '2026-03-18 05:20:19');

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

--
-- Estrutura da tabela `itens_adicionais_pedido`
--

CREATE TABLE `itens_adicionais_pedido` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `item_pedido_id` bigint(20) UNSIGNED NOT NULL,
  `adicional_id` bigint(20) UNSIGNED NOT NULL,
  `adicional_nome` varchar(100) NOT NULL,
  `adicional_preco` decimal(10,2) NOT NULL,
  `quantidade` int(11) NOT NULL DEFAULT 1,
  `subtotal` decimal(10,2) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `itens_pedido`
--

CREATE TABLE `itens_pedido` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pedido_id` bigint(20) UNSIGNED NOT NULL,
  `produto_id` bigint(20) UNSIGNED NOT NULL,
  `produto_nome` varchar(150) NOT NULL,
  `produto_descricao` text DEFAULT NULL,
  `produto_preco` decimal(10,2) NOT NULL,
  `quantidade` int(11) NOT NULL,
  `subtotal` decimal(10,2) NOT NULL,
  `observacoes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `queue` varchar(255) NOT NULL,
  `payload` longtext NOT NULL,
  `attempts` tinyint(3) UNSIGNED NOT NULL,
  `reserved_at` int(10) UNSIGNED DEFAULT NULL,
  `available_at` int(10) UNSIGNED NOT NULL,
  `created_at` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `lgpd_aceites`
--

CREATE TABLE `lgpd_aceites` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `versao` varchar(20) NOT NULL DEFAULT '1.0',
  `tipo` enum('cookies','termos','ambos') NOT NULL DEFAULT 'ambos',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `lgpd_aceites`
--

INSERT INTO `lgpd_aceites` (`id`, `usuario_id`, `loja_id`, `ip`, `user_agent`, `versao`, `tipo`, `created_at`, `updated_at`) VALUES
(1, NULL, 1, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', '1.0', 'cookies', '2026-03-18 06:32:40', '2026-03-18 06:32:40'),
(2, NULL, 1, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '1.0', 'cookies', '2026-03-18 06:36:57', '2026-03-18 06:36:57'),
(3, NULL, 1, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', '1.0', 'cookies', '2026-03-18 17:39:06', '2026-03-18 17:39:06'),
(4, NULL, 1, '189.89.12.169', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', '1.0', 'cookies', '2026-04-03 05:20:09', '2026-04-03 05:20:09');

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

--
-- Estrutura da tabela `lojas`
--

CREATE TABLE `lojas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `plano_id` bigint(20) UNSIGNED DEFAULT NULL,
  `trial_expira_em` date DEFAULT NULL,
  `trial_utilizado` tinyint(1) NOT NULL DEFAULT 0,
  `nome` varchar(150) NOT NULL,
  `slug` varchar(150) NOT NULL,
  `cnpj` varchar(18) DEFAULT NULL,
  `telefone` varchar(20) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `email` varchar(150) DEFAULT NULL,
  `logo` varchar(255) DEFAULT NULL,
  `banner` varchar(255) DEFAULT NULL,
  `descricao` text DEFAULT NULL,
  `cep` varchar(9) DEFAULT NULL,
  `logradouro` varchar(200) DEFAULT NULL,
  `numero` varchar(20) DEFAULT NULL,
  `complemento` varchar(100) DEFAULT NULL,
  `bairro` varchar(100) DEFAULT NULL,
  `cidade` varchar(100) DEFAULT NULL,
  `estado` varchar(2) DEFAULT NULL,
  `latitude` decimal(10,8) DEFAULT NULL,
  `longitude` decimal(11,8) DEFAULT NULL,
  `raio_entrega_km` decimal(5,2) NOT NULL DEFAULT 10.00,
  `cor_primaria` varchar(7) NOT NULL DEFAULT '#FF6B35',
  `cor_secundaria` varchar(7) NOT NULL DEFAULT '#2C3E50',
  `pedido_minimo` decimal(10,2) NOT NULL DEFAULT 0.00,
  `tempo_entrega_min` decimal(5,0) NOT NULL DEFAULT 30,
  `tempo_entrega_max` decimal(5,0) NOT NULL DEFAULT 60,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `horario_automatico` tinyint(1) NOT NULL DEFAULT 0,
  `horario_abertura` time DEFAULT NULL,
  `horario_fechamento` time DEFAULT NULL,
  `dias_funcionamento` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'Array com dias da semana: [0=dom, 1=seg, ..., 6=sab]' CHECK (json_valid(`dias_funcionamento`)),
  `aceita_retirada` tinyint(1) NOT NULL DEFAULT 1,
  `aceita_entrega` tinyint(1) NOT NULL DEFAULT 1,
  `aceita_pagamento_entrega` tinyint(1) NOT NULL DEFAULT 0,
  `tipo_taxa_entrega` enum('fixo','por_km','bairro','gratis') NOT NULL DEFAULT 'fixo',
  `taxa_entrega_fixa` decimal(10,2) NOT NULL DEFAULT 0.00,
  `taxa_por_km` decimal(10,2) NOT NULL DEFAULT 0.00,
  `km_gratis` decimal(5,2) NOT NULL DEFAULT 0.00,
  `chave_pix` varchar(200) DEFAULT NULL,
  `mercadopago_public_key` varchar(200) DEFAULT NULL,
  `mercadopago_access_token` text DEFAULT NULL,
  `evolution_instance` varchar(100) DEFAULT NULL,
  `notificacoes_whatsapp` tinyint(1) NOT NULL DEFAULT 0,
  `horarios_funcionamento` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`horarios_funcionamento`)),
  `configuracoes` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`configuracoes`)),
  `limitacoes_plano` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`limitacoes_plano`)),
  `popup_saida_ativo` tinyint(1) NOT NULL DEFAULT 0,
  `popup_saida_titulo` varchar(150) DEFAULT NULL,
  `popup_saida_texto` text DEFAULT NULL,
  `popup_saida_desconto_tipo` enum('percentual','fixo','frete_gratis') NOT NULL DEFAULT 'percentual',
  `popup_saida_desconto_valor` decimal(8,2) NOT NULL DEFAULT 10.00,
  `popup_saida_cupom` varchar(50) DEFAULT NULL,
  `popup_saida_imagem` varchar(255) DEFAULT NULL,
  `popup_saida_validade_min` int(11) NOT NULL DEFAULT 30,
  `popup_promo_ativo` tinyint(1) NOT NULL DEFAULT 0,
  `popup_promo_titulo` varchar(150) DEFAULT NULL,
  `popup_promo_texto` text DEFAULT NULL,
  `popup_promo_imagem` varchar(255) DEFAULT NULL,
  `popup_promo_delay_seg` int(11) NOT NULL DEFAULT 5,
  `popup_promo_expira_em` timestamp NULL DEFAULT NULL,
  `popup_promo_url` varchar(500) DEFAULT NULL,
  `nfe_ativo` tinyint(1) NOT NULL DEFAULT 0,
  `nfe_ambiente` enum('homologacao','producao') NOT NULL DEFAULT 'homologacao',
  `nfe_token` varchar(200) DEFAULT NULL,
  `nfe_cnpj_emitente` varchar(20) DEFAULT NULL,
  `nfe_razao_social` varchar(200) DEFAULT NULL,
  `nfe_serie` varchar(10) NOT NULL DEFAULT '1',
  `nfe_numero_atual` int(11) NOT NULL DEFAULT 1,
  `nfe_provedor` varchar(50) NOT NULL DEFAULT 'focusnfe',
  `lgpd_texto_cookies` text DEFAULT NULL,
  `lgpd_url_politica` varchar(500) DEFAULT NULL,
  `lgpd_url_termos` varchar(500) DEFAULT NULL,
  `cozinha_ativo` tinyint(1) NOT NULL DEFAULT 0,
  `cozinha_pin` varchar(10) DEFAULT NULL,
  `wpp_templates` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`wpp_templates`)),
  `avaliacao_media` decimal(3,2) NOT NULL DEFAULT 0.00,
  `avaliacao_media_comida` decimal(3,2) NOT NULL DEFAULT 0.00,
  `avaliacao_media_entrega` decimal(3,2) NOT NULL DEFAULT 0.00,
  `avaliacoes_total` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `lojas`
--

INSERT INTO `lojas` (`id`, `plano_id`, `trial_expira_em`, `trial_utilizado`, `nome`, `slug`, `cnpj`, `telefone`, `whatsapp`, `email`, `logo`, `banner`, `descricao`, `cep`, `logradouro`, `numero`, `complemento`, `bairro`, `cidade`, `estado`, `latitude`, `longitude`, `raio_entrega_km`, `cor_primaria`, `cor_secundaria`, `pedido_minimo`, `tempo_entrega_min`, `tempo_entrega_max`, `ativo`, `horario_automatico`, `horario_abertura`, `horario_fechamento`, `dias_funcionamento`, `aceita_retirada`, `aceita_entrega`, `aceita_pagamento_entrega`, `tipo_taxa_entrega`, `taxa_entrega_fixa`, `taxa_por_km`, `km_gratis`, `chave_pix`, `mercadopago_public_key`, `mercadopago_access_token`, `evolution_instance`, `notificacoes_whatsapp`, `horarios_funcionamento`, `configuracoes`, `limitacoes_plano`, `popup_saida_ativo`, `popup_saida_titulo`, `popup_saida_texto`, `popup_saida_desconto_tipo`, `popup_saida_desconto_valor`, `popup_saida_cupom`, `popup_saida_imagem`, `popup_saida_validade_min`, `popup_promo_ativo`, `popup_promo_titulo`, `popup_promo_texto`, `popup_promo_imagem`, `popup_promo_delay_seg`, `popup_promo_expira_em`, `popup_promo_url`, `nfe_ativo`, `nfe_ambiente`, `nfe_token`, `nfe_cnpj_emitente`, `nfe_razao_social`, `nfe_serie`, `nfe_numero_atual`, `nfe_provedor`, `lgpd_texto_cookies`, `lgpd_url_politica`, `lgpd_url_termos`, `cozinha_ativo`, `cozinha_pin`, `wpp_templates`, `avaliacao_media`, `avaliacao_media_comida`, `avaliacao_media_entrega`, `avaliacoes_total`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, NULL, NULL, 0, 'Lanchonete do Zé', 'lanchonete-do-ze', '00.000.000/0001-00', '(11) 98765-4321', '11987654321', 'contato@lanchonete.com', NULL, NULL, 'Os melhores lanches da cidade, feitos com ingredientes frescos!', '01310-100', 'Avenida Paulista', '1000', 'Loja 1', 'Bela Vista', 'São Paulo', 'SP', -23.56140000, -46.65580000, 10.00, '#FF6B35', '#2C3E50', 15.00, 25, 45, 1, 0, NULL, NULL, NULL, 1, 1, 1, 'bairro', 5.00, 0.00, 0.00, NULL, NULL, NULL, NULL, 0, '{\"segunda\":{\"abre\":\"11:00\",\"fecha\":\"23:00\",\"ativo\":true},\"terca\":{\"abre\":\"11:00\",\"fecha\":\"23:00\",\"ativo\":true},\"quarta\":{\"abre\":\"11:00\",\"fecha\":\"23:00\",\"ativo\":true},\"quinta\":{\"abre\":\"11:00\",\"fecha\":\"23:00\",\"ativo\":true},\"sexta\":{\"abre\":\"11:00\",\"fecha\":\"00:00\",\"ativo\":true},\"sabado\":{\"abre\":\"11:00\",\"fecha\":\"01:00\",\"ativo\":true},\"domingo\":{\"abre\":\"12:00\",\"fecha\":\"22:00\",\"ativo\":true}}', NULL, NULL, 0, NULL, NULL, 'percentual', 10.00, NULL, NULL, 30, 0, NULL, NULL, NULL, 5, NULL, NULL, 0, 'homologacao', NULL, NULL, NULL, '1', 1, 'focusnfe', NULL, NULL, NULL, 0, NULL, NULL, 0.00, 0.00, 0.00, 0, '2026-03-18 05:20:18', '2026-03-18 05:20:18', NULL);

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

--
-- Estrutura da tabela `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2024_01_01_000001_create_lojas_table', 1),
(2, '2024_01_01_000002_create_usuarios_table', 1),
(3, '2024_01_01_000003_create_funcionarios_table', 1),
(4, '2024_01_01_000004_create_enderecos_table', 1),
(5, '2024_01_01_000005_create_categorias_table', 1),
(6, '2024_01_01_000006_create_produtos_table', 1),
(7, '2024_01_01_000007_create_bairros_entrega_table', 1),
(8, '2024_01_01_000008_create_pedidos_table', 1),
(9, '2024_01_01_000009_create_pagamentos_table', 1),
(10, '2024_01_01_000010_create_entregas_table', 1),
(11, '2024_01_01_000011_create_cupons_table', 1),
(12, '2024_01_01_000012_create_avaliacoes_table', 1),
(13, '2024_01_02_000001_add_features_to_lojas_table', 1),
(14, '2024_01_03_000001_add_cnpj_alphanumeric_visits_auto_hours', 1),
(15, '2024_01_04_000001_create_planos_system', 1),
(16, '2024_01_05_000001_create_tours_system', 2),
(17, '2026_03_18_000100_add_gorjeta_and_avaliacoes_columns', 3);

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

--
-- Estrutura da tabela `notas_fiscais`
--

CREATE TABLE `notas_fiscais` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pedido_id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `numero` varchar(20) DEFAULT NULL,
  `serie` varchar(10) NOT NULL DEFAULT '1',
  `tipo` enum('nfce','nfe') NOT NULL DEFAULT 'nfce',
  `ambiente` enum('homologacao','producao') NOT NULL DEFAULT 'homologacao',
  `status` enum('pendente','processando','autorizada','cancelada','rejeitada') NOT NULL DEFAULT 'pendente',
  `chave_acesso` varchar(50) DEFAULT NULL,
  `protocolo` varchar(30) DEFAULT NULL,
  `url_danfe` varchar(500) DEFAULT NULL,
  `xml_path` varchar(255) DEFAULT NULL,
  `motivo_rejeicao` text DEFAULT NULL,
  `dados_emissao` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`dados_emissao`)),
  `resposta_sefaz` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`resposta_sefaz`)),
  `valor_total` decimal(10,2) DEFAULT NULL,
  `emitida_em` timestamp NULL DEFAULT NULL,
  `cancelada_em` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `notificacoes`
--

CREATE TABLE `notificacoes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `titulo` varchar(150) NOT NULL,
  `mensagem` text NOT NULL,
  `tipo` varchar(50) NOT NULL DEFAULT 'info',
  `icone` varchar(50) DEFAULT NULL,
  `url` varchar(500) DEFAULT NULL,
  `dados` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`dados`)),
  `lida` tinyint(1) NOT NULL DEFAULT 0,
  `lida_em` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `pagamentos`
--

CREATE TABLE `pagamentos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `pedido_id` bigint(20) UNSIGNED NOT NULL,
  `metodo` varchar(50) NOT NULL,
  `status` enum('pendente','aprovado','recusado','cancelado','reembolsado','em_analise') NOT NULL DEFAULT 'pendente',
  `valor` decimal(10,2) NOT NULL,
  `mp_payment_id` varchar(255) DEFAULT NULL,
  `mp_preference_id` varchar(255) DEFAULT NULL,
  `mp_status` varchar(255) DEFAULT NULL,
  `mp_status_detail` varchar(255) DEFAULT NULL,
  `mp_transaction_id` varchar(255) DEFAULT NULL,
  `pix_qr_code` varchar(255) DEFAULT NULL,
  `pix_qr_code_base64` text DEFAULT NULL,
  `pix_expiracao` timestamp NULL DEFAULT NULL,
  `parcelas` int(11) NOT NULL DEFAULT 1,
  `bandeira_cartao` varchar(30) DEFAULT NULL,
  `ultimos_digitos_cartao` varchar(4) DEFAULT NULL,
  `titular_cartao` varchar(150) DEFAULT NULL,
  `comprovante` varchar(255) DEFAULT NULL,
  `resposta_gateway` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`resposta_gateway`)),
  `pago_em` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) NOT NULL,
  `token` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `pedidos`
--

CREATE TABLE `pedidos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED NOT NULL,
  `numero` varchar(20) NOT NULL,
  `status` enum('aguardando_pagamento','pagamento_aprovado','confirmado','em_preparo','pronto','saiu_para_entrega','entregue','cancelado','recusado') NOT NULL DEFAULT 'aguardando_pagamento',
  `tipo_entrega` enum('entrega','retirada') NOT NULL DEFAULT 'entrega',
  `endereco_id` bigint(20) UNSIGNED DEFAULT NULL,
  `endereco_cep` varchar(9) DEFAULT NULL,
  `endereco_logradouro` varchar(200) DEFAULT NULL,
  `endereco_numero` varchar(20) DEFAULT NULL,
  `endereco_complemento` varchar(100) DEFAULT NULL,
  `endereco_bairro` varchar(100) DEFAULT NULL,
  `endereco_cidade` varchar(100) DEFAULT NULL,
  `endereco_estado` varchar(2) DEFAULT NULL,
  `endereco_latitude` decimal(10,8) DEFAULT NULL,
  `endereco_longitude` decimal(11,8) DEFAULT NULL,
  `subtotal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `taxa_entrega` decimal(10,2) NOT NULL DEFAULT 0.00,
  `desconto` decimal(10,2) NOT NULL DEFAULT 0.00,
  `gorjeta_entregador` decimal(10,2) NOT NULL DEFAULT 0.00,
  `total` decimal(10,2) NOT NULL DEFAULT 0.00,
  `observacoes` text DEFAULT NULL,
  `cupom_codigo` varchar(50) DEFAULT NULL,
  `tempo_estimado_min` int(11) DEFAULT NULL,
  `confirmado_em` timestamp NULL DEFAULT NULL,
  `entregue_em` timestamp NULL DEFAULT NULL,
  `cancelado_em` timestamp NULL DEFAULT NULL,
  `motivo_cancelamento` text DEFAULT NULL,
  `entregador_id` bigint(20) UNSIGNED DEFAULT NULL,
  `link_rastreamento` varchar(255) DEFAULT NULL,
  `historico_status` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`historico_status`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `planos`
--

CREATE TABLE `planos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `descricao` text DEFAULT NULL,
  `preco_mensal` decimal(10,2) NOT NULL DEFAULT 0.00,
  `preco_anual` decimal(10,2) DEFAULT NULL,
  `recursos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`recursos`)),
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `destaque` tinyint(1) NOT NULL DEFAULT 0,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `planos`
--

INSERT INTO `planos` (`id`, `nome`, `slug`, `descricao`, `preco_mensal`, `preco_anual`, `recursos`, `ativo`, `destaque`, `ordem`, `created_at`, `updated_at`) VALUES
(1, 'Plano Gratuita', 'gratuita', 'Período de teste de 14 dias com todos os recursos disponíveis', 0.00, 0.00, '{\"produtos_ilimitados\":true,\"pedidos_ilimitados\":true,\"pagamento_online\":true,\"relatorios_completos\":true,\"estatisticas_visitas\":true,\"notificacoes_whatsapp\":true,\"cozinha_app\":true,\"nfe_integracao\":true,\"lgpd_compliance\":true,\"popups_marketing\":true,\"suporte_prioritario\":false,\"dominio_personalizado\":false,\"api_acesso\":false}', 1, 0, 1, '2026-03-18 02:31:29', '2026-03-18 02:31:29'),
(2, 'Plano Profissional', 'profissional', 'Acesso completo a todos os recursos com suporte prioritário', 97.00, 970.00, '{\"produtos_ilimitados\":true,\"pedidos_ilimitados\":true,\"pagamento_online\":true,\"relatorios_completos\":true,\"estatisticas_visitas\":true,\"notificacoes_whatsapp\":true,\"cozinha_app\":true,\"nfe_integracao\":true,\"lgpd_compliance\":true,\"popups_marketing\":true,\"suporte_prioritario\":true,\"dominio_personalizado\":true,\"api_acesso\":true}', 1, 1, 2, '2026-03-18 02:31:29', '2026-03-18 02:31:29');

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

--
-- Estrutura da tabela `produtos`
--

CREATE TABLE `produtos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `categoria_id` bigint(20) UNSIGNED DEFAULT NULL,
  `nome` varchar(150) NOT NULL,
  `slug` varchar(150) NOT NULL,
  `descricao` text DEFAULT NULL,
  `ingredientes` text DEFAULT NULL,
  `preco` decimal(10,2) NOT NULL,
  `preco_promocional` decimal(10,2) DEFAULT NULL,
  `peso_gramas` decimal(10,2) DEFAULT NULL,
  `imagem_principal` varchar(255) DEFAULT NULL,
  `imagens` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`imagens`)),
  `estoque` int(11) DEFAULT NULL,
  `controla_estoque` tinyint(1) NOT NULL DEFAULT 0,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `disponivel` tinyint(1) NOT NULL DEFAULT 1,
  `destaque` tinyint(1) NOT NULL DEFAULT 0,
  `novo` tinyint(1) NOT NULL DEFAULT 0,
  `tempo_preparo_min` int(11) NOT NULL DEFAULT 15,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `vendas_total` int(11) NOT NULL DEFAULT 0,
  `avaliacao_media` decimal(3,2) NOT NULL DEFAULT 0.00,
  `avaliacoes_total` int(11) NOT NULL DEFAULT 0,
  `informacoes_nutricionais` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`informacoes_nutricionais`)),
  `alergicos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`alergicos`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `produtos`
--

INSERT INTO `produtos` (`id`, `loja_id`, `categoria_id`, `nome`, `slug`, `descricao`, `ingredientes`, `preco`, `preco_promocional`, `peso_gramas`, `imagem_principal`, `imagens`, `estoque`, `controla_estoque`, `ativo`, `disponivel`, `destaque`, `novo`, `tempo_preparo_min`, `ordem`, `vendas_total`, `avaliacao_media`, `avaliacoes_total`, `informacoes_nutricionais`, `alergicos`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 'X-Burguer', 'x-burguer', 'Pão, hambúrguer artesanal 150g, queijo, alface, tomate, maionese caseira.', NULL, 22.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 1, 0, 15, 1, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(2, 1, 1, 'X-Bacon', 'x-bacon', 'Pão, hambúrguer 150g, bacon crocante, queijo cheddar, cebola crispy.', NULL, 26.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 1, 0, 15, 2, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(3, 1, 1, 'X-Frango', 'x-frango', 'Pão, filé de frango grelhado, queijo prato, alface americana, tomate.', NULL, 24.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 3, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(4, 1, 1, 'X-Tudo', 'x-tudo', 'Pão, hambúrguer duplo, bacon, queijo, alface, tomate, ovo, milho, batata palha.', NULL, 32.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 1, 1, 15, 4, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(5, 1, 1, 'X-Veggie', 'x-veggie', 'Pão integral, hambúrguer de grão-de-bico, queijo, rúcula, tomate seco.', NULL, 24.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 1, 15, 5, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(6, 1, 4, 'Refrigerante Lata', 'refrigerante-lata', NULL, NULL, 5.00, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 1, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(7, 1, 4, 'Suco Natural 300ml', 'suco-natural-300ml', NULL, NULL, 9.00, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 2, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(8, 1, 4, 'Água Mineral', 'agua-mineral', NULL, NULL, 3.00, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 3, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(9, 1, 4, 'Milkshake 400ml', 'milkshake-400ml', NULL, NULL, 14.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 4, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(10, 1, 4, 'Vitamina de Frutas', 'vitamina-de-frutas', NULL, NULL, 12.00, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 15, 5, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(11, 1, 3, 'Batata Frita P', 'batata-frita-p', NULL, NULL, 16.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 12, 1, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(12, 1, 3, 'Batata Frita M', 'batata-frita-m', NULL, NULL, 22.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 12, 2, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(13, 1, 3, 'Batata Frita G', 'batata-frita-g', NULL, NULL, 28.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 12, 3, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(14, 1, 3, 'Onion Rings', 'onion-rings', NULL, NULL, 22.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 12, 4, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(15, 1, 3, 'Nuggets 10 peças', 'nuggets-10-pecas', NULL, NULL, 19.90, NULL, NULL, NULL, NULL, NULL, 0, 1, 1, 0, 0, 12, 5, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(16, 1, 6, 'Combo X-Burguer', 'combo-x-burguer', 'X-Burguer + Batata Frita M + Refrigerante Lata. Economia de R$ 5,00!', NULL, 34.90, 32.90, NULL, NULL, NULL, NULL, 0, 1, 1, 1, 0, 20, 1, 0, 0.00, 0, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL);

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

--
-- Estrutura da tabela `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `payload` longtext NOT NULL,
  `last_activity` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `tours`
--

CREATE TABLE `tours` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(100) NOT NULL,
  `titulo` varchar(200) NOT NULL,
  `descricao` text DEFAULT NULL,
  `passos` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL CHECK (json_valid(`passos`)),
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `ordem` int(11) NOT NULL DEFAULT 0,
  `target_role` varchar(50) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `tours`
--

INSERT INTO `tours` (`id`, `nome`, `titulo`, `descricao`, `passos`, `ativo`, `ordem`, `target_role`, `created_at`, `updated_at`) VALUES
(1, 'primeiro_acesso_admin', 'Bem-vindo ao Painel Administrativo!', 'Tour guiado para conhecer as principais funcionalidades do sistema', '[{\"id\":\"dashboard\",\"element\":\".admin-nav-link[href=\\\"\\/admin\\/dashboard\\\"]\",\"title\":\"\\ud83c\\udfe0 Dashboard\",\"text\":\"Este \\u00e9 seu painel principal! Aqui voc\\u00ea ver\\u00e1 um resumo das vendas, pedidos recentes e estat\\u00edsticas importantes da sua loja.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"pedidos\",\"element\":\".admin-nav-link[href*=\\\"pedidos\\\"]\",\"title\":\"\\ud83d\\udccb Pedidos\",\"text\":\"Aqui voc\\u00ea gerencia todos os pedidos da sua loja. Visualize, atualize status, atribua entregadores e muito mais!\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"produtos\",\"element\":\".admin-nav-link[href*=\\\"produtos\\\"]\",\"title\":\"\\ud83d\\udce6 Produtos\",\"text\":\"Cadastre e gerencie seu card\\u00e1pio aqui! Adicione produtos, categorias, pre\\u00e7os e fotos.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"planos\",\"element\":\".admin-nav-link[href*=\\\"planos\\\"]\",\"title\":\"\\ud83d\\udcb3 Meu Plano\",\"text\":\"Gerencie sua assinatura aqui. Veja seu plano atual, upgrade ou downgrade e hist\\u00f3rico de pagamentos.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"relatorios\",\"element\":\".admin-nav-link[href*=\\\"relatorios\\\"]\",\"title\":\"\\ud83d\\udcca Relat\\u00f3rios\",\"text\":\"An\\u00e1lise detalhada das suas vendas. Gere relat\\u00f3rios, exporte dados e acompanhe o desempenho.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"estatisticas\",\"element\":\".admin-nav-link[href*=\\\"estatisticas\\\"]\",\"title\":\"\\ud83d\\udc41\\ufe0f Visitas\",\"text\":\"Veja estat\\u00edsticas de visitas \\u00e0 sua loja. Saiba quais produtos s\\u00e3o mais vistos e de onde v\\u00eam seus clientes.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"loja_config\",\"element\":\".admin-nav-link[href*=\\\"lojas\\\"]\",\"title\":\"\\u2699\\ufe0f Configura\\u00e7\\u00f5es da Loja\",\"text\":\"Personalize sua loja aqui! Configure dados, hor\\u00e1rios, delivery, pagamentos e muito mais.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"dashboard_content\",\"element\":\".dashboard-cards\",\"title\":\"\\ud83d\\udcc8 Cards de Informa\\u00e7\\u00f5es\",\"text\":\"Estes cards mostram as informa\\u00e7\\u00f5es mais importantes em tempo real: vendas do dia, pedidos pendentes, faturamento e mais.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"pedidos_recentes\",\"element\":\".pedidos-recentes\",\"title\":\"\\ud83d\\udccb Pedidos Recentes\",\"text\":\"Aqui voc\\u00ea v\\u00ea os \\u00faltimos pedidos e pode agir rapidamente: aceitar, preparar para entrega ou cancelar.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"acoes_rapidas\",\"element\":\".acoes-rapidas\",\"title\":\"\\ud83d\\ude80 A\\u00e7\\u00f5es R\\u00e1pidas\",\"text\":\"Bot\\u00f5es para a\\u00e7\\u00f5es comuns: cadastrar produto, ver pedidos, configurar delivery. Economize tempo!\",\"buttons\":[{\"text\":\"Concluir Tour\",\"action\":\"complete\"}]}]', 1, 1, 'admin', '2026-03-18 02:48:29', '2026-03-18 02:48:29'),
(2, 'primeiro_produto', '📦 Cadastre seu Primeiro Produto', 'Aprenda a cadastrar produtos no seu cardápio', '[{\"id\":\"btn_novo_produto\",\"element\":\".btn-novo-produto\",\"title\":\"\\u2795 Novo Produto\",\"text\":\"Clique aqui para adicionar um novo produto ao seu card\\u00e1pio. Vamos cadastrar seu primeiro item!\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"nome_produto\",\"element\":\"input[name=\\\"nome\\\"]\",\"title\":\"\\ud83d\\udcdd Nome do Produto\",\"text\":\"D\\u00ea um nome claro e apetitoso ao seu produto. Ex: \\\"Hamb\\u00farguer X-Bacon\\\" ou \\\"Pizza Calabresa\\\".\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"descricao_produto\",\"element\":\"textarea[name=\\\"descricao\\\"]\",\"title\":\"\\ud83d\\udcc4 Descri\\u00e7\\u00e3o\",\"text\":\"Descreva seu produto detalhadamente. Ingredientes, modo de preparo, informa\\u00e7\\u00f5es al\\u00e9rgicas, etc.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"preco_produto\",\"element\":\"input[name=\\\"preco\\\"]\",\"title\":\"\\ud83d\\udcb0 Pre\\u00e7o\",\"text\":\"Defina o pre\\u00e7o do produto. Use v\\u00edrgula para centavos: 29,90\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"categoria_produto\",\"element\":\"select[name=\\\"categoria_id\\\"]\",\"title\":\"\\ud83d\\udcc2 Categoria\",\"text\":\"Selecione a categoria adequada. Isso ajuda os clientes a encontrarem seus produtos.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"imagem_produto\",\"element\":\".upload-produto\",\"title\":\"\\ud83d\\udcf8 Foto do Produto\",\"text\":\"Uma boa foto aumenta as vendas! Clique aqui para fazer upload da imagem do seu produto.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"disponibilidade\",\"element\":\"input[name=\\\"disponivel\\\"]\",\"title\":\"\\u2705 Disponibilidade\",\"text\":\"Marque se o produto est\\u00e1 dispon\\u00edvel para venda. Desmarque quando estiver em falta.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"btn_salvar\",\"element\":\".btn-salvar-produto\",\"title\":\"\\ud83d\\udcbe Salvar Produto\",\"text\":\"Pronto! Clique aqui para salvar seu primeiro produto. Depois voc\\u00ea pode cadastrar mais!\",\"buttons\":[{\"text\":\"Concluir Tour\",\"action\":\"complete\"}]}]', 1, 2, 'admin', '2026-03-18 02:48:29', '2026-03-18 02:48:29'),
(3, 'primeiro_pedido', '📋 Gerenciando seu Primeiro Pedido', 'Aprenda a processar pedidos dos clientes', '[{\"id\":\"lista_pedidos\",\"element\":\".pedidos-table\",\"title\":\"\\ud83d\\udccb Lista de Pedidos\",\"text\":\"Aqui voc\\u00ea v\\u00ea todos os pedidos recebidos. Cada linha mostra informa\\u00e7\\u00f5es importantes do pedido.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"status_pedido\",\"element\":\".status-badge\",\"title\":\"\\ud83d\\udd04 Status do Pedido\",\"text\":\"Cores diferentes indicam status: azul (novo), verde (confirmado), laranja (preparando), etc.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"btn_detalhes\",\"element\":\".btn-ver-pedido\",\"title\":\"\\ud83d\\udc41\\ufe0f Ver Detalhes\",\"text\":\"Clique para ver todos os detalhes do pedido: itens, endere\\u00e7o, cliente, forma de pagamento.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"acoes_status\",\"element\":\".acoes-status\",\"title\":\"\\u26a1 A\\u00e7\\u00f5es R\\u00e1pidas\",\"text\":\"Use estes bot\\u00f5es para atualizar o status rapidamente: confirmar, preparar, entregar, etc.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"imprimir_pedido\",\"element\":\".btn-imprimir\",\"title\":\"\\ud83d\\udda8\\ufe0f Imprimir\",\"text\":\"Imprima o pedido para a cozinha ou para controle interno. Formato otimizado para impress\\u00e3o.\",\"buttons\":[{\"text\":\"Pr\\u00f3ximo\",\"action\":\"next\"}]},{\"id\":\"notificar_cliente\",\"element\":\".btn-notificar\",\"title\":\"\\ud83d\\udcf1 Notificar Cliente\",\"text\":\"Envie notifica\\u00e7\\u00f5es autom\\u00e1ticas por WhatsApp sobre o status do pedido.\",\"buttons\":[{\"text\":\"Concluir Tour\",\"action\":\"complete\"}]}]', 1, 3, 'admin', '2026-03-18 02:48:29', '2026-03-18 02:48:29');

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

--
-- Estrutura da tabela `tour_usuarios`
--

CREATE TABLE `tour_usuarios` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `tour_id` bigint(20) UNSIGNED NOT NULL,
  `status` enum('pendente','em_andamento','concluido','pulado') NOT NULL DEFAULT 'pendente',
  `passo_atual` int(11) NOT NULL DEFAULT 0,
  `dados_adicionais` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`dados_adicionais`)),
  `iniciado_em` timestamp NULL DEFAULT NULL,
  `concluido_em` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `usuarios`
--

CREATE TABLE `usuarios` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nome` varchar(150) NOT NULL,
  `email` varchar(150) NOT NULL,
  `email_verificado_em` timestamp NULL DEFAULT NULL,
  `senha` varchar(255) NOT NULL,
  `telefone` varchar(20) DEFAULT NULL,
  `whatsapp` varchar(20) DEFAULT NULL,
  `cpf` varchar(14) DEFAULT NULL,
  `data_nascimento` date DEFAULT NULL,
  `genero` enum('masculino','feminino','outro','prefiro_nao_informar') DEFAULT NULL,
  `foto_perfil` varchar(255) DEFAULT NULL,
  `role` enum('super_admin','admin','gerente','atendente','cozinheiro','entregador','cliente') NOT NULL DEFAULT 'cliente',
  `loja_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ativo` tinyint(1) NOT NULL DEFAULT 1,
  `token_redefinicao` varchar(255) DEFAULT NULL,
  `token_redefinicao_expira_em` timestamp NULL DEFAULT NULL,
  `ultimo_acesso_em` timestamp NULL DEFAULT NULL,
  `dispositivo_push_token` varchar(255) DEFAULT NULL,
  `preferencias` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`preferencias`)),
  `remember_token` varchar(100) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `usuarios`
--

INSERT INTO `usuarios` (`id`, `nome`, `email`, `email_verificado_em`, `senha`, `telefone`, `whatsapp`, `cpf`, `data_nascimento`, `genero`, `foto_perfil`, `role`, `loja_id`, `ativo`, `token_redefinicao`, `token_redefinicao_expira_em`, `ultimo_acesso_em`, `dispositivo_push_token`, `preferencias`, `remember_token`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Administrador', 'admin@lanchonete.com', NULL, '$2y$12$q5VaQm3ujDqGRVTJ9dJ6H.PQFpSGCcyOeHn04NRbsWfx3qlu4LhlS', '(11) 99999-0001', '11999990001', NULL, NULL, NULL, NULL, 'super_admin', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(2, 'Maria Gerente', 'gerente@lanchonete.com', NULL, '$2y$12$cItVaEZfadnWq.yvu2m1v.v1U4EDh/W3NEY1FExgPrInW30pQmU8K', '(11) 99999-0002', '11999990002', NULL, NULL, NULL, NULL, 'gerente', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(3, 'João Atendente', 'atendente@lanchonete.com', NULL, '$2y$12$jProdv8G3CbOP2TxlWWqxOoQizIfojIm8bWsiTUDP9n4xsUCsue4e', '(11) 99999-0003', '11999990003', NULL, NULL, NULL, NULL, 'atendente', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(4, 'Carlos Entregador', 'entregador@lanchonete.com', NULL, '$2y$12$qLC4YFN4V3FvKlQSJDUmaOJ9ih1rkyofUFAic6Lkwc2Y4R3PE0NHq', '(11) 99999-0004', '11999990004', NULL, NULL, NULL, NULL, 'entregador', 1, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(5, 'Cliente Teste', 'cliente@lanchonete.com', NULL, '$2y$12$8M/hbOAihoXnb2Sx1mYjGuQ5SLmKMIQvDNJcPpWgdq0FduZWgPi.q', '(11) 99999-0005', '11999990005', NULL, NULL, NULL, NULL, 'cliente', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 05:20:19', '2026-03-18 05:20:19', NULL),
(6, 'Alexandro', 'site.kdkhost@gmail.com', NULL, '$2y$12$9Yki3tfG8NUTSLEuaKZecegb/gnH3fOpIvRTOgDLwcZHupMYRJl8e', '(21) 98132-5441', '(21) 98132-5441', '095.777.117-74', NULL, NULL, NULL, 'cliente', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-03-18 22:10:29', '2026-03-18 22:10:29', NULL),
(7, 'mufjogieje', 'yuvwhgud@immenseignite.info', NULL, '$2y$12$9HXIXuITpACI1WC97dkmOuCgR9JjExonM3pt5SUU38hjGkMUYP5X2', '+1-755-135-0527', '+1-755-135-0527', 'njvihrskjm', NULL, NULL, NULL, 'cliente', NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, '2026-05-02 21:29:01', '2026-05-02 21:29:01', NULL);

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

--
-- Estrutura da tabela `visitas_categorias`
--

CREATE TABLE `visitas_categorias` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `categoria_id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `referer` varchar(500) DEFAULT NULL,
  `device_type` varchar(20) DEFAULT NULL,
  `visitado_em` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura da tabela `visitas_lojas`
--

CREATE TABLE `visitas_lojas` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `referer` varchar(500) DEFAULT NULL,
  `device_type` varchar(20) DEFAULT NULL,
  `visitado_em` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `visitas_lojas`
--

INSERT INTO `visitas_lojas` (`id`, `loja_id`, `usuario_id`, `ip`, `user_agent`, `referer`, `device_type`, `visitado_em`) VALUES
(1, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lojas', 'desktop', '2026-03-18 06:32:05'),
(2, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lojas', 'mobile', '2026-03-18 06:37:43'),
(3, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', 'https://delivery.nano-servidor.rio.br/login', 'mobile', '2026-03-18 17:58:02'),
(4, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lojas', 'desktop', '2026-03-18 18:31:33'),
(5, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 19:04:30'),
(6, 1, NULL, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lojas', 'mobile', '2026-03-18 22:08:30'),
(7, 1, 6, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/notificacoes', 'mobile', '2026-03-18 22:14:09'),
(8, 1, NULL, '57.141.0.12', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:02:05'),
(9, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lojas', 'desktop', '2026-03-19 14:13:59'),
(10, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lojas', 'desktop', '2026-03-19 14:32:59'),
(11, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-20 12:36:37'),
(12, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-20 16:57:57'),
(13, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-20 18:12:09'),
(14, 1, NULL, '66.249.85.7', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)', '', 'mobile', '2026-03-21 00:09:14'),
(15, 1, NULL, '66.102.8.33', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/138.0.0.0 Mobile Safari/537.36 (compatible; Google-Read-Aloud; +https://support.google.com/webmasters/answer/1061943)', '', 'mobile', '2026-03-21 00:09:15'),
(16, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-22 15:22:56'),
(17, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-24 16:48:29'),
(18, 1, NULL, '181.77.236.26', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/notificacoes', 'desktop', '2026-03-24 22:27:53'),
(19, 1, NULL, '181.77.236.26', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/notificacoes', 'desktop', '2026-03-24 23:42:11'),
(20, 1, NULL, '181.77.236.26', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/notificacoes', 'desktop', '2026-03-24 23:50:19'),
(21, 1, NULL, '74.7.229.15', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36; compatible; OAI-SearchBot/1.3; +https://openai.com/searchbot', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-26 20:11:36'),
(22, 1, NULL, '181.77.247.0', 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/notificacoes', 'desktop', '2026-03-26 22:06:08'),
(23, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-27 20:53:27'),
(24, 1, NULL, '74.7.243.218', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-31 10:01:22'),
(25, 1, NULL, '74.7.241.25', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-31 14:04:10'),
(26, 1, NULL, '189.89.12.169', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'mobile', '2026-04-03 05:20:05'),
(27, 1, NULL, '74.7.227.28', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-04-05 20:34:24'),
(28, 1, NULL, '91.231.89.22', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 02:43:48'),
(29, 1, NULL, '91.231.89.17', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 02:54:20'),
(30, 1, NULL, '216.73.216.211', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-07 06:35:45'),
(31, 1, NULL, '66.249.65.164', 'Mozilla/5.0 (Linux; Android 6.0.1; Nexus 5X Build/MMB29P) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.7680.177 Mobile Safari/537.36 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', '', 'mobile', '2026-04-07 13:59:07'),
(32, 1, NULL, '5.133.192.187', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:123.0) Gecko/20100101 Firefox/123', '', 'desktop', '2026-04-08 08:17:08'),
(33, 1, NULL, '74.7.243.218', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-04-11 06:02:05'),
(34, 1, NULL, '74.7.227.178', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-04-11 08:02:12'),
(35, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-14 00:13:42'),
(36, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 09:06:54'),
(37, 1, NULL, '54.39.0.105', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-16 16:00:16'),
(38, 1, NULL, '74.7.229.124', 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36; compatible; OAI-SearchBot/1.3; +https://openai.com/searchbot', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-04-22 09:11:27'),
(39, 1, NULL, '142.44.233.218', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-23 00:22:02'),
(40, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-04-23 15:39:47'),
(41, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-04-23 20:30:45'),
(42, 1, NULL, '74.7.241.25', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-04-30 15:08:33'),
(43, 1, NULL, '194.116.236.215', 'Mozilla/5.0 (Windows NT 6.3; WOW64; rv:41.0) Gecko/20100101 Firefox/41.0', '', 'desktop', '2026-05-02 21:28:55'),
(44, 1, NULL, '74.7.227.53', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-05-03 12:52:56'),
(45, 1, NULL, '74.7.242.41', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-05-03 13:56:21'),
(46, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-05-08 07:26:34'),
(47, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/', 'desktop', '2026-05-08 16:32:56'),
(48, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-05-08 21:26:44');

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

--
-- Estrutura da tabela `visitas_produtos`
--

CREATE TABLE `visitas_produtos` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `produto_id` bigint(20) UNSIGNED NOT NULL,
  `loja_id` bigint(20) UNSIGNED NOT NULL,
  `usuario_id` bigint(20) UNSIGNED DEFAULT NULL,
  `ip` varchar(45) DEFAULT NULL,
  `user_agent` varchar(255) DEFAULT NULL,
  `referer` varchar(500) DEFAULT NULL,
  `device_type` varchar(20) DEFAULT NULL,
  `visitado_em` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Extraindo dados da tabela `visitas_produtos`
--

INSERT INTO `visitas_produtos` (`id`, `produto_id`, `loja_id`, `usuario_id`, `ip`, `user_agent`, `referer`, `device_type`, `visitado_em`) VALUES
(1, 1, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 06:31:32'),
(2, 16, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/buscar', 'mobile', '2026-03-18 06:39:09'),
(3, 4, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 14:52:55'),
(4, 4, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 15:35:06'),
(5, 5, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 16:51:08'),
(6, 3, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 16:59:39'),
(7, 3, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 17:08:44'),
(8, 4, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 17:27:53'),
(9, 2, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/', 'desktop', '2026-03-18 17:35:55'),
(10, 6, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Linux; Android 6.0.1; Moto G (4)) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Mobile Safari/537.36', 'https://delivery.nano-servidor.rio.br/buscar', 'mobile', '2026-03-18 17:58:27'),
(11, 4, 1, NULL, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lanchonete-do-ze', 'mobile', '2026-03-18 22:08:51'),
(12, 16, 1, 6, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lanchonete-do-ze', 'mobile', '2026-03-18 22:12:32'),
(13, 1, 1, 6, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lanchonete-do-ze', 'mobile', '2026-03-18 22:14:12'),
(14, 5, 1, 6, '181.77.242.5', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://www.delivery.nano-servidor.rio.br/lanchonete-do-ze', 'mobile', '2026-03-18 22:14:25'),
(15, 6, 1, NULL, '57.141.0.62', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:03:11'),
(16, 13, 1, NULL, '57.141.0.10', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:03:17'),
(17, 16, 1, NULL, '57.141.0.25', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:04:03'),
(18, 2, 1, NULL, '57.141.0.63', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:04:40'),
(19, 11, 1, NULL, '57.141.0.8', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:05:52'),
(20, 3, 1, NULL, '57.141.0.35', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:06:14'),
(21, 12, 1, NULL, '57.141.0.38', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:07:48'),
(22, 7, 1, NULL, '57.141.0.7', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:08:07'),
(23, 9, 1, NULL, '57.141.0.12', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:09:14'),
(24, 4, 1, NULL, '57.141.0.65', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:12:50'),
(25, 1, 1, NULL, '57.141.0.17', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:14:12'),
(26, 8, 1, NULL, '57.141.0.51', 'meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler)', '', 'desktop', '2026-03-19 10:24:40'),
(27, 10, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lanchonete-do-ze', 'desktop', '2026-03-19 14:14:40'),
(28, 4, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/145.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lanchonete-do-ze', 'desktop', '2026-03-19 14:15:31'),
(29, 9, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:53'),
(30, 8, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:54'),
(31, 1, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:54'),
(32, 13, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:55'),
(33, 7, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:55'),
(34, 16, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:56'),
(35, 6, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:56'),
(36, 11, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:57'),
(37, 12, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:58'),
(38, 4, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:36:58'),
(39, 10, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 12:36:59'),
(40, 15, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 12:36:59'),
(41, 14, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 12:37:00'),
(42, 2, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:37:00'),
(43, 5, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 12:37:01'),
(44, 3, 1, NULL, '74.7.227.138', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 12:37:02'),
(45, 16, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:11'),
(46, 4, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:11'),
(47, 13, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:12'),
(48, 9, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:13'),
(49, 12, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:13'),
(50, 11, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:14'),
(51, 6, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:15'),
(52, 7, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:15'),
(53, 8, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:16'),
(54, 1, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:17'),
(55, 2, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:17'),
(56, 3, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 16:58:19'),
(57, 14, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 16:58:19'),
(58, 15, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 16:58:20'),
(59, 10, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 16:58:20'),
(60, 5, 1, NULL, '74.7.242.3', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 16:58:21'),
(61, 1, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:21'),
(62, 16, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:22'),
(63, 9, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:23'),
(64, 11, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:24'),
(65, 13, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:24'),
(66, 12, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:25'),
(67, 7, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:26'),
(68, 4, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:26'),
(69, 3, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:29'),
(70, 2, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:29'),
(71, 8, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:30'),
(72, 6, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-03-20 18:12:31'),
(73, 15, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 18:12:32'),
(74, 14, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 18:12:32'),
(75, 5, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 18:12:33'),
(76, 10, 1, NULL, '74.7.227.13', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-03-20 18:12:33'),
(77, 6, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-25 01:17:54'),
(78, 11, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-25 05:33:38'),
(79, 8, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-25 08:08:21'),
(80, 16, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-25 10:40:00'),
(81, 3, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-26 07:47:56'),
(82, 4, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-26 10:59:24'),
(83, 2, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-27 08:32:37'),
(84, 1, 1, NULL, '177.192.7.91', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'https://delivery.nano-servidor.rio.br/lanchonete-do-ze', 'desktop', '2026-03-27 20:53:46'),
(85, 7, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-28 01:49:16'),
(86, 8, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-28 22:29:26'),
(87, 13, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-29 07:39:24'),
(88, 4, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-29 07:39:27'),
(89, 1, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-29 18:12:43'),
(90, 2, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-29 20:39:07'),
(91, 16, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-29 22:13:05'),
(92, 6, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-30 00:04:36'),
(93, 14, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-30 04:03:57'),
(94, 9, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-31 18:28:09'),
(95, 12, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-31 20:17:42'),
(96, 12, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-31 21:48:27'),
(97, 11, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-31 22:43:46'),
(98, 13, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-03-31 22:45:35'),
(99, 1, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-01 00:17:08'),
(100, 1, 1, NULL, '189.89.12.169', 'Mozilla/5.0 (Linux; Android 10; K) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Mobile Safari/537.36', 'https://delivery.nano-servidor.rio.br/lanchonete-do-ze', 'mobile', '2026-04-03 05:20:15'),
(101, 9, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-03 20:13:21'),
(102, 7, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-03 23:32:16'),
(103, 15, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-03 23:33:57'),
(104, 10, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-04 01:59:40'),
(105, 15, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-04 08:12:29'),
(106, 10, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-06 19:52:06'),
(107, 3, 1, NULL, '91.231.89.126', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:07:33'),
(108, 6, 1, NULL, '91.231.89.37', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:08:55'),
(109, 9, 1, NULL, '91.231.89.34', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:09:02'),
(110, 8, 1, NULL, '91.231.89.38', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:11:11'),
(111, 7, 1, NULL, '91.231.89.38', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:11:40'),
(112, 4, 1, NULL, '91.231.89.37', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:12:38'),
(113, 1, 1, NULL, '91.231.89.127', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:12:59'),
(114, 16, 1, NULL, '91.231.89.124', 'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:134.0) Gecko/20100101 Firefox/134.0', '', 'desktop', '2026-04-07 03:14:08'),
(115, 14, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-09 18:44:15'),
(116, 3, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-09 21:47:42'),
(117, 5, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-09 21:54:01'),
(118, 5, 1, NULL, '216.244.66.198', 'Mozilla/5.0 (compatible; DotBot/1.2; +https://opensiteexplorer.org/dotbot; help@moz.com)', '', 'desktop', '2026-04-12 14:38:40'),
(119, 12, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:03:39'),
(120, 7, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:04:22'),
(121, 1, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:05:48'),
(122, 16, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:07:51'),
(123, 4, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:07:51'),
(124, 9, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:08:42'),
(125, 8, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:09:08'),
(126, 6, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:09:08'),
(127, 13, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:09:41'),
(128, 2, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:10:36'),
(129, 3, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:11:01'),
(130, 11, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 10:12:05'),
(131, 14, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 11:41:27'),
(132, 10, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 11:41:40'),
(133, 5, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 11:44:53'),
(134, 15, 1, NULL, '216.73.216.34', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-13 11:45:42'),
(135, 8, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:09:25'),
(136, 3, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:10:30'),
(137, 7, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:11:31'),
(138, 6, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:11:36'),
(139, 12, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:11:36'),
(140, 16, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:12:29'),
(141, 13, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:12:30'),
(142, 2, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:12:30'),
(143, 4, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:13:16'),
(144, 11, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:14:04'),
(145, 1, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 11:15:06'),
(146, 11, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:25:28'),
(147, 12, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:25:28'),
(148, 7, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:26:21'),
(149, 6, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:27:02'),
(150, 9, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:29:35'),
(151, 8, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:29:35'),
(152, 13, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:30:58'),
(153, 1, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:32:01'),
(154, 3, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:32:42'),
(155, 4, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:33:25'),
(156, 16, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:34:25'),
(157, 2, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:34:41'),
(158, 5, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:36:57'),
(159, 10, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:37:38'),
(160, 14, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:43:03'),
(161, 15, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 12:44:27'),
(162, 15, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 14:07:06'),
(163, 10, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 14:08:31'),
(164, 5, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 14:14:10'),
(165, 14, 1, NULL, '216.73.216.131', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-16 14:14:10'),
(166, 3, 1, NULL, '54.39.203.44', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-16 22:50:05'),
(167, 1, 1, NULL, '54.39.210.218', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-16 23:34:49'),
(168, 4, 1, NULL, '15.235.96.253', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 00:27:19'),
(169, 2, 1, NULL, '54.39.203.185', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 01:17:08'),
(170, 7, 1, NULL, '142.44.228.45', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 02:01:50'),
(171, 6, 1, NULL, '15.235.27.106', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 02:46:31'),
(172, 9, 1, NULL, '51.222.168.241', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 03:08:26'),
(173, 16, 1, NULL, '54.39.203.187', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 03:29:51'),
(174, 11, 1, NULL, '51.161.37.10', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 03:49:00'),
(175, 12, 1, NULL, '142.44.225.210', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 04:13:53'),
(176, 13, 1, NULL, '54.39.89.174', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 04:28:24'),
(177, 8, 1, NULL, '51.222.168.3', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 04:41:18'),
(178, 5, 1, NULL, '142.44.228.48', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 06:05:07'),
(179, 10, 1, NULL, '51.161.65.32', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 06:20:29'),
(180, 14, 1, NULL, '54.39.210.76', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 06:34:53'),
(181, 15, 1, NULL, '51.222.168.245', 'Mozilla/5.0 (compatible; AhrefsBot/7.0; +http://ahrefs.com/robot/)', '', 'desktop', '2026-04-17 06:49:09'),
(182, 9, 1, NULL, '216.73.217.27', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)', '', 'desktop', '2026-04-18 08:41:39'),
(183, 8, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:02'),
(184, 13, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:03'),
(185, 3, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:04'),
(186, 6, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:05'),
(187, 1, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:05'),
(188, 16, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:06'),
(189, 2, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:07'),
(190, 4, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:09'),
(191, 9, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:10'),
(192, 7, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:11'),
(193, 12, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:11'),
(194, 11, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 15:40:12'),
(195, 14, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 15:40:14'),
(196, 5, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 15:40:15'),
(197, 15, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 15:40:15'),
(198, 10, 1, NULL, '74.7.227.46', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 15:40:16'),
(199, 2, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:00'),
(200, 7, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:01'),
(201, 12, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:02'),
(202, 4, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:02'),
(203, 9, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:03'),
(204, 8, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:04'),
(205, 16, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:06'),
(206, 13, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:07'),
(207, 11, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:08'),
(208, 6, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:08'),
(209, 1, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:09'),
(210, 3, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-04-23 20:31:10'),
(211, 5, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 20:31:11'),
(212, 14, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 20:31:12'),
(213, 10, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 20:31:12'),
(214, 15, 1, NULL, '74.7.242.20', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-04-23 20:31:13'),
(215, 6, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:51'),
(216, 13, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:52'),
(217, 2, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:53'),
(218, 8, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:54'),
(219, 11, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:55'),
(220, 12, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:56'),
(221, 16, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:57'),
(222, 7, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:59'),
(223, 9, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:26:59'),
(224, 4, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:27:00'),
(225, 1, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:27:01'),
(226, 3, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 07:27:01'),
(227, 10, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 07:27:03'),
(228, 15, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 07:27:04'),
(229, 14, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 07:27:04'),
(230, 5, 1, NULL, '74.7.243.225', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 07:27:05'),
(231, 6, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:15'),
(232, 2, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:16'),
(233, 3, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:16'),
(234, 1, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:18'),
(235, 4, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:18'),
(236, 12, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:19'),
(237, 7, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:20'),
(238, 16, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:21'),
(239, 13, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:22'),
(240, 11, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:23'),
(241, 8, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:24'),
(242, 9, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 16:33:27'),
(243, 15, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 16:33:29'),
(244, 5, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 16:33:31'),
(245, 10, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 16:33:31'),
(246, 14, 1, NULL, '74.7.227.2', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://mail.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 16:33:32'),
(247, 11, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:26:59'),
(248, 3, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:00'),
(249, 16, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:02'),
(250, 13, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:03');
INSERT INTO `visitas_produtos` (`id`, `produto_id`, `loja_id`, `usuario_id`, `ip`, `user_agent`, `referer`, `device_type`, `visitado_em`) VALUES
(251, 2, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:04'),
(252, 12, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:04'),
(253, 6, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:05'),
(254, 7, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:06'),
(255, 9, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:07'),
(256, 8, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:07'),
(257, 4, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:08'),
(258, 1, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar', 'desktop', '2026-05-08 21:27:09'),
(259, 10, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 21:27:10'),
(260, 15, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 21:27:11'),
(261, 14, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 21:27:11'),
(262, 5, 1, NULL, '74.7.227.143', 'Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; GPTBot/1.3; +https://openai.com/gptbot)', 'https://www.delivery.nano-servidor.rio.br/buscar?page=2&q=', 'desktop', '2026-05-08 21:27:12');

--
-- Índices para tabelas despejadas
--

--
-- Índices para tabela `adicionais`
--
ALTER TABLE `adicionais`
  ADD PRIMARY KEY (`id`),
  ADD KEY `adicionais_grupo_id_foreign` (`grupo_id`);

--
-- Índices para tabela `assinaturas`
--
ALTER TABLE `assinaturas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `assinaturas_plano_id_foreign` (`plano_id`),
  ADD KEY `assinaturas_loja_id_status_index` (`loja_id`,`status`),
  ADD KEY `assinaturas_trial_expira_em_index` (`trial_expira_em`);

--
-- Índices para tabela `avaliacoes`
--
ALTER TABLE `avaliacoes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `avaliacoes_pedido_id_foreign` (`pedido_id`),
  ADD KEY `avaliacoes_usuario_id_foreign` (`usuario_id`),
  ADD KEY `avaliacoes_loja_id_aprovado_index` (`loja_id`,`aprovado`);

--
-- Índices para tabela `bairros_entrega`
--
ALTER TABLE `bairros_entrega`
  ADD PRIMARY KEY (`id`),
  ADD KEY `bairros_entrega_loja_id_ativo_index` (`loja_id`,`ativo`);

--
-- Índices para tabela `banners`
--
ALTER TABLE `banners`
  ADD PRIMARY KEY (`id`),
  ADD KEY `banners_loja_id_ativo_index` (`loja_id`,`ativo`);

--
-- Índices para tabela `categorias`
--
ALTER TABLE `categorias`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `categorias_loja_id_slug_unique` (`loja_id`,`slug`),
  ADD KEY `categorias_categoria_pai_id_foreign` (`categoria_pai_id`),
  ADD KEY `categorias_loja_id_ativo_ordem_index` (`loja_id`,`ativo`,`ordem`);

--
-- Índices para tabela `contadores_visitas`
--
ALTER TABLE `contadores_visitas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `contadores_visitas_tipo_entidade_id_data_unique` (`tipo`,`entidade_id`,`data`),
  ADD KEY `contadores_visitas_tipo_entidade_id_data_index` (`tipo`,`entidade_id`,`data`);

--
-- Índices para tabela `cupons`
--
ALTER TABLE `cupons`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `cupons_codigo_unique` (`codigo`),
  ADD KEY `cupons_loja_id_ativo_index` (`loja_id`,`ativo`),
  ADD KEY `cupons_codigo_index` (`codigo`);

--
-- Índices para tabela `enderecos`
--
ALTER TABLE `enderecos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `enderecos_usuario_id_index` (`usuario_id`);

--
-- Índices para tabela `entregas`
--
ALTER TABLE `entregas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `entregas_pedido_id_unique` (`pedido_id`),
  ADD UNIQUE KEY `entregas_token_rastreamento_unique` (`token_rastreamento`),
  ADD KEY `entregas_entregador_id_status_index` (`entregador_id`,`status`),
  ADD KEY `entregas_token_rastreamento_index` (`token_rastreamento`);

--
-- Índices para tabela `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Índices para tabela `funcionarios`
--
ALTER TABLE `funcionarios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `funcionarios_usuario_id_foreign` (`usuario_id`),
  ADD KEY `funcionarios_loja_id_e_entregador_disponivel_entregas_index` (`loja_id`,`e_entregador`,`disponivel_entregas`),
  ADD KEY `funcionarios_loja_id_ativo_index` (`loja_id`,`ativo`);

--
-- Índices para tabela `grupos_adicionais`
--
ALTER TABLE `grupos_adicionais`
  ADD PRIMARY KEY (`id`),
  ADD KEY `grupos_adicionais_produto_id_foreign` (`produto_id`);

--
-- Índices para tabela `itens_adicionais_pedido`
--
ALTER TABLE `itens_adicionais_pedido`
  ADD PRIMARY KEY (`id`),
  ADD KEY `itens_adicionais_pedido_item_pedido_id_foreign` (`item_pedido_id`),
  ADD KEY `itens_adicionais_pedido_adicional_id_foreign` (`adicional_id`);

--
-- Índices para tabela `itens_pedido`
--
ALTER TABLE `itens_pedido`
  ADD PRIMARY KEY (`id`),
  ADD KEY `itens_pedido_produto_id_foreign` (`produto_id`),
  ADD KEY `itens_pedido_pedido_id_index` (`pedido_id`);

--
-- Índices para tabela `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

--
-- Índices para tabela `lgpd_aceites`
--
ALTER TABLE `lgpd_aceites`
  ADD PRIMARY KEY (`id`),
  ADD KEY `lgpd_aceites_usuario_id_foreign` (`usuario_id`),
  ADD KEY `lgpd_aceites_loja_id_foreign` (`loja_id`);

--
-- Índices para tabela `lojas`
--
ALTER TABLE `lojas`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `lojas_slug_unique` (`slug`),
  ADD UNIQUE KEY `lojas_cnpj_unique` (`cnpj`),
  ADD KEY `lojas_slug_index` (`slug`),
  ADD KEY `lojas_ativo_index` (`ativo`),
  ADD KEY `lojas_plano_id_foreign` (`plano_id`),
  ADD KEY `lojas_trial_expira_em_index` (`trial_expira_em`);

--
-- Índices para tabela `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Índices para tabela `notas_fiscais`
--
ALTER TABLE `notas_fiscais`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notas_fiscais_pedido_id_foreign` (`pedido_id`),
  ADD KEY `notas_fiscais_loja_id_status_index` (`loja_id`,`status`),
  ADD KEY `notas_fiscais_chave_acesso_index` (`chave_acesso`);

--
-- Índices para tabela `notificacoes`
--
ALTER TABLE `notificacoes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `notificacoes_usuario_id_lida_index` (`usuario_id`,`lida`);

--
-- Índices para tabela `pagamentos`
--
ALTER TABLE `pagamentos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pagamentos_pedido_id_status_index` (`pedido_id`,`status`),
  ADD KEY `pagamentos_mp_payment_id_index` (`mp_payment_id`),
  ADD KEY `pagamentos_mp_preference_id_index` (`mp_preference_id`);

--
-- Índices para tabela `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Índices para tabela `pedidos`
--
ALTER TABLE `pedidos`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pedidos_numero_unique` (`numero`),
  ADD KEY `pedidos_endereco_id_foreign` (`endereco_id`),
  ADD KEY `pedidos_entregador_id_foreign` (`entregador_id`),
  ADD KEY `pedidos_loja_id_status_index` (`loja_id`,`status`),
  ADD KEY `pedidos_usuario_id_status_index` (`usuario_id`,`status`),
  ADD KEY `pedidos_numero_index` (`numero`),
  ADD KEY `pedidos_created_at_index` (`created_at`);

--
-- Índices para tabela `planos`
--
ALTER TABLE `planos`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `planos_slug_unique` (`slug`);

--
-- Índices para tabela `produtos`
--
ALTER TABLE `produtos`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `produtos_loja_id_slug_unique` (`loja_id`,`slug`),
  ADD KEY `produtos_categoria_id_foreign` (`categoria_id`),
  ADD KEY `produtos_loja_id_ativo_disponivel_index` (`loja_id`,`ativo`,`disponivel`),
  ADD KEY `produtos_loja_id_categoria_id_index` (`loja_id`,`categoria_id`),
  ADD KEY `produtos_destaque_index` (`destaque`);

--
-- Índices para tabela `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Índices para tabela `tours`
--
ALTER TABLE `tours`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tours_ativo_ordem_index` (`ativo`,`ordem`),
  ADD KEY `tours_target_role_index` (`target_role`);

--
-- Índices para tabela `tour_usuarios`
--
ALTER TABLE `tour_usuarios`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tour_usuarios_user_id_tour_id_unique` (`user_id`,`tour_id`),
  ADD KEY `tour_usuarios_tour_id_foreign` (`tour_id`),
  ADD KEY `tour_usuarios_user_id_status_index` (`user_id`,`status`);

--
-- Índices para tabela `usuarios`
--
ALTER TABLE `usuarios`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `usuarios_email_unique` (`email`),
  ADD UNIQUE KEY `usuarios_cpf_unique` (`cpf`),
  ADD KEY `usuarios_role_ativo_index` (`role`,`ativo`),
  ADD KEY `usuarios_loja_id_index` (`loja_id`);

--
-- Índices para tabela `visitas_categorias`
--
ALTER TABLE `visitas_categorias`
  ADD PRIMARY KEY (`id`),
  ADD KEY `visitas_categorias_usuario_id_foreign` (`usuario_id`),
  ADD KEY `visitas_categorias_categoria_id_visitado_em_index` (`categoria_id`,`visitado_em`),
  ADD KEY `visitas_categorias_loja_id_visitado_em_index` (`loja_id`,`visitado_em`);

--
-- Índices para tabela `visitas_lojas`
--
ALTER TABLE `visitas_lojas`
  ADD PRIMARY KEY (`id`),
  ADD KEY `visitas_lojas_usuario_id_foreign` (`usuario_id`),
  ADD KEY `visitas_lojas_loja_id_visitado_em_index` (`loja_id`,`visitado_em`),
  ADD KEY `visitas_lojas_ip_index` (`ip`);

--
-- Índices para tabela `visitas_produtos`
--
ALTER TABLE `visitas_produtos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `visitas_produtos_usuario_id_foreign` (`usuario_id`),
  ADD KEY `visitas_produtos_produto_id_visitado_em_index` (`produto_id`,`visitado_em`),
  ADD KEY `visitas_produtos_loja_id_visitado_em_index` (`loja_id`,`visitado_em`);

--
-- AUTO_INCREMENT de tabelas despejadas
--

--
-- AUTO_INCREMENT de tabela `adicionais`
--
ALTER TABLE `adicionais`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=40;

--
-- AUTO_INCREMENT de tabela `assinaturas`
--
ALTER TABLE `assinaturas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `avaliacoes`
--
ALTER TABLE `avaliacoes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `bairros_entrega`
--
ALTER TABLE `bairros_entrega`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de tabela `banners`
--
ALTER TABLE `banners`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `categorias`
--
ALTER TABLE `categorias`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT de tabela `contadores_visitas`
--
ALTER TABLE `contadores_visitas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=175;

--
-- AUTO_INCREMENT de tabela `cupons`
--
ALTER TABLE `cupons`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `enderecos`
--
ALTER TABLE `enderecos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `entregas`
--
ALTER TABLE `entregas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `funcionarios`
--
ALTER TABLE `funcionarios`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `grupos_adicionais`
--
ALTER TABLE `grupos_adicionais`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT de tabela `itens_adicionais_pedido`
--
ALTER TABLE `itens_adicionais_pedido`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `itens_pedido`
--
ALTER TABLE `itens_pedido`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `lgpd_aceites`
--
ALTER TABLE `lgpd_aceites`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT de tabela `lojas`
--
ALTER TABLE `lojas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT de tabela `notas_fiscais`
--
ALTER TABLE `notas_fiscais`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `notificacoes`
--
ALTER TABLE `notificacoes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `pagamentos`
--
ALTER TABLE `pagamentos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `pedidos`
--
ALTER TABLE `pedidos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `planos`
--
ALTER TABLE `planos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT de tabela `produtos`
--
ALTER TABLE `produtos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;

--
-- AUTO_INCREMENT de tabela `tours`
--
ALTER TABLE `tours`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT de tabela `tour_usuarios`
--
ALTER TABLE `tour_usuarios`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `usuarios`
--
ALTER TABLE `usuarios`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT de tabela `visitas_categorias`
--
ALTER TABLE `visitas_categorias`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT de tabela `visitas_lojas`
--
ALTER TABLE `visitas_lojas`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=49;

--
-- AUTO_INCREMENT de tabela `visitas_produtos`
--
ALTER TABLE `visitas_produtos`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=263;

--
-- Restrições para despejos de tabelas
--

--
-- Limitadores para a tabela `adicionais`
--
ALTER TABLE `adicionais`
  ADD CONSTRAINT `adicionais_grupo_id_foreign` FOREIGN KEY (`grupo_id`) REFERENCES `grupos_adicionais` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `assinaturas`
--
ALTER TABLE `assinaturas`
  ADD CONSTRAINT `assinaturas_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `assinaturas_plano_id_foreign` FOREIGN KEY (`plano_id`) REFERENCES `planos` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `avaliacoes`
--
ALTER TABLE `avaliacoes`
  ADD CONSTRAINT `avaliacoes_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `avaliacoes_pedido_id_foreign` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `avaliacoes_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `bairros_entrega`
--
ALTER TABLE `bairros_entrega`
  ADD CONSTRAINT `bairros_entrega_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `banners`
--
ALTER TABLE `banners`
  ADD CONSTRAINT `banners_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `categorias`
--
ALTER TABLE `categorias`
  ADD CONSTRAINT `categorias_categoria_pai_id_foreign` FOREIGN KEY (`categoria_pai_id`) REFERENCES `categorias` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `categorias_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `cupons`
--
ALTER TABLE `cupons`
  ADD CONSTRAINT `cupons_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `enderecos`
--
ALTER TABLE `enderecos`
  ADD CONSTRAINT `enderecos_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `entregas`
--
ALTER TABLE `entregas`
  ADD CONSTRAINT `entregas_entregador_id_foreign` FOREIGN KEY (`entregador_id`) REFERENCES `funcionarios` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `entregas_pedido_id_foreign` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `funcionarios`
--
ALTER TABLE `funcionarios`
  ADD CONSTRAINT `funcionarios_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `funcionarios_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `grupos_adicionais`
--
ALTER TABLE `grupos_adicionais`
  ADD CONSTRAINT `grupos_adicionais_produto_id_foreign` FOREIGN KEY (`produto_id`) REFERENCES `produtos` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `itens_adicionais_pedido`
--
ALTER TABLE `itens_adicionais_pedido`
  ADD CONSTRAINT `itens_adicionais_pedido_adicional_id_foreign` FOREIGN KEY (`adicional_id`) REFERENCES `adicionais` (`id`),
  ADD CONSTRAINT `itens_adicionais_pedido_item_pedido_id_foreign` FOREIGN KEY (`item_pedido_id`) REFERENCES `itens_pedido` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `itens_pedido`
--
ALTER TABLE `itens_pedido`
  ADD CONSTRAINT `itens_pedido_pedido_id_foreign` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `itens_pedido_produto_id_foreign` FOREIGN KEY (`produto_id`) REFERENCES `produtos` (`id`);

--
-- Limitadores para a tabela `lgpd_aceites`
--
ALTER TABLE `lgpd_aceites`
  ADD CONSTRAINT `lgpd_aceites_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `lgpd_aceites_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `lojas`
--
ALTER TABLE `lojas`
  ADD CONSTRAINT `lojas_plano_id_foreign` FOREIGN KEY (`plano_id`) REFERENCES `planos` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `notas_fiscais`
--
ALTER TABLE `notas_fiscais`
  ADD CONSTRAINT `notas_fiscais_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `notas_fiscais_pedido_id_foreign` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `notificacoes`
--
ALTER TABLE `notificacoes`
  ADD CONSTRAINT `notificacoes_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `pagamentos`
--
ALTER TABLE `pagamentos`
  ADD CONSTRAINT `pagamentos_pedido_id_foreign` FOREIGN KEY (`pedido_id`) REFERENCES `pedidos` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `pedidos`
--
ALTER TABLE `pedidos`
  ADD CONSTRAINT `pedidos_endereco_id_foreign` FOREIGN KEY (`endereco_id`) REFERENCES `enderecos` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `pedidos_entregador_id_foreign` FOREIGN KEY (`entregador_id`) REFERENCES `funcionarios` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `pedidos_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `pedidos_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `produtos`
--
ALTER TABLE `produtos`
  ADD CONSTRAINT `produtos_categoria_id_foreign` FOREIGN KEY (`categoria_id`) REFERENCES `categorias` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `produtos_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `tour_usuarios`
--
ALTER TABLE `tour_usuarios`
  ADD CONSTRAINT `tour_usuarios_tour_id_foreign` FOREIGN KEY (`tour_id`) REFERENCES `tours` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tour_usuarios_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `usuarios` (`id`) ON DELETE CASCADE;

--
-- Limitadores para a tabela `usuarios`
--
ALTER TABLE `usuarios`
  ADD CONSTRAINT `usuarios_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `visitas_categorias`
--
ALTER TABLE `visitas_categorias`
  ADD CONSTRAINT `visitas_categorias_categoria_id_foreign` FOREIGN KEY (`categoria_id`) REFERENCES `categorias` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `visitas_categorias_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `visitas_categorias_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `visitas_lojas`
--
ALTER TABLE `visitas_lojas`
  ADD CONSTRAINT `visitas_lojas_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `visitas_lojas_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE SET NULL;

--
-- Limitadores para a tabela `visitas_produtos`
--
ALTER TABLE `visitas_produtos`
  ADD CONSTRAINT `visitas_produtos_loja_id_foreign` FOREIGN KEY (`loja_id`) REFERENCES `lojas` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `visitas_produtos_produto_id_foreign` FOREIGN KEY (`produto_id`) REFERENCES `produtos` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `visitas_produtos_usuario_id_foreign` FOREIGN KEY (`usuario_id`) REFERENCES `usuarios` (`id`) ON DELETE SET NULL;
COMMIT;

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