-- https://www.phpmyadmin.net/
--
-- Hôte : localhost
-- Généré le :  mer. 12 déc. 2018 à 23:24
-- Version du serveur :  10.3.10-MariaDB-log
-- Version de PHP :  7.2.11

START TRANSACTION;



--
-- Base de données :  `charli`
--

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

--
-- Structure de la table `charlis`
--

CREATE TABLE `charlis` (
  `id` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `group_id` int(11) NOT NULL,
  `longitude` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '2.299083201214671',
  `latitude` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '48.852461424472935',
  `charge_id` int(11) DEFAULT NULL,
  `sim` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
  `couleur` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `software` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sw_arduino` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `sw_opi` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `offline_alert` tinyint(4) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `last_lmk_review` timestamp NULL DEFAULT NULL,
  `last_charli_review` timestamp NULL DEFAULT NULL,
  `user_id` int(11) NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `video_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `charlis`
--

INSERT INTO `charlis` (`id`, `name`, `group_id`, `longitude`, `latitude`, `charge_id`, `sim`, `couleur`, `software`, `sw_arduino`, `sw_opi`, `offline_alert`, `created_at`, `last_lmk_review`, `last_charli_review`, `user_id`, `type`, `video_id`) VALUES
('27472646', 'Premier Charli de test', 4, '2.299083201214671', '48.852461424472935', NULL, 'dfsfsfsf', 'Blanc', 'sfdfsf', 'fdsfsfs', 'fdsfsfs', 0, '2018-12-10 15:20:01', NULL, NULL, 2, '[\"1\"]', 1);

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

--
-- Structure de la table `data_rows`
--

CREATE TABLE `data_rows` (
  `id` int(10) UNSIGNED NOT NULL,
  `data_type_id` int(10) UNSIGNED NOT NULL,
  `field` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `required` tinyint(1) NOT NULL DEFAULT 0,
  `browse` tinyint(1) NOT NULL DEFAULT 1,
  `read` tinyint(1) NOT NULL DEFAULT 1,
  `edit` tinyint(1) NOT NULL DEFAULT 1,
  `add` tinyint(1) NOT NULL DEFAULT 1,
  `delete` tinyint(1) NOT NULL DEFAULT 1,
  `details` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `order` int(11) NOT NULL DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;



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

--
-- Structure de la table `data_types`
--

CREATE TABLE `data_types` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_singular` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_name_plural` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `icon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `model_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `policy_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `controller` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `generate_permissions` tinyint(1) NOT NULL DEFAULT 0,
  `server_side` tinyint(4) NOT NULL DEFAULT 0,
  `details` text 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;

--
-- Déchargement des données de la table `data_types`
--

INSERT INTO `data_types` (`id`, `name`, `slug`, `display_name_singular`, `display_name_plural`, `icon`, `model_name`, `policy_name`, `controller`, `description`, `generate_permissions`, `server_side`, `details`, `created_at`, `updated_at`) VALUES
(1, 'users', 'users', 'Utilisateur', 'Utilisateurs', 'voyager-person', 'TCG\\Voyager\\Models\\User', 'TCG\\Voyager\\Policies\\UserPolicy', NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null}', '2018-12-04 11:55:24', '2018-12-12 19:46:01'),
(2, 'menus', 'menus', 'Menu', 'Menus', 'voyager-list', 'TCG\\Voyager\\Models\\Menu', NULL, '', '', 1, 0, NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(3, 'roles', 'roles', 'Role', 'Roles', 'voyager-lock', 'TCG\\Voyager\\Models\\Role', NULL, '', '', 1, 0, NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(14, 'charlis', 'charlis', 'Charli', 'Charlis', 'voyager-tv', 'App\\Charli', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null}', '2018-12-09 18:11:53', '2018-12-12 22:18:11'),
(15, 'video', 'video', 'Video', 'Videos', NULL, 'App\\Video', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null}', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(16, 'videos', 'videos', 'Video', 'Videos', 'voyager-video', 'App\\Video', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null}', '2018-12-09 20:25:21', '2018-12-12 19:51:12'),
(17, 'groups', 'groups', 'Groupe', 'Groupes', 'voyager-archive', 'App\\Group', NULL, NULL, NULL, 1, 0, '{\"order_column\":null,\"order_display_column\":null}', '2018-12-09 20:54:48', '2018-12-09 22:38:14');

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

--
-- Structure de la table `groups`
--

CREATE TABLE `groups` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `groups`
--

INSERT INTO `groups` (`id`, `name`, `user_id`) VALUES
(4, 'Groupe de test 1', 2);

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

--
-- Structure de la table `menus`
--

CREATE TABLE `menus` (
  `id` int(10) 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;

--
-- Déchargement des données de la table `menus`
--

INSERT INTO `menus` (`id`, `name`, `created_at`, `updated_at`) VALUES
(1, 'admin', '2018-12-04 11:55:24', '2018-12-04 11:55:24');

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

--
-- Structure de la table `menu_items`
--

CREATE TABLE `menu_items` (
  `id` int(10) UNSIGNED NOT NULL,
  `menu_id` int(10) UNSIGNED DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `target` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '_self',
  `icon_class` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parent_id` int(11) DEFAULT NULL,
  `order` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `route` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `parameters` text COLLATE utf8mb4_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `menu_items`
--

INSERT INTO `menu_items` (`id`, `menu_id`, `title`, `url`, `target`, `icon_class`, `color`, `parent_id`, `order`, `created_at`, `updated_at`, `route`, `parameters`) VALUES
(4, 1, 'Roles', '', '_self', 'voyager-lock', NULL, NULL, 7, '2018-12-04 11:55:24', '2018-12-10 14:46:09', 'voyager.roles.index', NULL),
(8, 1, 'Compass', '', '_self', 'voyager-compass', NULL, 18, 1, '2018-12-04 11:55:24', '2018-12-10 14:45:28', 'voyager.compass.index', NULL),
(9, 1, 'BREAD', '', '_self', 'voyager-bread', NULL, 18, 3, '2018-12-04 11:55:24', '2018-12-10 14:45:28', 'voyager.bread.index', NULL),
(14, 1, 'Hooks', '', '_self', 'voyager-hook', NULL, 18, 5, '2018-12-04 11:55:25', '2018-12-10 14:45:57', 'voyager.hooks', NULL),
(16, 1, 'Médiathèque', '', '_self', 'voyager-images', NULL, NULL, 8, '2018-12-08 18:39:04', '2018-12-10 14:45:42', 'voyager.media.index', NULL),
(17, 1, 'Utilisateurs', '', '_self', 'voyager-person', NULL, NULL, 4, '2018-12-08 18:39:04', '2018-12-10 14:46:13', 'voyager.users.index', NULL),
(18, 1, 'Outils', '', '_self', 'voyager-tools', NULL, NULL, 5, '2018-12-08 18:39:04', '2018-12-10 14:46:13', NULL, NULL),
(19, 1, 'Créateur de Menus', '', '_self', 'voyager-list', NULL, 18, 2, '2018-12-08 18:39:04', '2018-12-10 14:45:28', 'voyager.menus.index', NULL),
(20, 1, 'Base de donnée', '', '_self', 'voyager-data', NULL, 18, 4, '2018-12-08 18:39:04', '2018-12-10 14:45:57', 'voyager.database.index', NULL),
(21, 1, 'Paramètres', '', '_self', 'voyager-settings', NULL, NULL, 6, '2018-12-08 18:39:04', '2018-12-10 14:46:09', 'voyager.settings.index', NULL),
(22, 1, 'Charlis', '', '_self', 'voyager-tv', NULL, NULL, 1, '2018-12-09 18:11:53', '2018-12-10 14:45:31', 'voyager.charlis.index', NULL),
(24, 1, 'Videos', '', '_self', 'voyager-video', '#000000', NULL, 2, '2018-12-09 20:25:21', '2018-12-10 14:46:00', 'voyager.videos.index', 'null'),
(25, 1, 'Groupes', '', '_self', 'voyager-archive', NULL, NULL, 3, '2018-12-09 20:54:48', '2018-12-10 14:46:07', 'voyager.groups.index', NULL);

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

--
-- Structure de la 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;

--
-- Déchargement des données de la 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, '2016_01_01_000000_add_voyager_user_fields', 1),
(4, '2016_01_01_000000_create_data_types_table', 1),
(5, '2016_05_19_173453_create_menu_table', 1),
(6, '2016_10_21_190000_create_roles_table', 1),
(7, '2016_10_21_190000_create_settings_table', 1),
(8, '2016_11_30_135954_create_permission_table', 1),
(9, '2016_11_30_141208_create_permission_role_table', 1),
(10, '2016_12_26_201236_data_types__add__server_side', 1),
(11, '2017_01_13_000000_add_route_to_menu_items_table', 1),
(12, '2017_01_14_005015_create_translations_table', 1),
(13, '2017_01_15_000000_make_table_name_nullable_in_permissions_table', 1),
(14, '2017_03_06_000000_add_controller_to_data_types_table', 1),
(15, '2017_04_21_000000_add_order_to_data_rows_table', 1),
(16, '2017_07_05_210000_add_policyname_to_data_types_table', 1),
(17, '2017_08_05_000000_add_group_to_settings_table', 1),
(18, '2017_11_26_013050_add_user_role_relationship', 1),
(19, '2017_11_26_015000_create_user_roles_table', 1),
(20, '2018_03_11_000000_add_user_settings', 1),
(21, '2018_03_14_000000_add_details_to_data_types_table', 1),
(22, '2018_03_16_000000_make_settings_value_nullable', 1),
(23, '2016_01_01_000000_create_pages_table', 2),
(24, '2016_01_01_000000_create_posts_table', 2),
(25, '2016_02_15_204651_create_categories_table', 2),
(26, '2017_04_11_000000_alter_post_nullable_fields_table', 2);

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

--
-- Structure de la table `password_resets`
--

CREATE TABLE `password_resets` (
  `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `permissions`
--

CREATE TABLE `permissions` (
  `id` int(10) UNSIGNED NOT NULL,
  `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `table_name` 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;

--
-- Déchargement des données de la table `permissions`
--

INSERT INTO `permissions` (`id`, `key`, `table_name`, `created_at`, `updated_at`) VALUES
(1, 'browse_admin', NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(2, 'browse_bread', NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(3, 'browse_database', NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(4, 'browse_media', NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(5, 'browse_compass', NULL, '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(6, 'browse_menus', 'menus', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(7, 'read_menus', 'menus', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(8, 'edit_menus', 'menus', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(9, 'add_menus', 'menus', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(10, 'delete_menus', 'menus', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(11, 'browse_roles', 'roles', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(12, 'read_roles', 'roles', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(13, 'edit_roles', 'roles', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(14, 'add_roles', 'roles', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(15, 'delete_roles', 'roles', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(16, 'browse_users', 'users', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(17, 'read_users', 'users', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(18, 'edit_users', 'users', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(19, 'add_users', 'users', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(20, 'delete_users', 'users', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(21, 'browse_settings', 'settings', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(22, 'read_settings', 'settings', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(23, 'edit_settings', 'settings', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(24, 'add_settings', 'settings', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(25, 'delete_settings', 'settings', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(41, 'browse_hooks', NULL, '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(52, 'browse_charli', 'charli', '2018-12-08 18:34:50', '2018-12-08 18:34:50'),
(53, 'read_charli', 'charli', '2018-12-08 18:34:50', '2018-12-08 18:34:50'),
(54, 'edit_charli', 'charli', '2018-12-08 18:34:50', '2018-12-08 18:34:50'),
(55, 'add_charli', 'charli', '2018-12-08 18:34:50', '2018-12-08 18:34:50'),
(56, 'delete_charli', 'charli', '2018-12-08 18:34:50', '2018-12-08 18:34:50'),
(57, 'browse_charlis', 'charlis', '2018-12-09 18:11:53', '2018-12-09 18:11:53'),
(58, 'read_charlis', 'charlis', '2018-12-09 18:11:53', '2018-12-09 18:11:53'),
(59, 'edit_charlis', 'charlis', '2018-12-09 18:11:53', '2018-12-09 18:11:53'),
(60, 'add_charlis', 'charlis', '2018-12-09 18:11:53', '2018-12-09 18:11:53'),
(61, 'delete_charlis', 'charlis', '2018-12-09 18:11:53', '2018-12-09 18:11:53'),
(62, 'browse_video', 'video', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(63, 'read_video', 'video', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(64, 'edit_video', 'video', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(65, 'add_video', 'video', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(66, 'delete_video', 'video', '2018-12-09 19:37:36', '2018-12-09 19:37:36'),
(67, 'browse_videos', 'videos', '2018-12-09 20:25:21', '2018-12-09 20:25:21'),
(68, 'read_videos', 'videos', '2018-12-09 20:25:21', '2018-12-09 20:25:21'),
(69, 'edit_videos', 'videos', '2018-12-09 20:25:21', '2018-12-09 20:25:21'),
(70, 'add_videos', 'videos', '2018-12-09 20:25:21', '2018-12-09 20:25:21'),
(71, 'delete_videos', 'videos', '2018-12-09 20:25:21', '2018-12-09 20:25:21'),
(72, 'browse_groups', 'groups', '2018-12-09 20:54:48', '2018-12-09 20:54:48'),
(73, 'read_groups', 'groups', '2018-12-09 20:54:48', '2018-12-09 20:54:48'),
(74, 'edit_groups', 'groups', '2018-12-09 20:54:48', '2018-12-09 20:54:48'),
(75, 'add_groups', 'groups', '2018-12-09 20:54:48', '2018-12-09 20:54:48'),
(76, 'delete_groups', 'groups', '2018-12-09 20:54:48', '2018-12-09 20:54:48');

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

--
-- Structure de la table `permission_role`
--

CREATE TABLE `permission_role` (
  `permission_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `permission_role`
--

INSERT INTO `permission_role` (`permission_id`, `role_id`) VALUES
(1, 1),
(1, 3),
(2, 1),
(3, 1),
(4, 1),
(5, 1),
(6, 1),
(7, 1),
(8, 1),
(9, 1),
(10, 1),
(11, 1),
(12, 1),
(13, 1),
(14, 1),
(15, 1),
(16, 1),
(17, 1),
(18, 1),
(19, 1),
(20, 1),
(21, 1),
(22, 1),
(23, 1),
(24, 1),
(25, 1),
(41, 1),
(52, 1),
(52, 2),
(52, 3),
(53, 1),
(53, 2),
(53, 3),
(54, 1),
(54, 3),
(55, 1),
(56, 1),
(56, 3),
(57, 1),
(57, 2),
(57, 3),
(58, 1),
(58, 2),
(58, 3),
(59, 1),
(59, 3),
(60, 1),
(61, 1),
(61, 3),
(62, 1),
(62, 2),
(62, 3),
(63, 1),
(63, 2),
(63, 3),
(64, 1),
(64, 3),
(65, 1),
(65, 3),
(66, 1),
(66, 3),
(67, 1),
(67, 2),
(67, 3),
(68, 1),
(68, 2),
(68, 3),
(69, 1),
(69, 3),
(70, 1),
(70, 3),
(71, 1),
(71, 3),
(72, 1),
(72, 3),
(73, 1),
(73, 3),
(74, 1),
(74, 3),
(75, 1),
(75, 3),
(76, 1),
(76, 3);

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

--
-- Structure de la table `posts`
--

CREATE TABLE `posts` (
  `id` int(10) UNSIGNED NOT NULL,
  `author_id` int(11) NOT NULL,
  `category_id` int(11) DEFAULT NULL,
  `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `seo_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `excerpt` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `body` text COLLATE utf8mb4_unicode_ci NOT NULL,
  `image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `meta_description` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `meta_keywords` text COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `status` enum('PUBLISHED','DRAFT','PENDING') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'DRAFT',
  `featured` tinyint(1) NOT NULL DEFAULT 0,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `posts`
--

INSERT INTO `posts` (`id`, `author_id`, `category_id`, `title`, `seo_title`, `excerpt`, `body`, `image`, `slug`, `meta_description`, `meta_keywords`, `status`, `featured`, `created_at`, `updated_at`) VALUES
(1, 0, NULL, 'Lorem Ipsum Post', NULL, 'This is the excerpt for the Lorem Ipsum Post', '<p>This is the body of the lorem ipsum post</p>', 'posts/post1.jpg', 'lorem-ipsum-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(2, 0, NULL, 'My Sample Post', NULL, 'This is the excerpt for the sample Post', '<p>This is the body for the sample post, which includes the body.</p>\n                <h2>We can use all kinds of format!</h2>\n                <p>And include a bunch of other stuff.</p>', 'posts/post2.jpg', 'my-sample-post', 'Meta Description for sample post', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(3, 0, NULL, 'Latest Post', NULL, 'This is the excerpt for the latest post', '<p>This is the body for the latest post</p>', 'posts/post3.jpg', 'latest-post', 'This is the meta description', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(4, 0, NULL, 'Yarr Post', NULL, 'Reef sails nipperkin bring a spring upon her cable coffer jury mast spike marooned Pieces of Eight poop deck pillage. Clipper driver coxswain galleon hempen halter come about pressgang gangplank boatswain swing the lead. Nipperkin yard skysail swab lanyard Blimey bilge water ho quarter Buccaneer.', '<p>Swab deadlights Buccaneer fire ship square-rigged dance the hempen jig weigh anchor cackle fruit grog furl. Crack Jennys tea cup chase guns pressgang hearties spirits hogshead Gold Road six pounders fathom measured fer yer chains. Main sheet provost come about trysail barkadeer crimp scuttle mizzenmast brig plunder.</p>\n<p>Mizzen league keelhaul galleon tender cog chase Barbary Coast doubloon crack Jennys tea cup. Blow the man down lugsail fire ship pinnace cackle fruit line warp Admiral of the Black strike colors doubloon. Tackle Jack Ketch come about crimp rum draft scuppers run a shot across the bow haul wind maroon.</p>\n<p>Interloper heave down list driver pressgang holystone scuppers tackle scallywag bilged on her anchor. Jack Tar interloper draught grapple mizzenmast hulk knave cable transom hogshead. Gaff pillage to go on account grog aft chase guns piracy yardarm knave clap of thunder.</p>', 'posts/post4.jpg', 'yarr-post', 'this be a meta descript', 'keyword1, keyword2, keyword3', 'PUBLISHED', 0, '2018-12-04 11:55:25', '2018-12-04 11:55:25');

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

--
-- Structure de la table `roles`
--

CREATE TABLE `roles` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `display_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;

--
-- Déchargement des données de la table `roles`
--

INSERT INTO `roles` (`id`, `name`, `display_name`, `created_at`, `updated_at`) VALUES
(1, 'admin', 'Administrator', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(2, 'user', 'Normal User', '2018-12-04 11:55:24', '2018-12-04 11:55:24'),
(3, 'user Manager', 'Manager', '2018-12-04 11:56:28', '2018-12-12 19:14:01');

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

--
-- Structure de la table `translations`
--

CREATE TABLE `translations` (
  `id` int(10) UNSIGNED NOT NULL,
  `table_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `column_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `foreign_key` int(10) UNSIGNED NOT NULL,
  `locale` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `value` 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;

--
-- Déchargement des données de la table `translations`
--

INSERT INTO `translations` (`id`, `table_name`, `column_name`, `foreign_key`, `locale`, `value`, `created_at`, `updated_at`) VALUES
(1, 'data_types', 'display_name_singular', 5, 'pt', 'Post', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(2, 'data_types', 'display_name_singular', 6, 'pt', 'Página', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(3, 'data_types', 'display_name_singular', 1, 'pt', 'Utilizador', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(4, 'data_types', 'display_name_singular', 4, 'pt', 'Categoria', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(5, 'data_types', 'display_name_singular', 2, 'pt', 'Menu', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(6, 'data_types', 'display_name_singular', 3, 'pt', 'Função', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(7, 'data_types', 'display_name_plural', 5, 'pt', 'Posts', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(8, 'data_types', 'display_name_plural', 6, 'pt', 'Páginas', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(9, 'data_types', 'display_name_plural', 1, 'pt', 'Utilizadores', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(10, 'data_types', 'display_name_plural', 4, 'pt', 'Categorias', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(11, 'data_types', 'display_name_plural', 2, 'pt', 'Menus', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(12, 'data_types', 'display_name_plural', 3, 'pt', 'Funções', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(13, 'categories', 'slug', 1, 'pt', 'categoria-1', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(14, 'categories', 'name', 1, 'pt', 'Categoria 1', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(15, 'categories', 'slug', 2, 'pt', 'categoria-2', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(16, 'categories', 'name', 2, 'pt', 'Categoria 2', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(17, 'pages', 'title', 1, 'pt', 'Olá Mundo', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(18, 'pages', 'slug', 1, 'pt', 'ola-mundo', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(19, 'pages', 'body', 1, 'pt', '<p>Olá Mundo. Scallywag grog swab Cat o\'nine tails scuttle rigging hardtack cable nipper Yellow Jack. Handsomely spirits knave lad killick landlubber or just lubber deadlights chantey pinnace crack Jennys tea cup. Provost long clothes black spot Yellow Jack bilged on her anchor league lateen sail case shot lee tackle.</p>\r\n<p>Ballast spirits fluke topmast me quarterdeck schooner landlubber or just lubber gabion belaying pin. Pinnace stern galleon starboard warp carouser to go on account dance the hempen jig jolly boat measured fer yer chains. Man-of-war fire in the hole nipperkin handsomely doubloon barkadeer Brethren of the Coast gibbet driver squiffy.</p>', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(20, 'menu_items', 'title', 1, 'pt', 'Painel de Controle', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(21, 'menu_items', 'title', 2, 'pt', 'Media', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(22, 'menu_items', 'title', 12, 'pt', 'Publicações', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(23, 'menu_items', 'title', 3, 'pt', 'Utilizadores', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(24, 'menu_items', 'title', 11, 'pt', 'Categorias', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(25, 'menu_items', 'title', 13, 'pt', 'Páginas', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(26, 'menu_items', 'title', 4, 'pt', 'Funções', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(27, 'menu_items', 'title', 5, 'pt', 'Ferramentas', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(28, 'menu_items', 'title', 6, 'pt', 'Menus', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(29, 'menu_items', 'title', 7, 'pt', 'Base de dados', '2018-12-04 11:55:25', '2018-12-04 11:55:25'),
(30, 'menu_items', 'title', 10, 'pt', 'Configurações', '2018-12-04 11:55:25', '2018-12-04 11:55:25');

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

--
-- Structure de la table `user_roles`
--

CREATE TABLE `user_roles` (
  `user_id` int(10) UNSIGNED NOT NULL,
  `role_id` int(10) UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Structure de la table `videos`
--

CREATE TABLE `videos` (
  `id` int(10) UNSIGNED NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `file_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `duration` int(11) NOT NULL DEFAULT 0,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
  `user_id` int(11) DEFAULT NULL,
  `checked` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Déchargement des données de la table `videos`
--

INSERT INTO `videos` (`id`, `name`, `file_name`, `duration`, `created_at`, `user_id`, `checked`) VALUES
(1, 'Vidéo toute simple', 'video.mp4', 2393, '2018-12-09 23:18:42', NULL, 0),
(2, 'Video test 2', 'vide_2.mp4', 3232, '2018-12-12 21:07:13', NULL, 0),
(6, 'Video 4', 'video4.mp4', 3402, '2018-12-12 21:10:00', 2, 0);

--
-- Index pour les tables déchargées
--

--
-- Index pour la table `charlis`
--
ALTER TABLE `charlis`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `data_rows`
--
ALTER TABLE `data_rows`
  ADD PRIMARY KEY (`id`),
  ADD KEY `data_rows_data_type_id_foreign` (`data_type_id`);

--
-- Index pour la table `data_types`
--
ALTER TABLE `data_types`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `data_types_name_unique` (`name`),
  ADD UNIQUE KEY `data_types_slug_unique` (`slug`);

--
-- Index pour la table `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `menus`
--
ALTER TABLE `menus`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `menus_name_unique` (`name`);

--
-- Index pour la table `menu_items`
--
ALTER TABLE `menu_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `menu_items_menu_id_foreign` (`menu_id`);

--
-- Index pour la table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Index pour la table `password_resets`
--
ALTER TABLE `password_resets`
  ADD KEY `password_resets_email_index` (`email`);

--
-- Index pour la table `permissions`
--
ALTER TABLE `permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `permissions_key_index` (`key`);

--
-- Index pour la table `permission_role`
--
ALTER TABLE `permission_role`
  ADD PRIMARY KEY (`permission_id`,`role_id`),
  ADD KEY `permission_role_permission_id_index` (`permission_id`),
  ADD KEY `permission_role_role_id_index` (`role_id`);

--
-- Index pour la table `posts`
--
ALTER TABLE `posts`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `posts_slug_unique` (`slug`);

--
-- Index pour la table `roles`
--
ALTER TABLE `roles`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `roles_name_unique` (`name`);

--
-- Index pour la table `translations`
--
ALTER TABLE `translations`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `translations_table_name_column_name_foreign_key_locale_unique` (`table_name`,`column_name`,`foreign_key`,`locale`);

--
-- Index pour la table `user_roles`
--
ALTER TABLE `user_roles`
  ADD PRIMARY KEY (`user_id`,`role_id`),
  ADD KEY `user_roles_user_id_index` (`user_id`),
  ADD KEY `user_roles_role_id_index` (`role_id`);

--
-- Index pour la table `videos`
--
ALTER TABLE `videos`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT pour les tables déchargées
--

--
-- AUTO_INCREMENT pour la table `data_rows`
--
ALTER TABLE `data_rows`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=155;

--
-- AUTO_INCREMENT pour la table `data_types`
--
ALTER TABLE `data_types`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=18;

--
-- AUTO_INCREMENT pour la table `groups`
--
ALTER TABLE `groups`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT pour la table `menus`
--
ALTER TABLE `menus`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT pour la table `menu_items`
--
ALTER TABLE `menu_items`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=26;

--
-- AUTO_INCREMENT pour la table `migrations`
--
ALTER TABLE `migrations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=27;

--
-- AUTO_INCREMENT pour la table `permissions`
--
ALTER TABLE `permissions`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=77;

--
-- AUTO_INCREMENT pour la table `posts`
--
ALTER TABLE `posts`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT pour la table `roles`
--
ALTER TABLE `roles`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;

--
-- AUTO_INCREMENT pour la table `translations`
--
ALTER TABLE `translations`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=31;

--
-- AUTO_INCREMENT pour la table `videos`
--
ALTER TABLE `videos`
  MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

--
-- Contraintes pour les tables déchargées
--

--
-- Contraintes pour la table `data_rows`
--
ALTER TABLE `data_rows`
  ADD CONSTRAINT `data_rows_data_type_id_foreign` FOREIGN KEY (`data_type_id`) REFERENCES `data_types` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Contraintes pour la table `menu_items`
--
ALTER TABLE `menu_items`
  ADD CONSTRAINT `menu_items_menu_id_foreign` FOREIGN KEY (`menu_id`) REFERENCES `menus` (`id`) ON DELETE CASCADE;

--
-- Contraintes pour la 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;

--
-- Contraintes pour la table `user_roles`
--
ALTER TABLE `user_roles`
  ADD CONSTRAINT `user_roles_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE,
  ADD CONSTRAINT `user_roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE;
COMMIT;

