-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Tempo de geração: 03/04/2026 às 22:53
-- Versão do servidor: 10.4.32-MariaDB
-- Versão do PHP: 8.2.12

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 */;

--
-- Banco de dados: `pms_hotel`
--

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

--
-- Estrutura para tabela `audit_logs`
--

CREATE TABLE `audit_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED DEFAULT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `entity_type` varchar(255) NOT NULL,
  `entity_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(50) NOT NULL,
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `reason` text DEFAULT NULL,
  `ip_address` varchar(45) DEFAULT NULL,
  `user_agent` text DEFAULT NULL,
  `request_id` char(36) DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `audit_logs`
--

INSERT INTO `audit_logs` (`id`, `hotel_id`, `user_id`, `entity_type`, `entity_id`, `action`, `old_values`, `new_values`, `reason`, `ip_address`, `user_agent`, `request_id`, `created_at`) VALUES
(1, NULL, NULL, 'App\\Models\\Hotel', 1, 'created', NULL, '{\"slug\":\"hotel-demo\",\"name\":\"Hotel Demo\",\"trade_name\":\"Hotel Demo Ltda\",\"document\":\"12.345.678\\/0001-90\",\"email\":\"contato@hoteldemo.com.br\",\"phone\":\"(11) 3456-7890\",\"address\":\"Rua das Palmeiras, 100\",\"city\":\"S\\u00e3o Paulo\",\"state\":\"SP\",\"zip_code\":\"01234-567\",\"country\":\"BR\",\"timezone\":\"America\\/Sao_Paulo\",\"currency\":\"BRL\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:36:44\",\"created_at\":\"2026-04-01 13:36:44\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:36:44'),
(2, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'fbbe4318-a672-45d7-b8ce-fa9a055f5345', '2026-04-01 16:50:00'),
(3, NULL, 2, 'system', NULL, 'login', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'a31454f2-3d8a-4a3c-af3f-a85ab1f1c90c', '2026-04-01 16:52:54'),
(4, 1, NULL, 'App\\Models\\RoomCategory', 1, 'created', NULL, '{\"hotel_id\":1,\"name\":\"Standard Double\",\"short_code\":\"STD\",\"base_price\":250,\"base_capacity\":2,\"max_capacity\":3,\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(5, 1, NULL, 'App\\Models\\RoomCategory', 2, 'created', NULL, '{\"hotel_id\":1,\"name\":\"Luxo King\",\"short_code\":\"LUX\",\"base_price\":450,\"base_capacity\":2,\"max_capacity\":2,\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":2}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(6, 1, NULL, 'App\\Models\\RoomCategory', 3, 'created', NULL, '{\"hotel_id\":1,\"name\":\"Su\\u00edte Master\",\"short_code\":\"SUI\",\"base_price\":780,\"base_capacity\":2,\"max_capacity\":4,\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":3}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(7, 1, NULL, 'App\\Models\\Room', 1, 'created', NULL, '{\"hotel_id\":1,\"name\":\"101\",\"room_category_id\":1,\"floor\":\"1\\u00ba Andar\",\"status\":\"available\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(8, 1, NULL, 'App\\Models\\Room', 2, 'created', NULL, '{\"hotel_id\":1,\"name\":\"102\",\"room_category_id\":1,\"floor\":\"1\\u00ba Andar\",\"status\":\"available\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":2}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(9, 1, NULL, 'App\\Models\\Room', 3, 'created', NULL, '{\"hotel_id\":1,\"name\":\"103\",\"room_category_id\":1,\"floor\":\"1\\u00ba Andar\",\"status\":\"dirty\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":3}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(10, 1, NULL, 'App\\Models\\Room', 4, 'created', NULL, '{\"hotel_id\":1,\"name\":\"201\",\"room_category_id\":2,\"floor\":\"2\\u00ba Andar\",\"status\":\"available\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":4}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(11, 1, NULL, 'App\\Models\\Room', 5, 'created', NULL, '{\"hotel_id\":1,\"name\":\"202\",\"room_category_id\":2,\"floor\":\"2\\u00ba Andar\",\"status\":\"maintenance\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":5}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(12, 1, NULL, 'App\\Models\\Room', 6, 'created', NULL, '{\"hotel_id\":1,\"name\":\"301\",\"room_category_id\":3,\"floor\":\"Cobertura\",\"status\":\"available\",\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":6}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(13, 1, NULL, 'App\\Models\\SalesChannel', 1, 'created', NULL, '{\"hotel_id\":1,\"name\":\"Balc\\u00e3o \\/ Direto\",\"type\":\"direct\",\"commission_rate\":0,\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(14, 1, NULL, 'App\\Models\\SalesChannel', 2, 'created', NULL, '{\"hotel_id\":1,\"name\":\"Booking.com\",\"type\":\"ota\",\"commission_rate\":15,\"is_active\":true,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":2}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(15, 1, NULL, 'App\\Models\\Guest', 1, 'created', NULL, '{\"hotel_id\":1,\"document_number\":\"123.456.789-00\",\"first_name\":\"Maria\",\"last_name\":\"Silva\",\"email\":\"maria@exemplo.com\",\"phone\":\"(11) 99999-1111\",\"document_type\":\"cpf\",\"nationality\":\"BR\",\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(16, 1, NULL, 'App\\Models\\Guest', 2, 'created', NULL, '{\"hotel_id\":1,\"document_number\":\"987.654.321-00\",\"first_name\":\"Jo\\u00e3o\",\"last_name\":\"Pereira\",\"email\":\"joao@exemplo.com\",\"phone\":\"(21) 98888-2222\",\"document_type\":\"cpf\",\"nationality\":\"BR\",\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":2}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(17, 1, NULL, 'App\\Models\\Guest', 3, 'created', NULL, '{\"hotel_id\":1,\"document_number\":\"111.222.333-44\",\"first_name\":\"Ana\",\"last_name\":\"Rodrigues\",\"email\":\"ana@exemplo.com\",\"phone\":\"(31) 97777-3333\",\"document_type\":\"cpf\",\"nationality\":\"BR\",\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":3}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(18, 1, NULL, 'App\\Models\\Reservation', 1, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"PMS-001\",\"guest_id\":1,\"room_id\":1,\"room_category_id\":1,\"sales_channel_id\":1,\"status\":\"confirmed\",\"check_in_expected\":\"2026-04-01 14:00:00\",\"check_out_expected\":\"2026-04-04 12:00:00\",\"adults\":2,\"total_expected\":750,\"notes\":\"H\\u00f3spede prefere quarto silencioso\",\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":1}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(19, 1, NULL, 'App\\Models\\Reservation', 2, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"PMS-002\",\"guest_id\":2,\"room_id\":4,\"room_category_id\":2,\"sales_channel_id\":2,\"status\":\"checked_in\",\"check_in_expected\":\"2026-03-31 14:00:00\",\"check_out_expected\":\"2026-04-03 12:00:00\",\"check_in_realized\":\"2026-03-31 15:00:00\",\"adults\":2,\"children\":1,\"total_expected\":900,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":2}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(20, 1, NULL, 'App\\Models\\Reservation', 3, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"PMS-003\",\"guest_id\":3,\"room_id\":2,\"room_category_id\":1,\"sales_channel_id\":1,\"status\":\"confirmed\",\"check_in_expected\":\"2026-04-03 14:00:00\",\"check_out_expected\":\"2026-04-07 12:00:00\",\"adults\":1,\"total_expected\":1000,\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":3}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(21, 1, NULL, 'App\\Models\\Reservation', 4, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"PMS-004\",\"guest_id\":1,\"room_id\":6,\"room_category_id\":3,\"sales_channel_id\":2,\"status\":\"provisional\",\"check_in_expected\":\"2026-04-06 14:00:00\",\"check_out_expected\":\"2026-04-08 12:00:00\",\"adults\":2,\"total_expected\":1560,\"notes\":\"Aguardando confirma\\u00e7\\u00e3o de pagamento\",\"updated_at\":\"2026-04-01 13:56:31\",\"created_at\":\"2026-04-01 13:56:31\",\"id\":4}', NULL, '127.0.0.1', 'Symfony', NULL, '2026-04-01 16:56:31'),
(22, NULL, 1, 'system', NULL, 'logout', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '0088487f-daf1-4e67-a106-cf58ffbd0cfe', '2026-04-01 19:34:13'),
(23, NULL, 2, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'ab05c5c1-363a-471a-a8d4-4c969e2bfe7a', '2026-04-01 19:34:43'),
(24, 1, 2, 'App\\Models\\Reservation', 2, 'updated', '{\"room_id\":4,\"check_in_expected\":\"2026-03-31T17:00:00.000000Z\",\"check_out_expected\":\"2026-04-03T15:00:00.000000Z\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"room_id\":\"3\",\"check_in_expected\":\"2026-04-02 00:00:00\",\"check_out_expected\":\"2026-04-05 00:00:00\",\"updated_at\":\"2026-04-01 19:07:14\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'e5194d85-a94a-4491-a86c-201594702163', '2026-04-01 22:07:14'),
(25, 1, 2, 'App\\Models\\Reservation', 1, 'updated', '{\"check_in_expected\":\"2026-04-01T17:00:00.000000Z\",\"check_out_expected\":\"2026-04-04T15:00:00.000000Z\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-07 00:00:00\",\"updated_at\":\"2026-04-01 20:53:31\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '9f0ee8da-4d98-4c2e-985b-7f2e29545790', '2026-04-01 23:53:31'),
(26, 1, 2, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":2,\"check_in_expected\":\"2026-04-03T17:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T15:00:00.000000Z\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"room_id\":\"5\",\"check_in_expected\":\"2026-04-02 00:00:00\",\"check_out_expected\":\"2026-04-06 00:00:00\",\"updated_at\":\"2026-04-01 20:53:33\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '4ae9fefa-8c26-4c60-a2e4-3ad7c6a86091', '2026-04-01 23:53:33'),
(27, 1, 2, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-02T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-06T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:53:33.000000Z\"}', '{\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-01 20:57:34\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '967f671f-0712-489e-bc24-c8fd92c27484', '2026-04-01 23:57:34'),
(28, 1, 2, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:57:34.000000Z\"}', '{\"check_in_expected\":\"2026-04-01 00:00:00\",\"check_out_expected\":\"2026-04-05 00:00:00\",\"updated_at\":\"2026-04-01 20:57:39\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '5a6aa96d-a040-4176-9d60-3d22b46e1bbe', '2026-04-01 23:57:39'),
(29, 1, 2, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":5,\"check_in_expected\":\"2026-04-01T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-05T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:57:39.000000Z\"}', '{\"room_id\":\"1\",\"check_in_expected\":\"2026-03-31 00:00:00\",\"check_out_expected\":\"2026-04-04 00:00:00\",\"updated_at\":\"2026-04-01 20:57:42\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'b97744fd-230d-4220-a114-cf1537910e36', '2026-04-01 23:57:42'),
(30, 1, 2, 'App\\Models\\Reservation', 1, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:53:31.000000Z\"}', '{\"check_in_expected\":\"2026-04-06 00:00:00\",\"check_out_expected\":\"2026-04-09 00:00:00\",\"updated_at\":\"2026-04-01 20:57:45\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'c7dc2603-54eb-4c4f-8bd1-b63b27cd81d5', '2026-04-01 23:57:45'),
(31, 1, 2, 'App\\Models\\Reservation', 1, 'updated', '{\"room_id\":1,\"check_in_expected\":\"2026-04-06T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-09T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:57:45.000000Z\"}', '{\"room_id\":\"2\",\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-07 00:00:00\",\"updated_at\":\"2026-04-01 20:57:48\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '87d6413e-24dc-46f4-9a5e-a0ab4aadf2ec', '2026-04-01 23:57:48'),
(32, 1, 2, 'App\\Models\\Reservation', 1, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:57:48.000000Z\"}', '{\"check_in_expected\":\"2026-04-02 00:00:00\",\"check_out_expected\":\"2026-04-05 00:00:00\",\"updated_at\":\"2026-04-01 20:57:51\"}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '7ccc34d7-90f7-4c0e-a036-5056b38d3f5d', '2026-04-01 23:57:51'),
(33, 1, 2, 'App\\Models\\Reservation', 1, 'updated', '{\"status\":\"confirmed\",\"check_in_realized\":null,\"updated_at\":\"2026-04-01T23:57:51.000000Z\",\"checked_in_by\":null}', '{\"status\":\"checked_in\",\"check_in_realized\":\"2026-04-01 21:16:44\",\"updated_at\":\"2026-04-01 21:16:44\",\"checked_in_by\":2}', NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '4b338cb5-5926-486a-83c0-d04dbec6f2c2', '2026-04-02 00:16:44'),
(34, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '192.168.1.17', 'Mozilla/5.0 (iPhone; CPU iPhone OS 18_7 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3 Mobile/15E148 Safari/604.1', 'b65799cb-7955-47a5-95be-a0bbf0a66885', '2026-04-02 00:42:28'),
(35, NULL, 2, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '8aa6d3fe-8686-4036-ae04-c102c8ded9a1', '2026-04-02 08:59:06'),
(36, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'e94a01c5-df1b-4b77-9255-98f4824819f6', '2026-04-02 08:59:25'),
(37, NULL, 1, 'system', NULL, 'logout', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '82704cfd-5d57-4d1d-b42e-f450dad0b6b5', '2026-04-02 09:01:13'),
(38, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '24d02324-41ba-455d-ba92-b16e65f32366', '2026-04-02 09:01:28'),
(39, NULL, 1, 'system', NULL, 'logout', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'f97962ed-6737-42ad-a5de-c88ea9330460', '2026-04-02 09:13:02'),
(40, NULL, 3, 'system', NULL, 'login', NULL, NULL, NULL, '127.0.0.1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '67de8411-fa67-486b-bbc8-d4951f999606', '2026-04-02 09:13:16'),
(41, NULL, 2, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'c13f158d-e01c-44f5-a0b8-c49e43e3b557', '2026-04-02 10:34:50'),
(42, NULL, 2, 'system', NULL, 'logout', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '890e5dfc-6df5-4628-8a44-01ab556ee89e', '2026-04-02 10:53:18'),
(43, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '039b07ad-20f1-4edf-b397-7b72e7cf5c22', '2026-04-02 10:53:42'),
(44, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'adece4e7-0820-456e-97dd-c0aad3b934b1', '2026-04-02 10:56:02'),
(45, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'a978ca86-a75e-4a50-a0d4-45c265bd9f53', '2026-04-02 13:04:07'),
(46, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'd3ae0323-2bda-41bf-8443-1b5f9650c79f', '2026-04-02 20:59:28'),
(47, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'df129f8f-249f-4753-a306-f7d972b91318', '2026-04-02 21:40:12'),
(48, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '008c15ce-5499-463a-a8c9-66681c3417b9', '2026-04-02 23:46:16'),
(49, NULL, 1, 'system', NULL, 'logout', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'b1091f7a-e966-40df-a63c-fae433639619', '2026-04-02 23:47:38'),
(50, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'ddbe622a-f47f-40c8-8bfe-98043da514e5', '2026-04-02 23:47:53'),
(51, NULL, 1, 'App\\Models\\Reservation', 1, 'reservation.payment.added', NULL, '{\"payment_id\":1,\"amount\":\"750.00\",\"method_id\":\"1\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '7dc49f2f-1904-49f9-a145-decbaab19819', '2026-04-03 00:55:57'),
(52, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '192.168.1.17', 'Mozilla/5.0 (iPhone; CPU iPhone OS 26_3_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) CriOS/146.0.7680.40 Mobile/15E148 Safari/604.1', '90fa235e-b8bf-4ec2-a1a3-b41259f8caa1', '2026-04-03 03:46:39'),
(53, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'd6c9c76d-b024-4f08-b4ed-4a76aafa221c', '2026-04-03 03:54:18'),
(54, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '3316ec91-eacb-46b3-bf9a-679222aa00de', '2026-04-03 05:34:11'),
(55, NULL, 1, 'App\\Models\\Reservation', 4, 'reservation.payment.added', NULL, '{\"payment_id\":2,\"amount\":\"1560.00\",\"method_id\":\"1\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'ef6b5e48-3d72-4b60-8e8b-def409964740', '2026-04-03 05:36:15'),
(56, 1, 1, 'App\\Models\\Guest', 4, 'created', NULL, '{\"hotel_id\":1,\"first_name\":\"Jo\",\"last_name\":\"\",\"document_type\":\"cpf\",\"updated_at\":\"2026-04-03 04:12:06\",\"created_at\":\"2026-04-03 04:12:06\",\"id\":4}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '80c98b21-f2c5-47ed-836c-ce727997f224', '2026-04-03 07:12:06'),
(57, 1, 1, 'App\\Models\\Reservation', 5, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"PMS-BQCD2M\",\"guest_id\":4,\"room_id\":\"5\",\"room_category_id\":2,\"sales_channel_id\":null,\"status\":\"confirmed\",\"check_in_expected\":\"2026-04-03 00:00:00\",\"check_out_expected\":\"2026-04-04 00:00:00\",\"adults\":2,\"children\":0,\"total_expected\":0,\"notes\":null,\"updated_at\":\"2026-04-03 04:12:06\",\"created_at\":\"2026-04-03 04:12:06\",\"id\":5}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '80c98b21-f2c5-47ed-836c-ce727997f224', '2026-04-03 07:12:06'),
(58, 1, 1, 'App\\Models\\Room', 4, 'updated', '{\"status\":\"available\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"status\":\"cleaning\",\"updated_at\":\"2026-04-03 05:12:34\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '5adfef5a-4bd3-4e55-a963-f54aa6ea4526', '2026-04-03 08:12:34'),
(59, 1, 1, 'App\\Models\\Room', 4, 'updated', '{\"status\":\"cleaning\",\"updated_at\":\"2026-04-03T08:12:34.000000Z\"}', '{\"status\":\"available\",\"updated_at\":\"2026-04-03 05:14:15\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '479b30d1-e775-4901-87f8-8f8654cfc5ee', '2026-04-03 08:14:15'),
(60, 1, 1, 'App\\Models\\Room', 4, 'updated', '{\"status\":\"available\",\"updated_at\":\"2026-04-03T08:14:15.000000Z\"}', '{\"status\":\"cleaning\",\"updated_at\":\"2026-04-03 05:14:17\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'b9906c38-ba08-46e3-a1ec-b4e28da17dc5', '2026-04-03 08:14:17'),
(61, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '2fff7ad9-0315-4a8d-b910-dbced91c2534', '2026-04-03 14:38:52'),
(62, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'cec44f5d-1615-42c0-b1b8-bf86036684a4', '2026-04-03 14:41:57'),
(63, 1, 1, 'App\\Models\\Room', 4, 'updated', '{\"status\":\"cleaning\",\"updated_at\":\"2026-04-03T08:14:17.000000Z\"}', '{\"status\":\"dirty\",\"updated_at\":\"2026-04-03 11:42:47\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '7c840e4c-5dbe-4a65-99ae-fbe77d723d88', '2026-04-03 14:42:47'),
(64, NULL, 1, 'App\\Models\\Hotel', 1, 'updated', '{\"name\":\"Hotel Demo\",\"trade_name\":\"Hotel Demo Ltda\",\"document\":\"12.345.678\\/0001-90\",\"email\":\"contato@hoteldemo.com.br\",\"phone\":\"(11) 3456-7890\",\"city\":\"S\\u00e3o Paulo\",\"state\":\"SP\",\"updated_at\":\"2026-04-01T16:36:44.000000Z\"}', '{\"name\":\"Hotel Bela Vista\",\"trade_name\":\"Bela Vista\",\"document\":\"00.000.000\\/0001-00\",\"email\":\"contato@belavista.com.br\",\"phone\":\"(48) 99999-9999\",\"city\":\"Florian\",\"state\":\"SC\",\"updated_at\":\"2026-04-03 12:47:36\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '90bd595e-63e0-4f74-8162-24b8f21e345e', '2026-04-03 15:47:36'),
(65, 1, 1, 'App\\Models\\Guest', 5, 'created', NULL, '{\"hotel_id\":1,\"first_name\":\"Passante\",\"last_name\":\"Bar\",\"updated_at\":\"2026-04-03 14:24:33\",\"created_at\":\"2026-04-03 14:24:33\",\"id\":5}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'c59f7b94-8413-43dc-8553-9129e39fe9f4', '2026-04-03 17:24:33'),
(66, 1, 1, 'App\\Models\\Reservation', 6, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"CMD-QLAOOQ\",\"reservation_type\":\"comanda\",\"guest_id\":5,\"room_id\":null,\"room_category_id\":null,\"status\":\"checked_in\",\"check_in_expected\":\"2026-04-03 14:24:33\",\"check_out_expected\":\"2026-04-03 23:59:59\",\"check_in_realized\":\"2026-04-03 14:24:33\",\"checked_in_by\":1,\"adults\":1,\"children\":0,\"total_expected\":0,\"updated_at\":\"2026-04-03 14:24:33\",\"created_at\":\"2026-04-03 14:24:33\",\"id\":6}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'c59f7b94-8413-43dc-8553-9129e39fe9f4', '2026-04-03 17:24:33'),
(67, 1, 1, 'App\\Models\\Guest', 6, 'created', NULL, '{\"hotel_id\":1,\"first_name\":\"Day\",\"last_name\":\"Use Pool\",\"updated_at\":\"2026-04-03 14:29:29\",\"created_at\":\"2026-04-03 14:29:29\",\"id\":6}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '7d88ad60-8036-468f-ba2e-f52303ecb186', '2026-04-03 17:29:29'),
(68, 1, 1, 'App\\Models\\Reservation', 7, 'created', NULL, '{\"hotel_id\":1,\"locator\":\"CMD-8EEJZG\",\"reservation_type\":\"day_use\",\"guest_id\":6,\"room_id\":1,\"room_category_id\":1,\"status\":\"checked_in\",\"check_in_expected\":\"2026-04-03 14:29:29\",\"check_out_expected\":\"2026-04-03 23:59:59\",\"check_in_realized\":\"2026-04-03 14:29:29\",\"checked_in_by\":1,\"adults\":1,\"children\":0,\"total_expected\":0,\"updated_at\":\"2026-04-03 14:29:29\",\"created_at\":\"2026-04-03 14:29:29\",\"id\":7}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '7d88ad60-8036-468f-ba2e-f52303ecb186', '2026-04-03 17:29:29'),
(69, NULL, 1, 'system', NULL, 'logout', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '0d55f963-db12-4a4a-bf30-0dfc5ec640ff', '2026-04-03 18:06:55'),
(70, NULL, 1, 'system', NULL, 'login', NULL, NULL, NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '11bfa97d-c9a5-42f1-a183-8479684010eb', '2026-04-03 18:07:01'),
(71, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":1,\"check_in_expected\":\"2026-03-31T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-04T03:00:00.000000Z\",\"updated_at\":\"2026-04-01T23:57:42.000000Z\"}', '{\"room_id\":\"5\",\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-03 16:15:19\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '5ae8be2e-811f-476d-ab2c-d589fe39415e', '2026-04-03 19:15:19'),
(72, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:19.000000Z\"}', '{\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-09 00:00:00\",\"updated_at\":\"2026-04-03 16:15:22\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '75cd6a13-a53d-4c8b-a1a1-ac78a693fdb0', '2026-04-03 19:15:22'),
(73, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-09T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:22.000000Z\"}', '{\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-03 16:15:30\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '1ef415cb-3045-466a-892b-af2c77fbd822', '2026-04-03 19:15:30'),
(74, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:30.000000Z\"}', '{\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-09 00:00:00\",\"updated_at\":\"2026-04-03 16:15:40\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '68ba8472-c344-42aa-874a-6ddade6c8b65', '2026-04-03 19:15:40'),
(75, 1, 1, 'App\\Models\\Reservation', 5, 'updated', '{\"check_in_expected\":\"2026-04-03T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-04T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T07:12:06.000000Z\"}', '{\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-05 00:00:00\",\"updated_at\":\"2026-04-03 16:15:45\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '38b4176e-e265-4eb3-ac06-b11ff1c5b338', '2026-04-03 19:15:45'),
(76, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-09T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:40.000000Z\"}', '{\"check_in_expected\":\"2026-04-06 00:00:00\",\"check_out_expected\":\"2026-04-10 00:00:00\",\"updated_at\":\"2026-04-03 16:15:47\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '9da9be6f-6219-4315-ae83-b3681a0d497e', '2026-04-03 19:15:47'),
(77, 1, 1, 'App\\Models\\Reservation', 5, 'updated', '{\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-05T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:45.000000Z\"}', '{\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-06 00:00:00\",\"updated_at\":\"2026-04-03 16:34:33\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '43e5075c-d2bf-40f3-b9ad-50ca16ccff7c', '2026-04-03 19:34:33'),
(78, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":5,\"check_in_expected\":\"2026-04-06T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-10T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:15:47.000000Z\"}', '{\"room_id\":\"4\",\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-09 00:00:00\",\"updated_at\":\"2026-04-03 16:34:35\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'a4d7091e-c8bd-46fb-bb5d-96e740003987', '2026-04-03 19:34:35'),
(79, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"room_id\":6,\"check_in_expected\":\"2026-04-06T17:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T15:00:00.000000Z\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"room_id\":\"2\",\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-07 00:00:00\",\"updated_at\":\"2026-04-03 16:36:05\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '5d4a3c9f-5ca6-4c12-8207-6d9bdb2ceadd', '2026-04-03 19:36:05'),
(80, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"room_id\":2,\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:36:05.000000Z\"}', '{\"room_id\":\"1\",\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-06 00:00:00\",\"updated_at\":\"2026-04-03 16:36:09\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '48ee9c1f-790b-4b50-8529-19b2828bb98b', '2026-04-03 19:36:09'),
(81, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"room_id\":1,\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-06T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:36:09.000000Z\"}', '{\"room_id\":\"2\",\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-07 00:00:00\",\"updated_at\":\"2026-04-03 16:36:16\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '3c2304e9-13ff-43b0-be71-74f756daceae', '2026-04-03 19:36:16'),
(82, 1, 1, 'App\\Models\\Reservation', 1, 'updated', '{\"status\":\"checked_in\",\"check_out_realized\":null,\"updated_at\":\"2026-04-02T00:16:44.000000Z\"}', '{\"status\":\"checked_out\",\"check_out_realized\":\"2026-04-03 16:36:24\",\"updated_at\":\"2026-04-03 16:36:24\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'aa720e7f-312b-46fd-8c58-892803a8c2ec', '2026-04-03 19:36:24'),
(83, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:36:16.000000Z\"}', '{\"check_in_expected\":\"2026-04-06 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-03 16:36:33\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '57eab247-77f7-47f2-9f79-0f2e163892d0', '2026-04-03 19:36:33'),
(84, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"check_in_expected\":\"2026-04-06T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:36:33.000000Z\"}', '{\"check_in_expected\":\"2026-04-05 00:00:00\",\"check_out_expected\":\"2026-04-07 00:00:00\",\"updated_at\":\"2026-04-03 16:36:35\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'd5931fbe-509a-4ad4-b30f-0a0a952bd809', '2026-04-03 19:36:35'),
(85, 1, 1, 'App\\Models\\Room', 2, 'updated', '{\"status\":\"available\",\"updated_at\":\"2026-04-01T16:56:31.000000Z\"}', '{\"status\":\"cleaning\",\"updated_at\":\"2026-04-03 17:10:59\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'd7e2f822-c5e3-4b8c-b88a-9d4caa98299f', '2026-04-03 20:10:59'),
(86, 1, 1, 'App\\Models\\Reservation', 4, 'updated', '{\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-07T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:36:35.000000Z\"}', '{\"check_in_expected\":\"2026-04-07 00:00:00\",\"check_out_expected\":\"2026-04-09 00:00:00\",\"updated_at\":\"2026-04-03 17:16:17\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '42e28738-58c8-40e7-9702-c7f6c5570e08', '2026-04-03 20:16:18'),
(87, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":4,\"check_in_expected\":\"2026-04-05T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-09T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T19:34:35.000000Z\"}', '{\"room_id\":\"5\",\"check_in_expected\":\"2026-04-06 00:00:00\",\"check_out_expected\":\"2026-04-10 00:00:00\",\"updated_at\":\"2026-04-03 17:16:21\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '31618681-2656-4679-bc5b-eb0aff8c339e', '2026-04-03 20:16:21'),
(88, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":5,\"check_in_expected\":\"2026-04-06T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-10T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T20:16:21.000000Z\"}', '{\"room_id\":\"1\",\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-03 17:16:38\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '3d7677ca-d693-4f6e-8eac-a580529941fc', '2026-04-03 20:16:38'),
(89, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":1,\"check_in_expected\":\"2026-04-04T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-08T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T20:16:38.000000Z\"}', '{\"room_id\":\"4\",\"check_in_expected\":\"2026-04-02 00:00:00\",\"check_out_expected\":\"2026-04-06 00:00:00\",\"updated_at\":\"2026-04-03 17:16:45\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '1cafe83e-d71f-406c-8d4b-36806f949429', '2026-04-03 20:16:45'),
(90, 1, 1, 'App\\Models\\Reservation', 3, 'updated', '{\"room_id\":4,\"check_in_expected\":\"2026-04-02T03:00:00.000000Z\",\"check_out_expected\":\"2026-04-06T03:00:00.000000Z\",\"updated_at\":\"2026-04-03T20:16:45.000000Z\"}', '{\"room_id\":\"1\",\"check_in_expected\":\"2026-04-04 00:00:00\",\"check_out_expected\":\"2026-04-08 00:00:00\",\"updated_at\":\"2026-04-03 17:16:53\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'b4bcd487-171f-47a7-be19-cf61c036408c', '2026-04-03 20:16:53'),
(91, NULL, 1, 'App\\Models\\Hotel', 1, 'updated', '{\"name\":\"Hotel Bela Vista\",\"trade_name\":\"Bela Vista\",\"email\":\"contato@belavista.com.br\",\"updated_at\":\"2026-04-03T15:47:36.000000Z\"}', '{\"name\":\"Pousadas Ilha Grande\",\"trade_name\":\"Pousadas Ilha Grande\",\"email\":\"contato@pousadailhasgrande.com.br\",\"updated_at\":\"2026-04-03 17:44:34\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '98688e77-03a7-485d-9673-2604499c5713', '2026-04-03 20:44:34'),
(92, NULL, 1, 'App\\Models\\Hotel', 1, 'updated', '{\"address\":\"Rua das Palmeiras, 100\",\"city\":\"Florian\",\"state\":\"SC\",\"updated_at\":\"2026-04-03T20:44:34.000000Z\"}', '{\"address\":\"R. ilha Grande\",\"city\":\"Rio de Janeiro\",\"state\":\"RJ\",\"updated_at\":\"2026-04-03 17:45:11\"}', NULL, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', '9505b031-7de2-44c8-afdb-9322f16b713a', '2026-04-03 20:45:11');

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

--
-- Estrutura para tabela `cache`
--

CREATE TABLE `cache` (
  `key` varchar(255) NOT NULL,
  `value` mediumtext NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `cache`
--

INSERT INTO `cache` (`key`, `value`, `expiration`) VALUES
('pms-hotel-cache-spatie.permission.cache', 'a:3:{s:5:\"alias\";a:4:{s:1:\"a\";s:2:\"id\";s:1:\"b\";s:4:\"name\";s:1:\"c\";s:10:\"guard_name\";s:1:\"r\";s:5:\"roles\";}s:11:\"permissions\";a:63:{i:0;a:4:{s:1:\"a\";i:1;s:1:\"b\";s:11:\"hotels.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:1;a:4:{s:1:\"a\";i:2;s:1:\"b\";s:13:\"hotels.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:2;a:4:{s:1:\"a\";i:3;s:1:\"b\";s:11:\"hotels.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:3;a:4:{s:1:\"a\";i:4;s:1:\"b\";s:13:\"hotels.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:4;a:4:{s:1:\"a\";i:5;s:1:\"b\";s:10:\"users.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:5;a:4:{s:1:\"a\";i:6;s:1:\"b\";s:12:\"users.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:6;a:4:{s:1:\"a\";i:7;s:1:\"b\";s:10:\"users.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:7;a:4:{s:1:\"a\";i:8;s:1:\"b\";s:12:\"users.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:8;a:4:{s:1:\"a\";i:9;s:1:\"b\";s:19:\"users.toggle_active\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:9;a:4:{s:1:\"a\";i:10;s:1:\"b\";s:10:\"roles.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:10;a:4:{s:1:\"a\";i:11;s:1:\"b\";s:12:\"roles.assign\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:11;a:4:{s:1:\"a\";i:12;s:1:\"b\";s:16:\"permissions.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:12;a:4:{s:1:\"a\";i:13;s:1:\"b\";s:18:\"permissions.manage\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:13;a:4:{s:1:\"a\";i:14;s:1:\"b\";s:13:\"settings.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:14;a:4:{s:1:\"a\";i:15;s:1:\"b\";s:13:\"settings.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:15;a:4:{s:1:\"a\";i:16;s:1:\"b\";s:10:\"audit.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:7;}}i:16;a:4:{s:1:\"a\";i:17;s:1:\"b\";s:12:\"audit.export\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:7;}}i:17;a:4:{s:1:\"a\";i:18;s:1:\"b\";s:14:\"dashboard.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:7:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:6;i:6;i:7;}}i:18;a:4:{s:1:\"a\";i:19;s:1:\"b\";s:20:\"dashboard.indicators\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:19;a:4:{s:1:\"a\";i:20;s:1:\"b\";s:17:\"reservations.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:6:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:7;}}i:20;a:4:{s:1:\"a\";i:21;s:1:\"b\";s:19:\"reservations.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:21;a:4:{s:1:\"a\";i:22;s:1:\"b\";s:17:\"reservations.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:22;a:4:{s:1:\"a\";i:23;s:1:\"b\";s:19:\"reservations.cancel\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:23;a:4:{s:1:\"a\";i:24;s:1:\"b\";s:19:\"reservations.reopen\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:24;a:4:{s:1:\"a\";i:25;s:1:\"b\";s:8:\"map.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:25;a:4:{s:1:\"a\";i:26;s:1:\"b\";s:8:\"map.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:26;a:4:{s:1:\"a\";i:27;s:1:\"b\";s:8:\"map.move\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:27;a:4:{s:1:\"a\";i:28;s:1:\"b\";s:11:\"guests.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;i:4;i:7;}}i:28;a:4:{s:1:\"a\";i:29;s:1:\"b\";s:13:\"guests.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:29;a:4:{s:1:\"a\";i:30;s:1:\"b\";s:11:\"guests.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:30;a:4:{s:1:\"a\";i:31;s:1:\"b\";s:13:\"guests.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:31;a:4:{s:1:\"a\";i:32;s:1:\"b\";s:17:\"housekeeping.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;i:4;i:6;}}i:32;a:4:{s:1:\"a\";i:33;s:1:\"b\";s:19:\"housekeeping.manage\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:6;}}i:33;a:4:{s:1:\"a\";i:34;s:1:\"b\";s:14:\"financial.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:6:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;i:5;i:7;}}i:34;a:4:{s:1:\"a\";i:35;s:1:\"b\";s:16:\"financial.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:35;a:4:{s:1:\"a\";i:36;s:1:\"b\";s:14:\"financial.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:36;a:4:{s:1:\"a\";i:37;s:1:\"b\";s:18:\"financial.discount\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:37;a:4:{s:1:\"a\";i:38;s:1:\"b\";s:17:\"financial.reverse\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:4;}}i:38;a:4:{s:1:\"a\";i:39;s:1:\"b\";s:24:\"financial.balance_adjust\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:4;}}i:39;a:4:{s:1:\"a\";i:40;s:1:\"b\";s:12:\"cashbox.open\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:40;a:4:{s:1:\"a\";i:41;s:1:\"b\";s:13:\"cashbox.close\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:41;a:4:{s:1:\"a\";i:42;s:1:\"b\";s:14:\"cashbox.reopen\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:4;}}i:42;a:4:{s:1:\"a\";i:43;s:1:\"b\";s:12:\"reports.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:7;}}i:43;a:4:{s:1:\"a\";i:44;s:1:\"b\";s:14:\"reports.export\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:7;}}i:44;a:4:{s:1:\"a\";i:45;s:1:\"b\";s:24:\"reports.export_sensitive\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:4;i:3;i:7;}}i:45;a:4:{s:1:\"a\";i:46;s:1:\"b\";s:17:\"integrations.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:46;a:4:{s:1:\"a\";i:47;s:1:\"b\";s:17:\"integrations.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:47;a:4:{s:1:\"a\";i:48;s:1:\"b\";s:8:\"crm.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:5;}}i:48;a:4:{s:1:\"a\";i:49;s:1:\"b\";s:10:\"crm.manage\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:3:{i:0;i:1;i:1;i:2;i:2;i:3;}}i:49;a:4:{s:1:\"a\";i:50;s:1:\"b\";s:21:\"financial.add_payment\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:50;a:4:{s:1:\"a\";i:51;s:1:\"b\";s:24:\"financial.cancel_payment\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:51;a:4:{s:1:\"a\";i:52;s:1:\"b\";s:25:\"financial.reverse_payment\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:52;a:4:{s:1:\"a\";i:53;s:1:\"b\";s:24:\"financial.apply_discount\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:53;a:4:{s:1:\"a\";i:54;s:1:\"b\";s:25:\"financial.apply_surcharge\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:54;a:4:{s:1:\"a\";i:55;s:1:\"b\";s:18:\"financial.add_item\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:55;a:4:{s:1:\"a\";i:56;s:1:\"b\";s:20:\"financial.view_items\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:56;a:4:{s:1:\"a\";i:57;s:1:\"b\";s:22:\"financial.reverse_item\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:4:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;}}i:57;a:4:{s:1:\"a\";i:58;s:1:\"b\";s:28:\"financial.generate_statement\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:58;a:4:{s:1:\"a\";i:59;s:1:\"b\";s:26:\"financial.generate_receipt\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:5:{i:0;i:1;i:1;i:2;i:2;i:3;i:3;i:4;i:4;i:5;}}i:59;a:4:{s:1:\"a\";i:60;s:1:\"b\";s:12:\"tariffs.view\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:60;a:4:{s:1:\"a\";i:61;s:1:\"b\";s:14:\"tariffs.create\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:61;a:4:{s:1:\"a\";i:62;s:1:\"b\";s:12:\"tariffs.edit\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}i:62;a:4:{s:1:\"a\";i:63;s:1:\"b\";s:14:\"tariffs.delete\";s:1:\"c\";s:3:\"web\";s:1:\"r\";a:2:{i:0;i:1;i:1;i:2;}}}s:5:\"roles\";a:7:{i:0;a:3:{s:1:\"a\";i:1;s:1:\"b\";s:11:\"super_admin\";s:1:\"c\";s:3:\"web\";}i:1;a:3:{s:1:\"a\";i:2;s:1:\"b\";s:11:\"hotel_admin\";s:1:\"c\";s:3:\"web\";}i:2;a:3:{s:1:\"a\";i:3;s:1:\"b\";s:7:\"manager\";s:1:\"c\";s:3:\"web\";}i:3;a:3:{s:1:\"a\";i:7;s:1:\"b\";s:7:\"auditor\";s:1:\"c\";s:3:\"web\";}i:4;a:3:{s:1:\"a\";i:4;s:1:\"b\";s:9:\"financial\";s:1:\"c\";s:3:\"web\";}i:5;a:3:{s:1:\"a\";i:5;s:1:\"b\";s:9:\"reception\";s:1:\"c\";s:3:\"web\";}i:6;a:3:{s:1:\"a\";i:6;s:1:\"b\";s:12:\"housekeeping\";s:1:\"c\";s:3:\"web\";}}}', 1775278850);

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

--
-- Estrutura para tabela `cache_locks`
--

CREATE TABLE `cache_locks` (
  `key` varchar(255) NOT NULL,
  `owner` varchar(255) NOT NULL,
  `expiration` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `cashboxes`
--

CREATE TABLE `cashboxes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED NOT NULL,
  `financial_account_id` bigint(20) UNSIGNED NOT NULL,
  `opening_balance` decimal(12,2) NOT NULL DEFAULT 0.00,
  `closing_balance` decimal(12,2) DEFAULT NULL,
  `opened_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `closed_at` timestamp NULL DEFAULT NULL,
  `status` varchar(10) NOT NULL DEFAULT 'open',
  `notes` text DEFAULT NULL,
  `opened_by` bigint(20) UNSIGNED NOT NULL,
  `closed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `cashboxes`
--

INSERT INTO `cashboxes` (`id`, `hotel_id`, `user_id`, `financial_account_id`, `opening_balance`, `closing_balance`, `opened_at`, `closed_at`, `status`, `notes`, `opened_by`, `closed_by`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 0.00, NULL, '2026-04-03 02:53:00', NULL, 'open', NULL, 1, NULL, '2026-04-03 02:53:00', '2026-04-03 02:53:00'),
(2, 1, 1, 1, 0.00, NULL, '2026-04-03 03:55:05', NULL, 'open', NULL, 1, NULL, '2026-04-03 03:55:05', '2026-04-03 03:55:05');

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

--
-- Estrutura para tabela `companies`
--

CREATE TABLE `companies` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `trade_name` varchar(255) NOT NULL COMMENT 'Nome Fantasia',
  `corporate_name` varchar(255) DEFAULT NULL COMMENT 'Razão Social',
  `document` varchar(50) DEFAULT NULL COMMENT 'CNPJ/VAT',
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(50) DEFAULT NULL,
  `country` varchar(10) NOT NULL DEFAULT 'BR',
  `credit_limit` decimal(10,2) NOT NULL DEFAULT 0.00,
  `is_active` 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 para tabela `departments`
--

CREATE TABLE `departments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_active` 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;

--
-- Despejando dados para a tabela `departments`
--

INSERT INTO `departments` (`id`, `hotel_id`, `name`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 'Recepção', NULL, 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(2, 1, 'Governança', NULL, 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(3, 1, 'Financeiro', NULL, 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(4, 1, 'Gerência', NULL, 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(5, 1, 'Manutenção', NULL, 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44');

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

--
-- Estrutura para 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 para tabela `financial_accounts`
--

CREATE TABLE `financial_accounts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `type` varchar(20) NOT NULL DEFAULT 'cash',
  `is_default` tinyint(1) NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `financial_accounts`
--

INSERT INTO `financial_accounts` (`id`, `hotel_id`, `name`, `type`, `is_default`, `is_active`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 'Caixa Físico Principal', 'cash', 0, 1, 'Conta padrão criada automaticamente.', '2026-04-02 22:43:12', '2026-04-03 15:48:31'),
(2, 1, 'Caixa Principal', 'bank', 1, 1, NULL, '2026-04-03 15:48:31', '2026-04-03 15:48:31');

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

--
-- Estrutura para tabela `fnrh_records`
--

CREATE TABLE `fnrh_records` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `guest_id` bigint(20) UNSIGNED NOT NULL,
  `generated_by` bigint(20) UNSIGNED DEFAULT NULL,
  `data_snapshot` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT 'Snapshot completo dos dados no momento da geração da FNRH' CHECK (json_valid(`data_snapshot`)),
  `pdf_path` varchar(500) DEFAULT NULL COMMENT 'Caminho relativo do PDF gerado em storage/',
  `status` varchar(30) NOT NULL DEFAULT 'draft' COMMENT 'draft, generated, printed',
  `generated_at` 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;

--
-- Despejando dados para a tabela `fnrh_records`
--

INSERT INTO `fnrh_records` (`id`, `hotel_id`, `reservation_id`, `guest_id`, `generated_by`, `data_snapshot`, `pdf_path`, `status`, `generated_at`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 1, 3, '{\"hotel_name\":\"Hotel Demo\",\"hotel_cnpj\":\"\",\"hotel_address\":\"Rua das Palmeiras, 100\",\"hotel_city\":\"S\\u00e3o Paulo\",\"hotel_state\":\"SP\",\"hotel_phone\":\"(11) 3456-7890\",\"hotel_email\":\"contato@hoteldemo.com.br\",\"locator\":\"PMS-001\",\"room_name\":\"102\",\"room_category\":\"Standard Double\",\"check_in\":\"02\\/04\\/2026\",\"check_out\":\"05\\/04\\/2026\",\"check_in_realized\":\"01\\/04\\/2026 21:16\",\"adults\":2,\"children\":0,\"guest_name\":\"Maria Silva\",\"guest_document_type\":\"CPF\",\"guest_document_number\":\"123.456.789-00\",\"guest_document_issuer\":\"\",\"guest_birth_date\":\"\\u2014\",\"guest_gender\":\"N\\u00e3o informado\",\"guest_nationality\":\"BR\",\"guest_profession\":\"\\u2014\",\"guest_phone\":\"(11) 99999-1111\",\"guest_email\":\"maria@exemplo.com\",\"guest_zip\":\"\\u2014\",\"guest_address\":\"\\u2014\",\"guest_neighborhood\":\"\\u2014\",\"guest_city\":\"\\u2014\",\"guest_state\":\"\\u2014\",\"guest_country\":\"Brasil\",\"travel_reason\":\"N\\u00e3o informado\",\"transport_mode\":\"N\\u00e3o informado\",\"companions\":[],\"generated_at\":\"02\\/04\\/2026 06:17\",\"generated_by\":\"Maria Recep\\u00e7\\u00e3o\"}', 'fnrh/1/fnrh_PMS-001_20260402061724.pdf', 'generated', '2026-04-02 09:17:24', '2026-04-02 09:16:10', '2026-04-02 09:17:24');

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

--
-- Estrutura para tabela `guests`
--

CREATE TABLE `guests` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `document_type` varchar(20) NOT NULL DEFAULT 'cpf',
  `document_number` varchar(50) DEFAULT NULL,
  `document_issuer` varchar(50) DEFAULT NULL COMMENT 'Órgão emissor do documento',
  `document_issued_at` varchar(30) DEFAULT NULL COMMENT 'Data de emissão do documento',
  `zip_code` varchar(10) DEFAULT NULL,
  `address` varchar(200) DEFAULT NULL,
  `address_number` varchar(20) DEFAULT NULL,
  `address_complement` varchar(100) DEFAULT NULL,
  `neighborhood` varchar(100) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `state` varchar(60) DEFAULT NULL,
  `country` varchar(80) DEFAULT 'Brasil',
  `phone_secondary` varchar(30) DEFAULT NULL,
  `travel_reason` varchar(60) DEFAULT NULL COMMENT 'lazer, negocios, eventos, saude, outros',
  `transport_mode` varchar(60) DEFAULT NULL COMMENT 'carro, onibus, aviao, trem, navio, outros',
  `birth_date` date DEFAULT NULL,
  `nationality` varchar(50) NOT NULL DEFAULT 'BR',
  `gender` varchar(20) DEFAULT NULL,
  `profession` varchar(100) DEFAULT NULL,
  `marital_status` varchar(30) DEFAULT NULL,
  `notes` text 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;

--
-- Despejando dados para a tabela `guests`
--

INSERT INTO `guests` (`id`, `hotel_id`, `first_name`, `last_name`, `email`, `phone`, `document_type`, `document_number`, `document_issuer`, `document_issued_at`, `zip_code`, `address`, `address_number`, `address_complement`, `neighborhood`, `city`, `state`, `country`, `phone_secondary`, `travel_reason`, `transport_mode`, `birth_date`, `nationality`, `gender`, `profession`, `marital_status`, `notes`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Maria', 'Silva', 'maria@exemplo.com', '(11) 99999-1111', 'cpf', '123.456.789-00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(2, 1, 'João', 'Pereira', 'joao@exemplo.com', '(21) 98888-2222', 'cpf', '987.654.321-00', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(3, 1, 'Ana', 'Rodrigues', 'ana@exemplo.com', '(31) 97777-3333', 'cpf', '111.222.333-44', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(4, 1, 'Jo', '', NULL, NULL, 'cpf', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-03 07:12:06', '2026-04-03 07:12:06', NULL),
(5, 1, 'Passante', 'Bar', NULL, NULL, 'cpf', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-03 17:24:33', '2026-04-03 17:24:33', NULL),
(6, 1, 'Day', 'Use Pool', NULL, NULL, 'cpf', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Brasil', NULL, NULL, NULL, NULL, 'BR', NULL, NULL, NULL, NULL, '2026-04-03 17:29:29', '2026-04-03 17:29:29', NULL);

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

--
-- Estrutura para tabela `guest_companions`
--

CREATE TABLE `guest_companions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `guest_id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) DEFAULT NULL,
  `document_number` varchar(50) DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `kinship` varchar(50) DEFAULT NULL COMMENT 'Parentesco com o titular',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `hotels`
--

CREATE TABLE `hotels` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `trade_name` varchar(255) DEFAULT NULL,
  `document` varchar(20) DEFAULT NULL COMMENT 'CNPJ',
  `email` varchar(255) DEFAULT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `address` varchar(255) DEFAULT NULL,
  `city` varchar(255) DEFAULT NULL,
  `state` varchar(2) DEFAULT NULL,
  `zip_code` varchar(10) DEFAULT NULL,
  `country` varchar(2) NOT NULL DEFAULT 'BR',
  `timezone` varchar(255) NOT NULL DEFAULT 'America/Sao_Paulo',
  `currency` varchar(3) NOT NULL DEFAULT 'BRL',
  `logo_path` varchar(255) DEFAULT NULL,
  `favicon_path` varchar(255) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `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;

--
-- Despejando dados para a tabela `hotels`
--

INSERT INTO `hotels` (`id`, `name`, `slug`, `trade_name`, `document`, `email`, `phone`, `address`, `city`, `state`, `zip_code`, `country`, `timezone`, `currency`, `logo_path`, `favicon_path`, `is_active`, `settings`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Pousadas Ilha Grande', 'hotel-demo', 'Pousadas Ilha Grande', '00.000.000/0001-00', 'contato@pousadailhasgrande.com.br', '(48) 99999-9999', 'R. ilha Grande', 'Rio de Janeiro', 'RJ', '01234-567', 'BR', 'America/Sao_Paulo', 'BRL', NULL, NULL, 1, NULL, '2026-04-01 16:36:44', '2026-04-03 20:45:11', NULL);

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

--
-- Estrutura para tabela `hotel_enabled_modules`
--

CREATE TABLE `hotel_enabled_modules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `module_id` bigint(20) UNSIGNED NOT NULL,
  `enabled_at` timestamp NULL DEFAULT NULL,
  `disabled_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `hotel_enabled_modules`
--

INSERT INTO `hotel_enabled_modules` (`id`, `hotel_id`, `module_id`, `enabled_at`, `disabled_at`) VALUES
(1, 1, 1, '2026-04-01 16:36:44', NULL),
(2, 1, 2, '2026-04-01 16:36:44', NULL),
(3, 1, 3, '2026-04-01 16:36:44', NULL),
(4, 1, 4, '2026-04-01 16:36:44', NULL),
(5, 1, 5, '2026-04-01 16:36:44', NULL),
(6, 1, 6, '2026-04-01 16:36:44', NULL),
(7, 1, 7, '2026-04-01 16:36:44', NULL),
(8, 1, 8, '2026-04-01 16:36:44', NULL),
(9, 1, 9, '2026-04-01 16:36:44', NULL),
(10, 1, 10, '2026-04-01 16:36:44', NULL),
(11, 1, 11, '2026-04-01 16:36:44', NULL),
(12, 1, 12, '2026-04-01 16:36:44', NULL),
(13, 1, 13, '2026-04-01 16:36:44', NULL),
(14, 1, 14, '2026-04-01 16:36:44', NULL),
(15, 1, 15, '2026-04-01 16:36:44', NULL),
(16, 1, 16, '2026-04-01 16:36:44', NULL),
(17, 1, 17, '2026-04-01 16:36:44', NULL);

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

--
-- Estrutura para tabela `hotel_settings`
--

CREATE TABLE `hotel_settings` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `key` varchar(255) NOT NULL,
  `value` text DEFAULT NULL,
  `group` varchar(255) NOT NULL DEFAULT 'general',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `hotel_subscriptions`
--

CREATE TABLE `hotel_subscriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'active',
  `starts_at` timestamp NULL DEFAULT NULL,
  `ends_at` timestamp NULL DEFAULT NULL,
  `trial_ends_at` 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;

--
-- Despejando dados para a tabela `hotel_subscriptions`
--

INSERT INTO `hotel_subscriptions` (`id`, `hotel_id`, `plan_id`, `status`, `starts_at`, `ends_at`, `trial_ends_at`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 'active', '2026-04-01 16:36:44', '2027-04-01 16:36:44', NULL, '2026-04-01 16:36:44', '2026-04-01 16:36:44');

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

--
-- Estrutura para 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 para tabela `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `total_jobs` int(11) NOT NULL,
  `pending_jobs` int(11) NOT NULL,
  `failed_jobs` int(11) NOT NULL,
  `failed_job_ids` longtext NOT NULL,
  `options` mediumtext DEFAULT NULL,
  `cancelled_at` int(11) DEFAULT NULL,
  `created_at` int(11) NOT NULL,
  `finished_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para 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;

--
-- Despejando dados para a tabela `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2024_01_01_000001_create_hotels_table', 1),
(5, '2024_01_01_000002_create_hotel_settings_table', 1),
(6, '2024_01_01_000003_create_plans_table', 1),
(7, '2024_01_01_000004_create_modules_table', 1),
(8, '2024_01_01_000005_create_plan_modules_table', 1),
(9, '2024_01_01_000006_create_hotel_subscriptions_table', 1),
(10, '2024_01_01_000007_create_hotel_enabled_modules_table', 1),
(11, '2024_01_01_000008_create_departments_table', 1),
(12, '2024_01_01_000009_add_hotel_fields_to_users_table', 1),
(13, '2024_01_01_000010_create_audit_logs_table', 1),
(14, '2026_04_01_095324_create_permission_tables', 1),
(15, '2026_04_01_133026_create_guests_table', 1),
(16, '2026_04_01_133027_create_guest_companions_table', 1),
(17, '2026_04_01_133027_create_room_categories_table', 1),
(18, '2026_04_01_133027_create_rooms_table', 1),
(19, '2026_04_01_133027_create_sales_channels_table', 1),
(20, '2026_04_01_133028_create_companies_table', 1),
(21, '2026_04_01_133028_create_reservations_table', 1),
(22, '2026_04_01_183000_add_icon_fields_to_sales_channels_table', 2),
(23, '2026_04_01_183001_create_reservation_status_colors_table', 2),
(24, '2026_04_02_000001_add_phase3_fields_to_guests_table', 3),
(25, '2026_04_02_000002_add_phase3_fields_to_reservations_table', 4),
(26, '2026_04_02_000003_create_reservation_activity_logs_table', 5),
(27, '2026_04_02_000004_create_reservation_companions_table', 6),
(28, '2026_04_02_000005_create_fnrh_records_table', 7),
(43, '2026_04_02_100001_create_payment_methods_table', 99),
(44, '2026_04_02_100002_create_financial_accounts_table', 99),
(45, '2026_04_02_100003_create_cashboxes_table', 99),
(46, '2026_04_02_100004_create_reservation_payments_table', 99),
(47, '2026_04_02_100005_create_transactions_table', 99),
(48, '2026_04_02_100006_create_reservation_adjustments_table', 99),
(49, '2026_04_02_100008_create_reservation_items_table', 99),
(50, '2026_04_02_100007_create_products_table', 99),
(51, '2026_04_03_050001_create_tariff_rules_table', 100),
(52, '2026_04_03_050002_create_tariff_rule_dates_table', 100),
(53, '2026_04_03_050003_create_tariff_rule_channels_table', 100),
(54, '2026_04_03_050004_create_tariff_packages_table', 100),
(55, '2026_04_03_050005_create_tariff_snapshots_table', 100),
(56, '2026_04_03_053857_alter_product_categories_type_column', 101),
(57, '2026_04_03_134042_add_reservation_type_to_reservations_table', 102),
(58, '2026_04_03_165801_add_stock_columns_to_products_table', 103),
(59, '2026_04_03_165847_create_stock_transactions_table', 103);

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

--
-- Estrutura para tabela `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(1, 'App\\Models\\User', 1),
(2, 'App\\Models\\User', 2),
(5, 'App\\Models\\User', 3);

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

--
-- Estrutura para tabela `modules`
--

CREATE TABLE `modules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `is_core` tinyint(1) NOT NULL DEFAULT 0,
  `icon` varchar(255) DEFAULT NULL,
  `sort_order` 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;

--
-- Despejando dados para a tabela `modules`
--

INSERT INTO `modules` (`id`, `name`, `slug`, `description`, `is_core`, `icon`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 'Hotel', 'hotel', NULL, 1, 'building-2', 1, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(2, 'Usuários', 'users', NULL, 1, 'users', 2, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(3, 'Permissões', 'permissions', NULL, 1, 'shield', 3, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(4, 'Configurações', 'settings', NULL, 1, 'settings', 4, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(5, 'Auditoria', 'audit', NULL, 1, 'scroll-text', 5, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(6, 'Reservas', 'reservations', NULL, 0, 'calendar-check', 10, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(7, 'Mapa', 'map', NULL, 0, 'map', 11, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(8, 'Hóspedes', 'guests', NULL, 0, 'user-check', 12, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(9, 'Governança', 'housekeeping', NULL, 0, 'sparkles', 13, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(10, 'Day Use', 'dayuse', NULL, 0, 'sun', 14, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(11, 'Tarifário', 'rates', NULL, 0, 'tag', 15, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(12, 'Financeiro', 'financial', NULL, 0, 'receipt', 20, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(13, 'Caixa', 'cashbox', NULL, 0, 'wallet', 21, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(14, 'Estoque', 'inventory', NULL, 0, 'package', 22, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(15, 'Relatórios', 'reports', NULL, 0, 'file-bar-chart', 30, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(16, 'CRM', 'crm', NULL, 0, 'heart-handshake', 31, '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(17, 'Integrações', 'integrations', NULL, 0, 'plug', 40, '2026-04-01 16:36:44', '2026-04-01 16:36:44');

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

--
-- Estrutura para 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 para tabela `payment_methods`
--

CREATE TABLE `payment_methods` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `type` varchar(30) NOT NULL COMMENT 'cash|pix|credit_card|debit_card|transfer|courtesy|invoice',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `requires_change` tinyint(1) NOT NULL DEFAULT 0,
  `sort_order` smallint(5) 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;

--
-- Despejando dados para a tabela `payment_methods`
--

INSERT INTO `payment_methods` (`id`, `hotel_id`, `name`, `type`, `is_active`, `requires_change`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 1, 'Dinheiro', 'cash', 1, 1, 1, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(2, 1, 'PIX', 'pix', 1, 0, 2, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(3, 1, 'Cartão de Débito', 'debit_card', 1, 0, 3, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(4, 1, 'Cartão de Crédito', 'credit_card', 1, 0, 4, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(5, 1, 'Transferência', 'transfer', 1, 0, 5, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(6, 1, 'Cortesia', 'courtesy', 1, 0, 6, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(7, 1, 'Faturado', 'invoice', 1, 0, 7, '2026-04-02 22:43:12', '2026-04-02 22:43:12'),
(8, 1, 'Cart', 'pix', 1, 0, 0, '2026-04-03 15:48:10', '2026-04-03 15:48:10');

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

--
-- Estrutura para tabela `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'hotels.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(2, 'hotels.create', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(3, 'hotels.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(4, 'hotels.delete', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(5, 'users.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(6, 'users.create', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(7, 'users.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(8, 'users.delete', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(9, 'users.toggle_active', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(10, 'roles.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(11, 'roles.assign', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(12, 'permissions.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(13, 'permissions.manage', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(14, 'settings.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(15, 'settings.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(16, 'audit.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(17, 'audit.export', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(18, 'dashboard.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(19, 'dashboard.indicators', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(20, 'reservations.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(21, 'reservations.create', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(22, 'reservations.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(23, 'reservations.cancel', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(24, 'reservations.reopen', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(25, 'map.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(26, 'map.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(27, 'map.move', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(28, 'guests.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(29, 'guests.create', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(30, 'guests.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(31, 'guests.delete', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(32, 'housekeeping.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(33, 'housekeeping.manage', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(34, 'financial.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(35, 'financial.create', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(36, 'financial.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(37, 'financial.discount', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(38, 'financial.reverse', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(39, 'financial.balance_adjust', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(40, 'cashbox.open', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(41, 'cashbox.close', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(42, 'cashbox.reopen', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(43, 'reports.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(44, 'reports.export', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(45, 'reports.export_sensitive', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(46, 'integrations.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(47, 'integrations.edit', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(48, 'crm.view', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(49, 'crm.manage', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(50, 'financial.add_payment', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(51, 'financial.cancel_payment', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(52, 'financial.reverse_payment', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(53, 'financial.apply_discount', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(54, 'financial.apply_surcharge', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(55, 'financial.add_item', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(56, 'financial.view_items', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(57, 'financial.reverse_item', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(58, 'financial.generate_statement', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(59, 'financial.generate_receipt', 'web', '2026-04-02 22:59:03', '2026-04-02 22:59:03'),
(60, 'tariffs.view', 'web', '2026-04-03 04:14:28', '2026-04-03 04:14:28'),
(61, 'tariffs.create', 'web', '2026-04-03 04:14:28', '2026-04-03 04:14:28'),
(62, 'tariffs.edit', 'web', '2026-04-03 04:14:28', '2026-04-03 04:14:28'),
(63, 'tariffs.delete', 'web', '2026-04-03 04:14:28', '2026-04-03 04:14:28');

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

--
-- Estrutura para tabela `plans`
--

CREATE TABLE `plans` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `price_monthly` decimal(10,2) NOT NULL DEFAULT 0.00,
  `price_yearly` decimal(10,2) NOT NULL DEFAULT 0.00,
  `max_rooms` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `max_users` int(10) UNSIGNED NOT NULL DEFAULT 0,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `features` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`features`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `plans`
--

INSERT INTO `plans` (`id`, `name`, `slug`, `description`, `price_monthly`, `price_yearly`, `max_rooms`, `max_users`, `is_active`, `features`, `created_at`, `updated_at`) VALUES
(1, 'Básico', 'basic', 'Ideal para pousadas e hostels pequenos.', 199.00, 1990.00, 20, 5, 1, '[\"reservations\",\"guests\",\"map\",\"housekeeping\",\"basic_reports\"]', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(2, 'Profissional', 'professional', 'Para hotéis e pousadas em crescimento.', 399.00, 3990.00, 60, 15, 1, '[\"reservations\",\"guests\",\"map\",\"housekeeping\",\"financial\",\"reports\",\"crm\",\"dayuse\",\"inventory\"]', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(3, 'Enterprise', 'enterprise', 'Solução completa para grandes hotéis e redes.', 799.00, 7990.00, 0, 0, 1, '[\"all\"]', '2026-04-01 16:36:44', '2026-04-01 16:36:44');

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

--
-- Estrutura para tabela `plan_modules`
--

CREATE TABLE `plan_modules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `plan_id` bigint(20) UNSIGNED NOT NULL,
  `module_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `products`
--

CREATE TABLE `products` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `product_category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(150) NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'product',
  `unit_price` decimal(12,2) NOT NULL DEFAULT 0.00,
  `unit` varchar(20) NOT NULL DEFAULT 'un',
  `manages_stock` tinyint(1) NOT NULL DEFAULT 0,
  `current_stock` int(11) NOT NULL DEFAULT 0,
  `min_stock` int(11) NOT NULL DEFAULT 0,
  `description` text DEFAULT NULL,
  `is_active` 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;

--
-- Despejando dados para a tabela `products`
--

INSERT INTO `products` (`id`, `hotel_id`, `product_category_id`, `name`, `type`, `unit_price`, `unit`, `manages_stock`, `current_stock`, `min_stock`, `description`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 1, 'Agua Mineral 500ml', 'service', 8.00, 'un', 0, 0, 0, NULL, 1, '2026-04-03 08:12:17', '2026-04-03 08:12:17'),
(2, 1, 1, 'Agua Mineral', 'service', 8.00, 'un', 0, 0, 0, NULL, 1, '2026-04-03 14:41:35', '2026-04-03 14:41:35');

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

--
-- Estrutura para tabela `product_categories`
--

CREATE TABLE `product_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(80) NOT NULL,
  `type` varchar(30) NOT NULL DEFAULT 'other',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` smallint(5) 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;

--
-- Despejando dados para a tabela `product_categories`
--

INSERT INTO `product_categories` (`id`, `hotel_id`, `name`, `type`, `is_active`, `sort_order`, `created_at`, `updated_at`) VALUES
(1, 1, 'Bar & Bebidas', 'service', 1, 0, '2026-04-03 08:11:24', '2026-04-03 08:11:24');

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

--
-- Estrutura para tabela `reservations`
--

CREATE TABLE `reservations` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `reservation_type` varchar(20) NOT NULL DEFAULT 'standard' COMMENT 'standard, day_use, comanda',
  `locator` varchar(20) NOT NULL COMMENT 'Código único da reserva, ex: R-100234',
  `guest_id` bigint(20) UNSIGNED NOT NULL,
  `room_id` bigint(20) UNSIGNED DEFAULT NULL,
  `room_category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `sales_channel_id` bigint(20) UNSIGNED DEFAULT NULL,
  `status` varchar(255) NOT NULL DEFAULT 'provisional' COMMENT 'provisional, confirmed, checked_in, checked_out, canceled, no_show',
  `check_in_expected` datetime NOT NULL,
  `check_out_expected` datetime NOT NULL,
  `check_in_realized` datetime DEFAULT NULL,
  `check_out_realized` datetime DEFAULT NULL,
  `adults` int(11) NOT NULL DEFAULT 1,
  `children` int(11) NOT NULL DEFAULT 0,
  `breakfast_included` tinyint(1) NOT NULL DEFAULT 0,
  `total_expected` decimal(12,2) NOT NULL DEFAULT 0.00,
  `total_paid` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT 'Total já recebido / pago',
  `cancellation_reason` varchar(255) DEFAULT NULL,
  `canceled_at` timestamp NULL DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `operational_notes` text DEFAULT NULL COMMENT 'Notas internas da operação (não visíveis ao hóspede)',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `checked_in_by` bigint(20) UNSIGNED DEFAULT NULL,
  `checked_out_by` bigint(20) UNSIGNED DEFAULT NULL,
  `canceled_by` bigint(20) UNSIGNED DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `reservations`
--

INSERT INTO `reservations` (`id`, `hotel_id`, `reservation_type`, `locator`, `guest_id`, `room_id`, `room_category_id`, `sales_channel_id`, `status`, `check_in_expected`, `check_out_expected`, `check_in_realized`, `check_out_realized`, `adults`, `children`, `breakfast_included`, `total_expected`, `total_paid`, `cancellation_reason`, `canceled_at`, `notes`, `operational_notes`, `created_at`, `updated_at`, `deleted_at`, `checked_in_by`, `checked_out_by`, `canceled_by`) VALUES
(1, 1, 'standard', 'PMS-001', 1, 2, 1, 1, 'checked_out', '2026-04-02 00:00:00', '2026-04-05 00:00:00', '2026-04-01 21:16:44', '2026-04-03 16:36:24', 2, 0, 0, 750.00, 0.00, NULL, NULL, 'Hóspede prefere quarto silencioso', NULL, '2026-04-01 16:56:31', '2026-04-03 19:36:24', NULL, 2, NULL, NULL),
(2, 1, 'standard', 'PMS-002', 2, 3, 2, 2, 'checked_in', '2026-04-02 00:00:00', '2026-04-05 00:00:00', '2026-03-31 15:00:00', NULL, 2, 1, 0, 900.00, 0.00, NULL, NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 22:07:14', NULL, NULL, NULL, NULL),
(3, 1, 'standard', 'PMS-003', 3, 1, 1, 1, 'confirmed', '2026-04-04 00:00:00', '2026-04-08 00:00:00', NULL, NULL, 1, 0, 0, 1000.00, 0.00, NULL, NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-03 20:16:53', NULL, NULL, NULL, NULL),
(4, 1, 'standard', 'PMS-004', 1, 2, 3, 2, 'provisional', '2026-04-07 00:00:00', '2026-04-09 00:00:00', NULL, NULL, 2, 0, 0, 1560.00, 0.00, NULL, NULL, 'Aguardando confirmação de pagamento', NULL, '2026-04-01 16:56:31', '2026-04-03 20:16:17', NULL, NULL, NULL, NULL),
(5, 1, 'standard', 'PMS-BQCD2M', 4, 5, 2, NULL, 'confirmed', '2026-04-05 00:00:00', '2026-04-06 00:00:00', NULL, NULL, 2, 0, 0, 0.00, 0.00, NULL, NULL, NULL, NULL, '2026-04-03 07:12:06', '2026-04-03 19:34:33', NULL, NULL, NULL, NULL),
(6, 1, 'comanda', 'CMD-QLAOOQ', 5, NULL, NULL, NULL, 'checked_in', '2026-04-03 14:24:33', '2026-04-03 23:59:59', '2026-04-03 14:24:33', NULL, 1, 0, 0, 0.00, 0.00, NULL, NULL, NULL, NULL, '2026-04-03 17:24:33', '2026-04-03 17:24:33', NULL, 1, NULL, NULL),
(7, 1, 'comanda', 'CMD-8EEJZG', 6, NULL, 1, NULL, 'checked_in', '2026-04-03 14:29:29', '2026-04-03 23:59:59', '2026-04-03 14:29:29', NULL, 1, 0, 0, 0.00, 0.00, NULL, NULL, NULL, NULL, '2026-04-03 17:29:29', '2026-04-03 18:30:54', NULL, 1, NULL, NULL);

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

--
-- Estrutura para tabela `reservation_activity_logs`
--

CREATE TABLE `reservation_activity_logs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `action` varchar(60) NOT NULL COMMENT 'created, updated, status_changed, checkin, checkout, room_changed, period_changed, canceled, fnrh_generated, document_issued, companion_added, companion_removed, note_added, payment_added, item_added',
  `description` varchar(500) DEFAULT NULL COMMENT 'Texto amigável descrevendo a ação',
  `old_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`old_values`)),
  `new_values` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`new_values`)),
  `origin` varchar(30) NOT NULL DEFAULT 'manual' COMMENT 'manual, system, map, integration',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `reservation_activity_logs`
--

INSERT INTO `reservation_activity_logs` (`id`, `reservation_id`, `hotel_id`, `user_id`, `action`, `description`, `old_values`, `new_values`, `origin`, `created_at`) VALUES
(1, 1, 1, 2, 'checkin', 'Check-in realizado por Admin Hotel Demo em 01/04/2026 21:16', '{\"status\":\"confirmed\"}', '{\"status\":\"checked_in\",\"check_in_realized\":\"2026-04-02T00:16:44.221149Z\"}', 'manual', '2026-04-02 00:16:44'),
(2, 1, 1, 3, 'fnrh_generated', 'FNRH visualizada por Maria Recepção', NULL, NULL, 'manual', '2026-04-02 09:16:10'),
(3, 1, 1, 3, 'fnrh_generated', 'FNRH gerada em PDF por Maria Recepção', NULL, NULL, 'manual', '2026-04-02 09:17:06'),
(4, 1, 1, 3, 'fnrh_generated', 'FNRH gerada em PDF por Maria Recepção', NULL, NULL, 'manual', '2026-04-02 09:17:24'),
(5, 1, 1, 1, 'payment_added', 'Pagamento de R$ 750,00 via Dinheiro lançado por Super Admin', NULL, '{\"payment_id\":1,\"amount\":\"750.00\"}', 'manual', '2026-04-03 00:55:57'),
(6, 4, 1, 1, 'payment_added', 'Pagamento de R$ 1.560,00 via Dinheiro lançado por Super Admin', NULL, '{\"payment_id\":2,\"amount\":\"1560.00\"}', 'manual', '2026-04-03 05:36:15');

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

--
-- Estrutura para tabela `reservation_adjustments`
--

CREATE TABLE `reservation_adjustments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `type` varchar(15) NOT NULL,
  `calc_type` varchar(10) NOT NULL,
  `value` decimal(10,4) NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `reason` varchar(500) NOT NULL,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `reservation_companions`
--

CREATE TABLE `reservation_companions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `first_name` varchar(100) NOT NULL,
  `last_name` varchar(100) DEFAULT NULL,
  `document_type` varchar(20) DEFAULT NULL,
  `document_number` varchar(50) DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `gender` varchar(20) DEFAULT NULL,
  `nationality` varchar(80) DEFAULT 'Brasileira',
  `kinship` varchar(50) DEFAULT NULL COMMENT 'Grau de parentesco/relação',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `reservation_items`
--

CREATE TABLE `reservation_items` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED DEFAULT NULL,
  `description` varchar(200) NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'product',
  `quantity` decimal(10,2) NOT NULL DEFAULT 1.00,
  `unit_price` decimal(12,2) NOT NULL,
  `total_price` decimal(12,2) NOT NULL,
  `status` varchar(15) NOT NULL DEFAULT 'active',
  `reversal_reason` varchar(500) DEFAULT NULL,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `reversed_by` bigint(20) UNSIGNED DEFAULT NULL,
  `reversed_at` 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 para tabela `reservation_payments`
--

CREATE TABLE `reservation_payments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `payment_method_id` bigint(20) UNSIGNED NOT NULL,
  `financial_account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cashbox_id` bigint(20) UNSIGNED DEFAULT NULL,
  `transaction_id` bigint(20) UNSIGNED DEFAULT NULL COMMENT 'Vinculado à transação do ledger após criação',
  `amount` decimal(12,2) NOT NULL,
  `change_amount` decimal(12,2) NOT NULL DEFAULT 0.00 COMMENT 'Troco devolvido (apenas dinheiro)',
  `paid_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `status` varchar(15) NOT NULL DEFAULT 'active' COMMENT 'active|cancelled|reversed',
  `notes` text DEFAULT NULL,
  `reference` varchar(100) DEFAULT NULL COMMENT 'NSU, código de autenticação PIX, etc.',
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `cancelled_by` bigint(20) UNSIGNED DEFAULT NULL,
  `cancelled_at` timestamp NULL DEFAULT NULL,
  `cancellation_reason` varchar(500) 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;

--
-- Despejando dados para a tabela `reservation_payments`
--

INSERT INTO `reservation_payments` (`id`, `hotel_id`, `reservation_id`, `payment_method_id`, `financial_account_id`, `cashbox_id`, `transaction_id`, `amount`, `change_amount`, `paid_at`, `status`, `notes`, `reference`, `created_by`, `cancelled_by`, `cancelled_at`, `cancellation_reason`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 1, 1, NULL, 1, 750.00, 0.00, '2026-04-03 00:55:00', 'active', NULL, NULL, 1, NULL, NULL, NULL, '2026-04-03 00:55:57', '2026-04-03 00:55:57', NULL),
(2, 1, 4, 1, 1, NULL, 2, 1560.00, 0.00, '2026-04-03 05:35:00', 'active', NULL, NULL, 1, NULL, NULL, NULL, '2026-04-03 05:36:15', '2026-04-03 05:36:15', NULL);

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

--
-- Estrutura para tabela `reservation_status_colors`
--

CREATE TABLE `reservation_status_colors` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `status_code` varchar(30) NOT NULL COMMENT 'provisional, confirmed, checked_in, checked_out, canceled, no_show',
  `label` varchar(60) NOT NULL COMMENT 'Label em português: Pré-reservado, Confirmado...',
  `bg_color` varchar(20) NOT NULL COMMENT 'Cor de fundo do bloco: #EBDD7A',
  `border_color` varchar(20) NOT NULL COMMENT 'Cor da borda: #D4C55B',
  `text_color` varchar(20) NOT NULL COMMENT 'Cor do texto: #5C4A00',
  `dot_color` varchar(20) DEFAULT NULL COMMENT 'Cor do indicador dot na sidebar',
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `is_active` 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;

--
-- Despejando dados para a tabela `reservation_status_colors`
--

INSERT INTO `reservation_status_colors` (`id`, `hotel_id`, `status_code`, `label`, `bg_color`, `border_color`, `text_color`, `dot_color`, `sort_order`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 1, 'provisional', 'Pré-reservado', '#f8a516', '#ffffff', '#fff5f5', '#ffffff', 1, 1, '2026-04-01 18:40:20', '2026-04-03 18:07:52'),
(2, 1, 'confirmed', 'Reservado', '#1c8ace', '#f2f2f2', '#ffffff', '#f2f2f2', 2, 1, '2026-04-01 18:40:20', '2026-04-03 18:12:04'),
(3, 1, 'checked_in', 'Hospedado', '#e92f39', '#3838f5', '#212121', '#3838f5', 3, 1, '2026-04-01 18:40:20', '2026-04-03 18:12:04'),
(4, 1, 'checked_out', 'Finalizado', '#D1FAE5', '#59B39E', '#064E3B', '#59B39E', 4, 1, '2026-04-01 18:40:20', '2026-04-01 18:40:20'),
(5, 1, 'canceled', 'Bloqueado', '#F1F5F9', '#4E5D6A', '#334155', '#4E5D6A', 5, 1, '2026-04-01 18:40:20', '2026-04-01 18:40:20'),
(6, 1, 'no_show', 'Em Espera', '#FCE7F3', '#D76C97', '#831843', '#D76C97', 6, 1, '2026-04-01 18:40:20', '2026-04-01 18:40:20');

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

--
-- Estrutura para tabela `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `guard_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'super_admin', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(2, 'hotel_admin', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(3, 'manager', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(4, 'financial', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(5, 'reception', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(6, 'housekeeping', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44'),
(7, 'auditor', 'web', '2026-04-01 16:36:44', '2026-04-01 16:36:44');

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

--
-- Estrutura para tabela `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `role_has_permissions`
--

INSERT INTO `role_has_permissions` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 2),
(2, 1),
(2, 2),
(3, 1),
(3, 2),
(4, 1),
(4, 2),
(5, 1),
(5, 2),
(5, 3),
(6, 1),
(6, 2),
(7, 1),
(7, 2),
(8, 1),
(8, 2),
(9, 1),
(9, 2),
(10, 1),
(10, 2),
(11, 1),
(11, 2),
(12, 1),
(12, 2),
(13, 1),
(13, 2),
(14, 1),
(14, 2),
(14, 3),
(15, 1),
(15, 2),
(16, 1),
(16, 2),
(16, 7),
(17, 1),
(17, 2),
(17, 7),
(18, 1),
(18, 2),
(18, 3),
(18, 4),
(18, 5),
(18, 6),
(18, 7),
(19, 1),
(19, 2),
(19, 3),
(20, 1),
(20, 2),
(20, 3),
(20, 4),
(20, 5),
(20, 7),
(21, 1),
(21, 2),
(21, 3),
(21, 5),
(22, 1),
(22, 2),
(22, 3),
(22, 5),
(23, 1),
(23, 2),
(23, 3),
(24, 1),
(24, 2),
(25, 1),
(25, 2),
(25, 3),
(25, 5),
(26, 1),
(26, 2),
(26, 3),
(26, 5),
(27, 1),
(27, 2),
(27, 3),
(28, 1),
(28, 2),
(28, 3),
(28, 5),
(28, 7),
(29, 1),
(29, 2),
(29, 3),
(29, 5),
(30, 1),
(30, 2),
(30, 3),
(30, 5),
(31, 1),
(31, 2),
(32, 1),
(32, 2),
(32, 3),
(32, 5),
(32, 6),
(33, 1),
(33, 2),
(33, 3),
(33, 6),
(34, 1),
(34, 2),
(34, 3),
(34, 4),
(34, 5),
(34, 7),
(35, 1),
(35, 2),
(35, 3),
(35, 4),
(35, 5),
(36, 1),
(36, 2),
(36, 3),
(36, 4),
(37, 1),
(37, 2),
(37, 3),
(37, 4),
(38, 1),
(38, 2),
(38, 4),
(39, 1),
(39, 2),
(39, 4),
(40, 1),
(40, 2),
(40, 3),
(40, 4),
(40, 5),
(41, 1),
(41, 2),
(41, 3),
(41, 4),
(41, 5),
(42, 1),
(42, 2),
(42, 4),
(43, 1),
(43, 2),
(43, 3),
(43, 4),
(43, 7),
(44, 1),
(44, 2),
(44, 3),
(44, 4),
(44, 7),
(45, 1),
(45, 2),
(45, 4),
(45, 7),
(46, 1),
(46, 2),
(47, 1),
(47, 2),
(48, 1),
(48, 2),
(48, 3),
(48, 5),
(49, 1),
(49, 2),
(49, 3),
(50, 1),
(50, 2),
(50, 3),
(50, 4),
(50, 5),
(51, 1),
(51, 2),
(51, 3),
(51, 4),
(51, 5),
(52, 1),
(52, 2),
(52, 3),
(52, 4),
(53, 1),
(53, 2),
(53, 3),
(53, 4),
(54, 1),
(54, 2),
(54, 3),
(54, 4),
(55, 1),
(55, 2),
(55, 3),
(55, 4),
(55, 5),
(56, 1),
(56, 2),
(56, 3),
(56, 4),
(56, 5),
(57, 1),
(57, 2),
(57, 3),
(57, 4),
(58, 1),
(58, 2),
(58, 3),
(58, 4),
(58, 5),
(59, 1),
(59, 2),
(59, 3),
(59, 4),
(59, 5),
(60, 1),
(60, 2),
(61, 1),
(61, 2),
(62, 1),
(62, 2),
(63, 1),
(63, 2);

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

--
-- Estrutura para tabela `rooms`
--

CREATE TABLE `rooms` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `room_category_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(50) NOT NULL COMMENT 'Número ou nome do quarto (ex: 101, Chalé Sol)',
  `floor` varchar(50) DEFAULT NULL,
  `status` varchar(30) NOT NULL DEFAULT 'available' COMMENT 'available, occupied, dirty, maintenance, out_of_order',
  `notes` text DEFAULT NULL,
  `is_active` 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;

--
-- Despejando dados para a tabela `rooms`
--

INSERT INTO `rooms` (`id`, `hotel_id`, `room_category_id`, `name`, `floor`, `status`, `notes`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, '101', '1º Andar', 'available', NULL, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(2, 1, 1, '102', '1º Andar', 'cleaning', NULL, 1, '2026-04-01 16:56:31', '2026-04-03 20:10:59', NULL),
(3, 1, 1, '103', '1º Andar', 'dirty', NULL, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(4, 1, 2, '201', '2º Andar', 'dirty', NULL, 1, '2026-04-01 16:56:31', '2026-04-03 14:42:47', NULL),
(5, 1, 2, '202', '2º Andar', 'maintenance', NULL, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(6, 1, 3, '301', 'Cobertura', 'available', NULL, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL);

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

--
-- Estrutura para tabela `room_categories`
--

CREATE TABLE `room_categories` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `short_code` varchar(10) DEFAULT NULL,
  `description` text DEFAULT NULL,
  `base_price` decimal(10,2) NOT NULL DEFAULT 0.00,
  `base_capacity` int(11) NOT NULL DEFAULT 2,
  `max_capacity` int(11) NOT NULL DEFAULT 2,
  `is_active` 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;

--
-- Despejando dados para a tabela `room_categories`
--

INSERT INTO `room_categories` (`id`, `hotel_id`, `name`, `short_code`, `description`, `base_price`, `base_capacity`, `max_capacity`, `is_active`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Standard Double', 'STD', NULL, 250.00, 2, 3, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(2, 1, 'Luxo King', 'LUX', NULL, 450.00, 2, 2, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(3, 1, 'Suíte Master', 'SUI', NULL, 780.00, 2, 4, 1, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL);

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

--
-- Estrutura para tabela `sales_channels`
--

CREATE TABLE `sales_channels` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `code` varchar(30) DEFAULT NULL COMMENT 'Slug único: booking, airbnb, direct...',
  `short_name` varchar(20) DEFAULT NULL COMMENT 'Abreviação: BK, AB, DIR...',
  `type` varchar(30) NOT NULL DEFAULT 'direct' COMMENT 'direct, ota, agency, corporate',
  `is_ota` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'É uma OTA (Online Travel Agency)?',
  `commission_rate` decimal(5,2) NOT NULL DEFAULT 0.00 COMMENT 'Percentual %',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `sort_order` int(11) NOT NULL DEFAULT 0,
  `icon_type` varchar(20) NOT NULL DEFAULT 'text' COMMENT 'text | svg | emoji | image',
  `icon_svg` text DEFAULT NULL COMMENT 'SVG inline do canal',
  `icon_path` varchar(255) DEFAULT NULL COMMENT 'Path de imagem uploadada',
  `badge_color` varchar(20) DEFAULT NULL COMMENT 'Cor do badge ex: #4E86E8',
  `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;

--
-- Despejando dados para a tabela `sales_channels`
--

INSERT INTO `sales_channels` (`id`, `hotel_id`, `name`, `code`, `short_name`, `type`, `is_ota`, `commission_rate`, `is_active`, `sort_order`, `icon_type`, `icon_svg`, `icon_path`, `badge_color`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'Balcão / Direto', NULL, NULL, 'direct', 0, 0.00, 1, 0, 'text', NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(2, 1, 'Booking.com', NULL, NULL, 'ota', 0, 15.00, 1, 0, 'text', NULL, NULL, NULL, '2026-04-01 16:56:31', '2026-04-01 16:56:31', NULL),
(3, 1, 'Booking.com', 'booking', 'BK', 'ota', 1, 15.00, 1, 1, 'svg', '<svg viewBox=\"0 0 24 24\" fill=\"#003580\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#003580\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">BK</text></svg>', NULL, '#003580', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(4, 1, 'Airbnb', 'airbnb', 'AB', 'ota', 1, 3.00, 1, 2, 'svg', '<svg viewBox=\"0 0 24 24\" fill=\"#FF5A5F\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#FF5A5F\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">AB</text></svg>', NULL, '#FF5A5F', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(5, 1, 'Expedia', 'expedia', 'EX', 'ota', 1, 18.00, 1, 3, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#FEC600\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"#001432\" text-anchor=\"middle\">EX</text></svg>', NULL, '#FEC600', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(6, 1, 'Hoteis.com', 'hoteis_com', 'HC', 'ota', 1, 16.00, 1, 4, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#D0021B\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"7\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">H.com</text></svg>', NULL, '#D0021B', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(7, 1, 'Decolar', 'decolar', 'DC', 'ota', 1, 14.00, 1, 5, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#FF0032\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">DC</text></svg>', NULL, '#FF0032', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(8, 1, 'Agoda', 'agoda', 'AG', 'ota', 1, 15.00, 1, 6, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#EB0028\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">AG</text></svg>', NULL, '#EB0028', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(9, 1, 'Trivago', 'trivago', 'TV', 'ota', 1, 0.00, 1, 7, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#2979FF\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">TV</text></svg>', NULL, '#2979FF', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(10, 1, 'Vrbo', 'vrbo', 'VB', 'ota', 1, 8.00, 1, 8, 'svg', '<svg viewBox=\"0 0 24 24\" xmlns=\"http://www.w3.org/2000/svg\"><rect width=\"24\" height=\"24\" rx=\"4\" fill=\"#1C7AE0\"/><text x=\"12\" y=\"16\" font-family=\"Arial\" font-size=\"8\" font-weight=\"bold\" fill=\"white\" text-anchor=\"middle\">VB</text></svg>', NULL, '#1C7AE0', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(11, 1, 'Site Direto', 'site_direto', 'SD', 'direct', 0, 0.00, 1, 9, 'emoji', '🌐', NULL, '#58BDC4', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(12, 1, 'Telefone', 'telefone', 'TEL', 'direct', 0, 0.00, 1, 10, 'emoji', '📞', NULL, '#6B7890', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(13, 1, 'WhatsApp', 'whatsapp', 'WA', 'direct', 0, 0.00, 1, 11, 'emoji', '💬', NULL, '#25D366', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(14, 1, 'Balcão / Direto', 'balcao', 'DIR', 'direct', 0, 0.00, 1, 12, 'emoji', '🏨', NULL, '#59B39E', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL),
(15, 1, 'Empresa / Convênio', 'corporativo', 'EMP', 'corporate', 0, 5.00, 1, 13, 'emoji', '🏢', NULL, '#4E5D6A', '2026-04-01 18:40:20', '2026-04-01 18:40:20', NULL);

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

--
-- Estrutura para 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;

--
-- Despejando dados para a tabela `sessions`
--

INSERT INTO `sessions` (`id`, `user_id`, `ip_address`, `user_agent`, `payload`, `last_activity`) VALUES
('CcDZQHfOiJsEXb55doa0Z7CbvwHgl1OZLvmaOnzz', 1, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'YTo0OntzOjY6Il90b2tlbiI7czo0MDoiOXM4MGZhMnpqZUprendTb1VabG12eUFuenJDR0ZZd0c1T3ZnOWhGZyI7czo2OiJfZmxhc2giO2E6Mjp7czozOiJvbGQiO2E6MDp7fXM6MzoibmV3IjthOjA6e319czo5OiJfcHJldmlvdXMiO2E6Mjp7czozOiJ1cmwiO3M6NDE6Imh0dHA6Ly9sb2NhbGhvc3QvUE1TL3B1YmxpYy9hZG1pbi9yZXBvcnRzIjtzOjU6InJvdXRlIjtzOjE5OiJhZG1pbi5yZXBvcnRzLmluZGV4Ijt9czo1MDoibG9naW5fd2ViXzU5YmEzNmFkZGMyYjJmOTQwMTU4MGYwMTRjN2Y1OGVhNGUzMDk4OWQiO2k6MTt9', 1775249117),
('kjXKzOmoWi5duG7Q92Fc1feyaDWPZIbGhHC8KmZ4', 1, '::1', 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/146.0.0.0 Safari/537.36', 'YTo1OntzOjY6Il90b2tlbiI7czo0MDoiRG5FdEJyaFNVM1A2TUNVaTV5Vm1RUXFBTVV6QkhnazVlRFBPaGxWWCI7czozOiJ1cmwiO2E6MDp7fXM6OToiX3ByZXZpb3VzIjthOjI6e3M6MzoidXJsIjtzOjMzOiJodHRwOi8vbG9jYWxob3N0L1BNUy9wdWJsaWMvYWRtaW4iO3M6NToicm91dGUiO3M6MTA6ImFkbWluLmhvbWUiO31zOjY6Il9mbGFzaCI7YToyOntzOjM6Im9sZCI7YTowOnt9czozOiJuZXciO2E6MDp7fX1zOjUwOiJsb2dpbl93ZWJfNTliYTM2YWRkYzJiMmY5NDAxNTgwZjAxNGM3ZjU4ZWE0ZTMwOTg5ZCI7aToxO30=', 1775249582);

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

--
-- Estrutura para tabela `stock_transactions`
--

CREATE TABLE `stock_transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `product_id` bigint(20) UNSIGNED NOT NULL,
  `user_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` enum('in','out') NOT NULL COMMENT 'Entrada ou Saída',
  `quantity` int(11) NOT NULL DEFAULT 0,
  `unit_price` decimal(10,2) DEFAULT NULL COMMENT 'Custo ou Valor no momento',
  `reference_model` varchar(255) DEFAULT NULL COMMENT 'Ex: ReservationItem, PurchaseOrder',
  `reference_id` bigint(20) UNSIGNED DEFAULT NULL,
  `notes` 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 para tabela `tariff_packages`
--

CREATE TABLE `tariff_packages` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `base_rule_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `description` text DEFAULT NULL,
  `includes_breakfast` tinyint(1) NOT NULL DEFAULT 0,
  `includes_parking` tinyint(1) NOT NULL DEFAULT 0,
  `includes_transfer` tinyint(1) NOT NULL DEFAULT 0,
  `includes_extras` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'outros itens inclusos em JSON' CHECK (json_valid(`includes_extras`)),
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `tariff_rules`
--

CREATE TABLE `tariff_rules` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `room_category_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `type` enum('base','season','weekday','channel','promo','package') NOT NULL DEFAULT 'base',
  `price_per_night` decimal(10,2) NOT NULL,
  `price_extra_adult` decimal(10,2) NOT NULL DEFAULT 0.00,
  `price_child` decimal(10,2) NOT NULL DEFAULT 0.00,
  `min_nights` smallint(6) NOT NULL DEFAULT 1,
  `max_nights` smallint(6) DEFAULT NULL,
  `is_breakfast_included` tinyint(1) NOT NULL DEFAULT 0,
  `priority` tinyint(4) NOT NULL DEFAULT 50 COMMENT '1-10=pacote, 11-20=temporada, 21-30=promo, 31-40=canal, 41-50=base',
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `notes` text DEFAULT NULL,
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `tariff_rules`
--

INSERT INTO `tariff_rules` (`id`, `hotel_id`, `room_category_id`, `name`, `type`, `price_per_night`, `price_extra_adult`, `price_child`, `min_nights`, `max_nights`, `is_breakfast_included`, `priority`, `is_active`, `notes`, `created_by`, `created_at`, `updated_at`) VALUES
(1, 1, 2, 'Tarifa Base Standard', 'base', 250.00, 80.00, 40.00, 1, NULL, 0, 50, 1, NULL, 1, '2026-04-03 05:00:08', '2026-04-03 05:00:08'),
(2, 1, 2, 'Alta Temporada Jul/Dez', 'season', 390.00, 100.00, 50.00, 2, NULL, 1, 15, 1, NULL, 1, '2026-04-03 05:00:08', '2026-04-03 06:18:02'),
(3, 1, NULL, 'Fim de Semana', 'weekday', 290.00, 80.00, 40.00, 1, NULL, 0, 40, 1, NULL, 1, '2026-04-03 05:00:08', '2026-04-03 05:00:08'),
(4, 1, NULL, 'Tarifa Teste', 'base', 300.00, 0.00, 0.00, 1, NULL, 0, 50, 1, NULL, 1, '2026-04-03 06:16:52', '2026-04-03 06:16:52');

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

--
-- Estrutura para tabela `tariff_rule_channels`
--

CREATE TABLE `tariff_rule_channels` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tariff_rule_id` bigint(20) UNSIGNED NOT NULL,
  `sales_channel_id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `adjustment_type` enum('percent','fixed') NOT NULL DEFAULT 'percent',
  `adjustment_value` decimal(8,2) NOT NULL DEFAULT 0.00 COMMENT 'positivo=acréscimo, negativo=desconto',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `tariff_rule_dates`
--

CREATE TABLE `tariff_rule_dates` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tariff_rule_id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `start_date` date NOT NULL,
  `end_date` date NOT NULL,
  `days_of_week` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL COMMENT 'null=todos dias, [0,6]=fim de semana' CHECK (json_valid(`days_of_week`)),
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `tariff_rule_dates`
--

INSERT INTO `tariff_rule_dates` (`id`, `tariff_rule_id`, `hotel_id`, `start_date`, `end_date`, `days_of_week`, `created_at`, `updated_at`) VALUES
(2, 3, 1, '2026-01-01', '2026-12-31', '[5,6]', '2026-04-03 05:00:08', '2026-04-03 05:00:08'),
(3, 2, 1, '2026-07-01', '2026-12-31', NULL, '2026-04-03 06:18:02', '2026-04-03 06:18:02');

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

--
-- Estrutura para tabela `tariff_snapshots`
--

CREATE TABLE `tariff_snapshots` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `reservation_id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `nights` tinyint(4) NOT NULL,
  `base_per_night` decimal(10,2) NOT NULL,
  `total_base` decimal(10,2) NOT NULL,
  `total_extras` decimal(10,2) NOT NULL DEFAULT 0.00,
  `daily_breakdown` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`daily_breakdown`)),
  `adjustments` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`adjustments`)),
  `total_final` decimal(10,2) NOT NULL,
  `manual_discount` decimal(10,2) NOT NULL DEFAULT 0.00,
  `manual_surcharge` decimal(10,2) NOT NULL DEFAULT 0.00,
  `applied_rule_id` bigint(20) UNSIGNED DEFAULT NULL,
  `applied_package_id` bigint(20) UNSIGNED DEFAULT NULL,
  `calculated_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `created_by` bigint(20) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Estrutura para tabela `transactions`
--

CREATE TABLE `transactions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED NOT NULL,
  `financial_account_id` bigint(20) UNSIGNED DEFAULT NULL,
  `cashbox_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reservation_id` bigint(20) UNSIGNED DEFAULT NULL,
  `reservation_payment_id` bigint(20) UNSIGNED DEFAULT NULL,
  `type` varchar(10) NOT NULL,
  `amount` decimal(12,2) NOT NULL,
  `description` varchar(255) NOT NULL,
  `transacted_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `created_by` bigint(20) UNSIGNED NOT NULL,
  `notes` text DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Despejando dados para a tabela `transactions`
--

INSERT INTO `transactions` (`id`, `hotel_id`, `financial_account_id`, `cashbox_id`, `reservation_id`, `reservation_payment_id`, `type`, `amount`, `description`, `transacted_at`, `created_by`, `notes`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, 1, 1, 'credit', 750.00, 'Recebimento — Reserva PMS-001', '2026-04-03 00:55:00', 1, NULL, '2026-04-03 00:55:57', '2026-04-03 00:55:57'),
(2, 1, 1, NULL, 4, 2, 'credit', 1560.00, 'Recebimento — Reserva PMS-004', '2026-04-03 05:35:00', 1, NULL, '2026-04-03 05:36:15', '2026-04-03 05:36:15');

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

--
-- Estrutura para tabela `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `hotel_id` bigint(20) UNSIGNED DEFAULT NULL,
  `department_id` bigint(20) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `display_name` varchar(255) DEFAULT NULL,
  `avatar_path` varchar(255) DEFAULT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(20) DEFAULT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `remember_token` varchar(100) DEFAULT NULL,
  `is_active` tinyint(1) NOT NULL DEFAULT 1,
  `last_login_at` timestamp NULL DEFAULT NULL,
  `settings` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`settings`)),
  `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;

--
-- Despejando dados para a tabela `users`
--

INSERT INTO `users` (`id`, `hotel_id`, `department_id`, `name`, `display_name`, `avatar_path`, `email`, `phone`, `email_verified_at`, `password`, `remember_token`, `is_active`, `last_login_at`, `settings`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, NULL, NULL, 'Super Admin', 'Super Admin', NULL, 'super@pmshotel.com', NULL, '2026-04-01 16:36:44', '$2y$12$Ypm6IaQsyn2nJAjh0EpUqeTil0aPGRsKgDnJDbrGHmKfVAr7wk7xa', 'ECTPApTjoFeFCEjHlrMSASEnXnJy0YGNRnBmTcNzVMNmDQafxmiyc2dVkeXt', 1, '2026-04-03 18:07:01', NULL, '2026-04-01 16:36:44', '2026-04-03 18:07:01', NULL),
(2, 1, NULL, 'Admin Hotel Demo', 'Admin', NULL, 'admin@hoteldemo.com.br', NULL, '2026-04-01 16:36:44', '$2y$12$R1FGCmcqXNo1LGjWxkWdHONLwHU6G/Sk3ifskOKCobbw4dtDBlO7a', NULL, 1, '2026-04-02 10:34:50', NULL, '2026-04-01 16:36:44', '2026-04-02 10:34:50', NULL),
(3, 1, NULL, 'Maria Recepção', 'Maria', NULL, 'recepcao@hoteldemo.com.br', NULL, '2026-04-01 16:36:45', '$2y$12$tIDUXVuH57Jh/xP.WNuXFOxjn7vFuvD2GNk5ylCHq.Nyz6d6xm72a', NULL, 1, '2026-04-02 09:13:16', NULL, '2026-04-01 16:36:45', '2026-04-02 09:13:16', NULL);

--
-- Índices para tabelas despejadas
--

--
-- Índices de tabela `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `audit_logs_hotel_id_created_at_index` (`hotel_id`,`created_at`),
  ADD KEY `audit_logs_entity_type_entity_id_index` (`entity_type`,`entity_id`),
  ADD KEY `audit_logs_user_id_index` (`user_id`),
  ADD KEY `audit_logs_action_index` (`action`),
  ADD KEY `audit_logs_request_id_index` (`request_id`);

--
-- Índices de tabela `cache`
--
ALTER TABLE `cache`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_expiration_index` (`expiration`);

--
-- Índices de tabela `cache_locks`
--
ALTER TABLE `cache_locks`
  ADD PRIMARY KEY (`key`),
  ADD KEY `cache_locks_expiration_index` (`expiration`);

--
-- Índices de tabela `cashboxes`
--
ALTER TABLE `cashboxes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `cx_hotel_status_idx` (`hotel_id`,`status`),
  ADD KEY `cx_hotel_user_idx` (`hotel_id`,`user_id`,`status`),
  ADD KEY `cx_user_fk` (`user_id`),
  ADD KEY `cx_account_fk` (`financial_account_id`);

--
-- Índices de tabela `companies`
--
ALTER TABLE `companies`
  ADD PRIMARY KEY (`id`),
  ADD KEY `companies_hotel_id_foreign` (`hotel_id`);

--
-- Índices de tabela `departments`
--
ALTER TABLE `departments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `departments_hotel_id_is_active_index` (`hotel_id`,`is_active`);

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

--
-- Índices de tabela `financial_accounts`
--
ALTER TABLE `financial_accounts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fa_hotel_active_idx` (`hotel_id`,`is_active`);

--
-- Índices de tabela `fnrh_records`
--
ALTER TABLE `fnrh_records`
  ADD PRIMARY KEY (`id`),
  ADD KEY `fnrh_records_reservation_id_foreign` (`reservation_id`),
  ADD KEY `fnrh_records_guest_id_foreign` (`guest_id`),
  ADD KEY `fnrh_records_generated_by_foreign` (`generated_by`),
  ADD KEY `fnrh_records_hotel_id_reservation_id_index` (`hotel_id`,`reservation_id`);

--
-- Índices de tabela `guests`
--
ALTER TABLE `guests`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guests_hotel_id_document_number_index` (`hotel_id`,`document_number`),
  ADD KEY `guests_hotel_id_first_name_index` (`hotel_id`,`first_name`);

--
-- Índices de tabela `guest_companions`
--
ALTER TABLE `guest_companions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `guest_companions_guest_id_foreign` (`guest_id`);

--
-- Índices de tabela `hotels`
--
ALTER TABLE `hotels`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `hotels_slug_unique` (`slug`),
  ADD KEY `hotels_slug_index` (`slug`),
  ADD KEY `hotels_is_active_index` (`is_active`);

--
-- Índices de tabela `hotel_enabled_modules`
--
ALTER TABLE `hotel_enabled_modules`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `hotel_enabled_modules_hotel_id_module_id_unique` (`hotel_id`,`module_id`),
  ADD KEY `hotel_enabled_modules_module_id_foreign` (`module_id`);

--
-- Índices de tabela `hotel_settings`
--
ALTER TABLE `hotel_settings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `hotel_settings_hotel_id_key_unique` (`hotel_id`,`key`),
  ADD KEY `hotel_settings_hotel_id_group_index` (`hotel_id`,`group`);

--
-- Índices de tabela `hotel_subscriptions`
--
ALTER TABLE `hotel_subscriptions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `hotel_subscriptions_plan_id_foreign` (`plan_id`),
  ADD KEY `hotel_subscriptions_hotel_id_status_index` (`hotel_id`,`status`);

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

--
-- Índices de tabela `job_batches`
--
ALTER TABLE `job_batches`
  ADD PRIMARY KEY (`id`);

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

--
-- Índices de tabela `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Índices de tabela `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Índices de tabela `modules`
--
ALTER TABLE `modules`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `modules_slug_unique` (`slug`);

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

--
-- Índices de tabela `payment_methods`
--
ALTER TABLE `payment_methods`
  ADD PRIMARY KEY (`id`),
  ADD KEY `payment_methods_hotel_id_is_active_index` (`hotel_id`,`is_active`);

--
-- Índices de tabela `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Índices de tabela `plans`
--
ALTER TABLE `plans`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `plans_slug_unique` (`slug`);

--
-- Índices de tabela `plan_modules`
--
ALTER TABLE `plan_modules`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `plan_modules_plan_id_module_id_unique` (`plan_id`,`module_id`),
  ADD KEY `plan_modules_module_id_foreign` (`module_id`);

--
-- Índices de tabela `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pr_hotel_active_idx` (`hotel_id`,`is_active`),
  ADD KEY `pr_hotel_type_idx` (`hotel_id`,`type`),
  ADD KEY `pr_category_fk` (`product_category_id`);

--
-- Índices de tabela `product_categories`
--
ALTER TABLE `product_categories`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pc_hotel_active_idx` (`hotel_id`,`is_active`);

--
-- Índices de tabela `reservations`
--
ALTER TABLE `reservations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `reservations_locator_unique` (`locator`),
  ADD KEY `reservations_guest_id_foreign` (`guest_id`),
  ADD KEY `reservations_room_id_foreign` (`room_id`),
  ADD KEY `reservations_room_category_id_foreign` (`room_category_id`),
  ADD KEY `reservations_sales_channel_id_foreign` (`sales_channel_id`),
  ADD KEY `reservations_hotel_id_status_index` (`hotel_id`,`status`),
  ADD KEY `reservations_hotel_id_check_in_expected_check_out_expected_index` (`hotel_id`,`check_in_expected`,`check_out_expected`),
  ADD KEY `reservations_hotel_id_room_id_index` (`hotel_id`,`room_id`),
  ADD KEY `reservations_checked_in_by_foreign` (`checked_in_by`),
  ADD KEY `reservations_checked_out_by_foreign` (`checked_out_by`),
  ADD KEY `reservations_canceled_by_foreign` (`canceled_by`);

--
-- Índices de tabela `reservation_activity_logs`
--
ALTER TABLE `reservation_activity_logs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `reservation_activity_logs_user_id_foreign` (`user_id`),
  ADD KEY `reservation_activity_logs_reservation_id_created_at_index` (`reservation_id`,`created_at`),
  ADD KEY `reservation_activity_logs_hotel_id_action_index` (`hotel_id`,`action`);

--
-- Índices de tabela `reservation_adjustments`
--
ALTER TABLE `reservation_adjustments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ra_hotel_res_idx` (`hotel_id`,`reservation_id`),
  ADD KEY `ra_hotel_type_idx` (`hotel_id`,`type`),
  ADD KEY `ra_reservation_fk` (`reservation_id`);

--
-- Índices de tabela `reservation_companions`
--
ALTER TABLE `reservation_companions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `reservation_companions_hotel_id_foreign` (`hotel_id`),
  ADD KEY `reservation_companions_reservation_id_index` (`reservation_id`);

--
-- Índices de tabela `reservation_items`
--
ALTER TABLE `reservation_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ri_hotel_res_idx` (`hotel_id`,`reservation_id`),
  ADD KEY `ri_hotel_status_idx` (`hotel_id`,`status`),
  ADD KEY `ri_hotel_type_idx` (`hotel_id`,`type`),
  ADD KEY `ri_reservation_fk` (`reservation_id`),
  ADD KEY `ri_product_fk` (`product_id`);

--
-- Índices de tabela `reservation_payments`
--
ALTER TABLE `reservation_payments`
  ADD PRIMARY KEY (`id`),
  ADD KEY `rp_hotel_fk` (`hotel_id`),
  ADD KEY `rp_reservation_fk` (`reservation_id`);

--
-- Índices de tabela `reservation_status_colors`
--
ALTER TABLE `reservation_status_colors`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `reservation_status_colors_hotel_id_status_code_unique` (`hotel_id`,`status_code`),
  ADD KEY `reservation_status_colors_hotel_id_sort_order_index` (`hotel_id`,`sort_order`);

--
-- Índices de tabela `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Índices de tabela `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

--
-- Índices de tabela `rooms`
--
ALTER TABLE `rooms`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `rooms_hotel_id_name_unique` (`hotel_id`,`name`),
  ADD KEY `rooms_room_category_id_foreign` (`room_category_id`);

--
-- Índices de tabela `room_categories`
--
ALTER TABLE `room_categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `room_categories_hotel_id_name_unique` (`hotel_id`,`name`);

--
-- Índices de tabela `sales_channels`
--
ALTER TABLE `sales_channels`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sales_channels_hotel_id_sort_order_index` (`hotel_id`,`sort_order`);

--
-- Índices de 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 de tabela `stock_transactions`
--
ALTER TABLE `stock_transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `stock_transactions_hotel_id_foreign` (`hotel_id`),
  ADD KEY `stock_transactions_product_id_foreign` (`product_id`),
  ADD KEY `stock_transactions_user_id_foreign` (`user_id`);

--
-- Índices de tabela `tariff_packages`
--
ALTER TABLE `tariff_packages`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tariff_packages_base_rule_id_foreign` (`base_rule_id`),
  ADD KEY `tariff_packages_created_by_foreign` (`created_by`),
  ADD KEY `tariff_packages_hotel_id_is_active_index` (`hotel_id`,`is_active`);

--
-- Índices de tabela `tariff_rules`
--
ALTER TABLE `tariff_rules`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tariff_rules_room_category_id_foreign` (`room_category_id`),
  ADD KEY `tariff_rules_created_by_foreign` (`created_by`),
  ADD KEY `tariff_rules_hotel_id_room_category_id_type_is_active_index` (`hotel_id`,`room_category_id`,`type`,`is_active`),
  ADD KEY `tariff_rules_hotel_id_priority_index` (`hotel_id`,`priority`);

--
-- Índices de tabela `tariff_rule_channels`
--
ALTER TABLE `tariff_rule_channels`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tariff_rule_channels_tariff_rule_id_sales_channel_id_unique` (`tariff_rule_id`,`sales_channel_id`),
  ADD KEY `tariff_rule_channels_sales_channel_id_foreign` (`sales_channel_id`),
  ADD KEY `tariff_rule_channels_hotel_id_foreign` (`hotel_id`);

--
-- Índices de tabela `tariff_rule_dates`
--
ALTER TABLE `tariff_rule_dates`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tariff_rule_dates_tariff_rule_id_start_date_end_date_index` (`tariff_rule_id`,`start_date`,`end_date`),
  ADD KEY `tariff_rule_dates_hotel_id_start_date_end_date_index` (`hotel_id`,`start_date`,`end_date`);

--
-- Índices de tabela `tariff_snapshots`
--
ALTER TABLE `tariff_snapshots`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tariff_snapshots_reservation_id_unique` (`reservation_id`),
  ADD KEY `tariff_snapshots_applied_rule_id_foreign` (`applied_rule_id`),
  ADD KEY `tariff_snapshots_applied_package_id_foreign` (`applied_package_id`),
  ADD KEY `tariff_snapshots_created_by_foreign` (`created_by`),
  ADD KEY `tariff_snapshots_hotel_id_calculated_at_index` (`hotel_id`,`calculated_at`);

--
-- Índices de tabela `transactions`
--
ALTER TABLE `transactions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `tr_hotel_type_idx` (`hotel_id`,`type`),
  ADD KEY `tr_hotel_date_idx` (`hotel_id`,`transacted_at`),
  ADD KEY `tr_hotel_cashbox_idx` (`hotel_id`,`cashbox_id`),
  ADD KEY `tr_hotel_res_idx` (`hotel_id`,`reservation_id`),
  ADD KEY `tr_account_fk` (`financial_account_id`),
  ADD KEY `tr_cashbox_fk` (`cashbox_id`),
  ADD KEY `tr_reservation_fk` (`reservation_id`);

--
-- Índices de tabela `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD KEY `users_department_id_foreign` (`department_id`),
  ADD KEY `users_hotel_id_is_active_index` (`hotel_id`,`is_active`);

--
-- AUTO_INCREMENT para tabelas despejadas
--

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

--
-- Restrições para tabelas despejadas
--

--
-- Restrições para tabelas `audit_logs`
--
ALTER TABLE `audit_logs`
  ADD CONSTRAINT `audit_logs_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `audit_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `cashboxes`
--
ALTER TABLE `cashboxes`
  ADD CONSTRAINT `cx_account_fk` FOREIGN KEY (`financial_account_id`) REFERENCES `financial_accounts` (`id`),
  ADD CONSTRAINT `cx_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `cx_user_fk` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Restrições para tabelas `companies`
--
ALTER TABLE `companies`
  ADD CONSTRAINT `companies_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `departments`
--
ALTER TABLE `departments`
  ADD CONSTRAINT `departments_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `financial_accounts`
--
ALTER TABLE `financial_accounts`
  ADD CONSTRAINT `fa_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `fnrh_records`
--
ALTER TABLE `fnrh_records`
  ADD CONSTRAINT `fnrh_records_generated_by_foreign` FOREIGN KEY (`generated_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `fnrh_records_guest_id_foreign` FOREIGN KEY (`guest_id`) REFERENCES `guests` (`id`),
  ADD CONSTRAINT `fnrh_records_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `fnrh_records_reservation_id_foreign` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `guests`
--
ALTER TABLE `guests`
  ADD CONSTRAINT `guests_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `guest_companions`
--
ALTER TABLE `guest_companions`
  ADD CONSTRAINT `guest_companions_guest_id_foreign` FOREIGN KEY (`guest_id`) REFERENCES `guests` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `hotel_enabled_modules`
--
ALTER TABLE `hotel_enabled_modules`
  ADD CONSTRAINT `hotel_enabled_modules_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `hotel_enabled_modules_module_id_foreign` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `hotel_settings`
--
ALTER TABLE `hotel_settings`
  ADD CONSTRAINT `hotel_settings_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `hotel_subscriptions`
--
ALTER TABLE `hotel_subscriptions`
  ADD CONSTRAINT `hotel_subscriptions_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `hotel_subscriptions_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`);

--
-- Restrições para tabelas `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `payment_methods`
--
ALTER TABLE `payment_methods`
  ADD CONSTRAINT `payment_methods_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `plan_modules`
--
ALTER TABLE `plan_modules`
  ADD CONSTRAINT `plan_modules_module_id_foreign` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `plan_modules_plan_id_foreign` FOREIGN KEY (`plan_id`) REFERENCES `plans` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `products`
--
ALTER TABLE `products`
  ADD CONSTRAINT `pr_category_fk` FOREIGN KEY (`product_category_id`) REFERENCES `product_categories` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `pr_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `product_categories`
--
ALTER TABLE `product_categories`
  ADD CONSTRAINT `pc_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `reservations`
--
ALTER TABLE `reservations`
  ADD CONSTRAINT `reservations_canceled_by_foreign` FOREIGN KEY (`canceled_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `reservations_checked_in_by_foreign` FOREIGN KEY (`checked_in_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `reservations_checked_out_by_foreign` FOREIGN KEY (`checked_out_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `reservations_guest_id_foreign` FOREIGN KEY (`guest_id`) REFERENCES `guests` (`id`),
  ADD CONSTRAINT `reservations_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reservations_room_category_id_foreign` FOREIGN KEY (`room_category_id`) REFERENCES `room_categories` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `reservations_room_id_foreign` FOREIGN KEY (`room_id`) REFERENCES `rooms` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `reservations_sales_channel_id_foreign` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channels` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `reservation_activity_logs`
--
ALTER TABLE `reservation_activity_logs`
  ADD CONSTRAINT `reservation_activity_logs_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reservation_activity_logs_reservation_id_foreign` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reservation_activity_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `reservation_adjustments`
--
ALTER TABLE `reservation_adjustments`
  ADD CONSTRAINT `ra_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ra_reservation_fk` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `reservation_companions`
--
ALTER TABLE `reservation_companions`
  ADD CONSTRAINT `reservation_companions_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `reservation_companions_reservation_id_foreign` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `reservation_items`
--
ALTER TABLE `reservation_items`
  ADD CONSTRAINT `ri_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `ri_product_fk` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `ri_reservation_fk` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `reservation_payments`
--
ALTER TABLE `reservation_payments`
  ADD CONSTRAINT `rp_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `rp_reservation_fk` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `reservation_status_colors`
--
ALTER TABLE `reservation_status_colors`
  ADD CONSTRAINT `reservation_status_colors_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `rooms`
--
ALTER TABLE `rooms`
  ADD CONSTRAINT `rooms_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `rooms_room_category_id_foreign` FOREIGN KEY (`room_category_id`) REFERENCES `room_categories` (`id`);

--
-- Restrições para tabelas `room_categories`
--
ALTER TABLE `room_categories`
  ADD CONSTRAINT `room_categories_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `sales_channels`
--
ALTER TABLE `sales_channels`
  ADD CONSTRAINT `sales_channels_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `stock_transactions`
--
ALTER TABLE `stock_transactions`
  ADD CONSTRAINT `stock_transactions_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `stock_transactions_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `stock_transactions_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `tariff_packages`
--
ALTER TABLE `tariff_packages`
  ADD CONSTRAINT `tariff_packages_base_rule_id_foreign` FOREIGN KEY (`base_rule_id`) REFERENCES `tariff_rules` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_packages_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_packages_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `tariff_rules`
--
ALTER TABLE `tariff_rules`
  ADD CONSTRAINT `tariff_rules_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_rules_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tariff_rules_room_category_id_foreign` FOREIGN KEY (`room_category_id`) REFERENCES `room_categories` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `tariff_rule_channels`
--
ALTER TABLE `tariff_rule_channels`
  ADD CONSTRAINT `tariff_rule_channels_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tariff_rule_channels_sales_channel_id_foreign` FOREIGN KEY (`sales_channel_id`) REFERENCES `sales_channels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tariff_rule_channels_tariff_rule_id_foreign` FOREIGN KEY (`tariff_rule_id`) REFERENCES `tariff_rules` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `tariff_rule_dates`
--
ALTER TABLE `tariff_rule_dates`
  ADD CONSTRAINT `tariff_rule_dates_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tariff_rule_dates_tariff_rule_id_foreign` FOREIGN KEY (`tariff_rule_id`) REFERENCES `tariff_rules` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `tariff_snapshots`
--
ALTER TABLE `tariff_snapshots`
  ADD CONSTRAINT `tariff_snapshots_applied_package_id_foreign` FOREIGN KEY (`applied_package_id`) REFERENCES `tariff_packages` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_snapshots_applied_rule_id_foreign` FOREIGN KEY (`applied_rule_id`) REFERENCES `tariff_rules` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_snapshots_created_by_foreign` FOREIGN KEY (`created_by`) REFERENCES `users` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tariff_snapshots_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tariff_snapshots_reservation_id_foreign` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE CASCADE;

--
-- Restrições para tabelas `transactions`
--
ALTER TABLE `transactions`
  ADD CONSTRAINT `tr_account_fk` FOREIGN KEY (`financial_account_id`) REFERENCES `financial_accounts` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tr_cashbox_fk` FOREIGN KEY (`cashbox_id`) REFERENCES `cashboxes` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `tr_hotel_fk` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `tr_reservation_fk` FOREIGN KEY (`reservation_id`) REFERENCES `reservations` (`id`) ON DELETE SET NULL;

--
-- Restrições para tabelas `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_department_id_foreign` FOREIGN KEY (`department_id`) REFERENCES `departments` (`id`) ON DELETE SET NULL,
  ADD CONSTRAINT `users_hotel_id_foreign` FOREIGN KEY (`hotel_id`) REFERENCES `hotels` (`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 */;
