-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: May 02, 2026 at 03:56 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30

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

--
-- Database: `hotel_pos_db`
--

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

--
-- Table structure for table `bookingattributes`
--

CREATE TABLE `bookingattributes` (
  `BookingAttributeID` int(11) NOT NULL,
  `BookingID` int(11) NOT NULL,
  `PricingID` int(11) DEFAULT NULL,
  `AttributeKey` varchar(80) NOT NULL,
  `AttributeValue` longtext DEFAULT NULL,
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bookingattributes`
--

INSERT INTO `bookingattributes` (`BookingAttributeID`, `BookingID`, `PricingID`, `AttributeKey`, `AttributeValue`, `CreatedAtUtc`) VALUES
(1, 6, 27, 'PackageType', 'Free & Easy', '2026-04-26 13:45:33.077324'),
(2, 6, 27, 'Room', 'WHT-02', '2026-04-26 13:45:33.077354'),
(3, 6, 27, 'Deposit', '1000.00', '2026-04-26 13:45:33.077433'),
(4, 6, 27, 'PricingMeta', '{\"pricingId\":27,\"nights\":1,\"totalPax\":1,\"packageName\":\"Free \\u0026 Easy\",\"roomType\":\"White House\",\"baseRate\":1850}', '2026-04-26 13:45:33.077501'),
(5, 6, 27, 'Pax', '{\"adult\":1,\"kid\":0,\"elderly\":0}', '2026-04-26 13:45:33.077503'),
(6, 6, 27, 'Fees', '{\"weekendSurcharge\":60,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":1,\"baseRate\":1850,\"totalPax\":1,\"packageSubtotal\":1850}', '2026-04-26 13:45:33.077505'),
(7, 6, 27, 'Addons', '[]', '2026-04-26 13:45:33.077507'),
(8, 7, 138, 'PackageType', 'Scuba Diving', '2026-04-28 15:48:07.336996'),
(9, 7, 138, 'Room', 'TBT-02', '2026-04-28 15:48:07.337031'),
(10, 7, 138, 'PricingMeta', '{\"pricingId\":138,\"nights\":2,\"totalPax\":1,\"packageName\":\"Scuba Diving\",\"roomType\":\"Timber House\",\"baseRate\":2395}', '2026-04-28 15:48:07.337126'),
(11, 7, 138, 'Pax', '{\"adult\":1,\"kid\":0,\"elderly\":0}', '2026-04-28 15:48:07.337128'),
(12, 7, 138, 'Fees', '{\"weekendSurcharge\":0,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":2,\"baseRate\":2395,\"totalPax\":1,\"packageSubtotal\":2395}', '2026-04-28 15:48:07.337131'),
(13, 7, 138, 'Addons', '[]', '2026-04-28 15:48:07.337134'),
(14, 8, 189, 'PackageType', 'SSI EFR & React Right / EFR & Rescue Scuba Diver', '2026-05-02 10:31:47.155769'),
(15, 8, 189, 'Room', 'WHT-01', '2026-05-02 10:31:47.155795'),
(16, 8, 189, 'PricingMeta', '{\"pricingId\":189,\"nights\":3,\"totalPax\":2,\"packageName\":\"SSI EFR \\u0026 React Right / EFR \\u0026 Rescue Scuba Diver\",\"roomType\":\"White House\",\"baseRate\":2680}', '2026-05-02 10:31:47.155953'),
(17, 8, 189, 'Pax', '{\"adult\":2,\"kid\":0,\"elderly\":0}', '2026-05-02 10:31:47.155955'),
(18, 8, 189, 'Fees', '{\"weekendSurcharge\":0,\"boatFee\":270,\"tourismTax\":0,\"gratuity\":10,\"nights\":3,\"baseRate\":2680,\"totalPax\":2,\"packageSubtotal\":5360}', '2026-05-02 10:31:47.155959'),
(19, 8, 189, 'Addons', '[]', '2026-05-02 10:31:47.155961'),
(20, 9, 138, 'PackageType', 'Scuba Diving', '2026-05-02 11:03:25.013600'),
(21, 9, 138, 'Room', 'TBT-01', '2026-05-02 11:03:25.013601'),
(22, 9, 138, 'PricingMeta', '{\"pricingId\":138,\"nights\":2,\"totalPax\":1,\"packageName\":\"Scuba Diving\",\"roomType\":\"Timber House\",\"baseRate\":2395}', '2026-05-02 11:03:25.013645'),
(23, 9, 138, 'Pax', '{\"adult\":1,\"kid\":0,\"elderly\":0}', '2026-05-02 11:03:25.013647'),
(24, 9, 138, 'Fees', '{\"weekendSurcharge\":60,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":2,\"baseRate\":2395,\"totalPax\":1,\"packageSubtotal\":2395}', '2026-05-02 11:03:25.013648'),
(25, 9, 138, 'Addons', '[]', '2026-05-02 11:03:25.013651');

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

--
-- Table structure for table `bookings`
--

CREATE TABLE `bookings` (
  `Id` int(11) NOT NULL,
  `BookingCode` varchar(32) NOT NULL,
  `GuestName` varchar(200) NOT NULL,
  `Phone` varchar(50) DEFAULT NULL,
  `Email` varchar(120) DEFAULT NULL,
  `Ic` varchar(64) DEFAULT NULL,
  `Nationality` varchar(40) NOT NULL DEFAULT 'Malaysian',
  `PricingID` int(11) DEFAULT NULL,
  `PackageType` varchar(80) DEFAULT NULL,
  `Course` varchar(120) DEFAULT NULL,
  `Room` varchar(32) NOT NULL,
  `Checkin` date NOT NULL,
  `Checkout` date NOT NULL,
  `Nights` int(11) NOT NULL,
  `PaxJson` longtext NOT NULL,
  `AddonsJson` longtext NOT NULL,
  `FeesJson` longtext DEFAULT NULL,
  `AgentCode` varchar(64) DEFAULT NULL,
  `AgentId` varchar(64) DEFAULT NULL,
  `TotalAmount` decimal(12,2) NOT NULL,
  `AmountPaid` decimal(12,2) NOT NULL,
  `PayMethod` varchar(32) NOT NULL DEFAULT 'cash',
  `Remarks` varchar(500) DEFAULT NULL,
  `Status` varchar(32) NOT NULL DEFAULT 'confirmed',
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `bookings`
--

INSERT INTO `bookings` (`Id`, `BookingCode`, `GuestName`, `Phone`, `Email`, `Ic`, `Nationality`, `PricingID`, `PackageType`, `Course`, `Room`, `Checkin`, `Checkout`, `Nights`, `PaxJson`, `AddonsJson`, `FeesJson`, `AgentCode`, `AgentId`, `TotalAmount`, `AmountPaid`, `PayMethod`, `Remarks`, `Status`, `CreatedAtUtc`) VALUES
(1, 'BKTEST20260410180722', 'Test Guest', '0123456789', 'test@example.com', 'A1234567', 'Malaysian', NULL, 'Scuba Diving', NULL, 'WHT-01', '2026-04-15', '2026-04-16', 1, '{\"kid\":0,\"elderly\":0,\"adult\":2}', '[]', '{\"boatFee\":0,\"tourismTax\":10,\"gratuity\":14,\"baseRate\":280,\"weekendSurcharge\":0}', NULL, NULL, 304.00, 304.00, 'cash', 'API test', 'confirmed', '2026-04-10 10:07:22.786207'),
(2, 'BK1861278', 'Chow Kent', '0125192230', 'munkent1030@gmail.com', '021030081001', 'Malaysian', NULL, 'Free & Easy', NULL, 'WHT-01', '2026-04-22', '2026-04-25', 3, '{\"adult\":3,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":0,\"boatFee\":0,\"tourismTax\":30,\"gratuity\":228.75,\"nights\":3,\"baseRate\":1525,\"totalPax\":3,\"packageSubtotal\":4575}', '', NULL, 4833.75, 4833.75, 'cash', 'nope', 'confirmed', '2026-04-20 13:31:01.315369'),
(3, 'BK2826792', 'siwai', '012999111', 'siwai@gmail.com', '03081301031931', 'Malaysian', NULL, 'Free & Easy', NULL, 'TBT-01', '2026-04-25', '2026-04-27', 2, '{\"adult\":2,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":186,\"boatFee\":0,\"tourismTax\":20,\"gratuity\":124,\"nights\":2,\"baseRate\":1240,\"totalPax\":2,\"packageSubtotal\":2480}', '', NULL, 2810.00, 2810.00, 'cash', '-', 'confirmed', '2026-04-20 13:47:06.803177'),
(4, 'BK6442822', 'Kenny', '012453933', 'munzhen@gmail.com', '2839898234', 'Malaysian', NULL, 'Mixed Package', NULL, 'WHT-05', '2026-04-25', '2026-04-27', 2, '{\"adult\":3,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":351.99999999999994,\"boatFee\":135,\"tourismTax\":30,\"gratuity\":15,\"nights\":2,\"baseRate\":2346.6666666666665,\"totalPax\":3,\"packageSubtotal\":7040}', '', NULL, 7572.00, 7572.00, 'cash', '-', 'confirmed', '2026-04-20 14:47:22.829701'),
(5, 'BK6676403', 'Kennt', '01238474', 'munzhen@gmail.com', '021030081001', 'Malaysian', NULL, 'Mixed Package', NULL, 'ZNQ-01', '2026-04-25', '2026-04-28', 3, '{\"adult\":3,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":405,\"boatFee\":135,\"tourismTax\":30,\"gratuity\":15,\"nights\":3,\"baseRate\":2700,\"totalPax\":3,\"packageSubtotal\":8100}', '', NULL, 8685.00, 8685.00, 'cash', '-', 'confirmed', '2026-04-20 14:51:16.411403'),
(6, 'BK1132763', 'Chow Mun Kent', '0125192230', 'munzhen@gmail.com', '021030081001', 'Malaysian', 27, 'Free & Easy', NULL, 'WHT-02', '2026-05-01', '2026-05-02', 1, '{\"adult\":1,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":60,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":1,\"baseRate\":1850,\"totalPax\":1,\"packageSubtotal\":1850}', '', NULL, 2255.00, 2255.00, 'cash', 'no', 'confirmed', '2026-04-26 13:45:32.819094'),
(7, 'BK1287056', 'test 428', '123', '123', '123', 'Malaysian', 138, 'Scuba Diving', NULL, 'TBT-02', '2026-04-28', '2026-04-30', 2, '{\"adult\":1,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":0,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":2,\"baseRate\":2395,\"totalPax\":1,\"packageSubtotal\":2395}', '', NULL, 2788.50, 2788.50, 'cash', '123', 'confirmed', '2026-04-28 15:48:07.107713'),
(8, 'BK7906867', 'Chow', '0125192330', 'oaksdk@sjdijsf.com', '021030081001', 'Malaysian', 189, 'SSI EFR & React Right / EFR & Rescue Scuba Diver', NULL, 'WHT-01', '2026-05-03', '2026-05-06', 3, '{\"adult\":2,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":0,\"boatFee\":270,\"tourismTax\":0,\"gratuity\":10,\"nights\":3,\"baseRate\":2680,\"totalPax\":2,\"packageSubtotal\":5360}', '', NULL, 6204.00, 6204.00, 'cash', 'haha', 'confirmed', '2026-05-02 10:31:46.918190'),
(9, 'BK9805000', 'Chow', '123', '123', '123', 'Malaysian', 138, 'Scuba Diving', NULL, 'TBT-01', '2026-05-02', '2026-05-04', 2, '{\"adult\":1,\"kid\":0,\"elderly\":0}', '[]', '{\"weekendSurcharge\":60,\"boatFee\":135,\"tourismTax\":0,\"gratuity\":5,\"nights\":2,\"baseRate\":2395,\"totalPax\":1,\"packageSubtotal\":2395}', '', NULL, 2854.50, 2854.50, 'cash', '123', 'confirmed', '2026-05-02 11:03:25.008605');

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

--
-- Table structure for table `booking_guest_details`
--

CREATE TABLE `booking_guest_details` (
  `BookingGuestID` int(11) NOT NULL,
  `BookingID` int(11) NOT NULL,
  `GuestName` varchar(200) NOT NULL,
  `Phone` varchar(50) DEFAULT NULL,
  `Email` varchar(120) DEFAULT NULL,
  `Ic` varchar(64) DEFAULT NULL,
  `Nationality` varchar(40) NOT NULL DEFAULT 'Malaysian',
  `IsPrimary` tinyint(1) NOT NULL DEFAULT 1,
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_guest_details`
--

INSERT INTO `booking_guest_details` (`BookingGuestID`, `BookingID`, `GuestName`, `Phone`, `Email`, `Ic`, `Nationality`, `IsPrimary`, `CreatedAtUtc`) VALUES
(1, 1, 'Test Guest', '0123456789', 'test@example.com', 'A1234567', 'Malaysian', 1, '2026-04-10 10:07:22.786207'),
(2, 2, 'Chow Kent', '0125192230', 'munkent1030@gmail.com', '021030081001', 'Malaysian', 1, '2026-04-20 13:31:01.315369');

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

--
-- Table structure for table `booking_payments`
--

CREATE TABLE `booking_payments` (
  `PaymentID` int(11) NOT NULL,
  `BookingID` int(11) NOT NULL,
  `Amount` decimal(12,2) NOT NULL,
  `Method` varchar(32) NOT NULL,
  `PaidAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6),
  `ReferenceNo` varchar(100) DEFAULT NULL,
  `Notes` varchar(500) DEFAULT NULL,
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_payments`
--

INSERT INTO `booking_payments` (`PaymentID`, `BookingID`, `Amount`, `Method`, `PaidAtUtc`, `ReferenceNo`, `Notes`, `CreatedAtUtc`) VALUES
(1, 1, 304.00, 'cash', '2026-04-10 10:07:22.786207', NULL, 'Initial migrated payment from bookings.AmountPaid', '2026-04-20 13:41:22.576730'),
(2, 2, 4833.75, 'cash', '2026-04-20 13:31:01.315369', NULL, 'Initial migrated payment from bookings.AmountPaid', '2026-04-20 13:41:22.576730');

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

--
-- Table structure for table `booking_pricing_snapshots`
--

CREATE TABLE `booking_pricing_snapshots` (
  `PricingSnapshotID` int(11) NOT NULL,
  `BookingID` int(11) NOT NULL,
  `PricingID` int(11) DEFAULT NULL,
  `FeesJson` longtext DEFAULT NULL,
  `AddonsJson` longtext DEFAULT NULL,
  `AgentCode` varchar(64) DEFAULT NULL,
  `AgentId` varchar(64) DEFAULT NULL,
  `Voucher` varchar(64) DEFAULT NULL,
  `Deposit` decimal(12,2) DEFAULT NULL,
  `TotalAmount` decimal(12,2) NOT NULL,
  `AmountPaid` decimal(12,2) NOT NULL,
  `PayMethod` varchar(32) NOT NULL DEFAULT 'cash',
  `Remarks` varchar(500) DEFAULT NULL,
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_pricing_snapshots`
--

INSERT INTO `booking_pricing_snapshots` (`PricingSnapshotID`, `BookingID`, `PricingID`, `FeesJson`, `AddonsJson`, `AgentCode`, `AgentId`, `Voucher`, `Deposit`, `TotalAmount`, `AmountPaid`, `PayMethod`, `Remarks`, `CreatedAtUtc`) VALUES
(1, 1, NULL, '{\"boatFee\":0,\"tourismTax\":10,\"gratuity\":14,\"baseRate\":280,\"weekendSurcharge\":0}', '[]', NULL, NULL, NULL, NULL, 304.00, 304.00, 'cash', 'API test', '2026-04-10 10:07:22.786207'),
(2, 2, NULL, '{\"weekendSurcharge\":0,\"boatFee\":0,\"tourismTax\":30,\"gratuity\":228.75,\"nights\":3,\"baseRate\":1525,\"totalPax\":3,\"packageSubtotal\":4575}', '[]', '', NULL, NULL, NULL, 4833.75, 4833.75, 'cash', 'nope', '2026-04-20 13:31:01.315369');

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

--
-- Table structure for table `booking_stays`
--

CREATE TABLE `booking_stays` (
  `BookingStayID` int(11) NOT NULL,
  `BookingID` int(11) NOT NULL,
  `Room` varchar(32) NOT NULL,
  `Checkin` date NOT NULL,
  `Checkout` date NOT NULL,
  `Nights` int(11) NOT NULL,
  `PaxJson` longtext NOT NULL,
  `PackageType` varchar(80) DEFAULT NULL,
  `Course` varchar(120) DEFAULT NULL,
  `PricingID` int(11) DEFAULT NULL,
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `booking_stays`
--

INSERT INTO `booking_stays` (`BookingStayID`, `BookingID`, `Room`, `Checkin`, `Checkout`, `Nights`, `PaxJson`, `PackageType`, `Course`, `PricingID`, `CreatedAtUtc`) VALUES
(1, 1, 'WHT-01', '2026-04-15', '2026-04-16', 1, '{\"kid\":0,\"elderly\":0,\"adult\":2}', 'Scuba Diving', NULL, NULL, '2026-04-10 10:07:22.786207'),
(2, 2, 'WHT-01', '2026-04-22', '2026-04-25', 3, '{\"adult\":3,\"kid\":0,\"elderly\":0}', 'Free & Easy', NULL, NULL, '2026-04-20 13:31:01.315369');

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

--
-- Table structure for table `durations`
--

CREATE TABLE `durations` (
  `DurationID` int(11) NOT NULL,
  `Name` varchar(20) DEFAULT NULL,
  `Days` int(11) DEFAULT NULL,
  `Nights` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `durations`
--

INSERT INTO `durations` (`DurationID`, `Name`, `Days`, `Nights`) VALUES
(1, '2D1N', 2, 1),
(2, '3D2N', 3, 2),
(3, '4D3N', 4, 3),
(4, '5D4N', 5, 4),
(5, '6D5N', 6, 5),
(6, '7D6N', 7, 6);

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

--
-- Table structure for table `packagepricing`
--

CREATE TABLE `packagepricing` (
  `PricingID` int(11) NOT NULL,
  `PackageID` int(11) NOT NULL,
  `DurationID` int(11) NOT NULL,
  `RoomTypeID` int(11) NOT NULL,
  `PaxTypeID` int(11) NOT NULL,
  `Price` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `packagepricing`
--

INSERT INTO `packagepricing` (`PricingID`, `PackageID`, `DurationID`, `RoomTypeID`, `PaxTypeID`, `Price`) VALUES
(13, 1, 1, 1, 1, 2100.00),
(14, 1, 2, 1, 1, 2470.00),
(15, 1, 3, 1, 1, 2830.00),
(16, 1, 4, 1, 1, 3295.00),
(17, 1, 5, 1, 1, 3775.00),
(18, 1, 6, 1, 1, 4435.00),
(19, 1, 1, 1, 2, 1430.00),
(20, 1, 2, 1, 2, 1670.00),
(21, 1, 3, 1, 2, 1910.00),
(22, 1, 4, 1, 2, 2220.00),
(23, 1, 5, 1, 2, 2540.00),
(24, 1, 6, 1, 2, 2980.00),
(27, 1, 1, 2, 1, 1850.00),
(28, 1, 2, 2, 1, 2170.00),
(29, 1, 3, 2, 1, 2485.00),
(30, 1, 4, 2, 1, 2905.00),
(31, 1, 5, 2, 1, 3415.00),
(32, 1, 6, 2, 1, 3910.00),
(33, 1, 1, 2, 2, 1255.00),
(34, 1, 2, 2, 2, 1470.00),
(35, 1, 3, 2, 2, 1680.00),
(36, 1, 4, 2, 2, 1960.00),
(37, 1, 5, 2, 2, 2300.00),
(38, 1, 6, 2, 2, 2630.00),
(39, 1, 1, 2, 3, 1235.00),
(40, 1, 2, 2, 3, 1415.00),
(41, 1, 3, 2, 3, 1595.00),
(42, 1, 4, 2, 3, 1775.00),
(43, 1, 5, 2, 3, 1950.00),
(44, 1, 6, 2, 3, 2130.00),
(45, 1, 1, 3, 1, 1960.00),
(46, 1, 2, 3, 1, 2255.00),
(49, 1, 3, 3, 1, 2570.00),
(50, 1, 4, 3, 1, 3055.00),
(51, 1, 5, 3, 1, 3595.00),
(52, 1, 6, 3, 1, 4090.00),
(53, 1, 1, 3, 2, 1330.00),
(54, 1, 2, 3, 2, 1525.00),
(55, 1, 3, 3, 2, 1735.00),
(56, 1, 4, 3, 2, 2060.00),
(57, 1, 5, 3, 2, 2420.00),
(58, 1, 6, 3, 2, 2750.00),
(59, 1, 1, 3, 4, 1105.00),
(60, 1, 2, 3, 4, 1240.00),
(61, 1, 3, 3, 4, 1385.00),
(62, 1, 4, 3, 4, 1535.00),
(63, 1, 5, 3, 4, 1690.00),
(64, 1, 6, 3, 4, 1850.00),
(65, 1, 1, 4, 1, 1780.00),
(66, 1, 2, 4, 1, 1930.00),
(67, 1, 3, 4, 1, 2380.00),
(68, 1, 4, 4, 1, 2650.00),
(69, 1, 5, 4, 1, 2930.00),
(70, 1, 6, 4, 1, 3520.00),
(71, 1, 1, 4, 2, 1210.00),
(72, 1, 2, 4, 2, 1310.00),
(73, 1, 3, 4, 2, 1610.00),
(74, 1, 4, 4, 2, 1790.00),
(75, 1, 5, 4, 2, 2050.00),
(76, 1, 6, 4, 2, 2370.00),
(77, 1, 1, 4, 3, 1130.00),
(78, 1, 2, 4, 3, 1210.00),
(79, 1, 3, 4, 3, 1450.00),
(80, 1, 4, 4, 3, 1600.00),
(81, 1, 5, 4, 3, 1810.00),
(82, 1, 6, 4, 3, 1950.00),
(83, 2, 1, 1, 1, 2515.00),
(84, 2, 2, 1, 1, 2935.00),
(85, 2, 3, 1, 1, 3460.00),
(86, 2, 4, 1, 1, 4060.00),
(87, 2, 5, 1, 1, 4690.00),
(88, 2, 6, 1, 1, 5305.00),
(89, 2, 1, 1, 2, 1700.00),
(90, 2, 2, 1, 2, 1980.00),
(91, 2, 3, 1, 2, 2330.00),
(92, 2, 4, 1, 2, 2730.00),
(93, 2, 5, 1, 2, 3150.00),
(94, 2, 6, 1, 2, 3560.00),
(95, 2, 1, 2, 1, 2455.00),
(96, 2, 2, 2, 1, 2770.00),
(97, 2, 3, 2, 1, 3220.00),
(98, 2, 4, 2, 1, 3790.00),
(99, 2, 5, 2, 1, 4390.00),
(100, 2, 6, 2, 1, 5030.00),
(101, 2, 1, 2, 2, 1660.00),
(102, 2, 2, 2, 2, 1870.00),
(103, 2, 3, 2, 2, 2170.00),
(104, 2, 4, 2, 2, 2550.00),
(105, 2, 5, 2, 2, 2950.00),
(106, 2, 6, 2, 2, 3375.00),
(107, 2, 1, 2, 3, 1490.00),
(108, 2, 2, 2, 3, 1740.00),
(109, 2, 3, 2, 3, 2090.00),
(110, 2, 4, 2, 3, 2450.00),
(111, 2, 5, 2, 3, 2570.00),
(112, 2, 6, 2, 3, 2845.00),
(113, 2, 1, 3, 1, 2405.00),
(114, 2, 2, 3, 1, 2720.00),
(115, 2, 3, 3, 1, 3170.00),
(116, 2, 4, 3, 1, 3720.00),
(117, 2, 5, 3, 1, 4340.00),
(118, 2, 6, 3, 1, 4970.00),
(119, 2, 1, 3, 2, 1760.00),
(120, 2, 2, 3, 2, 2080.00),
(121, 2, 3, 3, 2, 2380.00),
(122, 2, 4, 3, 2, 2790.00),
(123, 2, 5, 3, 2, 3100.00),
(124, 2, 6, 3, 2, 3530.00),
(125, 2, 1, 3, 3, 1560.00),
(126, 2, 2, 3, 3, 1810.00),
(127, 2, 3, 3, 3, 2160.00),
(128, 2, 4, 3, 3, 2520.00),
(129, 2, 5, 3, 3, 2670.00),
(130, 2, 6, 3, 3, 2945.00),
(131, 2, 1, 3, 4, 1285.00),
(132, 2, 2, 3, 4, 1415.00),
(133, 2, 3, 3, 4, 1735.00),
(134, 2, 4, 3, 4, 1950.00),
(135, 2, 5, 3, 4, 2250.00),
(136, 2, 6, 3, 4, 2540.00),
(137, 2, 1, 4, 1, 2095.00),
(138, 2, 2, 4, 1, 2395.00),
(139, 2, 3, 4, 1, 2980.00),
(140, 2, 4, 4, 1, 3520.00),
(141, 2, 5, 4, 1, 4030.00),
(142, 2, 6, 4, 1, 4600.00),
(144, 1, 1, 3, 3, 1265.00),
(145, 1, 2, 3, 3, 1455.00),
(146, 1, 3, 3, 3, 1660.00),
(147, 1, 4, 3, 3, 1880.00),
(148, 1, 5, 3, 3, 2160.00),
(149, 1, 6, 3, 3, 2465.00),
(150, 2, 1, 4, 2, 1420.00),
(151, 2, 2, 4, 2, 1620.00),
(152, 2, 3, 4, 2, 2010.00),
(153, 2, 4, 4, 2, 2370.00),
(154, 2, 5, 4, 2, 2710.00),
(155, 2, 6, 4, 2, 3090.00),
(156, 2, 1, 4, 3, 1330.00),
(157, 2, 2, 4, 3, 1475.00),
(158, 2, 3, 4, 3, 1900.00),
(159, 2, 4, 4, 3, 2070.00),
(160, 2, 5, 4, 3, 2420.00),
(161, 2, 6, 4, 3, 2730.00),
(162, 3, 3, 1, 1, 3380.00),
(163, 3, 3, 1, 2, 2930.00),
(164, 3, 3, 2, 1, 3130.00),
(165, 3, 3, 2, 2, 2680.00),
(166, 3, 3, 2, 3, 2480.00),
(167, 3, 3, 3, 1, 3230.00),
(168, 3, 3, 3, 2, 2790.00),
(169, 3, 3, 3, 3, 2580.00),
(170, 3, 3, 3, 4, 2170.00),
(171, 3, 3, 4, 1, 2880.00),
(172, 3, 3, 4, 2, 2430.00),
(173, 3, 3, 4, 3, 2230.00),
(174, 4, 3, 1, 1, 3580.00),
(175, 4, 3, 1, 2, 3130.00),
(176, 4, 3, 2, 1, 3330.00),
(177, 4, 3, 2, 2, 2880.00),
(178, 4, 3, 2, 3, 2680.00),
(179, 4, 3, 3, 1, 3340.00),
(180, 4, 3, 3, 2, 2990.00),
(181, 4, 3, 3, 3, 2780.00),
(182, 4, 3, 3, 4, 2370.00),
(183, 4, 3, 4, 1, 3080.00),
(184, 4, 3, 4, 2, 2630.00),
(185, 4, 3, 4, 3, 2430.00),
(186, 5, 3, 1, 1, 3380.00),
(187, 5, 3, 1, 2, 2930.00),
(188, 5, 3, 2, 1, 3130.00),
(189, 5, 3, 2, 2, 2680.00),
(190, 5, 3, 2, 3, 2480.00),
(191, 5, 3, 3, 1, 3230.00),
(192, 5, 3, 3, 2, 2790.00),
(193, 5, 3, 3, 3, 2580.00),
(194, 5, 3, 3, 4, 2170.00),
(195, 5, 3, 4, 1, 2880.00),
(196, 5, 3, 4, 2, 2430.00),
(197, 5, 3, 4, 3, 2230.00),
(198, 6, 3, 1, 1, 3580.00),
(199, 6, 3, 1, 2, 3130.00),
(200, 6, 3, 2, 1, 3330.00),
(201, 6, 3, 2, 2, 2880.00),
(202, 6, 3, 2, 3, 2680.00),
(203, 6, 3, 3, 1, 3430.00),
(204, 6, 3, 3, 2, 2990.00),
(205, 6, 3, 3, 3, 2780.00),
(206, 6, 3, 3, 4, 2370.00),
(207, 6, 3, 4, 1, 3080.00),
(208, 6, 3, 4, 2, 2630.00),
(209, 6, 3, 4, 3, 2430.00),
(210, 7, 2, 1, 1, 2980.00),
(211, 7, 2, 1, 2, 2530.00),
(212, 7, 2, 2, 1, 2730.00),
(213, 7, 2, 2, 2, 2280.00),
(214, 7, 2, 2, 3, 2180.00),
(215, 7, 2, 3, 1, 2830.00),
(216, 7, 2, 3, 2, 2390.00),
(217, 7, 2, 3, 3, 2280.00),
(218, 7, 2, 3, 4, 1870.00),
(219, 7, 2, 4, 1, 2480.00),
(220, 7, 2, 4, 2, 2030.00),
(221, 7, 2, 4, 3, 1930.00),
(222, 8, 2, 1, 1, 3180.00),
(223, 8, 2, 1, 2, 2730.00),
(224, 8, 2, 2, 1, 2930.00),
(225, 8, 2, 2, 2, 2480.00),
(226, 8, 2, 2, 3, 2380.00),
(227, 8, 2, 3, 1, 3030.00),
(228, 8, 2, 3, 2, 2590.00),
(229, 8, 2, 3, 3, 2480.00),
(230, 8, 2, 3, 4, 2070.00),
(231, 8, 2, 4, 1, 2680.00),
(232, 8, 2, 4, 2, 2230.00),
(233, 8, 2, 4, 3, 2130.00);

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

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

CREATE TABLE `packages` (
  `PackageID` int(11) NOT NULL,
  `Name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

INSERT INTO `packages` (`PackageID`, `Name`) VALUES
(1, 'Free & Easy'),
(2, 'Scuba Diving'),
(3, 'SSI Open Water Scuba Diver '),
(4, 'PADI Open Water Scuba Diver'),
(5, 'SSI EFR & React Right / EFR & Rescue Scuba Diver'),
(6, 'PADI EFR & React Right / EFR & Rescue Scuba Diver'),
(7, 'SSI Advanced Adventurer / Advanced Open Water Scub'),
(8, 'PADI Advanced Adventurer / Advanced Open Water Scu');

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

--
-- Table structure for table `paxtypes`
--

CREATE TABLE `paxtypes` (
  `PaxTypeID` int(11) NOT NULL,
  `Name` varchar(20) DEFAULT NULL,
  `Capacity` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `paxtypes`
--

INSERT INTO `paxtypes` (`PaxTypeID`, `Name`, `Capacity`) VALUES
(1, 'Single', 1),
(2, 'Twin', 2),
(3, 'Triple', 3),
(4, 'Quad', 4);

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

--
-- Table structure for table `rooms`
--

CREATE TABLE `rooms` (
  `RoomID` int(11) NOT NULL,
  `RoomCode` varchar(32) NOT NULL,
  `RoomTypeName` varchar(80) NOT NULL,
  `MaxPax` int(11) NOT NULL,
  `IsActive` tinyint(1) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `rooms`
--

INSERT INTO `rooms` (`RoomID`, `RoomCode`, `RoomTypeName`, `MaxPax`, `IsActive`) VALUES
(1, 'WHT-01', 'White House Triple', 3, 1),
(2, 'WHT-02', 'White House Triple', 3, 1),
(3, 'WHT-03', 'White House Triple', 3, 1),
(4, 'WHT-04', 'White House Triple', 3, 1),
(5, 'WHT-05', 'White House Triple', 3, 1),
(6, 'WHT-06', 'White House Triple', 3, 1),
(7, 'WHT-07', 'White House Triple', 3, 1),
(8, 'WHT-08', 'White House Triple', 3, 1),
(9, 'WHT-09', 'White House Triple', 3, 1),
(10, 'WHT-10', 'White House Triple', 3, 1),
(11, 'WHT-11', 'White House Triple', 3, 1),
(12, 'WHT-12', 'White House Triple', 3, 1),
(13, 'WHT-13', 'White House Triple', 3, 1),
(14, 'WHT-14', 'White House Triple', 3, 1),
(15, 'WHS-01', 'White House Seaview', 2, 1),
(16, 'WHS-02', 'White House Seaview', 2, 1),
(17, 'TBT-01', 'Timber Triple', 3, 1),
(18, 'TBT-02', 'Timber Triple', 3, 1),
(19, 'TBT-03', 'Timber Triple', 3, 1),
(20, 'TBW-01', 'Timber Twin (2 single beds)', 3, 1),
(21, 'TBW-02', 'Timber Twin (2 single beds)', 3, 1),
(22, 'TBW-03', 'Timber Twin (2 single beds)', 3, 1),
(23, 'TBW-04', 'Timber Twin (2 single beds)', 3, 1),
(24, 'TBK-01', 'Timber King', 3, 1),
(25, 'TBK-02', 'Timber King', 3, 1),
(26, 'TBK-03', 'Timber King', 3, 1),
(27, 'TBK-04', 'Timber King', 3, 1),
(28, 'TBK-05', 'Timber King', 3, 1),
(29, 'ZNQ-01', 'Zenith Quad', 4, 1),
(30, 'ZNQ-02', 'Zenith Quad', 4, 1),
(31, 'ZNQ-03', 'Zenith Quad', 4, 1),
(32, 'ZNQ-04', 'Zenith Quad', 4, 1),
(33, 'ZNQ-05', 'Zenith Quad', 4, 1),
(34, 'ZNQ-06', 'Zenith Quad', 4, 1),
(35, 'ZNQ-07', 'Zenith Quad', 4, 1),
(36, 'ZNQ-08', 'Zenith Quad', 4, 1),
(37, 'ZNQ-09', 'Zenith Quad', 4, 1),
(38, 'ZNQ-10', 'Zenith Quad', 4, 1),
(39, 'ZNQ-11', 'Zenith Quad', 4, 1),
(40, 'ZNQ-12', 'Zenith Quad', 4, 1),
(41, 'ZNQ-13', 'Zenith Quad', 4, 1),
(42, 'ZNQ-14', 'Zenith Quad', 4, 1),
(43, 'ZNQ-15', 'Zenith Quad', 4, 1);

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

--
-- Table structure for table `roomtypes`
--

CREATE TABLE `roomtypes` (
  `RoomTypeID` int(11) NOT NULL,
  `Name` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `roomtypes`
--

INSERT INTO `roomtypes` (`RoomTypeID`, `Name`) VALUES
(1, 'Seaview White House'),
(2, 'White House'),
(3, 'Zenith Suite'),
(4, 'Timber House');

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

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

CREATE TABLE `users` (
  `Id` int(11) NOT NULL,
  `Username` varchar(64) NOT NULL,
  `PasswordHash` varchar(500) NOT NULL,
  `Role` varchar(32) NOT NULL DEFAULT 'User',
  `CreatedAtUtc` datetime(6) NOT NULL DEFAULT utc_timestamp(6)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `users` (`Id`, `Username`, `PasswordHash`, `Role`, `CreatedAtUtc`) VALUES
(1, 'admin', 'AQAAAAIAAYagAAAAEMmQ/Vn7fB2FY7itfgR4NONXGTjlyssXkQT8ixSR9idAC982uXMoDc+BoWf6acg8Tw==', 'Admin', '2026-04-08 08:12:10.696266');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bookingattributes`
--
ALTER TABLE `bookingattributes`
  ADD PRIMARY KEY (`BookingAttributeID`),
  ADD UNIQUE KEY `UQ_BookingAttributes_Booking_Attribute` (`BookingID`,`AttributeKey`),
  ADD KEY `IX_BookingAttributes_PricingID` (`PricingID`);

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`Id`),
  ADD UNIQUE KEY `UQ_Bookings_BookingCode` (`BookingCode`),
  ADD KEY `IX_Bookings_Checkin` (`Checkin`),
  ADD KEY `IX_Bookings_Status` (`Status`),
  ADD KEY `IX_Bookings_PricingID` (`PricingID`),
  ADD KEY `IX_Bookings_Room` (`Room`);

--
-- Indexes for table `booking_guest_details`
--
ALTER TABLE `booking_guest_details`
  ADD PRIMARY KEY (`BookingGuestID`),
  ADD KEY `IX_BookingGuestDetails_BookingID` (`BookingID`);

--
-- Indexes for table `booking_payments`
--
ALTER TABLE `booking_payments`
  ADD PRIMARY KEY (`PaymentID`),
  ADD KEY `IX_BookingPayments_BookingID` (`BookingID`),
  ADD KEY `IX_BookingPayments_PaidAtUtc` (`PaidAtUtc`);

--
-- Indexes for table `booking_pricing_snapshots`
--
ALTER TABLE `booking_pricing_snapshots`
  ADD PRIMARY KEY (`PricingSnapshotID`),
  ADD UNIQUE KEY `UQ_BookingPricingSnapshots_BookingID` (`BookingID`),
  ADD KEY `IX_BookingPricingSnapshots_PricingID` (`PricingID`);

--
-- Indexes for table `booking_stays`
--
ALTER TABLE `booking_stays`
  ADD PRIMARY KEY (`BookingStayID`),
  ADD UNIQUE KEY `UQ_BookingStays_BookingID` (`BookingID`),
  ADD KEY `IX_BookingStays_PricingID` (`PricingID`),
  ADD KEY `fk_booking_stays_room` (`Room`);

--
-- Indexes for table `durations`
--
ALTER TABLE `durations`
  ADD PRIMARY KEY (`DurationID`);

--
-- Indexes for table `packagepricing`
--
ALTER TABLE `packagepricing`
  ADD PRIMARY KEY (`PricingID`),
  ADD UNIQUE KEY `PackageID` (`PackageID`,`DurationID`,`RoomTypeID`,`PaxTypeID`),
  ADD KEY `DurationID` (`DurationID`),
  ADD KEY `RoomTypeID` (`RoomTypeID`),
  ADD KEY `PaxTypeID` (`PaxTypeID`);

--
-- Indexes for table `packages`
--
ALTER TABLE `packages`
  ADD PRIMARY KEY (`PackageID`);

--
-- Indexes for table `paxtypes`
--
ALTER TABLE `paxtypes`
  ADD PRIMARY KEY (`PaxTypeID`);

--
-- Indexes for table `rooms`
--
ALTER TABLE `rooms`
  ADD PRIMARY KEY (`RoomID`),
  ADD UNIQUE KEY `UQ_Rooms_RoomCode` (`RoomCode`);

--
-- Indexes for table `roomtypes`
--
ALTER TABLE `roomtypes`
  ADD PRIMARY KEY (`RoomTypeID`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`Id`),
  ADD UNIQUE KEY `UQ_Users_Username` (`Username`),
  ADD KEY `IX_Users_Role` (`Role`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bookingattributes`
--
ALTER TABLE `bookingattributes`
  MODIFY `BookingAttributeID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `booking_guest_details`
--
ALTER TABLE `booking_guest_details`
  MODIFY `BookingGuestID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `booking_payments`
--
ALTER TABLE `booking_payments`
  MODIFY `PaymentID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `booking_pricing_snapshots`
--
ALTER TABLE `booking_pricing_snapshots`
  MODIFY `PricingSnapshotID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `booking_stays`
--
ALTER TABLE `booking_stays`
  MODIFY `BookingStayID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `durations`
--
ALTER TABLE `durations`
  MODIFY `DurationID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT for table `packagepricing`
--
ALTER TABLE `packagepricing`
  MODIFY `PricingID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=234;

--
-- AUTO_INCREMENT for table `packages`
--
ALTER TABLE `packages`
  MODIFY `PackageID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `paxtypes`
--
ALTER TABLE `paxtypes`
  MODIFY `PaxTypeID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `roomtypes`
--
ALTER TABLE `roomtypes`
  MODIFY `RoomTypeID` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `Id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `bookingattributes`
--
ALTER TABLE `bookingattributes`
  ADD CONSTRAINT `bookingattributes_ibfk_1` FOREIGN KEY (`BookingID`) REFERENCES `bookings` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `bookingattributes_ibfk_2` FOREIGN KEY (`PricingID`) REFERENCES `packagepricing` (`PricingID`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `bookings`
--
ALTER TABLE `bookings`
  ADD CONSTRAINT `bookings_ibfk_1` FOREIGN KEY (`PricingID`) REFERENCES `packagepricing` (`PricingID`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `bookings_ibfk_2` FOREIGN KEY (`Room`) REFERENCES `rooms` (`RoomCode`) ON UPDATE CASCADE;

--
-- Constraints for table `booking_guest_details`
--
ALTER TABLE `booking_guest_details`
  ADD CONSTRAINT `fk_booking_guest_details_booking` FOREIGN KEY (`BookingID`) REFERENCES `bookings` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `booking_payments`
--
ALTER TABLE `booking_payments`
  ADD CONSTRAINT `fk_booking_payments_booking` FOREIGN KEY (`BookingID`) REFERENCES `bookings` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `booking_pricing_snapshots`
--
ALTER TABLE `booking_pricing_snapshots`
  ADD CONSTRAINT `fk_booking_pricing_snapshots_booking` FOREIGN KEY (`BookingID`) REFERENCES `bookings` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_booking_pricing_snapshots_pricing` FOREIGN KEY (`PricingID`) REFERENCES `packagepricing` (`PricingID`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `booking_stays`
--
ALTER TABLE `booking_stays`
  ADD CONSTRAINT `fk_booking_stays_booking` FOREIGN KEY (`BookingID`) REFERENCES `bookings` (`Id`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_booking_stays_pricing` FOREIGN KEY (`PricingID`) REFERENCES `packagepricing` (`PricingID`) ON DELETE SET NULL ON UPDATE CASCADE,
  ADD CONSTRAINT `fk_booking_stays_room` FOREIGN KEY (`Room`) REFERENCES `rooms` (`RoomCode`) ON UPDATE CASCADE;

--
-- Constraints for table `packagepricing`
--
ALTER TABLE `packagepricing`
  ADD CONSTRAINT `packagepricing_ibfk_1` FOREIGN KEY (`PackageID`) REFERENCES `packages` (`PackageID`),
  ADD CONSTRAINT `packagepricing_ibfk_2` FOREIGN KEY (`DurationID`) REFERENCES `durations` (`DurationID`),
  ADD CONSTRAINT `packagepricing_ibfk_3` FOREIGN KEY (`RoomTypeID`) REFERENCES `roomtypes` (`RoomTypeID`),
  ADD CONSTRAINT `packagepricing_ibfk_4` FOREIGN KEY (`PaxTypeID`) REFERENCES `paxtypes` (`PaxTypeID`);
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 */;
