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

START TRANSACTION;



--
-- Database: `boilerplate_laravel`
--

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

--
-- Table structure for table `event_logs`
--

CREATE TABLE IF NOT EXISTS `event_logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` int(11) NOT NULL,
  `end_point` varchar(100) NOT NULL,
  `changes` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `file_types`
--

CREATE TABLE IF NOT EXISTS `file_types` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(10) NOT NULL,
  `status` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `file_types`
--

INSERT INTO `file_types` (`id`, `name`, `status`, `created_at`, `updated_at`) VALUES
(1, 'jpg', 'Active', '2019-06-22 08:43:39', '2019-06-22 08:43:39'),
(2, 'jpeg', 'Active', '2019-06-22 08:43:54', '2019-06-22 08:43:54'),
(3, 'png', 'Active', '2019-06-22 08:44:05', '2019-06-22 08:44:05'),
(4, 'gif', 'Active', '2019-06-22 08:44:14', '2019-06-22 08:44:14');

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

--
-- Table structure for table `logs`
--

CREATE TABLE IF NOT EXISTS `logs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(255) NOT NULL,
  `full_page` text NOT NULL,
  `url` varchar(255) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

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

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

CREATE TABLE IF NOT EXISTS `migrations` (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `migration` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 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_06_15_062636_entrust_setup_tables', 2);

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

--
-- Table structure for table `modules`
--

CREATE TABLE IF NOT EXISTS `modules` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `fa_icon` varchar(20) NOT NULL,
  `status` enum('Active','Inactive') NOT NULL DEFAULT 'Active',
  `sorting` smallint(6) NOT NULL,
  `created_at` datetime NOT NULL,
  `updated_at` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `modules`
--

INSERT INTO `modules` (`id`, `name`, `fa_icon`, `status`, `sorting`, `created_at`, `updated_at`) VALUES
(15, 'Brands', 'fa-apple', 'Active', 1, '2019-11-10 09:24:06', '2019-11-10 09:24:06');

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

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

CREATE TABLE IF NOT EXISTS `permissions` (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `module_id` int(11) NOT NULL,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permissions_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=80 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permissions`
--

INSERT INTO `permissions` (`id`, `module_id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(73, 15, 'brands.index1', 'Listing page of all brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(74, 15, 'brands/create', 'Display the form for creating new brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(75, 15, 'brands/{id}/edit', 'Display the form for editing a brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(76, 15, 'brands/show/{id}', 'Show detail information for a brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(77, 15, 'brands/store', 'Store action for creating a new brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(78, 15, 'brands/update', 'Update action for updating a brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06'),
(79, 15, 'brands/{id}', 'Delete action for removing a brands', NULL, '2019-11-10 03:24:06', '2019-11-10 03:24:06');

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

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

CREATE TABLE IF NOT EXISTS `permission_role` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL,
  `module_id` int(11) NOT NULL,
  PRIMARY KEY (`permission_id`,`role_id`,`module_id`),
  KEY `module_id` (`module_id`),
  KEY `role_id` (`role_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `permission_role`
--

INSERT INTO `permission_role` (`permission_id`, `role_id`, `module_id`) VALUES
(73, 1, 15),
(74, 1, 15),
(75, 1, 15),
(76, 1, 15),
(77, 1, 15),
(78, 1, 15),
(79, 1, 15);

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

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

CREATE TABLE IF NOT EXISTS `roles` (
  `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,
  `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `roles_name_unique` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `roles`
--

INSERT INTO `roles` (`id`, `name`, `display_name`, `description`, `created_at`, `updated_at`) VALUES
(1, 'Admin', 'Administrator of whole site', 'Admin is the topmost role for whole site. This role can take any action all over the site', '2019-06-16 08:55:50', '2019-06-16 08:56:58'),
(2, 'Editor', 'Post Editor', 'Editor can modify post, upload photo but he cannot delete anythings', '2019-06-16 09:00:45', '2019-06-16 09:00:45');

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

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

CREATE TABLE IF NOT EXISTS `role_user` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL,
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_user_role_id_foreign` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `role_user`
--

INSERT INTO `role_user` (`user_id`, `role_id`) VALUES
(1, 1);

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

--
-- Table structure for table `settings`
--

CREATE TABLE IF NOT EXISTS `settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `constant` varchar(255) NOT NULL,
  `value` varchar(100) NOT NULL,
  `field_type` enum('Text','Options','File') NOT NULL DEFAULT 'Text',
  `options` varchar(255) NOT NULL,
  `sorting` int(11) NOT NULL,
  `status` enum('0','1') NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `title`, `constant`, `value`, `field_type`, `options`, `sorting`, `status`) VALUES
(1, 'Is Event Logs Enable', 'IS_EVENT_LOGS_ENABLE', '1', 'Options', 'Yes|1,No|0', 5, '1'),
(2, 'Site Name', 'SITE_NAME', 'Boiler Plate', 'Text', '', 1, '1'),
(3, 'Footer Text', 'FOOTER_TEXT', 'Copyright © 2019 Company. All rights reserved.', 'Text', '', 6, '1'),
(4, 'Site Email', 'SITE_EMAIL', 'firoz.cse.sust@gmail.com', 'Text', '', 3, '1'),
(5, 'Is Admin Privilege Enable', 'IS_ADMIN_PRIVILEGE_ENABLE', '0', 'Options', 'Yes|1,No|0', 4, '1'),
(6, 'Site Logo', 'SITE_LOGO', 'logo-1573634050.png', 'File', '', 7, '1'),
(7, 'Site Short Name', 'SITE_SHORT_NAME', 'BP', 'Text', '', 2, '1');

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

--
-- Table structure for table `uploaded_files`
--

CREATE TABLE IF NOT EXISTS `uploaded_files` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `filename` varchar(50) NOT NULL,
  `original_filename` varchar(255) NOT NULL,
  `file_type_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `created_at` datetime DEFAULT NULL,
  `updated_at` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `uploaded_files`
--

INSERT INTO `uploaded_files` (`id`, `filename`, `original_filename`, `file_type_id`, `user_id`, `created_at`, `updated_at`) VALUES
(20, '1.jpg', 'Picture.jpg', 1, 1, '2019-06-23 11:34:50', '2019-06-23 11:34:50'),
(27, '41.png', 'if_search_binoculars_find_103854.png', 3, 41, '2019-06-23 11:47:53', '2019-06-23 11:47:53');

--
-- Constraints for dumped tables
--

--
-- Constraints for table `permission_role`
--
ALTER TABLE `permission_role`
  ADD CONSTRAINT `permission_role_ibfk_1` FOREIGN KEY (`module_id`) REFERENCES `modules` (`id`),
  ADD CONSTRAINT `permission_role_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`),
  ADD CONSTRAINT `permission_role_ibfk_3` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`);
COMMIT;

