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

START TRANSACTION;



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

--
-- Table structure for table `chapters`
--

CREATE TABLE `chapters` (
  `id` varchar(10) DEFAULT NULL,
  `title` varchar(10) DEFAULT NULL,
  `content` varchar(10) DEFAULT NULL,
  `trainingId` varchar(10) DEFAULT NULL,
  `videoPath` varchar(10) DEFAULT NULL,
  `createdAt` varchar(10) DEFAULT NULL,
  `updatedAt` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

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

--
-- Table structure for table `feedback`
--

CREATE TABLE `feedback` (
  `id` int NOT NULL,
  `rating` varchar(200) NOT NULL,
  `description` varchar(500) NOT NULL,
  `userId` int NOT NULL,
  `createdAt` timestamp NOT NULL,
  `updatedAt` timestamp NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

--
-- Dumping data for table `feedback`
--

INSERT INTO `feedback` (`id`, `rating`, `description`, `userId`, `createdAt`, `updatedAt`) VALUES
(1, '3', 'hi', 27, '2024-08-31 11:32:23', '2024-08-31 11:32:23'),
(2, '2', 'hi', 27, '2024-08-31 11:42:45', '2024-08-31 11:42:45'),
(3, '4', 'hi', 27, '2024-08-31 11:44:03', '2024-08-31 11:44:03'),
(4, '4', 'sample', 18, '2024-08-31 12:24:37', '2024-08-31 12:24:37'),
(5, '5', 'sak', 16, '2024-09-01 14:49:05', '2024-09-01 14:49:05');

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

--
-- Table structure for table `resources`
--

CREATE TABLE `resources` (
  `id` int NOT NULL,
  `name` varchar(25) DEFAULT NULL,
  `content` varchar(43) DEFAULT NULL,
  `type` varchar(8) DEFAULT NULL,
  `path` varchar(200) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `createdAt` varchar(19) DEFAULT NULL,
  `updatedAt` varchar(19) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `resources`
--

INSERT INTO `resources` (`id`, `name`, `content`, `type`, `path`, `createdAt`, `updatedAt`) VALUES
(6, 'EDII_TN Research Studies ', 'MSME Enterprises in Tamil Nadu Report - 201', 'Ebooks', 'ebooks/ebooka.pdf', '2024-09-02 00:15:07', NULL),
(7, 'EDII_TN Research Studies ', 'MSME Enterprises in Tamil Nadu Report - 201', 'Ebooks', 'ebooks/ebookb.pdf', '2024-09-02 00:16:13', NULL);

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

--
-- Table structure for table `trainings`
--

CREATE TABLE `trainings` (
  `id` int NOT NULL,
  `title` varchar(28) DEFAULT NULL,
  `description` varchar(240) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci DEFAULT NULL,
  `code` varchar(7) DEFAULT NULL,
  `isCourse` int DEFAULT NULL,
  `mode` varchar(6) DEFAULT NULL,
  `rating` varchar(10) DEFAULT NULL,
  `start_date` varchar(19) DEFAULT NULL,
  `end_date` varchar(19) DEFAULT NULL,
  `fee_amount` int DEFAULT NULL,
  `is_fullTime` int DEFAULT NULL,
  `location` varchar(10) DEFAULT NULL,
  `mentorId` varchar(10) DEFAULT NULL,
  `createdAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `trainings`
--

INSERT INTO `trainings` (`id`, `title`, `description`, `code`, `isCourse`, `mode`, `rating`, `start_date`, `end_date`, `fee_amount`, `is_fullTime`, `location`, `mentorId`, `createdAt`, `updatedAt`) VALUES
(1, 'Gold Appraiser Training', 'Resitor is the process of promoting, selling, and distributing a product or service.', 'RT-102', 1, 'online', '', '', '', 700, 0, 'Coimbatore', '1', '2024-09-01 19:40:35', '2024-09-01 19:40:35'),
(3, 'Basic Photography', 'Marketing is the process of promoting, selling, and distributing a product or service.', 'PT-0091', 1, 'online', '', '2024-07-01', '2024-07-31', 0, 0, 'Chennai', '1', '2024-09-01 19:44:23', '2024-09-01 19:44:23'),
(4, 'Herbal Cosmetics Products', 'Gold Training is the process of promoting, selling, and distributing a product or service.', 'GT-103', 1, 'online', '', '', '', 0, 0, 'Chennai', '3', '2024-09-01 19:42:33', '2024-09-01 19:42:33'),
(5, 'Industrial Chemical Products', 'Digital Marketing is the process of promoting, selling, and distributing a product or service.', 'MT-110', 1, 'online', '', '', '', 400, 0, 'Chennai', '3', '2024-09-01 19:41:09', '2024-09-01 19:41:09'),
(6, 'One Year Certificate Program', 'Entrepreneurship Development and Innovation Institute (EDII-TN) and Entrepreneurship Development Institute of India (EDII) are jointly dedicated in providing a transformative One Year Certificate Programme on Entrepreneurship and Innovation', 'PG09-01', 1, 'offlin', '', '', '', 80000, 1, 'Chennai', '1', '2024-09-01 22:29:04', '2024-09-01 22:29:04'),
(8, 'Youtube Channel Training', 'The YouTube Masterclass is a fast and effective course that takes you from zero skills to a complete YouTube channel with high quality videos, views, and subscribers.\r\n\r\nWhile there are plenty of YouTube courses that focus on specific aspec', 'YT101', 1, 'online', NULL, '2024-07-28', '2024-07-30', 1500, 1, 'Chennai', '1', '2024-09-01 19:39:28', '2024-09-01 19:39:28');

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

--
-- Table structure for table `userCourses`
--

CREATE TABLE `userCourses` (
  `id` int NOT NULL,
  `userId` int DEFAULT NULL,
  `trainingId` int DEFAULT NULL,
  `is_course_completed` int DEFAULT NULL,
  `is_certificate_generated` int DEFAULT NULL,
  `certificate_path` varchar(10) DEFAULT NULL,
  `is_payment_done` int DEFAULT NULL,
  `payment_id` varchar(10) DEFAULT NULL,
  `createdAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `updatedAt` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3;

--
-- Dumping data for table `userCourses`
--

INSERT INTO `userCourses` (`id`, `userId`, `trainingId`, `is_course_completed`, `is_certificate_generated`, `certificate_path`, `is_payment_done`, `payment_id`, `createdAt`, `updatedAt`) VALUES
(1, 16, 4, 0, 0, '', 0, '', '2024-08-02 04:06:40', '2024-08-02 04:06:40'),
(2, 16, 4, 0, 0, '', 0, '', '2024-08-02 04:06:49', '2024-08-02 04:06:49'),
(3, 5, 6, 0, 0, '', 0, '', '2024-07-01 12:53:28', '2024-07-01 12:53:28'),
(4, 16, 6, 0, 0, '', 0, '', '2024-08-02 04:06:53', '2024-08-02 04:06:53'),
(5, 16, 6, 0, 0, '', 0, '', '2024-08-02 04:06:57', '2024-08-02 04:06:57');

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `trainings`
--
ALTER TABLE `trainings`
  MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=22;

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

