-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `event_reservation`
--

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

--
-- Table structure for table `about_us`
--

CREATE TABLE `about_us` (
  `id` int(11) NOT NULL,
  `content` text NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `about_us`
--

INSERT INTO `about_us` (`id`, `content`) VALUES
(1, 'Welcome to our website! Edit this text to update the About Us section.1');

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

--
-- Table structure for table `addons`
--

CREATE TABLE `addons` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `addons`
--

INSERT INTO `addons` (`id`, `name`, `price`) VALUES
(3, 'momol', 1000),
(4, 'ASDWIQO', 6000);

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

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

CREATE TABLE `bookings` (
  `name` varchar(255) NOT NULL,
  `check_in` time NOT NULL,
  `check_out` time NOT NULL,
  `package` varchar(255) NOT NULL,
  `event_theme` varchar(255) NOT NULL,
  `event_start` time NOT NULL,
  `reservation_date` date NOT NULL,
  `status` enum('approved','rejected','pending') NOT NULL DEFAULT 'pending',
  `email` varchar(255) NOT NULL,
  `num_people` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `reservation_type` varchar(50) NOT NULL,
  `celebrant_name` varchar(255) DEFAULT NULL,
  `event_type` varchar(255) NOT NULL,
  `name1` varchar(255) NOT NULL,
  `reservation_date1` date NOT NULL,
  `mirror_date` date DEFAULT NULL,
  `event_type1` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

INSERT INTO `bookings` (`name`, `check_in`, `check_out`, `package`, `event_theme`, `event_start`, `reservation_date`, `status`, `email`, `num_people`, `created_at`, `reservation_type`, `celebrant_name`, `event_type`, `name1`, `reservation_date1`, `mirror_date`, `event_type1`) VALUES
('adrianne', '00:32:00', '12:32:00', 'dwqdqdqwdwqd', 'hulks', '12:31:00', '0213-03-12', 'pending', '', 0, '2025-03-17 09:10:10', '', '', 'Villa', '', '0000-00-00', NULL, NULL);

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

--
-- Table structure for table `carousel_images`
--

CREATE TABLE `carousel_images` (
  `id` int(11) NOT NULL,
  `image_name` varchar(255) NOT NULL,
  `uploaded_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `carousel_images`
--

INSERT INTO `carousel_images` (`id`, `image_name`, `uploaded_at`) VALUES
(19, 'image1.jpg', '2025-03-18 10:29:57'),
(20, 'image2.jpg', '2025-03-18 10:30:04'),
(21, 'image3.jpg', '2025-03-18 10:30:13'),
(22, 'image4.jpg', '2025-03-18 10:30:22'),
(23, 'image5.jpg', '2025-03-18 10:30:32'),
(24, 'image6.jpg', '2025-03-18 10:30:40'),
(25, 'image7.jpg', '2025-03-18 10:30:52'),
(26, 'image8.jpg', '2025-03-18 10:31:03'),
(27, 'image9.jpg', '2025-03-18 10:31:12'),
(28, 'image10.jpg', '2025-03-18 10:31:22'),
(29, 'image11.jpg', '2025-03-18 10:31:35'),
(30, 'image12.jpg', '2025-03-18 10:31:46'),
(31, 'image13.jpg', '2025-03-18 10:31:57'),
(32, 'image14.jpg', '2025-03-18 10:32:10'),
(33, 'image15.jpg', '2025-03-18 10:32:25'),
(34, 'image16.jpg', '2025-03-18 10:32:33'),
(35, 'image17.jpg', '2025-03-18 10:32:46');

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

--
-- Table structure for table `event_bookings`
--

CREATE TABLE `event_bookings` (
  `id` int(11) NOT NULL,
  `customer_name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `check_in` time NOT NULL,
  `check_out` time NOT NULL,
  `package_type` varchar(255) NOT NULL,
  `event_theme` varchar(255) NOT NULL,
  `event_start` time NOT NULL,
  `reservation_date` date NOT NULL,
  `status` enum('approved','rejected','pending') NOT NULL DEFAULT 'pending',
  `num_people` int(11) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `reservation_type` varchar(50) NOT NULL,
  `celebrant_name` varchar(255) DEFAULT NULL,
  `event_type` varchar(255) NOT NULL,
  `mirror_date` date DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `event_bookings`
--

INSERT INTO `event_bookings` (`id`, `customer_name`, `email`, `check_in`, `check_out`, `package_type`, `event_theme`, `event_start`, `reservation_date`, `status`, `num_people`, `created_at`, `reservation_type`, `celebrant_name`, `event_type`, `mirror_date`) VALUES
(25, 'Adrianne Cabrera dasd asd', 'adriannegatmaitan03@gmail.com', '00:00:00', '00:00:00', 'axasd', 'dqwd', '06:26:12', '2025-03-20', 'approved', 31, '2025-03-19 05:26:12', 'dsad', 'asdw', 'csa', NULL);

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `price` int(11) NOT NULL,
  `option_type` varchar(255) NOT NULL,
  `main_course` varchar(255) NOT NULL,
  `total_price` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `name`, `price`, `option_type`, `main_course`, `total_price`) VALUES
(1, 'jake lans quintans', 6000, 'event', 'pork', 8000),
(2, 'jake lans quintans', 6000, 'event', 'pork', 8000),
(3, 'adrianne', 3000, 'event', 'pork', 5000),
(4, 'adrianne', 3000, 'event', 'pork', 5000),
(5, 'angeliza chua', 20000, 'villa', 'pork', 21000);

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

--
-- Table structure for table `order_addons`
--

CREATE TABLE `order_addons` (
  `id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `addon_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_addons`
--

INSERT INTO `order_addons` (`id`, `order_id`, `addon_id`) VALUES
(2, 1, 3),
(4, 2, 3),
(6, 3, 3),
(8, 4, 3),
(9, 5, 3);

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

--
-- Table structure for table `quantity_pricing`
--

CREATE TABLE `quantity_pricing` (
  `id` int(11) NOT NULL,
  `range_1_10` int(11) NOT NULL,
  `range_11_20` int(11) NOT NULL,
  `range_21_30` int(11) NOT NULL,
  `range_31_40` int(11) NOT NULL,
  `range_41_above` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `quantity_pricing`
--

INSERT INTO `quantity_pricing` (`id`, `range_1_10`, `range_11_20`, `range_21_30`, `range_31_40`, `range_41_above`) VALUES
(1, 3000, 6000, 9000, 12000, 20000);

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

--
-- Table structure for table `receipts`
--

CREATE TABLE `receipts` (
  `id` int(11) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `payment_method` varchar(50) NOT NULL,
  `status` enum('Pending','Approved','Rejected') DEFAULT 'Pending',
  `uploaded_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `email` varchar(255) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `receipts`
--

INSERT INTO `receipts` (`id`, `filename`, `payment_method`, `status`, `uploaded_at`, `email`) VALUES
(1, 'bpi.jpg', 'BPI', 'Pending', '2025-03-21 13:43:42', '');

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

--
-- Table structure for table `static_images`
--

CREATE TABLE `static_images` (
  `id` int(11) NOT NULL,
  `image_name` varchar(255) NOT NULL,
  `slot` int(11) NOT NULL CHECK (`slot` between 1 and 4),
  `uploaded_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `static_images`
--

INSERT INTO `static_images` (`id`, `image_name`, `slot`, `uploaded_at`) VALUES
(8, 'event1.jpg', 1, '2025-03-18 10:14:46'),
(9, 'event2.jpg', 2, '2025-03-18 10:15:12'),
(10, 'villa1.jpg', 3, '2025-03-18 10:16:16'),
(11, 'rules.jpg', 4, '2025-03-18 10:16:28');

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

--
-- Table structure for table `villa_bookings`
--

CREATE TABLE `villa_bookings` (
  `id` int(11) NOT NULL,
  `full_name` varchar(100) NOT NULL,
  `email` varchar(255) NOT NULL,
  `check_in` time NOT NULL,
  `check_out` time NOT NULL,
  `package` varchar(100) DEFAULT NULL,
  `event_theme` varchar(100) DEFAULT NULL,
  `event_start` time DEFAULT NULL,
  `reservation_date` date NOT NULL,
  `event_type` varchar(50) NOT NULL DEFAULT 'Villa',
  `created_at` timestamp NOT NULL DEFAULT current_timestamp(),
  `status` enum('Pending','Approved','Rejected') DEFAULT 'Pending',
  `num_people1` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `villa_bookings`
--

INSERT INTO `villa_bookings` (`id`, `full_name`, `email`, `check_in`, `check_out`, `package`, `event_theme`, `event_start`, `reservation_date`, `event_type`, `created_at`, `status`, `num_people1`) VALUES
(25, 'Gatmaitan Jr., Adrianne Cabrera', 'adrianne_gatmaitan@aura.edu.ph', '14:13:00', '12:31:00', 'asda', 'dwwqd', NULL, '2025-03-26', 'Villa', '2025-03-19 05:28:29', 'Approved', 21);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `about_us`
--
ALTER TABLE `about_us`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `addons`
--
ALTER TABLE `addons`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `carousel_images`
--
ALTER TABLE `carousel_images`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `event_bookings`
--
ALTER TABLE `event_bookings`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `order_addons`
--
ALTER TABLE `order_addons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `order_id` (`order_id`),
  ADD KEY `addon_id` (`addon_id`);

--
-- Indexes for table `quantity_pricing`
--
ALTER TABLE `quantity_pricing`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `receipts`
--
ALTER TABLE `receipts`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `static_images`
--
ALTER TABLE `static_images`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `slot` (`slot`);

--
-- Indexes for table `villa_bookings`
--
ALTER TABLE `villa_bookings`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_date` (`reservation_date`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `about_us`
--
ALTER TABLE `about_us`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

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

--
-- AUTO_INCREMENT for table `carousel_images`
--
ALTER TABLE `carousel_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=37;

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

--
-- AUTO_INCREMENT for table `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

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

--
-- AUTO_INCREMENT for table `quantity_pricing`
--
ALTER TABLE `quantity_pricing`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `receipts`
--
ALTER TABLE `receipts`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `static_images`
--
ALTER TABLE `static_images`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `order_addons`
--
ALTER TABLE `order_addons`
  ADD CONSTRAINT `order_addons_ibfk_1` FOREIGN KEY (`order_id`) REFERENCES `orders` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `order_addons_ibfk_2` FOREIGN KEY (`addon_id`) REFERENCES `addons` (`id`) ON DELETE CASCADE;
COMMIT;

