-- --------------------------------------------------------
-- Host:                         localhost
-- Server version:               8.4.3 - MySQL Community Server - GPL
-- Server OS:                    Win64
-- HeidiSQL Version:             12.12.0.7122
-- --------------------------------------------------------

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET NAMES utf8 */;
/*!50503 SET NAMES utf8mb4 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;


-- Dumping database structure for galadarbs
CREATE DATABASE IF NOT EXISTS `galadarbs` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */ /*!80016 DEFAULT ENCRYPTION='N' */;
USE `galadarbs`;

-- Dumping structure for table galadarbs.categories
CREATE TABLE IF NOT EXISTS `categories` (
  `id` tinyint NOT NULL,
  `name` varchar(50) NOT NULL,
  `slug` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `slug` (`slug`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- Dumping data for table galadarbs.categories: ~5 rows (approximately)
INSERT INTO `categories` (`id`, `name`, `slug`) VALUES
	(1, 'Logo design', 'logo-design'),
	(2, 'Packaging Design', 'packaging-design'),
	(3, 'Advert Design', 'advert-design'),
	(4, 'Web design', 'web-design'),
	(5, '3D design', '3d-design');

-- Dumping structure for table galadarbs.posts
CREATE TABLE IF NOT EXISTS `posts` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `category_id` tinyint DEFAULT NULL,
  `post_name` varchar(255) DEFAULT NULL,
  `post_description` text,
  `image_1` varchar(255) DEFAULT NULL,
  `image_2` varchar(255) DEFAULT NULL,
  `image_3` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `user_id` (`user_id`),
  KEY `category_id` (`category_id`),
  CONSTRAINT `posts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE,
  CONSTRAINT `posts_ibfk_2` FOREIGN KEY (`category_id`) REFERENCES `categories` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- Dumping data for table galadarbs.posts: ~3 rows (approximately)
INSERT INTO `posts` (`id`, `user_id`, `category_id`, `post_name`, `post_description`, `image_1`, `image_2`, `image_3`) VALUES
	(15, 3, 1, 'logo design in any style', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industrys standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'image_1.jpg', 'image_2.jpg', 'image_3.jpg'),
	(16, 26, 5, 'custom blender project', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', '6973e28122b01_advert_design.jpg', '6973e281231a5_logo_design.jpg', '6973e2812336a_3d_design.jpg'),
	(18, 3, 1, 'Custom design for box packaging', 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.\r\n\r\n', '697537a89ac9b_3d_design.jpg', '697537a89ae84_advert_design.jpg', '697537a89afac_andrew-kliatskyi-P82xoqgfL7Q-unsplash.jpg');

-- Dumping structure for table galadarbs.profiles
CREATE TABLE IF NOT EXISTS `profiles` (
  `id` int NOT NULL AUTO_INCREMENT,
  `user_id` int DEFAULT NULL,
  `profile_description` text,
  `profile_picture` varchar(255) DEFAULT NULL,
  `twitter` varchar(255) DEFAULT NULL,
  `instagram` varchar(255) DEFAULT NULL,
  `linkedin` varchar(255) DEFAULT NULL,
  `facebook` varchar(255) DEFAULT NULL,
  `tiktok` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `user_id` (`user_id`),
  CONSTRAINT `profiles_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- Dumping data for table galadarbs.profiles: ~3 rows (approximately)
INSERT INTO `profiles` (`id`, `user_id`, `profile_description`, `profile_picture`, `twitter`, `instagram`, `linkedin`, `facebook`, `tiktok`) VALUES
	(1, 3, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'pfp_69711c78e93335.68442064.png', 'https://www.twitter.com/skjbjgs', NULL, 'https://linkedin.com/', 'https://www.facebook.com/marketplace/category/vehicles', 'https://www.tiktok.com/en/'),
	(31, 26, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'pfp_6973e4529fa283.22803902.jpg', 'https://www.twitter.com/skjbjgs', 'https://www.instagram.com/sdgfsa/', 'https://linkedin.com/', 'https://www.facebook.com/marketplace/category/vehicles', 'https://www.tiktok.com/en/'),
	(32, 1, 'Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry\'s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.', 'pfp_69751e919edc99.38611068.jpg', NULL, NULL, NULL, NULL, NULL);

-- Dumping structure for table galadarbs.users
CREATE TABLE IF NOT EXISTS `users` (
  `id` int NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `fname` varchar(255) NOT NULL,
  `lname` varchar(255) NOT NULL,
  `designer` tinyint(1) NOT NULL,
  `pass` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=29 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

-- Dumping data for table galadarbs.users: ~5 rows (approximately)
INSERT INTO `users` (`id`, `email`, `fname`, `lname`, `designer`, `pass`) VALUES
	(1, 'rinaldspoliters@gmail.com', 'Rinalds', 'Politers', 0, '$2y$10$FN0NCF3zeOQ4ogq5EVUQLeRHBcQPit81JUSykR7SVHNCV3Lu5cIQ2'),
	(3, '1@1', '1', '1', 0, '$2y$10$n8SruSX0zhOQ6qSa2uwid.703VlvkgqASeGSaqAyo7tIBcAbkJfuS'),
	(26, '2@2', '2', '2', 1, '$2y$10$UeHaxDhHYPobi6wlL/VFMe.gsfzNyCADJK7oIAH3H9vAjD3u.Y46a'),
	(27, '3@3', '3', '3', 1, '$2y$10$GTj/VBu3vWM2SQgSONnBHeuEI2LvGV//aSnbWyu9MTmfzCkpoouG6'),
	(28, '4@4', '4', '4', 1, '$2y$10$tA8BHnO57VeH3vKwkID1KuHr2BUmV8GjMb7DYTDkKjUF4QodScs86');

/*!40103 SET TIME_ZONE=IFNULL(@OLD_TIME_ZONE, 'system') */;
/*!40101 SET SQL_MODE=IFNULL(@OLD_SQL_MODE, '') */;
/*!40014 SET FOREIGN_KEY_CHECKS=IFNULL(@OLD_FOREIGN_KEY_CHECKS, 1) */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40111 SET SQL_NOTES=IFNULL(@OLD_SQL_NOTES, 1) */;
