text: -- MySQL Distrib 8.0.20, for Linux (x86_64)
  --
  -- Host: localhost    Database: dws
  -- ------------------------------------------------------
  -- Server version	8.0.20
  
  /*!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 utf8mb4 */;
  /*!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 `project_user`
  --
  
  DROP TABLE IF EXISTS `project_user`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `project_user` (
    `id` bigint unsigned NOT NULL AUTO_INCREMENT,
    `project_id` int unsigned NOT NULL,
    `user_id` bigint unsigned NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `project_user_project_id_foreign` (`project_id`),
    KEY `project_user_user_id_foreign` (`user_id`),
    CONSTRAINT `project_user_project_id_foreign` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE,
    CONSTRAINT `project_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `project_user`
  --
  
  LOCK TABLES `project_user` WRITE;
  /*!40000 ALTER TABLE `project_user` DISABLE KEYS */;
  /*!40000 ALTER TABLE `project_user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `projects`
  --
  
  DROP TABLE IF EXISTS `projects`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `projects` (
    `id` int unsigned NOT NULL AUTO_INCREMENT,
    `title` varchar(150) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` text COLLATE utf8mb4_unicode_ci,
    `company_id` int unsigned DEFAULT NULL,
    `category_id` int unsigned DEFAULT NULL,
    `is_active` tinyint(1) NOT NULL DEFAULT '1',
    `priority` enum('low','mid','high') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'mid',
    `start_at` timestamp NOT NULL DEFAULT '2021-12-08 13:36:07',
    `end_at` timestamp NOT NULL DEFAULT '2022-01-07 13:36:07',
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `projects_is_active_index` (`is_active`),
    KEY `projects_priority_index` (`priority`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `projects`
  --
  
  LOCK TABLES `projects` WRITE;
  /*!40000 ALTER TABLE `projects` DISABLE KEYS */;
  /*!40000 ALTER TABLE `projects` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `role_user`
  --
  
  DROP TABLE IF EXISTS `role_user`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `role_user` (
    `id` bigint unsigned NOT NULL AUTO_INCREMENT,
    `role_id` int unsigned NOT NULL,
    `user_id` bigint unsigned NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    KEY `role_user_role_id_foreign` (`role_id`),
    KEY `role_user_user_id_foreign` (`user_id`),
    CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
    CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `role_user`
  --
  
  LOCK TABLES `role_user` WRITE;
  /*!40000 ALTER TABLE `role_user` DISABLE KEYS */;
  /*!40000 ALTER TABLE `role_user` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- Table structure for table `roles`
  --
  
  DROP TABLE IF EXISTS `roles`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!50503 SET character_set_client = utf8mb4 */;
  CREATE TABLE `roles` (
    `id` int unsigned NOT NULL AUTO_INCREMENT,
    `title` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` text COLLATE utf8mb4_unicode_ci,
    `rules` enum('super_admin','admin','writer','reader') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'super_admin',
    `is_active` tinyint(1) NOT NULL DEFAULT '1',
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `roles`
  --
  
  LOCK TABLES `roles` WRITE;
  /*!40000 ALTER TABLE `roles` DISABLE KEYS */;
  /*!40000 ALTER TABLE `roles` ENABLE KEYS */;
  UNLOCK TABLES;
  
  --
  -- 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` bigint unsigned NOT NULL AUTO_INCREMENT,
    `first_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `last_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `email` varchar(70) COLLATE utf8mb4_unicode_ci NOT NULL,
    `username` varchar(70) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `status` enum('inactive','pending','active') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
    `address` text COLLATE utf8mb4_unicode_ci,
    `setting` json DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL,
    PRIMARY KEY (`id`),
    UNIQUE KEY `users_email_unique` (`email`),
    UNIQUE KEY `users_username_unique` (`username`),
    KEY `users_status_index` (`status`)
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping data for table `users`
  --
  
  LOCK TABLES `users` WRITE;
  /*!40000 ALTER TABLE `users` DISABLE KEYS */;
  /*!40000 ALTER TABLE `users` ENABLE KEYS */;
  UNLOCK TABLES;
  
  
  /*!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 2021-12-08 13:37:39
  