--
-- Host: localhost    Database: ieee_sudan
-- ------------------------------------------------------


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

CREATE TABLE `failed_jobs` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `connection` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `queue` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `failed_jobs`
--


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

CREATE TABLE `migrations` (
  `id` int unsigned NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

INSERT INTO `migrations` VALUES (1,'2014_10_12_000000_create_users_table',1),(2,'2014_10_12_100000_create_password_reset_tokens_table',1),(3,'2019_08_19_000000_create_failed_jobs_table',1),(4,'2019_12_14_000001_create_personal_access_tokens_table',1),(5,'2025_10_17_125833_create_teams_table',1),(6,'2025_10_17_130143_add_team_id_and_role_to_users_table',1);

--
-- Table structure for table `password_reset_tokens`
--

CREATE TABLE `password_reset_tokens` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `password_reset_tokens`
--


--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `tokenable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tokenable_id` bigint unsigned NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL,
  `abilities` text COLLATE utf8mb4_unicode_ci,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_at` timestamp NULL DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `personal_access_tokens`
--


--
-- Table structure for table `teams`
--

CREATE TABLE `teams` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `teams`
--

INSERT INTO `teams` VALUES (1,'الفريق التقني','2025-10-17 13:03:33','2025-10-17 13:03:33'),(2,'فريق الإعلام','2025-10-17 13:03:33','2025-10-17 13:03:33');

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `team_id` bigint unsigned DEFAULT NULL,
  `role` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'volunteer',
  PRIMARY KEY (`id`),
  UNIQUE KEY `users_email_unique` (`email`),
  KEY `users_team_id_foreign` (`team_id`),
  CONSTRAINT `users_team_id_foreign` FOREIGN KEY (`team_id`) REFERENCES `teams` (`id`) ON DELETE SET NULL
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` VALUES (1,'admin','admin@example.com',NULL,'$2y$12$p0RTHyP40TBgN6P2vpiNHu68XiBsw7GqFM/e/dyHGkVj55wOmOJn6',NULL,'2025-10-17 13:03:33','2025-10-17 13:03:33',NULL,'admin'),(2,'ahmed_lead','ahmed_lead@example.com',NULL,'$2y$12$dQq3gg/dTf4Ku2pTi7mNXOmpk.L9SRVbxf2ex40i8hv46ZkvIBtBu',NULL,'2025-10-17 13:03:34','2025-10-17 13:03:34',1,'technical_lead'),(3,'sara_lead','sara_lead@example.com',NULL,'$2y$12$vG5Vs39XVAbLpS4b..jMSuv.NpgVcKY4OcwUI6uPKKnA60/27wAfi',NULL,'2025-10-17 13:03:34','2025-10-17 13:03:34',2,'media_lead'),(4,'omar_dev','omar_dev@example.com',NULL,'$2y$12$V8yEh518kGkaw3BXIwMKketW56rVhyXhq9V9I9kv1ZI0Ku1TlMUii',NULL,'2025-10-17 13:03:34','2025-10-17 13:03:34',1,'volunteer'),(5,'fatima_dev','fatima_dev@example.com',NULL,'$2y$12$LNzwbDh52I19CPyPlmQTmuy9nOTcU4FmGUUokpKxX0LMcmEXk1Hzi',NULL,'2025-10-17 13:03:34','2025-10-17 13:03:34',1,'volunteer'),(6,'ali_designer','ali_designer@example.com',NULL,'$2y$12$NcTdS4xh46HZlZDZjc4Dm.shMKAaOEc6t.Tzp/YTo7L1a3g/wHa66',NULL,'2025-10-17 13:03:35','2025-10-17 13:03:35',2,'volunteer'),(7,'mona_writer','mona_writer@example.com',NULL,'$2y$12$H.hBYWDzaMoRcvHNqckWLeyyBR5XmQvhLOtJKbMQXZ7Knk4N/eGfm',NULL,'2025-10-17 13:03:35','2025-10-17 13:03:35',2,'volunteer');


