-- https://www.phpmyadmin.net/
--
-- Хост: localhost:3306
-- Время создания: Май 24 2019 г., 10:15
-- Версия сервера: 5.6.41-84.1
-- Версия PHP: 7.2.7

START TRANSACTION;



--
-- База данных: `buyautou_newwa`
--

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

--
-- Структура таблицы `articles`
--

CREATE TABLE `articles` (
  `id` int(10) UNSIGNED NOT NULL,
  `category_id` int(10) UNSIGNED NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL DEFAULT '',
  `content` text NOT NULL,
  `image` varchar(255) DEFAULT NULL,
  `status` enum('PUBLISHED','DRAFT') NOT NULL DEFAULT 'PUBLISHED',
  `date` date NOT NULL,
  `featured` tinyint(1) NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `articles`
--

INSERT INTO `articles` (`id`, `category_id`, `title`, `slug`, `content`, `image`, `status`, `date`, `featured`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 'First Post Goes here and we are about to see how it goes )', 'first-post-test', '<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Cras sit amet commodo augue. Nulla maximus ultrices felis, ac convallis ligula volutpat a. Phasellus placerat nisi turpis, ut euismod eros fermentum ac. Etiam ullamcorper nibh massa, vel consequat tortor cursus vel. Proin mattis elit magna. Praesent et dui vel erat rutrum faucibus ut ac ipsum. Fusce elit justo, placerat luctus auctor a, suscipit non quam. Praesent tincidunt tristique metus, at luctus nisl pharetra eu.</p>\r\n\r\n<p><strong><em>Aliquam lacinia venena</em>tis </strong>finibus. Ut scelerisque, ex sed ultrices dignissim, mi neque sollicitudin massa, eget mollis magna tellus nec neque. Nullam vitae eros dictum, ultrices ligula a, elementum turpis. Sed a fringilla dui, vitae feugiat turpis. Nullam a pharetra ipsum. Curabitur sagittis est eget lorem condimentum facilisis at vitae risus. Integer tortor odio, bibendum et augue vel, aliquam aliquet erat. Duis malesuada ullamcorper nibh, feugiat faucibus ante auctor vel. Sed ultrices, diam non bibendum feugiat, ex eros tristique tellus, vel ornare eros lacus quis mi. Pellentesque vel quam ac tortor facilisis consequat a ut sapien. Curabitur ullamcorper a lorem rutrum maximus. Aliquam ex lacus, vulputate ut mattis eget, malesuada eu augue. Donec auctor finibus ullamcorper. Sed pretium egestas tincidunt.</p>\r\n\r\n<p>Aliquam eget eros vel ex sollicitudin scelerisque vel vel nibh. Nulla porta elit quam, a lobortis risus cursus in. Cras mi justo, convallis in tempor in, vehicula sit amet justo. Pellentesque ultrices est a tellus semper, in posuere purus rutrum. Donec condimentum dictum fermentum. Proin hendrerit sed nunc at laoreet. Sed convallis, sapien luctus maximus consectetur, lectus dui suscipit justo, fringilla sollicitudin nisi velit a nisl. Quisque eleifend est nisl, quis accumsan lectus pulvinar sit amet. Vivamus at consequat risus. Proin hendrerit urna accumsan eleifend cursus. Vestibulum elementum nisl vitae nibh vulputate malesuada. Mauris pretium commodo magna, et placerat neque aliquet dignissim. Fusce quis quam nisi. Phasellus sit amet imperdiet eros, nec elementum ligula. Nullam et lectus ut quam egestas faucibus.</p>\r\n\r\n<p>Maecenas maximus scelerisque nunc sit amet vehicula. Sed ex elit, tincidunt ac lacinia a, placerat quis urna. Nam at lacus egestas, fermentum libero vel, hendrerit lectus. Vivamus at dui nibh. Fusce vulputate pretium tempor. Quisque bibendum non dolor non aliquet. Vivamus tincidunt, ligula a convallis suscipit, magna nisi viverra justo, id accumsan justo purus maximus augue. Ut tincidunt leo id elit viverra, quis imperdiet mauris vehicula. Mauris sit amet ante lectus. Nullam lorem felis, varius at nibh vel, feugiat fringilla urna.</p>\r\n\r\n<p>Maecenas et gravida mi. C<strong>ras nec posuere sapien</strong>, ac molestie nisi. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Nam a justo et felis consequat dapibus eget ut diam. Maecenas hendrerit lorem lectus, nec tincidunt ex laoreet vel. Nullam pulvinar commodo vestibulum. Praesent ut elementum neque, ac vestibulum odio. Nulla quis feugiat est. Proin tincidunt velit sit amet congue semper. Vestibulum molestie erat lectus, nec semper ipsum auctor ut. Suspendisse et ex vel sapien accumsan fermentum. Curabitur sit amet tempus ex. Nullam pharetra eleifend purus sit amet posuere. Nam commodo condimentum ullamcorper. Phasellus nec vulputate nibh.</p>\r\n\r\n<p>text</p>', 'uploads/bg1.png', 'PUBLISHED', '2017-04-08', 0, '2017-04-03 11:21:22', '2017-05-11 23:28:40', NULL);

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

--
-- Структура таблицы `article_tag`
--

CREATE TABLE `article_tag` (
  `id` int(10) UNSIGNED NOT NULL,
  `article_id` int(10) UNSIGNED NOT NULL,
  `tag_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Структура таблицы `categories`
--

CREATE TABLE `categories` (
  `id` int(10) UNSIGNED NOT NULL,
  `parent_id` int(11) DEFAULT '0',
  `lft` int(10) UNSIGNED DEFAULT NULL,
  `rgt` int(10) UNSIGNED DEFAULT NULL,
  `depth` int(10) UNSIGNED DEFAULT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `categories`
--

INSERT INTO `categories` (`id`, `parent_id`, `lft`, `rgt`, `depth`, `name`, `slug`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, NULL, NULL, NULL, NULL, 'Design', 'design', '2017-04-03 11:21:01', '2017-04-03 11:21:01', NULL);

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

--
-- Структура таблицы `mails`
--

CREATE TABLE `mails` (
  `id` int(10) UNSIGNED NOT NULL,
  `mail` varchar(255) NOT NULL DEFAULT '',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `mails`
--

INSERT INTO `mails` (`id`, `mail`, `created_at`, `updated_at`) VALUES
(4, 'ivan@bigsiter.ru', '2017-04-28 03:23:49', '2017-04-28 03:23:49');

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

--
-- Структура таблицы `menu_items`
--

CREATE TABLE `menu_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(100) NOT NULL,
  `type` varchar(20) DEFAULT NULL,
  `link` varchar(255) DEFAULT NULL,
  `page_id` int(10) UNSIGNED DEFAULT NULL,
  `parent_id` int(10) UNSIGNED DEFAULT NULL,
  `lft` int(10) UNSIGNED DEFAULT NULL,
  `rgt` int(10) UNSIGNED DEFAULT NULL,
  `depth` 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=utf8;

--
-- Дамп данных таблицы `menu_items`
--

INSERT INTO `menu_items` (`id`, `name`, `type`, `link`, `page_id`, `parent_id`, `lft`, `rgt`, `depth`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'About', 'page_link', NULL, 1, NULL, 2, 3, 1, '2017-04-03 10:25:25', '2017-04-03 11:02:07', NULL),
(2, 'Services', 'internal_link', 'services', 2, NULL, 4, 5, 1, '2017-04-03 10:35:23', '2017-04-06 13:17:54', NULL),
(3, 'Contact', 'page_link', NULL, 3, NULL, 12, 13, 1, '2017-04-03 11:02:00', '2017-04-03 11:11:13', NULL),
(5, 'Templates', 'internal_link', '/templates', 1, NULL, 8, 9, 1, '2017-04-03 11:10:51', '2017-04-03 14:50:48', NULL),
(6, 'Blog', 'internal_link', '/blog', NULL, NULL, 10, 11, 1, '2017-04-03 11:11:01', '2017-04-03 11:11:13', NULL);

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

--
-- Структура таблицы `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `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, '2015_08_04_131614_create_settings_table', 2),
(4, '2015_08_04_130507_create_article_tag_table', 3),
(5, '2015_08_04_130520_create_articles_table', 3),
(6, '2015_08_04_130551_create_categories_table', 3),
(7, '2015_08_04_131626_create_tags_table', 3),
(8, '2016_07_24_060017_add_slug_to_categories_table', 3),
(9, '2016_07_24_060101_add_slug_to_tags_table', 3),
(10, '2016_05_05_115641_create_menu_items_table', 4),
(11, '2016_05_25_121918_create_pages_table', 5),
(22, '2017_04_03_055337_create_templates_table', 6),
(23, '2017_04_03_081902_create_template_tag_table', 6),
(24, '2017_04_03_082042_create_requirements_table', 6),
(25, '2017_04_03_082116_create_template_requirement_table', 6),
(26, '2017_04_03_091141_update_templates_table', 6),
(35, '2017_04_06_063916_create_services_table', 7),
(36, '2017_04_25_041614_create_orders_table', 8),
(38, '2017_04_25_041947_create_order_template_table', 9),
(39, '2017_04_27_173922_update_orders_table', 10),
(41, '2017_04_27_201433_add_download_to_templates_table', 11);

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

--
-- Структура таблицы `orders`
--

CREATE TABLE `orders` (
  `id` int(10) UNSIGNED NOT NULL,
  `fname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `lname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sum` int(10) UNSIGNED DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `is_paid` tinyint(4) NOT NULL DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Дамп данных таблицы `orders`
--

INSERT INTO `orders` (`id`, `fname`, `lname`, `email`, `sum`, `created_at`, `updated_at`, `is_paid`) VALUES
(1, 'Ivan', 'Domashkin', 'ivandomashkin@yandex.ru', NULL, '2017-04-28 06:00:00', NULL, 0),
(2, 'Ivan', 'Domashkin', 'ivandomashkin@yandex.ru', 145, '2017-04-28 06:23:00', NULL, 0),
(3, 'Ivan', 'Domashkin', 'ivan@bigsiter.ru', 145, '2017-04-28 22:32:22', NULL, 1),
(4, 'Boris', 'Go', 'ewgccorp@yahoo.com', NULL, '2017-05-03 21:51:40', '2017-05-03 21:51:40', 0),
(5, 'Boris', 'Go', 'ewgccorp@yahoo.com', 466, '2017-05-11 23:21:05', '2017-05-11 23:25:04', 1);

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

--
-- Структура таблицы `order_template`
--

CREATE TABLE `order_template` (
  `id` int(10) UNSIGNED NOT NULL,
  `template_id` int(10) UNSIGNED NOT NULL,
  `order_id` int(10) UNSIGNED NOT NULL,
  `installation` tinyint(1) DEFAULT NULL,
  `logo` tinyint(1) DEFAULT NULL,
  `psd` tinyint(1) DEFAULT NULL,
  `hosting` tinyint(1) 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;

--
-- Дамп данных таблицы `order_template`
--

INSERT INTO `order_template` (`id`, `template_id`, `order_id`, `installation`, `logo`, `psd`, `hosting`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, 1, 1, 0, 0, NULL, NULL, NULL),
(2, 1, 2, 1, 1, 0, 0, NULL, NULL, NULL),
(3, 1, 3, 1, 1, 0, 0, NULL, NULL, NULL),
(4, 1, 4, 1, 1, 0, 0, NULL, NULL, NULL),
(5, 3, 5, 1, 1, 1, 1, NULL, NULL, NULL),
(6, 2, 5, 0, 1, 0, 0, NULL, NULL, NULL);

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

--
-- Структура таблицы `pages`
--

CREATE TABLE `pages` (
  `id` int(10) UNSIGNED NOT NULL,
  `template` varchar(255) NOT NULL,
  `name` varchar(255) NOT NULL,
  `title` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `content` text,
  `extras` text,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `pages`
--

INSERT INTO `pages` (`id`, `template`, `name`, `title`, `slug`, `content`, `extras`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'common', 'About Us', 'About Us', 'about', '<p>About Us&nbsp;Text</p>', '{\"meta_title\":\"About Us\",\"meta_description\":\"About Us\",\"meta_keywords\":\"About Us\",\"subheader\":\"Want to learn a little more about us? You\\u2019ve come to the right place!\"}', '2017-04-03 10:12:42', '2017-04-03 10:24:19', NULL),
(2, 'common', 'Services', 'Services', 'services', NULL, '{\"meta_title\":\"Services\",\"meta_description\":\"Services\",\"meta_keywords\":\"Services\",\"subheader\":\"Subheader about services\"}', '2017-04-03 10:26:25', '2017-04-03 10:26:25', NULL),
(3, 'contact', 'Contact', 'Contact', 'contact', NULL, '{\"meta_title\":\"Contact\",\"meta_description\":\"Contact\",\"meta_keywords\":\"Contact\",\"subheader\":\"Contact subheader text\",\"schedule\":\"<p><i class=\\\"fa fa-phone\\\"><\\/i>111-222-333<\\/p>\\r\\n<p>\\r\\n<i class=\\\"fa fa-clock-o\\\"><\\/i><span>Mon-Fri:<\\/span> 9.00am - 6.00pm<br>\\r\\n<span>Sat:<\\/span> By appointment only\\r\\n<\\/p>\\r\\n <p><i class=\\\"fa fa-ban\\\"><\\/i><span>Sun:<\\/span> Closed<\\/p>\"}', '2017-04-03 11:01:49', '2017-04-03 11:07:42', NULL),
(4, 'common', 'Templates', 'Templates', 'templates', '<p><strong>Proin pellente</strong>sque iaculis metus vel dignissim. Integer sit amet sem ut elit faucibus fermentum. Integer sed massa elementum, pellentesque lacus ut, vestibulum orci. Donec quis felis vel tortor blandit suscipit sit amet nec nunc. Nunc neque tortor, venenatis sit amet lacus nec, pellentesque vestibulum augue. Pellentesque at tempus odio. Aliquam rhoncus ipsum ex. Fusce non est sed justo consectetur ornare vel id magna. Pellentesque pulvinar sollicitudin hendrerit. Pellentesque id nulla pretium sapien lacinia iaculis sed at tortor. Praesent eget ante a massa tempor lobortis. Nam non ligula at libero tincidunt vestibulum.</p>', '{\"meta_title\":\"Templates Super Title\",\"meta_description\":\"Templates\",\"meta_keywords\":\"Templates\",\"subheader\":\"test roin pellentesque iaculis metus vel dignissim. Integer sit amet sem ut elit faucibus fermentum. Integer sed massa elementum, pellentesque lacus ut, vestibulum orci. Donec quis felis vel tortor blandit suscipit sit amet nec nunc.\"}', '2017-04-21 14:10:47', '2017-05-11 23:32:04', NULL);

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

--
-- Структура таблицы `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `permissions`
--

INSERT INTO `permissions` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'edit', '2017-05-12 05:21:45', '2017-05-12 05:21:45');

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

--
-- Структура таблицы `permission_roles`
--

CREATE TABLE `permission_roles` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `permission_roles`
--

INSERT INTO `permission_roles` (`permission_id`, `role_id`) VALUES
(1, 1);

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

--
-- Структура таблицы `permission_users`
--

CREATE TABLE `permission_users` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `permission_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Структура таблицы `requirements`
--

CREATE TABLE `requirements` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `requirements`
--

INSERT INTO `requirements` (`id`, `name`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'Web Server (preferably Apache)', NULL, NULL, NULL),
(2, 'PHP (at least 5.2)', NULL, NULL, NULL),
(3, 'MySQL', NULL, NULL, NULL),
(4, 'cURL', NULL, NULL, NULL),
(5, 'Fsock', NULL, NULL, NULL);

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

--
-- Структура таблицы `roles`
--

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `roles`
--

INSERT INTO `roles` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'Admin', '2017-05-12 05:21:31', '2017-05-12 05:21:31');

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

--
-- Структура таблицы `role_users`
--

CREATE TABLE `role_users` (
  `role_id` int(10) UNSIGNED NOT NULL,
  `user_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `role_users`
--

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

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

--
-- Структура таблицы `services`
--

CREATE TABLE `services` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `icon` varchar(255) DEFAULT NULL,
  `icon_big` varchar(255) DEFAULT NULL,
  `fade` varchar(255) DEFAULT 'Right',
  `text` text,
  `priority` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `services`
--

INSERT INTO `services` (`id`, `name`, `slug`, `icon`, `icon_big`, `fade`, `text`, `priority`, `created_at`, `updated_at`) VALUES
(1, 'Web-design', 'web-design', 'uploads/service/service1.png', 'uploads/service/serv1.png', 'Right', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor, ', 0, NULL, NULL),
(2, 'Development', 'development', 'uploads/service/service2.png', 'uploads/service/serv2.png', 'Down', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor,', 0, NULL, '2017-04-06 13:43:26'),
(3, 'Mobile application', 'mobile', 'uploads/service/service3.png', 'uploads/service/serv3.png', 'Left', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor, ', 0, NULL, NULL),
(4, 'Branding&logo', 'branding', 'uploads/service/service4.png', 'uploads/service/serv4.png', 'Right', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor, ', 0, NULL, NULL),
(5, 'E-marketing', 'e-marketing', 'uploads/service/service5.png', 'uploads/service/serv5.png', 'Up', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor,', 5, NULL, '2017-04-06 13:44:31'),
(6, 'Hosting', 'hosting', 'uploads/service/service6.png', 'uploads/service/serv6.png', 'Left', 'Cras placerat magna habitasse porttitor cum, odio ut! Sed mus placerat proin pulvinar turpis! Est augue porta lectus ut nisi adipiscing sit amet rhoncus, elementum sociis porttitor porta lectus magnis, dis purus cras dolor, ', 0, NULL, NULL);

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

--
-- Структура таблицы `tags`
--

CREATE TABLE `tags` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `slug` varchar(255) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `tags`
--

INSERT INTO `tags` (`id`, `name`, `slug`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 'PSD', 'psd', NULL, NULL, NULL),
(2, 'JS', 'js', NULL, NULL, NULL),
(3, 'PHP', 'php', NULL, NULL, NULL);

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

--
-- Структура таблицы `templates`
--

CREATE TABLE `templates` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `subtitle` varchar(255) DEFAULT NULL,
  `slug` varchar(255) NOT NULL,
  `preview` varchar(255) DEFAULT NULL,
  `preview_mobile` varchar(255) DEFAULT NULL,
  `bg` varchar(255) DEFAULT NULL,
  `img` varchar(255) DEFAULT NULL,
  `text` text,
  `priority` int(10) UNSIGNED NOT NULL DEFAULT '0',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `price` int(10) UNSIGNED DEFAULT NULL,
  `price_installation` int(10) UNSIGNED DEFAULT NULL,
  `price_logo` int(10) UNSIGNED DEFAULT NULL,
  `price_psd` int(10) UNSIGNED DEFAULT NULL,
  `price_hosting` int(10) UNSIGNED DEFAULT NULL,
  `demo` varchar(255) DEFAULT NULL,
  `download` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `templates`
--

INSERT INTO `templates` (`id`, `name`, `subtitle`, `slug`, `preview`, `preview_mobile`, `bg`, `img`, `text`, `priority`, `created_at`, `updated_at`, `price`, `price_installation`, `price_logo`, `price_psd`, `price_hosting`, `demo`, `download`) VALUES
(1, 'First template', 'Subtitle', 'first-template', 'uploads/templates/1/temp1.png', 'uploads/templates/1/prev1.png', 'uploads/templates/1/bg4.png', 'uploads/templates/1/bg4.png', NULL, 0, '2017-04-04 13:51:42', '2017-04-28 02:17:08', 123, 12, 10, 12, 20, 'http://ya.ru', 'http://ya.ru'),
(2, 'New super template of limousine website. Works great.', 'Ready to use in 30 minutes', 'new-super-template-of-limousine-website-works-great', 'uploads/temp/temp2.png', 'uploads/temp/temp5.png', 'uploads/Capture1.PNG', NULL, 'Fixed websitite', 0, '2017-05-03 21:59:05', '2017-05-03 21:59:05', 200, 10, 5, 3, 1, 'http://renovation-master.com/', 'http://cleaning-master.com/'),
(3, 'Super name for super limo template', 'fast and easy', 'super-name-for-super-limo-template', 'uploads/temp/temp6.png', 'uploads/temp/prev1.png', 'uploads/bg3.png', NULL, 'Description for this particular template', 10, '2017-05-11 23:11:41', '2019-05-09 23:11:01', 121, 12, 1, 5, 122, 'https://yahoo.com', 'https:cnn.com');

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

--
-- Структура таблицы `template_requirement`
--

CREATE TABLE `template_requirement` (
  `id` int(10) UNSIGNED NOT NULL,
  `template_id` int(10) UNSIGNED NOT NULL,
  `requirement_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `template_requirement`
--

INSERT INTO `template_requirement` (`id`, `template_id`, `requirement_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, NULL, NULL, NULL),
(2, 1, 2, NULL, NULL, NULL),
(3, 1, 3, NULL, NULL, NULL),
(4, 1, 4, NULL, NULL, NULL),
(5, 1, 5, NULL, NULL, NULL),
(6, 2, 3, NULL, NULL, NULL),
(7, 2, 4, NULL, NULL, NULL),
(8, 3, 2, NULL, NULL, NULL);

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

--
-- Структура таблицы `template_tag`
--

CREATE TABLE `template_tag` (
  `id` int(10) UNSIGNED NOT NULL,
  `template_id` int(10) UNSIGNED NOT NULL,
  `tag_id` int(10) UNSIGNED NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `deleted_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Дамп данных таблицы `template_tag`
--

INSERT INTO `template_tag` (`id`, `template_id`, `tag_id`, `created_at`, `updated_at`, `deleted_at`) VALUES
(1, 1, 1, NULL, NULL, NULL),
(2, 1, 2, NULL, NULL, NULL),
(3, 1, 3, NULL, NULL, NULL),
(4, 2, 2, NULL, NULL, NULL),
(5, 3, 2, NULL, NULL, NULL),
(6, 3, 3, NULL, NULL, NULL);

--
-- Индексы сохранённых таблиц
--

--
-- Индексы таблицы `articles`
--
ALTER TABLE `articles`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `article_tag`
--
ALTER TABLE `article_tag`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `categories`
--
ALTER TABLE `categories`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `categories_slug_unique` (`slug`);

--
-- Индексы таблицы `mails`
--
ALTER TABLE `mails`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `mails_mail_unique` (`mail`);

--
-- Индексы таблицы `menu_items`
--
ALTER TABLE `menu_items`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `order_template`
--
ALTER TABLE `order_template`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `permissions_name_unique` (`name`);

--
-- Индексы таблицы `permission_roles`
--
ALTER TABLE `permission_roles`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `permission_roles_role_id_foreign` (`role_id`);

--
-- Индексы таблицы `permission_users`
--
ALTER TABLE `permission_users`
  ADD PRIMARY KEY (`user_id`,`permission_id`),
  ADD KEY `permission_users_permission_id_foreign` (`permission_id`);

--
-- Индексы таблицы `requirements`
--
ALTER TABLE `requirements`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

--
-- Индексы таблицы `role_users`
--
ALTER TABLE `role_users`
  ADD PRIMARY KEY (`role_id`,`user_id`),
  ADD KEY `role_users_user_id_foreign` (`user_id`);

--
-- Индексы таблицы `services`
--
ALTER TABLE `services`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `services_name_unique` (`name`),
  ADD UNIQUE KEY `services_slug_unique` (`slug`);

--
-- Индексы таблицы `tags`
--
ALTER TABLE `tags`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `tags_slug_unique` (`slug`);

--
-- Индексы таблицы `templates`
--
ALTER TABLE `templates`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `templates_slug_unique` (`slug`);

--
-- Индексы таблицы `template_requirement`
--
ALTER TABLE `template_requirement`
  ADD PRIMARY KEY (`id`);

--
-- Индексы таблицы `template_tag`
--
ALTER TABLE `template_tag`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT для сохранённых таблиц
--

--
-- AUTO_INCREMENT для таблицы `articles`
--
ALTER TABLE `articles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT для таблицы `article_tag`
--
ALTER TABLE `article_tag`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT для таблицы `categories`
--
ALTER TABLE `categories`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT для таблицы `mails`
--
ALTER TABLE `mails`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT для таблицы `menu_items`
--
ALTER TABLE `menu_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT для таблицы `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=42;

--
-- AUTO_INCREMENT для таблицы `orders`
--
ALTER TABLE `orders`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT для таблицы `order_template`
--
ALTER TABLE `order_template`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT для таблицы `pages`
--
ALTER TABLE `pages`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT для таблицы `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT для таблицы `requirements`
--
ALTER TABLE `requirements`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT для таблицы `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT для таблицы `services`
--
ALTER TABLE `services`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- AUTO_INCREMENT для таблицы `tags`
--
ALTER TABLE `tags`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT для таблицы `templates`
--
ALTER TABLE `templates`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT для таблицы `template_requirement`
--
ALTER TABLE `template_requirement`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT для таблицы `template_tag`
--
ALTER TABLE `template_tag`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Ограничения внешнего ключа сохраненных таблиц
--

--
-- Ограничения внешнего ключа таблицы `permission_roles`
--
ALTER TABLE `permission_roles`
  ADD CONSTRAINT `permission_roles_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `permission_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE;

--
-- Ограничения внешнего ключа таблицы `permission_users`
--
ALTER TABLE `permission_users`
  ADD CONSTRAINT `permission_users_permission_id_foreign` FOREIGN KEY (`permission_id`) REFERENCES `permissions` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `permission_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;

--
-- Ограничения внешнего ключа таблицы `role_users`
--
ALTER TABLE `role_users`
  ADD CONSTRAINT `role_users_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `role_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

