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

START TRANSACTION;



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

--
-- Table structure for table `categories`
--

CREATE TABLE `categories` (
  `id` int NOT NULL,
  `category_name` varchar(255) NOT NULL,
  `category_icon` varchar(255) 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 `categories`
--

INSERT INTO `categories` (`id`, `category_name`, `category_icon`, `created_at`, `updated_at`) VALUES
(1, 'Mathematics', 'uploads/category/image_2024-08-15_111802097.png', '2024-08-06 09:25:12', '2024-08-30 11:05:57'),
(2, 'Chapter wise', 'uploads/category/image_2024-08-15_111856503.png', '2024-08-06 09:25:12', '2025-01-03 15:21:59');

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

--
-- Table structure for table `contact`
--

CREATE TABLE `contact` (
  `id` int NOT NULL,
  `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `email` varchar(255) NOT NULL,
  `phone` varchar(40) NOT NULL,
  `website` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `subject` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
  `message` text NOT NULL,
  `create_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `contact`
--

INSERT INTO `contact` (`id`, `name`, `email`, `phone`, `website`, `subject`, `message`, `create_at`) VALUES
(22, 'Aditya', 'admin@gmail.com', '1234567890', NULL, NULL, 'Testing', '2024-04-19 14:13:39');

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

--
-- Table structure for table `coupons`
--

CREATE TABLE `coupons` (
  `id` int NOT NULL,
  `course_id` int NOT NULL,
  `coupon_code` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `coupons`
--

INSERT INTO `coupons` (`id`, `course_id`, `coupon_code`) VALUES
(2, 1, 'RFC322');

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

--
-- Table structure for table `courses`
--

CREATE TABLE `courses` (
  `id` int NOT NULL,
  `title` varchar(255) NOT NULL,
  `description` text,
  `duration` varchar(50) DEFAULT NULL,
  `price` decimal(10,2) DEFAULT NULL,
  `category_id` int DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `course_image` varchar(255) DEFAULT NULL,
  `curriculum` text,
  `instructor` varchar(255) DEFAULT NULL,
  `featured` tinyint(1) DEFAULT '0',
  `popular` tinyint DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `courses`
--

INSERT INTO `courses` (`id`, `title`, `description`, `duration`, `price`, `category_id`, `created_at`, `updated_at`, `course_image`, `curriculum`, `instructor`, `featured`, `popular`) VALUES
(1, 'Introduction to Web Development', '<p>Learn the basics of web development including HTML, CSS, and JavaScript.</p>', '6 weeks', 199.99, 1, '2024-08-06 09:40:11', '2024-11-08 06:45:28', '66b1f1ec05b3f6.29131213.png', '<p>Learn the basics of web development including HTML, CSS, and JavaScript.<br></p>', 'Sunil Sir', 0, 1),
(2, 'Advanced Data Science', 'Deep dive into data science with advanced techniques and tools.', '8 weeks', 299.99, 2, '2024-08-06 09:40:11', '2024-08-30 10:56:29', '66b1f1ec05b3f6.29131213.png', NULL, NULL, 1, 0),
(7, 'Advanced Data Science 2', 'Deep dive into data science with advanced techniques and tools.', '8 weeks', 299.99, 2, '2024-08-06 09:40:11', '2024-11-08 06:47:02', '66b1f1ec05b3f6.29131213.png', NULL, NULL, 1, 1),
(10, '10+2 math chapter 1', '<p>chapter 1 relation and function</p>', '2', 99.00, 2, '2024-12-27 13:41:05', '2024-12-27 13:41:05', '676eae71472ba4.14902327.jpg', '<p>Complete math</p>', 'Msbs', 1, 1),
(11, 'The founder in hindi', '<p><br></p><table class=\"table table-bordered\"><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table><p>The founder in hindi motivational</p>', '2.55 hour', 9.00, 2, '2025-01-04 05:08:49', '2025-01-04 05:08:49', '6778c261826df7.31543080.jpg', '<p>Motivational video<a href=\"http://The founder in hindi\" target=\"_blank\">The founder in hindi</a></p>', 'Msbs', 1, 1),
(12, 'Song', '<p>All song</p>', '2', 20.00, 1, '2025-01-17 11:39:02', '2025-01-17 11:39:02', '678a41567d1b33.93594975.jpg', '<p>Song</p>', 'Msbs', 1, 1),
(13, 'Song', '<p>All song</p>', '2', 20.00, 1, '2025-01-17 11:39:22', '2025-01-17 11:39:22', '678a416ab79a09.35727470.jpg', '<p>Song</p>', 'Msbs', 1, 1);

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

--
-- Table structure for table `course_ratings`
--

CREATE TABLE `course_ratings` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `course_id` int NOT NULL,
  `rating` tinyint(1) NOT NULL,
  `rated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ;

--
-- Dumping data for table `course_ratings`
--

INSERT INTO `course_ratings` (`id`, `user_id`, `course_id`, `rating`, `rated_at`) VALUES
(1, 34, 1, 4, '2024-09-21 13:05:33'),
(2, 35, 1, 2, '2024-09-14 12:04:08'),
(3, 36, 2, 4, '2024-09-21 13:49:26'),
(4, 37, 2, 5, '2024-10-11 10:29:56'),
(5, 34, 2, 5, '2024-10-10 10:02:38'),
(6, 38, 7, 4, '2024-11-06 19:32:06'),
(7, 38, 2, 5, '2024-11-06 20:25:33'),
(8, 40, 7, 5, '2024-11-07 06:18:02'),
(9, 37, 1, 5, '2024-12-30 09:57:46'),
(10, 37, 10, 5, '2025-01-20 11:21:14');

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

--
-- Table structure for table `course_videos`
--

CREATE TABLE `course_videos` (
  `id` int NOT NULL,
  `course_id` int DEFAULT NULL,
  `video_file_name` varchar(255) DEFAULT NULL,
  `video_title` varchar(255) DEFAULT NULL,
  `video_description` text,
  `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 `course_videos`
--

INSERT INTO `course_videos` (`id`, `course_id`, `video_file_name`, `video_title`, `video_description`, `created_at`, `updated_at`) VALUES
(2, 1, 'video_preview_h264.mp4', 'HTML & CSS Basics', 'A detailed video on HTML and CSS basics.', '2024-08-06 09:47:25', '2024-09-02 10:26:17'),
(3, 2, 'video_preview_h264.mp4', 'Data Analysis Techniques', 'Video covering various data analysis techniques.j', '2024-08-06 09:47:25', '2024-08-06 10:21:30'),
(7, 1, 'video_preview_h264.mp4', 'COding', 'A detailed video on HTML and CSS basics.', '2024-08-06 10:10:45', '2024-09-03 10:49:04'),
(9, 1, '1000139417.mp4', 'Motivational video', 'Sandeep maheswari motivational video', '2025-01-03 15:23:58', '2025-01-03 15:23:58');

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

--
-- Table structure for table `live_classes`
--

CREATE TABLE `live_classes` (
  `id` int NOT NULL,
  `course_id` int DEFAULT NULL,
  `instructor` varchar(255) DEFAULT NULL,
  `class_title` varchar(255) DEFAULT NULL,
  `software_name` varchar(100) DEFAULT NULL,
  `user_id` int DEFAULT NULL,
  `class_description` text,
  `start_time` datetime DEFAULT NULL,
  `end_time` datetime DEFAULT NULL,
  `meeting_link` varchar(255) DEFAULT NULL,
  `price` decimal(10,0) DEFAULT '0',
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `status` enum('waiting for response','payment pending','class scheduled') NOT NULL DEFAULT 'waiting for response'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `live_classes`
--

INSERT INTO `live_classes` (`id`, `course_id`, `instructor`, `class_title`, `software_name`, `user_id`, `class_description`, `start_time`, `end_time`, `meeting_link`, `price`, `created_at`, `updated_at`, `status`) VALUES
(14, 1, NULL, 'Frontend Live Class', 'Meet', 6, 'This is Frontend Live Class ', '2024-09-10 15:05:45', '2024-09-10 17:05:54', 'https://meet.google.com/rub-tnqa-nvx', 299, '2024-09-09 11:41:55', '2024-09-10 09:39:45', 'class scheduled'),
(15, 1, NULL, 'Backedn Live Class', 'Meet', 7, 'This is Backedn Live Class', '2024-09-10 15:05:45', '2024-09-10 17:05:54', 'https://meet.google.com/rub-tnqa-nvx', 399, '2024-09-09 11:42:45', '2024-09-10 09:39:52', 'waiting for response'),
(16, 1, NULL, 'Javascript Live Class', 'Meet', 8, 'This is Javascript Live Class', '2024-09-10 15:05:45', '2024-09-10 17:05:54', 'https://meet.google.com/rub-tnqa-nvx', 499, '2024-09-09 11:42:56', '2024-09-10 09:40:08', 'payment pending'),
(40, 1, 'Mahendra Sir', 'asda', NULL, 40, 'asdsa', '1970-01-01 00:00:00', '1970-01-01 00:00:00', 'https://meet.google.com/ved-bmak-aeo', 299, '2024-11-08 05:38:56', '2024-11-08 05:39:59', 'class scheduled'),
(44, 1, 'ABCD', 'ABDCD', NULL, 39, 'sdjksw', '1970-01-01 00:00:00', '1970-01-01 00:00:00', 'https://meet.google.com/esd-sfzp-qeh', 1000, '2024-12-18 08:27:40', '2024-12-18 08:46:19', 'class scheduled'),
(45, 1, NULL, NULL, NULL, 39, NULL, NULL, NULL, NULL, 2000, '2024-12-18 08:28:02', '2024-12-18 12:37:24', 'class scheduled'),
(46, 1, NULL, NULL, NULL, 39, NULL, NULL, NULL, NULL, 0, '2024-12-18 10:40:07', '2024-12-18 10:40:07', 'waiting for response'),
(47, 1, NULL, NULL, NULL, 39, NULL, NULL, NULL, NULL, 0, '2024-12-18 11:08:16', '2024-12-18 11:08:16', 'waiting for response'),
(48, 1, NULL, NULL, NULL, 37, NULL, NULL, NULL, NULL, 0, '2024-12-30 10:02:42', '2024-12-30 10:02:42', 'waiting for response'),
(49, 10, 'Msbs', '12', NULL, NULL, 'Class will be start', '2025-01-14 19:47:00', '2025-01-14 19:49:00', '', 0, '2025-01-14 14:13:41', '2025-01-14 14:13:41', 'waiting for response'),
(50, 10, NULL, NULL, NULL, 37, NULL, NULL, NULL, NULL, 0, '2025-01-14 14:14:13', '2025-01-14 14:14:13', 'waiting for response'),
(51, 10, NULL, NULL, NULL, 37, NULL, NULL, NULL, NULL, 0, '2025-01-14 14:14:22', '2025-01-14 14:14:22', 'waiting for response'),
(52, 10, NULL, NULL, NULL, 37, NULL, NULL, NULL, NULL, 0, '2025-01-14 14:15:16', '2025-01-14 14:15:16', 'waiting for response'),
(53, 10, 'Msbs', '12', NULL, NULL, 'Class will be start', '2025-01-14 19:47:00', '2025-01-14 19:49:00', '', 0, '2025-01-14 14:15:58', '2025-01-14 14:15:58', 'waiting for response'),
(54, 1, NULL, NULL, NULL, 40, NULL, NULL, NULL, NULL, 0, '2025-02-15 09:40:13', '2025-02-15 09:40:13', 'waiting for response'),
(55, 1, NULL, NULL, NULL, 40, NULL, NULL, NULL, NULL, 0, '2025-11-17 11:02:03', '2025-11-17 11:02:03', 'waiting for response');

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

--
-- Table structure for table `messages`
--

CREATE TABLE `messages` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `message` text NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `messages`
--

INSERT INTO `messages` (`id`, `user_id`, `message`, `created_at`) VALUES
(1, 34, 'Hello, world!', '2025-01-06 09:09:28'),
(2, 34, 'Hello, world!', '2025-01-14 09:08:59'),
(3, 34, 'Hello, world!', '2025-01-25 11:49:44'),
(4, 34, 'Hello, world!', '2025-01-25 11:53:42'),
(5, 34, 'Hello, world!', '2025-01-25 11:54:01');

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

--
-- Table structure for table `my_course`
--

CREATE TABLE `my_course` (
  `id` int NOT NULL,
  `cost` decimal(10,2) NOT NULL,
  `phone` varchar(15) NOT NULL,
  `course_id` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `my_course`
--

INSERT INTO `my_course` (`id`, `cost`, `phone`, `course_id`) VALUES
(1, 159.44, '92756540310', 1),
(2, 159.44, '9876543210', 2),
(3, 159.44, '9876543210', 1),
(4, 159.44, '9876543210', 1),
(5, 299.00, '8127902535', 2),
(6, 299.99, '8127902535', 2),
(7, 199.99, '8127902535', 1),
(8, 199.99, '8127902535', 1),
(9, 299.99, '9876543210', 2),
(10, 299.99, '1236547890', 2),
(11, 299.99, '', 2),
(12, 299.99, '', 2),
(13, 159.44, '92756540310', 1),
(14, 60.00, '92756140310', 2),
(15, 159.44, '92756540310', 1),
(16, 60.00, '8127902534', 2),
(17, 299.99, '8127902534', 7),
(18, 299.99, '92756540310', 2),
(20, 299.99, '92756540310', 7),
(21, 199.99, '8127902534', 1),
(22, 299.99, '1236547890', 7),
(23, 299.99, '7420811467', 7),
(24, 299.99, '7420811467', 2),
(25, 99.00, '8127902534', 10),
(26, 99.00, '8127902534', 10),
(27, 9.00, '8127902534', 11),
(28, 159.44, '92756540310', 1),
(29, 159.44, '92756540310', 13),
(30, 159.44, '92756540310', 13),
(31, 159.44, '92756540310', 13),
(32, 159.44, '92756540310', 13),
(33, 159.44, '92756540310', 13),
(34, 159.44, '92756540310', 13);

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

--
-- Table structure for table `my_liveclass`
--

CREATE TABLE `my_liveclass` (
  `id` int NOT NULL,
  `phone` varchar(20) NOT NULL,
  `liveclass_id` int NOT NULL,
  `cost` int 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 `my_liveclass`
--

INSERT INTO `my_liveclass` (`id`, `phone`, `liveclass_id`, `cost`, `created_at`, `updated_at`) VALUES
(1, '9876543210', 14, 399, '2024-09-10 09:54:47', '2024-09-10 09:54:47'),
(3, '9876643210', 14, 399, '2024-09-10 09:54:47', '2024-09-10 09:54:47'),
(4, '9876543210', 15, 399, '2024-09-10 09:54:47', '2024-09-10 09:54:47'),
(5, '9876543210', 14, 399, '2024-09-11 04:06:42', '2024-09-11 04:06:42'),
(6, '9876543210', 14, 399, '2024-11-08 05:25:04', '2024-11-08 05:25:04'),
(8, '7420811467', 38, 399, '2024-11-08 05:29:52', '2024-11-08 05:29:52'),
(9, '7420811467', 40, 299, '2024-11-08 05:39:45', '2024-11-08 05:39:45'),
(10, '7420811467', 43, 299, '2024-11-08 06:04:58', '2024-11-08 06:04:58'),
(11, '8127902534', 44, 1000, '2024-12-18 08:45:33', '2024-12-18 08:45:33'),
(12, '8127902535', 45, 2000, '2024-12-18 12:37:24', '2024-12-18 12:37:24'),
(13, '8127902535', 45, 2000, '2024-12-18 12:37:31', '2024-12-18 12:37:31');

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

--
-- Table structure for table `order_details`
--

CREATE TABLE `order_details` (
  `id` int NOT NULL,
  `order_id` varchar(50) NOT NULL,
  `phone` varchar(15) NOT NULL,
  `course_id` int NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `payment_status` enum('pending','completed','failed') NOT NULL DEFAULT 'pending',
  `payment_method` varchar(50) 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 `order_details`
--

INSERT INTO `order_details` (`id`, `order_id`, `phone`, `course_id`, `amount`, `payment_status`, `payment_method`, `created_at`, `updated_at`) VALUES
(1, 'ORD66E2DB7AB19D7', '9876543210', 1, 499.00, 'completed', '0', '2024-09-12 12:15:54', '2024-09-12 12:19:28'),
(2, 'ORD66E2DB8EDD413', '9876543210', 2, 499.00, 'pending', '0', '2024-09-12 12:16:14', '2024-09-12 12:16:14'),
(3, 'ORD66E2DB90A5D3B', '9876543210', 2, 499.00, 'pending', '0', '2024-09-12 12:16:16', '2024-09-12 12:16:16'),
(4, 'ORD66E2DC38DC741', '9876543210', 2, 499.00, 'pending', '0', '2024-09-12 12:19:04', '2024-09-12 12:19:04'),
(5, 'ORD66E2DC5D6CF13', '9876543210', 2, 499.00, 'completed', '0', '2024-09-12 12:19:41', '2024-09-12 12:19:41'),
(6, 'ORD66E73DF0738AB', '9876543210', 2, 499.00, 'completed', '0', '2024-09-15 20:05:04', '2024-09-15 20:05:04'),
(7, 'ORD66EEB58136AEA', '9876543210', 2, 499.00, 'completed', '0', '2024-09-21 12:01:05', '2024-09-21 12:01:05'),
(8, 'ORD66EEBAA8D6652', '9876543210', 2, 499.00, 'completed', '0', '2024-09-21 12:23:04', '2024-09-21 12:23:04');

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

--
-- Table structure for table `sliders`
--

CREATE TABLE `sliders` (
  `id` int NOT NULL,
  `slider_title` varchar(255) NOT NULL,
  `slider_image` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `sliders`
--

INSERT INTO `sliders` (`id`, `slider_title`, `slider_image`, `created_at`) VALUES
(3, 'New course', 'uploads/slider/logo a plus.JPG', '2024-08-30 10:13:08'),
(4, 'New chapter 2 inverse trignometric function', 'uploads/slider/Inverse trignometric function_20250103_204836_0000.png', '2025-01-03 15:19:04');

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

--
-- Table structure for table `Transaction`
--

CREATE TABLE `Transaction` (
  `TransactionID` int NOT NULL,
  `Amount` decimal(10,2) NOT NULL,
  `Narration` varchar(255) DEFAULT NULL,
  `PayerID` int DEFAULT NULL,
  `PayerType` varchar(50) DEFAULT NULL,
  `ReferenceNo` varchar(100) DEFAULT NULL,
  `Status` varchar(50) DEFAULT NULL,
  `DatePaid` datetime DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

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

--
-- Table structure for table `user_progress`
--

CREATE TABLE `user_progress` (
  `id` int NOT NULL,
  `user_id` int NOT NULL,
  `course_id` int NOT NULL,
  `video_id` int NOT NULL,
  `completed` tinyint(1) NOT NULL DEFAULT '0',
  `progress_percentage` decimal(5,2) DEFAULT '0.00',
  `watched_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `user_progress`
--

INSERT INTO `user_progress` (`id`, `user_id`, `course_id`, `video_id`, `completed`, `progress_percentage`, `watched_at`) VALUES
(11, 34, 1, 3, 0, 0.00, '2025-02-15 05:09:55');

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

--
-- Table structure for table `wallet`
--

CREATE TABLE `wallet` (
  `id` int NOT NULL,
  `phone` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL,
  `amount` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `wallet`
--

INSERT INTO `wallet` (`id`, `phone`, `amount`, `date`) VALUES
(8, '92756140310', '120', '2024-09-21 11:58:51'),
(7, '9276243310', '13800', '2024-09-10 10:58:05'),
(9, '8127902534', '380', '2024-09-30 03:11:00');

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

--
-- Table structure for table `website_settings`
--

CREATE TABLE `website_settings` (
  `id` int NOT NULL,
  `website_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `email_sender_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `sender_email` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `maintenance_mode` tinyint(1) NOT NULL DEFAULT '0',
  `header_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `footer_code` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci,
  `upi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `website_settings`
--

INSERT INTO `website_settings` (`id`, `website_name`, `email_sender_name`, `sender_email`, `maintenance_mode`, `header_code`, `footer_code`, `upi`) VALUES
(1, 'Educated Site', 'EducatedSite@gmail.com', '12345678', 0, '<!-- Sample header code goes here -->', '<!-- Sample footer code goes here -->', 'abcd@ybl');

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

--
-- Table structure for table `withdrawal_requests`
--

CREATE TABLE `withdrawal_requests` (
  `id` int NOT NULL,
  `phone` varchar(20) NOT NULL,
  `requested_amount` decimal(10,2) NOT NULL,
  `withdrawn_amount` decimal(10,2) DEFAULT NULL,
  `remaining_amount` decimal(10,2) DEFAULT NULL,
  `status` enum('Pending','Completed','Failed') NOT NULL DEFAULT 'Pending',
  `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 `withdrawal_requests`
--

INSERT INTO `withdrawal_requests` (`id`, `phone`, `requested_amount`, `withdrawn_amount`, `remaining_amount`, `status`, `created_at`, `updated_at`) VALUES
(1, '9276243310', 1600.00, 1600.00, 18400.00, 'Completed', '2024-09-10 11:10:36', '2024-09-10 11:10:36'),
(2, '9276243310', 1600.00, 1600.00, 16800.00, 'Completed', '2024-09-11 07:16:56', '2024-09-11 07:16:56'),
(3, '9276243310', 1500.00, 1500.00, 15300.00, 'Completed', '2024-09-11 07:17:09', '2024-09-11 07:17:09'),
(4, '9276243310', 1500.00, 1500.00, 13800.00, 'Completed', '2024-09-11 07:17:14', '2024-09-11 07:17:14');

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

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

--
-- Indexes for table `coupons`
--
ALTER TABLE `coupons`
  ADD PRIMARY KEY (`id`),
  ADD KEY `course_id` (`course_id`);

--
-- Indexes for table `courses`
--
ALTER TABLE `courses`
  ADD PRIMARY KEY (`id`),
  ADD KEY `category_id` (`category_id`);

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

--
-- Indexes for table `course_videos`
--
ALTER TABLE `course_videos`
  ADD PRIMARY KEY (`id`),
  ADD KEY `course_id` (`course_id`);

--
-- Indexes for table `live_classes`
--
ALTER TABLE `live_classes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `course_id` (`course_id`);

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

--
-- Indexes for table `my_course`
--
ALTER TABLE `my_course`
  ADD PRIMARY KEY (`id`),
  ADD KEY `course_id` (`course_id`);

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

--
-- Indexes for table `order_details`
--
ALTER TABLE `order_details`
  ADD PRIMARY KEY (`id`),
  ADD KEY `course_id` (`course_id`);

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

--
-- Indexes for table `Transaction`
--
ALTER TABLE `Transaction`
  ADD PRIMARY KEY (`TransactionID`);

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

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

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

--
-- AUTO_INCREMENT for table `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `contact`
--
ALTER TABLE `contact`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

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

--
-- AUTO_INCREMENT for table `courses`
--
ALTER TABLE `courses`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `course_ratings`
--
ALTER TABLE `course_ratings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `course_videos`
--
ALTER TABLE `course_videos`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `live_classes`
--
ALTER TABLE `live_classes`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `messages`
--
ALTER TABLE `messages`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `my_course`
--
ALTER TABLE `my_course`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT for table `my_liveclass`
--
ALTER TABLE `my_liveclass`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `order_details`
--
ALTER TABLE `order_details`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT for table `sliders`
--
ALTER TABLE `sliders`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `Transaction`
--
ALTER TABLE `Transaction`
  MODIFY `TransactionID` int NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `user_progress`
--
ALTER TABLE `user_progress`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `wallet`
--
ALTER TABLE `wallet`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;

--
-- AUTO_INCREMENT for table `withdrawal_requests`
--
ALTER TABLE `withdrawal_requests`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- Constraints for dumped tables
--

--
-- Constraints for table `coupons`
--
ALTER TABLE `coupons`
  ADD CONSTRAINT `coupons_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`);

--
-- Constraints for table `courses`
--
ALTER TABLE `courses`
  ADD CONSTRAINT `courses_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`);

--
-- Constraints for table `course_videos`
--
ALTER TABLE `course_videos`
  ADD CONSTRAINT `course_videos_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `my_course`
--
ALTER TABLE `my_course`
  ADD CONSTRAINT `my_course_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `order_details`
--
ALTER TABLE `order_details`
  ADD CONSTRAINT `order_details_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`);

--
-- Constraints for table `user_progress`
--
ALTER TABLE `user_progress`
  ADD CONSTRAINT `user_progress_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `students` (`id`),
  ADD CONSTRAINT `user_progress_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `courses` (`id`),
  ADD CONSTRAINT `user_progress_ibfk_3` FOREIGN KEY (`video_id`) REFERENCES `course_videos` (`id`);
COMMIT;

