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

START TRANSACTION;

--
-- Database: `bdbooking`
--

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

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

CREATE TABLE `bookings` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `booking_date` date NOT NULL,
  `booking_time` time NOT NULL,
  `client_name` varchar(255) DEFAULT NULL,
  `client_email` varchar(255) DEFAULT NULL,
  `guest_email` varchar(255) NOT NULL,
  `status` enum('pending','confirmed','cancelled') DEFAULT 'pending',
  `booking_link` tinytext CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci,
  `note` longtext NOT NULL,
  `event_id` text NOT NULL,
  `created_at` datetime DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

INSERT INTO `bookings` (`id`, `user_id`, `booking_date`, `booking_time`, `client_name`, `client_email`, `guest_email`, `status`, `booking_link`, `note`, `event_id`, `created_at`) VALUES
(1, 5, '2025-03-28', '11:00:00', 'adsf', 'nasiruddinsaikh2015@gmail.com', '', 'pending', '6e1ddd03ea240245', '', '6cpi1cjmkg2buruk8ep5lueikk', '2025-03-15 23:13:12'),
(2, 5, '2025-03-21', '13:00:00', 'adsf', 'nsaikh98@gmail.com', '', 'pending', '402bac2fe2e1297c', '', '5ha5kkv0u00apbe24n9vdau1ho', '2025-03-21 01:17:37'),
(3, 5, '2025-04-13', '13:00:00', 'Imani Richard', 'jeve@vynex.org', '', 'pending', '36afc35e86a95af9', '', '4o1cccb6ullliolaribgenralg', '2025-04-13 01:58:56'),
(4, 5, '2025-04-13', '11:00:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', '72ccc2e88d300e54', '', 'jb0ccc215335i5lduvbr0icuog', '2025-04-13 04:20:23'),
(5, 5, '2025-04-13', '11:30:00', 'Test booking 1', 'nsaikh98@gmail.com', 'testh3llo@gmail.com', 'pending', '3941fc514dc36cc3', '', 'fjlsq014r6bu017upvio48fpfo', '2025-04-13 04:28:37'),
(6, 5, '2025-04-13', '11:30:00', 'Test booking 1', 'nsaikh98@gmail.com', 'testh3llo@gmail.com', 'pending', 'b007bc21c8e3e5b0', '', 'i6h5vbqmgs12d8r27p0idrneno', '2025-04-13 04:34:00'),
(7, 5, '2025-04-13', '12:00:00', 'Test booking 2', 'nsaikh98@gmail.com', 'testh3llo@gmail.com', 'pending', '4db36b248f36be61', '', 'drvduvo1kk20u4kmvivvlnfi0s', '2025-04-13 04:39:00'),
(8, 5, '2025-04-13', '12:00:00', 'Test booking 2', 'nsaikh98@gmail.com', 'testh3llo@gmail.com', 'pending', '21d3e824e2f1395f', '', 't6h20tiifg4r9j7qf9p2mn876c', '2025-04-13 04:40:34'),
(9, 5, '2025-04-13', '11:30:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', '', 'pending', 'fffb41e213a0db11', '', 'o1sthqtlo59gr7c1thf1nftbro', '2025-04-13 17:09:51'),
(10, 5, '2025-04-13', '16:30:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', 'd3bc9a9f7064a06d', '', 'j1g3aedaapuanp187ndhudihls', '2025-04-13 17:13:37'),
(11, 5, '2025-04-13', '13:00:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', 'c3987c97756be85e', '', 'gc1e8bci0ucd0dhi0sgi7ntaoo', '2025-04-13 17:31:38'),
(12, 5, '2025-04-13', '13:00:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', 'ffc6e5255f110141', 'hello, \nthis is a test note', 'io9ej5p1jrd9vokn8l9g8aj0v4', '2025-04-13 17:38:12'),
(13, 5, '2025-04-13', '10:00:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', '24024cf1b7ad40bd', 'Hello,\nthis is a sample message', '8be27n0cmb3iipq6v4bd5ul65c', '2025-04-13 17:44:41'),
(14, 5, '2025-04-13', '10:30:00', 'Imani Richard', 'nasiruddinsaikh2015@gmail.com', 'nasiruddinsaikh2015@gmail.com', 'pending', 'e4a25a5f5730d3cb', 'hello,\nthis is test with multiple lines\nthis is test with multiple lines', 'li167cepafcr9k6ssb8qs2u5i0', '2025-04-13 17:47:13');

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

--
-- Table structure for table `booking_settings`
--

CREATE TABLE `booking_settings` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `calendar_title` varchar(255) DEFAULT 'Book an Appointment',
  `calendar_description` text,
  `event_duration` int DEFAULT '30' COMMENT 'Duration in minutes',
  `buffer_time` int DEFAULT '0' COMMENT 'Buffer time in minutes',
  `minimum_notice` int DEFAULT '0' COMMENT 'Minimum notice in hours',
  `daily_limit` int DEFAULT '0' COMMENT 'Maximum bookings per day, 0 for unlimited',
  `timezone` varchar(50) DEFAULT 'UTC',
  `work_start_time` time DEFAULT '09:00:00',
  `work_end_time` time DEFAULT '17:00:00',
  `notification_email` varchar(255) DEFAULT NULL,
  `notification_sms` varchar(20) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `booking_settings`
--

INSERT INTO `booking_settings` (`id`, `user_id`, `calendar_title`, `calendar_description`, `event_duration`, `buffer_time`, `minimum_notice`, `daily_limit`, `timezone`, `work_start_time`, `work_end_time`, `notification_email`, `notification_sms`, `created_at`, `updated_at`) VALUES
(1, 24, 'Book an Appointment1', 'Hello,\nWelcome to my calendar', 30, 5, 2, 4, 'UTC', '09:00:00', '17:00:00', '0', '', '2025-04-13 16:00:04', '2025-04-13 16:04:38');

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

--
-- Table structure for table `holidays`
--

CREATE TABLE `holidays` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `holiday_date` date NOT NULL,
  `holiday_name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `holidays`
--

INSERT INTO `holidays` (`id`, `user_id`, `holiday_date`, `holiday_name`, `created_at`, `updated_at`) VALUES
(2, 24, '2025-04-18', 'Birthday Baby', '2025-04-13 16:13:38', '2025-04-13 16:13:38');

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

--
-- Table structure for table `team_participants`
--

CREATE TABLE `team_participants` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `participant_name` varchar(255) NOT NULL,
  `participant_email` varchar(255) NOT NULL,
  `is_active` tinyint(1) DEFAULT '1',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `team_participants`
--

INSERT INTO `team_participants` (`id`, `user_id`, `participant_name`, `participant_email`, `is_active`, `created_at`, `updated_at`) VALUES
(1, 24, 'Priyanka', 'priyanka.kadali93@gmail.com', 1, '2025-04-13 16:13:38', '2025-04-13 16:13:38');

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

--
-- Table structure for table `working_hours`
--

CREATE TABLE `working_hours` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `day_of_week` tinyint(1) NOT NULL COMMENT '0-6 for Sunday-Saturday',
  `is_working` tinyint(1) DEFAULT '1',
  `start_time` time DEFAULT NULL,
  `end_time` time DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `working_hours`
--

INSERT INTO `working_hours` (`id`, `user_id`, `day_of_week`, `is_working`, `start_time`, `end_time`, `created_at`, `updated_at`) VALUES
(1, 24, 0, 1, '08:00:00', '12:00:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(2, 24, 1, 0, '09:00:00', '17:00:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(3, 24, 2, 1, '09:00:00', '13:00:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(4, 24, 3, 1, '10:00:00', '14:00:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(5, 24, 4, 1, '11:00:00', '15:10:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(6, 24, 5, 1, '12:00:00', '16:21:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38'),
(7, 24, 6, 1, '13:00:00', '17:51:00', '2025-04-13 16:00:04', '2025-04-13 16:04:38');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `bookings`
--
ALTER TABLE `bookings`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

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

--
-- Indexes for table `holidays`
--
ALTER TABLE `holidays`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_holiday` (`user_id`,`holiday_date`);

--
-- Indexes for table `team_participants`
--
ALTER TABLE `team_participants`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

--
-- Indexes for table `working_hours`
--
ALTER TABLE `working_hours`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `user_day` (`user_id`,`day_of_week`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `bookings`
--
ALTER TABLE `bookings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

--
-- AUTO_INCREMENT for table `booking_settings`
--
ALTER TABLE `booking_settings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `holidays`
--
ALTER TABLE `holidays`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `team_participants`
--
ALTER TABLE `team_participants`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `working_hours`
--
ALTER TABLE `working_hours`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=50;
COMMIT;
