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

START TRANSACTION;



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

--
-- Table structure for table `contact_us`
--

CREATE TABLE `contact_us` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `subject` text COLLATE utf8mb4_unicode_ci,
  `message` varchar(255) COLLATE utf8mb4_unicode_ci 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 `contact_us`
--

INSERT INTO `contact_us` (`id`, `name`, `email`, `subject`, `message`, `created_at`, `updated_at`) VALUES
(1, 'Illiana Jefferson', 'mebapyre@mailinator.com', 'Consequatur temporib', 'Velit velit culpa s', '2024-04-30 04:25:40', '2024-04-30 04:25:40'),
(2, 'Aimee Maynard', 'cifuwo@mailinator.com', 'Et aliqua Aut proid', 'Id dicta reiciendis', '2024-04-30 04:25:57', '2024-04-30 04:25:57'),
(3, 'Cameron Atkins', 'hucures@mailinator.com', 'Vitae fugiat vitae a', 'Molestiae amet blan', '2024-04-30 04:31:23', '2024-04-30 04:31:23'),
(4, 'Connor Rich', 'qupelulomo@mailinator.com', 'Mollitia in modi fug', 'Id aut elit et cons', '2024-04-30 04:32:00', '2024-04-30 04:32:00'),
(5, 'Shaine Taylor', 'mylovigo@mailinator.com', 'Sapiente impedit es', 'Nam nemo deserunt ap', '2024-05-01 06:50:54', '2024-05-01 06:50:54'),
(6, 'Regan James', 'bovipawyso@mailinator.com', 'In iste vitae velit', 'Quibusdam doloribus', '2024-05-01 07:32:08', '2024-05-01 07:32:08');

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

--
-- Table structure for table `contests`
--

CREATE TABLE `contests` (
  `id` int(10) UNSIGNED NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `price` decimal(5,2) DEFAULT NULL,
  `qty` int(11) DEFAULT NULL,
  `contest_on` date DEFAULT NULL,
  `contest_no` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `overview` text COLLATE utf8mb4_unicode_ci,
  `specifications` text COLLATE utf8mb4_unicode_ci,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL,
  `competition_details` text COLLATE utf8mb4_unicode_ci,
  `contest_number` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contests`
--

INSERT INTO `contests` (`id`, `slug`, `title`, `description`, `price`, `qty`, `contest_on`, `contest_no`, `overview`, `specifications`, `created_at`, `updated_at`, `deleted_at`, `competition_details`, `contest_number`) VALUES
(1, 'donovan-rosario', 'Donovan Rosario', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed ex eget mi sollicitudin consequat. Sed rhoncus ligula vel justo dignissim aliquam. Maecenas non est vitae ipsum luctus feugiat. Fusce purus nunc, sodales at condimentum sed, ullamcorper a nulla. Nam justo est, venenatis quis tellus in, volutpat eleifend nunc. Vestibulum congue laoreet mi non interdum. Ut ut dapibus tellus.', 151.00, 742, '2024-06-24', NULL, NULL, NULL, '2024-05-01 03:22:08', '2024-05-01 03:22:08', NULL, NULL, NULL),
(2, 'isabelle-hensley', 'Isabelle Hensley', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed ex eget mi sollicitudin consequat. Sed rhoncus ligula vel justo dignissim aliquam. Maecenas non est vitae ipsum luctus feugiat. Fusce purus nunc, sodales at condimentum sed, ullamcorper a nulla. Nam justo est, venenatis quis tellus in, volutpat eleifend nunc. Vestibulum congue laoreet mi non interdum. Ut ut dapibus tellus.', 63.80, 799, '0224-05-13', NULL, NULL, NULL, '2024-05-01 03:23:52', '2024-05-01 03:23:52', NULL, NULL, NULL),
(3, 'colt-boyer', 'Colt Boyer', 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis sed ex eget mi sollicitudin consequat. Sed rhoncus ligula vel justo dignissim aliquam. Maecenas non est vitae ipsum luctus feugiat. Fusce purus nunc, sodales at condimentum sed, ullamcorper a nulla. Nam justo est, venenatis quis tellus in, volutpat eleifend nunc. Vestibulum congue laoreet mi non interdum. Ut ut dapibus tellus.', 60.00, 865, '2024-02-02', NULL, NULL, NULL, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL, NULL, NULL),
(4, 'herman-hodge', 'Herman Hodge', NULL, 15.30, 517, '2024-04-09', NULL, NULL, NULL, '2024-05-01 04:19:25', '2024-05-01 04:19:25', NULL, NULL, NULL),
(5, 'ginger-dillon', 'Ginger Dillon', 'Amet quo expedita r', 70.98, 379, '2024-05-25', NULL, NULL, NULL, '2024-05-01 04:55:02', '2024-05-01 04:55:02', NULL, 'Est dolor debitis a', 'XD4R'),
(6, 'clio-lindsey', 'Clio Lindsey', NULL, 98.70, 115, '2024-12-31', NULL, NULL, NULL, '2024-05-01 05:49:16', '2024-05-01 05:49:16', NULL, 'Praesentium ipsum d', '1X9R6'),
(7, 'brenna-peterson', 'Brenna Peterson', NULL, 67.40, 959, '2024-05-10', NULL, NULL, NULL, '2024-05-01 07:37:13', '2024-05-01 07:37:13', NULL, 'Culpa commodo quod r', '37R4');

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

--
-- Table structure for table `contest_images`
--

CREATE TABLE `contest_images` (
  `id` int(10) UNSIGNED NOT NULL,
  `path` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `contest_id` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `contest_images`
--

INSERT INTO `contest_images` (`id`, `path`, `contest_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'public/uploads/contests/F0h7jlR3UQshLgA8ie9XoQe1adb0YwRaXbDz9XT1.jpg', 1, '2024-05-01 03:22:08', '2024-05-01 03:22:08', NULL),
(2, 'public/uploads/contests/pe8c8It6kASPX2MDkEeeOSFiHufWyaqkTJF29ZXH.jpg', 1, '2024-05-01 03:22:08', '2024-05-01 03:22:08', NULL),
(3, 'public/uploads/contests/k2MCAsjiz0hYQgE8pbFlAUUs3SLy6w5dnrAB9012.jpg', 1, '2024-05-01 03:22:08', '2024-05-01 03:22:08', NULL),
(4, 'public/uploads/contests/uc7gTz2bAYwFfGjbgshsWTFWtRMGbnARV8rQer9z.jpg', 2, '2024-05-01 03:23:52', '2024-05-01 03:23:52', NULL),
(5, 'public/uploads/contests/EdwjHiBRYVATtMFDqQVvSgNremp1TEzh0B65JeCf.jpg', 2, '2024-05-01 03:23:52', '2024-05-01 03:23:52', NULL),
(6, 'public/uploads/contests/ZLHRbJZEBfCMqtPBVmhcnU4cY1D2Mci36YP9o6mt.jpg', 2, '2024-05-01 03:23:52', '2024-05-01 03:23:52', NULL),
(7, 'public/uploads/contests/piisM1iZEnD2rDK3mSuVO3CwqypXKSRHvTVUynbR.jpg', 2, '2024-05-01 03:23:52', '2024-05-01 03:23:52', NULL),
(8, 'public/uploads/contests/cJyvkl09wJvKkLMzdsNHWR7oTGBNtiHoWJiBzmUx.jpg', 3, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL),
(9, 'public/uploads/contests/h4Iur2CMIWCZ2VXvZ7UUyGJDHThjVj9e0gAhGQ61.jpg', 3, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL),
(10, 'public/uploads/contests/UO2K1ZuavdZ8YW4LGj5HtQnDqRq7fL4XUPiWocyX.jpg', 3, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL),
(11, 'public/uploads/contests/uig8JYxWJIyhyZhfvCx8IJ5670SnezrM57qn0jnB.jpg', 3, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL),
(12, 'public/uploads/contests/ELeHUpuGPB3jpZAQlaUGSDim4fyOFMrOCPFvcFNQ.jpg', 3, '2024-05-01 03:25:04', '2024-05-01 03:25:04', NULL),
(13, 'public/uploads/contests/boLBawzjmCnsnYfKQkcsXj7s8ME86mmLlKmuC3VO.jpg', 4, '2024-05-01 04:19:25', '2024-05-01 04:19:25', NULL),
(14, 'public/uploads/contests/b8dSpsXRptZwVL62499ZDV1qHju6QN1NWuX4tm6u.jpg', 4, '2024-05-01 04:19:25', '2024-05-01 04:19:25', NULL),
(15, 'public/uploads/contests/2QOXW0taMrY1msfl9KembUmGSmj10C9T2TDsRgv4.jpg', 4, '2024-05-01 04:19:25', '2024-05-01 04:19:25', NULL),
(16, 'public/uploads/contests/NW3jn22HowzJAlHlsz30Uw6aqeamC1qhpPcqv4Wd.jpg', 4, '2024-05-01 04:19:25', '2024-05-01 04:19:25', NULL),
(17, 'public/uploads/contests/KI4iQt9F8WESyLdssjhh47S7R7VK2UYs5PoXEwU1.jpg', 5, '2024-05-01 04:55:02', '2024-05-01 04:55:02', NULL),
(18, 'public/uploads/contests/yTKy5Ft4VB1psGVBod0jG3LEQiGVdVv5y5SecS56.jpg', 5, '2024-05-01 04:55:02', '2024-05-01 04:55:02', NULL),
(19, 'public/uploads/contests/BFlzBRS7bLXqcdnPGX5o2HqFYYQw4Dx1EsmzpdIF.jpg', 5, '2024-05-01 04:55:02', '2024-05-01 04:55:02', NULL),
(20, 'public/uploads/contests/oXB21MgrjRPu41sdAIMoWH5D1Xw4CgLomRMu4bXF.jpg', 6, '2024-05-01 05:49:16', '2024-05-01 05:49:16', NULL),
(21, 'public/uploads/contests/mhjnDwYPKd9xDRrvqsB7niYoLtRx8V0Z6VANuOLy.jpg', 6, '2024-05-01 05:49:16', '2024-05-01 05:49:16', NULL),
(22, 'public/uploads/contests/nrsV5XzC4n9SVaBQt1MPv0ox9PKr3zbiS5A5Fziu.jpg', 6, '2024-05-01 05:49:16', '2024-05-01 05:49:16', NULL),
(23, 'public/uploads/contests/Cj9ddAJNn0ZvKqN8EUCXjnVx2jQiAWbUlLNTOfnW.jpg', 7, '2024-05-01 07:37:13', '2024-05-01 07:37:13', NULL),
(24, 'public/uploads/contests/iiNXd2uiI8aOE1FqguPNKrlcCMMVMrfjPNZYr09A.jpg', 7, '2024-05-01 07:37:13', '2024-05-01 07:37:13', NULL);

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `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
) 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) COLLATE utf8mb4_unicode_ci 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, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2024_04_25_081246_create_roles_table', 2),
(6, '2024_04_27_191728_new_column_in_users_table', 2),
(7, '2024_04_29_164544_create_contact_page_table', 3),
(8, '2024_04_29_164606_create_contact_us_table', 3),
(9, '2024_04_29_164622_create_about_page_table', 3),
(10, '2024_04_30_120104_create_about_us_table', 4),
(11, '2024_04_27_194653_create_permission_tables', 5),
(12, '2024_04_30_100316_create_contest_management_table', 5),
(13, '2024_04_30_100332_create_contest_management_images_table', 5),
(14, '2024_05_01_101713_add_columns_to_contests', 6),
(15, '2024_05_01_100533_new_columns_in_contests_table', 7),
(16, '2024_05_02_133606_add_columns_to_users', 7);

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

--
-- Table structure for table `model_has_permissions`
--

CREATE TABLE `model_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `model_has_roles`
--

CREATE TABLE `model_has_roles` (
  `role_id` bigint(20) UNSIGNED NOT NULL,
  `model_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `model_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `model_has_roles`
--

INSERT INTO `model_has_roles` (`role_id`, `model_type`, `model_id`) VALUES
(2, 'App\\Models\\User', 10);

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

--
-- Table structure for table `permissions`
--

CREATE TABLE `permissions` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci 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 `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'add', 'admin', '2024-05-01 06:40:23', '2024-05-01 06:40:23'),
(2, 'edit', 'admin', '2024-05-01 06:45:59', '2024-05-01 06:45:59'),
(3, 'delete', 'admin', '2024-05-01 06:45:59', '2024-05-01 06:45:59');

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

--
-- Table structure for table `roles`
--

CREATE TABLE `roles` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `guard_name` varchar(255) COLLATE utf8mb4_unicode_ci 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 `roles`
--

INSERT INTO `roles` (`id`, `name`, `guard_name`, `created_at`, `updated_at`) VALUES
(1, 'User', 'web', '2024-05-01 06:40:23', '2024-05-01 06:40:23'),
(2, 'admin', 'web', '2024-05-01 06:45:59', '2024-05-01 06:45:59');

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

--
-- Table structure for table `role_has_permissions`
--

CREATE TABLE `role_has_permissions` (
  `permission_id` bigint(20) UNSIGNED NOT NULL,
  `role_id` bigint(20) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

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

--
-- Indexes for table `contest_images`
--
ALTER TABLE `contest_images`
  ADD PRIMARY KEY (`id`),
  ADD KEY `contest_images_contest_id_foreign` (`contest_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 `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`model_id`,`model_type`),
  ADD KEY `model_has_permissions_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD PRIMARY KEY (`role_id`,`model_id`,`model_type`),
  ADD KEY `model_has_roles_model_id_model_type_index` (`model_id`,`model_type`);

--
-- Indexes for table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_guard_name_unique` (`name`,`guard_name`);

--
-- Indexes for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `role_has_permissions_role_id_foreign` (`role_id`);

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

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

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

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  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=17;

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `contest_images`
--
ALTER TABLE `contest_images`
  ADD CONSTRAINT `contest_images_contest_id_foreign` FOREIGN KEY (`contest_id`) REFERENCES `contests` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_permissions`
--
ALTER TABLE `model_has_permissions`
  ADD CONSTRAINT `model_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `model_has_roles`
--
ALTER TABLE `model_has_roles`
  ADD CONSTRAINT `model_has_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_has_permissions`
--
ALTER TABLE `role_has_permissions`
  ADD CONSTRAINT `role_has_permissions_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_has_permissions_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;
COMMIT;

