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

START TRANSACTION;



--
-- Database: `blogdb`
--

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

--
-- Table structure for table `activities`
--

CREATE TABLE `activities` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `description` varchar(1000) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `activities`
--

INSERT INTO `activities` (`id`, `user_id`, `description`, `created_at`, `updated_at`) VALUES
(1, 1, 'Action on an edited post (fgsdfsdfasfsafasfdasdfasfsdaf)', '2024-05-06 14:58:57', '2024-05-06 14:58:57'),
(2, 2, 'Created a post (What is WordPress)', '2024-08-19 08:55:02', '2024-08-19 08:55:02'),
(3, 1, 'Action on new post (What is WordPress)', '2024-08-19 08:56:48', '2024-08-19 08:56:48');

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

--
-- Table structure for table `adverts`
--

CREATE TABLE `adverts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `advert_title` varchar(255) NOT NULL,
  `body` varchar(255) NOT NULL,
  `advert_pictures` varchar(255) DEFAULT NULL,
  `company_name` varchar(255) NOT NULL,
  `company_phone` varchar(255) DEFAULT NULL,
  `company_address` varchar(255) NOT NULL,
  `company_email` varchar(255) DEFAULT NULL,
  `company_description` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `comments`
--

CREATE TABLE `comments` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` int(11) NOT NULL,
  `post_id` int(11) NOT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `comment_type` int(11) NOT NULL,
  `comment_name` int(11) DEFAULT NULL,
  `comment_body` varchar(255) NOT NULL,
  `status` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `favorites`
--

CREATE TABLE `favorites` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `likes`
--

CREATE TABLE `likes` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` varchar(255) NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `like_type` varchar(255) NOT NULL,
  `comment_id` varchar(255) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '2014_10_12_000000_create_users_table', 1),
(2, '2014_10_12_100000_create_password_reset_tokens_table', 1),
(3, '2014_10_12_100000_create_password_resets_table', 1),
(4, '2019_08_19_000000_create_failed_jobs_table', 1),
(5, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(6, '2022_01_03_031112_create_post_table', 1),
(7, '2022_01_03_032217_create_comments_table', 1),
(8, '2022_01_03_032246_create_favorites_table', 1),
(9, '2022_01_03_032346_create_likes_table', 1),
(10, '2022_01_03_032412_create_adverts_table', 1),
(11, '2023_06_10_213731_create_activities_table', 1),
(12, '2023_06_10_213915_create_page_views_table', 1),
(13, '2023_07_14_234217_create_newsletter_subscriptions_table', 1);

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

--
-- Table structure for table `newsletter_subscriptions`
--

CREATE TABLE `newsletter_subscriptions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `user_id` varchar(255) NOT NULL,
  `subscription_name` varchar(255) NOT NULL,
  `subscription_picture` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `page_views`
--

CREATE TABLE `page_views` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_id` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `page_views`
--

INSERT INTO `page_views` (`id`, `post_id`, `created_at`, `updated_at`) VALUES
(1, 3, '2024-11-18 07:11:13', '2024-11-18 07:11:13'),
(2, 3, '2024-11-18 07:13:37', '2024-11-18 07:13:37'),
(3, 3, '2024-11-18 09:48:15', '2024-11-18 09:48:15'),
(4, 3, '2024-11-18 09:49:27', '2024-11-18 09:49:27'),
(5, 3, '2024-11-18 09:54:04', '2024-11-18 09:54:04'),
(6, 3, '2024-11-18 10:31:49', '2024-11-18 10:31:49'),
(7, 3, '2024-11-18 10:32:28', '2024-11-18 10:32:28'),
(8, 3, '2024-11-18 10:36:26', '2024-11-18 10:36:26'),
(9, 3, '2024-11-18 12:09:42', '2024-11-18 12:09:42'),
(10, 3, '2024-11-18 15:53:56', '2024-11-18 15:53:56'),
(11, 3, '2024-11-18 16:05:22', '2024-11-18 16:05:22'),
(12, 3, '2024-11-18 16:05:44', '2024-11-18 16:05:44'),
(13, 3, '2024-11-18 16:20:51', '2024-11-18 16:20:51'),
(14, 3, '2024-11-18 16:21:30', '2024-11-18 16:21:30'),
(15, 3, '2024-11-18 16:21:39', '2024-11-18 16:21:39'),
(16, 3, '2024-11-18 16:22:04', '2024-11-18 16:22:04'),
(17, 3, '2024-11-18 16:23:30', '2024-11-18 16:23:30'),
(18, 3, '2024-11-18 16:24:37', '2024-11-18 16:24:37'),
(19, 3, '2024-11-18 16:24:48', '2024-11-18 16:24:48'),
(20, 3, '2024-12-22 16:28:07', '2024-12-22 16:28:07');

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

--
-- Table structure for table `posts`
--

CREATE TABLE `posts` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `post_title` varchar(255) NOT NULL,
  `featured_picture` varchar(255) NOT NULL,
  `body` longtext NOT NULL,
  `editor_id` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL,
  `status` varchar(255) DEFAULT NULL,
  `watermark` varchar(255) DEFAULT NULL,
  `approved_by` varchar(255) DEFAULT NULL,
  `approved_by_id` varchar(255) DEFAULT NULL,
  `edited_at` timestamp NULL DEFAULT NULL,
  `approved_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `posts`
--

INSERT INTO `posts` (`id`, `post_title`, `featured_picture`, `body`, `editor_id`, `category`, `status`, `watermark`, `approved_by`, `approved_by_id`, `edited_at`, `approved_at`, `created_at`, `updated_at`) VALUES
(1, 'thidfnlasfsdfasdfdffasfasfsa', 'lhie1706416695.png', '<p>adfasfasf<span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><br></p>', '2', 'Laravel', 'Pending', 'Yes', NULL, NULL, NULL, NULL, '2024-01-28 03:38:58', '2024-01-28 03:38:58'),
(2, 'thidfnlasfsdfasdfdffasfasfsa', 'qlur1706416739.png', '<p>adfasfasf<span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><span style=\"font-size: 1rem;\">adfasfasf</span><br></p>', '2', 'Laravel', 'Pending', 'Yes', NULL, NULL, NULL, NULL, '2024-01-28 03:39:37', '2024-01-28 03:39:37'),
(3, 'fgsdfsdfasfsafasfdasdfasfsdaf', 'crfa1706419061.png', '<p><br></p>\r\nI\'m aware that some of you are novices in the field of web building and that you could all use some help. This tutorial will help you accomplish tasks that your HTML and CSS cannot. You should now be aware that while CSS contributes to HTML\'s aesthetic appeal, HMTL aids in its structural development. However, CSS behaviour is restricted.\r\n\r\nJavaScript enables you to customise the behaviour of your HTML. To change our CSS, we will use the JavaScript library jQuery. For example, we will make a div disappear and then reappear when we press the same button.\r\n\r\nAchieving this requires:\r\n\r\nHTML file with a jQuery CDN or HTML with a jQuery linked file\r\nAdd Bootstrap or Tailwind - this is optional\r\n<pre class=\"prettyprint lang-html prettyprinted\">\r\n     \r\n	<title>jQuery show/hide div with button</title>\r\n	<meta charset=\"utf-8\">\r\n        <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\">\r\n	<link rel=\"stylesheet\" href=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css\" integrity=\"sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh\" crossorigin=\"anonymous\">\r\n        <script src=\"https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js\" integrity=\"sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6\" crossorigin=\"anonymous\"></script>\r\n	<script src=\"https://code.jquery.com/jquery-3.5.1.min.js\" crossorigin=\"anonymous\"></script>\r\n      \r\n	\r\n	\r\n\r\n		<div class=\"container-fluid text-center\" style=\"margin: auto; padding: 100px 0 100px 0; \">\r\n			<h1 class=\"text-capitalize\">jQuery show/hide div with button</h1>\r\n			<lt-highlighter contenteditable=\"false\" data-lt-linked=\"1\" style=\"display: none;\"><lt-div spellcheck=\"false\" class=\"lt-highlighter__wrapper\" style=\"width: 94.375px !important; height: 36px !important; transform: none !important; transform-origin: 48.1875px 19px !important; zoom: 1 !important; margin-top: 1px !important; margin-left: 408.672px !important;\"><lt-div class=\"lt-highlighter__scroll-element\" style=\"top: 0px !important; left: 0px !important; width: 94px !important; height: 36px !important;\"><canvas class=\"lt-highlighter__canvas\" width=\"28\" height=\"20\" style=\"display: none; top: 8px !important; left: 55px !important;\"></canvas></lt-div></lt-div></lt-highlighter><button class=\"btn btn-success my-btn\" data-lt-tmp-id=\"lt-150907\" spellcheck=\"false\" data-gramm=\"false\">Show Div</button>\r\n		</div>\r\n		<div class=\"show-hide-div bg-dark text-white text-center\" style=\"padding: 200px 0px; display: none;\">\r\n			<h1>Showing the DIV</h1>\r\n		</div>\r\n\r\n<script>\r\n			$(document).ready(function () {\r\n				\r\n				\r\n				$(\'.my-btn\').click(function () {\r\n\r\n				var button = $(this);\r\n				const showHideDiv =	$(\'.show-hide-div\').css(\"display\");\r\n\r\n					// hide div and change the text of the button\r\n				if(showHideDiv === \'block\'){\r\n					$(\'.show-hide-div\').css(\"display\", \"none\");\r\n					button.html(\"\");\r\n					button.html(\"Show Div\");\r\n				}\r\n\r\n				// Show div and change the text of the button\r\n				else{\r\n					$(\'.show-hide-div\').css(\"display\", \"block\");\r\n					button.html(\"\");\r\n					button.html(\"Hide Div\");\r\n				}\r\n				});\r\n			});\r\n</script></pre>', '2', 'Laravel', 'Active', 'No', 'ubong Ibok', '1', NULL, '2024-05-06 14:18:42', '2024-01-28 04:17:41', '2024-01-28 04:17:41');
INSERT INTO `posts` (`id`, `post_title`, `featured_picture`, `body`, `editor_id`, `category`, `status`, `watermark`, `approved_by`, `approved_by_id`, `edited_at`, `approved_at`, `created_at`, `updated_at`) VALUES
(4, 'What is WordPress', 'whj21724061302.jpg', '<p>WordPress is an open-source, free content management system (CMS) that makes it simple for users to build and maintain websites. It was initially created in 2003, largely as a blogging platform, but it has expanded into a versatile tool used for developing many sorts of websites, from simple blogs to complicated e-commerce sites, portfolios, company websites, and more.</p><p><img style=\"width: 727px;\" src=\"data:image/png;base64,[BLOB]\" data-filename=\"Dashboard ‹ My Blog — WordPress(1).png\"></p><h3><b>What Websites Can WordPress Make?</b></h3><p>WordPress is versatile and can be used to create various types of websites, including:</p><ol><li><strong>Blogs or Personal Websites:</strong> Ideal for sharing personal stories, opinions, or hobbies.</li><li><strong>Business Websites:</strong> Showcase products, services, and company information.</li><li><strong>E-commerce Websites:</strong> Sell products online with features like shopping carts and payment gateways.</li><li><strong>News or Magazine Websites:</strong> Publish articles, news, and multimedia content.</li><li><strong>Portfolio Websites:</strong> Display work samples, projects, and achievements.</li><li><strong>Nonprofit Websites:</strong> Promote causes, events, and accept donations.</li><li><strong>Community or Forum Websites:</strong> Facilitate discussions and build communities around specific topics.</li><li><strong>Educational Websites:</strong> Offer online courses, tutorials, and resources.</li><li>&nbsp;<b>Social Network:</b> offer means for user to connect with each other.</li></ol><h3><b>Why Use WordPress?</b></h3><p>WordPress is widely used for several compelling reasons:</p><ol><li><p><strong>User-Friendly Interface</strong>: WordPress is designed to be easy to use, even for beginners. Its intuitive dashboard allows users to manage content, add new pages, and update posts without needing to know how to code.</p></li><li><p><strong>Flexibility and Customization</strong>: WordPress offers a vast array of themes and plugins, allowing users to customize the appearance and functionality of their websites to meet specific needs. This flexibility makes it suitable for anything from a simple blog to a complex e-commerce site.</p></li><li><p><strong>SEO-Friendly</strong>: WordPress is built with search engine optimization (SEO) in mind. It has features like clean permalink structures, meta tags, and plugins like Yoast SEO that help optimize content to rank better in search engines.</p></li><li><p><strong>Community Support</strong>: WordPress has a large, active community of developers, designers, and users who contribute to its improvement. This community offers extensive resources, including forums, tutorials, and documentation.</p></li><li><p><strong>Cost-Effective</strong>: WordPress itself is free, and many themes and plugins are also available at no cost. Even for premium options, the cost is often lower than building a custom site from scratch.</p></li><li><p><strong>Scalability</strong>: WordPress can handle websites of any size, from small blogs to large corporate sites with thousands of pages. It can grow with your business and adapt to increasing traffic and content needs.</p></li><li><p><strong>Security</strong>: With regular updates and security plugins, WordPress provides a secure platform for your website. The community actively works on identifying and fixing vulnerabilities.</p></li><li><p><strong>Mobile Responsiveness</strong>: Most WordPress themes are designed to be mobile-responsive, ensuring that your site looks good on any device, which is crucial for user experience and SEO.</p></li><li><p><strong>Integration Capabilities</strong>: WordPress integrates with many third-party services, including social media platforms, email marketing tools, payment gateways, and more, making it easy to expand your site\'s functionality.</p></li><li><p><strong>Open Source</strong>: As an open-source platform, WordPress allows developers to contribute to its code, build custom solutions, and modify the software as needed, ensuring that it continues to evolve and improve.</p></li></ol><p></p><p></p>', '2', 'WordPress', 'Active', 'No', 'ubong Ibok', '1', NULL, '2024-08-19 08:56:48', '2024-08-19 08:55:02', '2024-08-19 08:55:02');

--
-- Indexes for dumped tables
--

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

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

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

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

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

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

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

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

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

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

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `activities`
--
ALTER TABLE `activities`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT for table `adverts`
--
ALTER TABLE `adverts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `comments`
--
ALTER TABLE `comments`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `favorites`
--
ALTER TABLE `favorites`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `likes`
--
ALTER TABLE `likes`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `newsletter_subscriptions`
--
ALTER TABLE `newsletter_subscriptions`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `page_views`
--
ALTER TABLE `page_views`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=21;

--
-- AUTO_INCREMENT for table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
COMMIT;

