-- MySQL dump 10.13 Distrib 8.0.36, for Win64 (x86_64)
--
-- Host: localhost Database: portifolio
-- ------------------------------------------------------
-- Server version 8.3.0
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!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 */;
--
-- Table structure for table `users`
--
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `users` (
`id` int NOT NULL AUTO_INCREMENT,
`firstName` varchar(255) DEFAULT NULL,
`lastName` varchar(255) DEFAULT NULL,
`email` varchar(255) DEFAULT NULL,
`password` varchar(255) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`isAdmin` tinyint DEFAULT '0',
`two_fa_code` varchar(6) DEFAULT NULL,
`two_fa_expires_at` datetime DEFAULT NULL,
`image` varchar(245) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `email` (`email`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2025-01-10 2:10:13
--
-- Table structure for table `blog_posts`
--
DROP TABLE IF EXISTS `blog_posts`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `blog_posts` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`slug` varchar(255) NOT NULL,
`content` text NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`author_id` int NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `slug` (`slug`),
KEY `author_id` (`author_id`),
CONSTRAINT `blog_posts_ibfk_1` FOREIGN KEY (`author_id`) REFERENCES `users` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `password_resets`
--
DROP TABLE IF EXISTS `password_resets`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `password_resets` (
`id` int NOT NULL AUTO_INCREMENT,
`email` varchar(255) NOT NULL,
`token` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `email` (`email`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resumes`
--
DROP TABLE IF EXISTS `resumes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resumes` (
`id` int NOT NULL AUTO_INCREMENT,
`user_id` int NOT NULL,
`summary` text NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `resumes_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `portfolio_items`
--
DROP TABLE IF EXISTS `portfolio_items`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `portfolio_items` (
`id` int NOT NULL AUTO_INCREMENT,
`title` varchar(255) NOT NULL,
`description` text NOT NULL,
`image` varchar(255) DEFAULT NULL,
`category` varchar(100) DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
`user_id` int NOT NULL,
PRIMARY KEY (`id`),
KEY `user_id` (`user_id`),
CONSTRAINT `portfolio_items_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_education`
--
DROP TABLE IF EXISTS `resume_education`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_education` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`degree` varchar(255) NOT NULL,
`institution` varchar(255) NOT NULL,
`start_date` date NOT NULL,
`end_date` date DEFAULT NULL,
`description` text,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_education_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_experiences`
--
DROP TABLE IF EXISTS `resume_experiences`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_experiences` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`job_title` varchar(255) NOT NULL,
`company_name` varchar(255) NOT NULL,
`start_date` date NOT NULL,
`end_date` date DEFAULT NULL,
`description` text,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_experiences_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_sections`
--
DROP TABLE IF EXISTS `resume_sections`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_sections` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`section_type` enum('education','experience','soft_skills','hard_skills','technologies','others') NOT NULL,
`title` varchar(255) NOT NULL,
`description` text,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_sections_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_skills`
--
DROP TABLE IF EXISTS `resume_skills`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_skills` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`skill_name` varchar(255) NOT NULL,
`skill_type` enum('soft','hard') NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_skills_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_socials`
--
DROP TABLE IF EXISTS `resume_socials`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_socials` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`platform` varchar(255) NOT NULL,
`url` varchar(255) NOT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_socials_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Table structure for table `resume_technologies`
--
DROP TABLE IF EXISTS `resume_technologies`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `resume_technologies` (
`id` int NOT NULL AUTO_INCREMENT,
`resume_id` int NOT NULL,
`name` varchar(255) NOT NULL,
`proficiency_level` enum('beginner','intermediate','advanced','expert') DEFAULT NULL,
`created_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
`updated_at` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
KEY `resume_id` (`resume_id`),
CONSTRAINT `resume_technologies_ibfk_1` FOREIGN KEY (`resume_id`) REFERENCES `resumes` (`id`)
);
/*!40101 SET character_set_client = @saved_cs_client */;
|