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

START TRANSACTION;



--
-- Database: `pms`
--

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

--
-- Table structure for table `clients`
--

CREATE TABLE `clients` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `mobile` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT '0',
  `country` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `currency` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) 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 `clients`
--

INSERT INTO `clients` (`id`, `name`, `email`, `mobile`, `country`, `currency`, `status`, `created_at`, `updated_at`) VALUES
(1, 'Kumar', 'click4u@gmail.com', '1234566', 'India', 'Rs', 1, '2022-04-01 05:32:51', '2022-04-01 05:32:51'),
(2, 'Devid', 'devid@gmail.com', '9876545678', 'America', 'USD', 1, '2022-04-01 05:38:58', '2022-04-01 05:38:58'),
(3, 'John', 'john@gmail.com', '09867452323', 'United Kingdon', 'GBP', 1, '2022-04-01 05:40:35', '2022-04-01 05:40:35'),
(4, 'Roza', 'roza@gmail.com', '9876545678', 'United Kingdon', 'GBP', 1, '2022-04-01 05:41:09', '2022-04-01 05:41:09');

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

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

CREATE TABLE `failed_jobs` (
  `id` bigint 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 UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int 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_resets_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2021_06_13_082038_create_roles_table', 1),
(6, '2021_06_13_082140_create_role_user_table', 1),
(7, '2021_06_13_093118_create_permissions_table', 1),
(8, '2021_06_13_093825_create_permission_role_table', 1),
(9, '2022_03_29_075102_create_clients_table', 1),
(10, '2022_03_29_110601_create_projects_table', 1);

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

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

CREATE TABLE `permissions` (
  `id` bigint UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `permission_id` bigint UNSIGNED DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'display name',
  `hint` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'info about the permission',
  `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`, `permission_id`, `title`, `hint`, `created_at`, `updated_at`) VALUES
(1, 'roles_access', NULL, 'Roles Management', NULL, '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(2, 'roles_create', 1, 'Roles Create', NULL, '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(3, 'roles_update', 1, 'Roles Update', NULL, '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(4, 'roles_delete', 1, 'Roles Delete', NULL, '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(5, 'permissions_access', NULL, 'Permissions Access', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(6, 'permissions_create', 5, 'Permissions Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(7, 'permissions_update', 5, 'Permissions Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(8, 'permissions_delete', 5, 'Permissions Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(9, 'permissions_roles_update', 5, 'Permissions Roles Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(10, 'users_access', NULL, 'Users Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(11, 'users_show', 10, 'Users Show', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(12, 'users_create', 10, 'Users Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(13, 'users_update', 10, 'Users Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(14, 'users_delete', 10, 'Users Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(15, 'login_to_user', 10, 'Users Login To', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(16, 'pages_access', NULL, 'Pages Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(17, 'pages_create', 16, 'Pages Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(18, 'pages_show', 16, 'Pages Show', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(19, 'pages_update', 16, 'Pages Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(20, 'pages_delete', 16, 'Pages Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(21, 'faqs_access', NULL, 'FAQs Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(22, 'faqs_create', 21, 'FAQs Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(23, 'faqs_show', 21, 'FAQs Show', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(24, 'faqs_update', 21, 'FAQs Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(25, 'faqs_delete', 21, 'FAQs Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(26, 'testimonials_access', NULL, 'Testimonials Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(27, 'testimonials_create', 26, 'Testimonials Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(28, 'testimonials_update', 26, 'Testimonials Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(29, 'testimonials_delete', 26, 'Testimonials Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(30, 'blog_categories_access', NULL, 'Blog Categories Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(31, 'blog_categories_create', 30, 'Blog Categories Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(32, 'blog_categories_update', 30, 'Blog Categories Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(33, 'blog_categories_delete', 30, 'Blog Categories Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(34, 'blog_posts_access', NULL, 'Blog Posts Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(35, 'blog_posts_create', 34, 'Blog Posts Create', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(36, 'blog_posts_show', 34, 'Blog Posts Show', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(37, 'blog_posts_update', 34, 'Blog Posts Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(38, 'blog_posts_delete', 34, 'Blog Posts Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(39, 'blog_comments_access', NULL, 'Blog Comments Management', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(40, 'blog_comments_update', 39, 'Blog Comments Update', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(41, 'blog_comments_show', 39, 'Blog Comments Show', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43'),
(42, 'blog_comments_delete', 39, 'Blog Comments Delete', NULL, '2022-03-31 12:21:43', '2022-03-31 12:21:43');

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

--
-- Table structure for table `permission_role`
--

CREATE TABLE `permission_role` (
  `id` bigint UNSIGNED NOT NULL,
  `permission_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED 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 `permission_role`
--

INSERT INTO `permission_role` (`id`, `permission_id`, `role_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL),
(2, 5, 1, NULL, NULL),
(3, 10, 1, NULL, NULL),
(4, 16, 1, NULL, NULL),
(5, 21, 1, NULL, NULL),
(6, 26, 1, NULL, NULL),
(7, 30, 1, NULL, NULL),
(8, 34, 1, NULL, NULL),
(9, 39, 1, NULL, NULL),
(10, 2, 1, NULL, NULL),
(11, 3, 1, NULL, NULL),
(12, 4, 1, NULL, NULL),
(13, 6, 1, NULL, NULL),
(14, 7, 1, NULL, NULL),
(15, 8, 1, NULL, NULL),
(16, 9, 1, NULL, NULL),
(17, 11, 1, NULL, NULL),
(18, 12, 1, NULL, NULL),
(19, 13, 1, NULL, NULL),
(20, 14, 1, NULL, NULL),
(21, 15, 1, NULL, NULL),
(22, 17, 1, NULL, NULL),
(23, 18, 1, NULL, NULL),
(24, 19, 1, NULL, NULL),
(25, 20, 1, NULL, NULL),
(26, 22, 1, NULL, NULL),
(27, 23, 1, NULL, NULL),
(28, 24, 1, NULL, NULL),
(29, 25, 1, NULL, NULL),
(30, 27, 1, NULL, NULL),
(31, 28, 1, NULL, NULL),
(32, 29, 1, NULL, NULL),
(33, 31, 1, NULL, NULL),
(34, 32, 1, NULL, NULL),
(35, 33, 1, NULL, NULL),
(36, 35, 1, NULL, NULL),
(37, 36, 1, NULL, NULL),
(38, 37, 1, NULL, NULL),
(39, 38, 1, NULL, NULL),
(40, 40, 1, NULL, NULL),
(41, 41, 1, NULL, NULL),
(42, 42, 1, NULL, NULL);

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

--
-- Table structure for table `projects`
--

CREATE TABLE `projects` (
  `id` bigint UNSIGNED NOT NULL,
  `client_id` int NOT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `cost` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `comm_mode` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `project_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `status` tinyint(1) NOT NULL,
  `description` longtext 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 `projects`
--

INSERT INTO `projects` (`id`, `client_id`, `title`, `cost`, `comm_mode`, `project_type`, `status`, `description`, `created_at`, `updated_at`) VALUES
(1, 1, 'E-commerce  store', '5000', 'Direct', 'project-base', 1, 'E-commerce  store', '2022-04-01 05:43:08', '2022-04-01 05:43:08');

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

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

CREATE TABLE `roles` (
  `id` bigint UNSIGNED NOT NULL,
  `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`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(2, 'user', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(3, 'editor', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(4, 'manager', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(5, 'author', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(6, 'executive', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(7, 'publisher', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(8, 'contributor', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(9, 'viewer', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(10, 'biller', '2022-03-31 12:21:42', '2022-03-31 12:21:42'),
(11, 'moderator', '2022-03-31 12:21:42', '2022-03-31 12:21:42');

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

--
-- Table structure for table `role_user`
--

CREATE TABLE `role_user` (
  `id` bigint UNSIGNED NOT NULL,
  `user_id` bigint UNSIGNED NOT NULL,
  `role_id` bigint UNSIGNED 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 `role_user`
--

INSERT INTO `role_user` (`id`, `user_id`, `role_id`, `created_at`, `updated_at`) VALUES
(1, 1, 1, NULL, NULL);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `clients`
--
ALTER TABLE `clients`
  ADD PRIMARY KEY (`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 `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `permissions_permission_id_foreign` (`permission_id`);

--
-- Indexes for table `permission_role`
--
ALTER TABLE `permission_role`
  ADD PRIMARY KEY (`id`),
  ADD KEY `permission_role_permission_id_foreign` (`permission_id`),
  ADD KEY `permission_role_role_id_foreign` (`role_id`);

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

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

--
-- Indexes for table `role_user`
--
ALTER TABLE `role_user`
  ADD PRIMARY KEY (`id`),
  ADD KEY `role_user_user_id_foreign` (`user_id`),
  ADD KEY `role_user_role_id_foreign` (`role_id`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `clients`
--
ALTER TABLE `clients`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;

--
-- AUTO_INCREMENT for table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- AUTO_INCREMENT for table `permission_role`
--
ALTER TABLE `permission_role`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- AUTO_INCREMENT for table `projects`
--
ALTER TABLE `projects`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=12;

--
-- AUTO_INCREMENT for table `role_user`
--
ALTER TABLE `role_user`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- Constraints for dumped tables
--

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

--
-- Constraints for table `permission_role`
--
ALTER TABLE `permission_role`
  ADD CONSTRAINT `permission_role_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `permission_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `role_user`
--
ALTER TABLE `role_user`
  ADD CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

