text: -- phpMyAdmin SQL Dump
  -- version 4.9.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Feb 15, 2020 at 01:15 PM
  -- Server version: 10.4.8-MariaDB
  -- PHP Version: 7.3.11
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET AUTOCOMMIT = 0;
  START TRANSACTION;
  SET time_zone = "+00:00";
  
  
  /*!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 */;
  /*!40101 SET NAMES utf8mb4 */;
  
  --
  -- Database: `laravel_kianart`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `categories`
  --
  
  CREATE TABLE `categories` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `caption` text 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 `categories`
  --
  
  INSERT INTO `categories` (`id`, `name`, `image`, `caption`, `created_at`, `updated_at`) VALUES
  (1, 'Programming', '1581752293programming.png', 'برنامه نویسی', '2020-02-12 08:22:20', '2020-02-15 04:08:13');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `comments`
  --
  
  CREATE TABLE `comments` (
    `id` int(10) UNSIGNED NOT NULL,
    `post_id` int(10) UNSIGNED NOT NULL,
    `is_active` int(11) NOT NULL DEFAULT 0,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `author` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `body` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `photo` varchar(191) 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 `comments`
  --
  
  INSERT INTO `comments` (`id`, `post_id`, `is_active`, `email`, `author`, `body`, `photo`, `created_at`, `updated_at`) VALUES
  (1, 1, 1, 'bahar.daryosh@gmail.com', 'bahar daryosh', 'fgbhdfgbdfr', '/images/1581752699angular.png', '2020-02-15 05:36:41', '2020-02-15 05:36:55');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `comment_replies`
  --
  
  CREATE TABLE `comment_replies` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `comment_id` int(10) UNSIGNED NOT NULL,
    `is_active` int(11) NOT NULL DEFAULT 0,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `photo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `author` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `body` text 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 `comment_replies`
  --
  
  INSERT INTO `comment_replies` (`id`, `comment_id`, `is_active`, `email`, `photo`, `author`, `body`, `created_at`, `updated_at`) VALUES
  (1, 1, 0, 'bahar.daryosh@gmail.com', '/images/1581752699angular.png', 'bahar daryosh', 'fdgfgds', '2020-02-15 05:37:06', '2020-02-15 05:37:06');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED 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(191) 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_resets_table', 1),
  (3, '2019_08_19_000000_create_failed_jobs_table', 1),
  (4, '2020_01_15_173803_create_roles_table', 1),
  (5, '2020_01_15_183652_create-role-user-table', 1),
  (6, '2020_01_26_060843_add_photo_column_to_users_tables', 1),
  (7, '2020_01_26_062915_create_photos_table', 1),
  (8, '2020_02_04_053441_create_posts_table', 1),
  (9, '2020_02_04_085521_create_categories_table', 1),
  (10, '2020_02_04_114306_create_comments_table', 1),
  (11, '2020_02_04_114635_create_comment_relpies_table', 1),
  (12, '2020_02_08_084213_create_work_samples_table', 1),
  (13, '2020_02_08_091242_create_skills_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `token` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `photos`
  --
  
  CREATE TABLE `photos` (
    `id` int(10) UNSIGNED NOT NULL,
    `file` varchar(191) 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 `photos`
  --
  
  INSERT INTO `photos` (`id`, `file`, `created_at`, `updated_at`) VALUES
  (1, '1581752639programming.png', '2020-02-15 04:13:59', '2020-02-15 04:13:59'),
  (2, '1581752699angular.png', '2020-02-15 04:14:59', '2020-02-15 04:14:59'),
  (3, '1581757713programming.png', '2020-02-15 05:38:33', '2020-02-15 05:38:33'),
  (4, '1581757714ui&ux.jpg', '2020-02-15 05:38:34', '2020-02-15 05:38:34'),
  (5, '1581757714Wordpress.jpg', '2020-02-15 05:38:34', '2020-02-15 05:38:34');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `posts`
  --
  
  CREATE TABLE `posts` (
    `id` int(10) UNSIGNED NOT NULL,
    `title` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `caption` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL,
    `photo_id` int(10) UNSIGNED NOT NULL,
    `category_id` int(10) 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 `posts`
  --
  
  INSERT INTO `posts` (`id`, `title`, `caption`, `user_id`, `photo_id`, `category_id`, `created_at`, `updated_at`) VALUES
  (1, 'سرعت پیشرفت خودروسازی', 'این پست برای تست است', 1, 1, 1, '2020-02-15 04:13:59', '2020-02-15 04:13:59'),
  (2, 'خودروسازی', 'این پست برای تست است', 1, 2, 1, '2020-02-15 04:14:59', '2020-02-15 04:14:59');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `roles`
  --
  
  CREATE TABLE `roles` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `description` varchar(191) 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`, `description`, `created_at`, `updated_at`) VALUES
  (1, 'Administrator', 'admin', '2020-02-12 08:21:23', '2020-02-12 08:21:23'),
  (2, 'Subscriber', 'subscriber', '2020-02-12 08:21:23', '2020-02-12 08:21:23'),
  (3, 'Seller', 'a seller', '2020-02-12 08:21:23', '2020-02-12 08:21:23'),
  (4, 'Buyer', 'buyer', '2020-02-12 08:21:23', '2020-02-12 08:21:23'),
  (5, 'Guest', 'guest', '2020-02-12 08:21:23', '2020-02-12 08:21:23');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `role_user`
  --
  
  CREATE TABLE `role_user` (
    `id` int(10) UNSIGNED NOT NULL,
    `role_id` int(10) UNSIGNED NOT NULL,
    `user_id` int(10) UNSIGNED NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `role_user`
  --
  
  INSERT INTO `role_user` (`id`, `role_id`, `user_id`) VALUES
  (1, 1, 1),
  (2, 2, 2);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `skills`
  --
  
  CREATE TABLE `skills` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `body` text 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 `skills`
  --
  
  INSERT INTO `skills` (`id`, `name`, `image`, `body`, `created_at`, `updated_at`) VALUES
  (1, 'laravel', 'laravel.png', 'برنامه نویسی با php', '2020-02-12 08:22:03', '2020-02-12 08:22:03'),
  (2, 'Android', '', 'برنامه نویسی برای App ', NULL, NULL),
  (3, 'Java', '', 'برنامه نویسی برای App', NULL, NULL),
  (4, 'angular', 'angular.png', 'برنامه نویسی برای App , Website', '2020-02-15 02:06:30', '2020-02-15 02:06:30'),
  (5, 'WordPress', 'Wordpress.jpg', 'طراحی سایت با قالب های WordPress', '2020-02-15 02:08:36', '2020-02-15 02:08:36'),
  (6, 'Ui & Ux', 'ui&ux.jpg', 'طراحی با قوانین UI , UX', '2020-02-15 02:12:44', '2020-02-15 02:12:44');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(191) 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,
    `avatar_id` int(11) NOT NULL,
    `is_active` int(11) NOT NULL DEFAULT 0
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`, `avatar_id`, `is_active`) VALUES
  (1, 'bahar daryosh', 'bahar.daryosh@gmail.com', NULL, '$2y$10$M.7ki4.kF1AfMrPY2ZBLEu7V1God4mlrcjFRMv6kmGVIYLPTWNRKW', NULL, '2020-02-12 08:21:23', '2020-02-12 08:21:23', 2, 1),
  (2, 'yorsa hosseini', 'yosra.h@gmail.com', NULL, '$2y$10$Agm5uDMpjnAIbTFperbi3OFjEkmsltXBvFMcdVqGwKC3WfPw4byqi', NULL, '2020-02-12 08:21:24', '2020-02-12 08:21:24', 4, 0);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `work_samples`
  --
  
  CREATE TABLE `work_samples` (
    `id` int(10) UNSIGNED NOT NULL,
    `title` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `subtitle` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `image` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `caption` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `category_id` int(11) DEFAULT NULL,
    `skill_id` int(11) DEFAULT NULL,
    `customerName` varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `workConspectus` varchar(191) 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 `work_samples`
  --
  
  INSERT INTO `work_samples` (`id`, `title`, `subtitle`, `image`, `caption`, `category_id`, `skill_id`, `customerName`, `workConspectus`, `created_at`, `updated_at`) VALUES
  (7, 'اندیشمندان البرز', 'بزرگترین و معتبرترین شرکت حقوقی', '158124341615.jpg', 'بزرگترین و معتبرترین شرکت حقوقی که برای ساختن این پروژه تکنولوژی طراحی گرافیک اختصاصی و php  استفاده شده است .', 1, 1, 'اندیشمندان البرز', 'شرکت حقوقی', '2020-02-09 06:46:56', '2020-02-10 07:32:26'),
  (9, 'هایپر مبل ایران', 'این پروژه عظیم در حال طراحی می باشد', '158149340214.jpg', NULL, 1, 3, 'هایپر مبل ایران', 'خدماتی', '2020-02-12 04:13:22', '2020-02-12 04:13:22');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `categories`
  --
  ALTER TABLE `categories`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `comments`
  --
  ALTER TABLE `comments`
    ADD PRIMARY KEY (`id`),
    ADD KEY `comments_post_id_index` (`post_id`);
  
  --
  -- Indexes for table `comment_replies`
  --
  ALTER TABLE `comment_replies`
    ADD PRIMARY KEY (`id`),
    ADD KEY `comment_replies_comment_id_index` (`comment_id`);
  
  --
  -- Indexes for table `failed_jobs`
  --
  ALTER TABLE `failed_jobs`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `photos`
  --
  ALTER TABLE `photos`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `posts`
  --
  ALTER TABLE `posts`
    ADD PRIMARY KEY (`id`),
    ADD KEY `posts_user_id_index` (`user_id`),
    ADD KEY `posts_photo_id_index` (`photo_id`),
    ADD KEY `posts_category_id_index` (`category_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`);
  
  --
  -- Indexes for table `skills`
  --
  ALTER TABLE `skills`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- Indexes for table `work_samples`
  --
  ALTER TABLE `work_samples`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `categories`
  --
  ALTER TABLE `categories`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `comments`
  --
  ALTER TABLE `comments`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- AUTO_INCREMENT for table `comment_replies`
  --
  ALTER TABLE `comment_replies`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  
  --
  -- 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=14;
  
  --
  -- AUTO_INCREMENT for table `photos`
  --
  ALTER TABLE `photos`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `posts`
  --
  ALTER TABLE `posts`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `roles`
  --
  ALTER TABLE `roles`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `role_user`
  --
  ALTER TABLE `role_user`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `skills`
  --
  ALTER TABLE `skills`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT for table `work_samples`
  --
  ALTER TABLE `work_samples`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=10;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `comments`
  --
  ALTER TABLE `comments`
    ADD CONSTRAINT `comments_post_id_foreign` FOREIGN KEY (`post_id`) REFERENCES `posts` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `comment_replies`
  --
  ALTER TABLE `comment_replies`
    ADD CONSTRAINT `comment_replies_comment_id_foreign` FOREIGN KEY (`comment_id`) REFERENCES `comments` (`id`) ON DELETE CASCADE;
  
  --
  -- Constraints for table `posts`
  --
  ALTER TABLE `posts`
    ADD CONSTRAINT `posts_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
  COMMIT;
  
  /*!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 */;
  