text: -- phpMyAdmin SQL Dump
  -- version 4.9.5
  -- https://www.phpmyadmin.net/
  --
  -- Hôte : localhost:3306
  -- Généré le : sam. 21 mars 2020 à 23:09
  -- Version du serveur :  5.7.24
  -- Version de PHP : 7.2.19
  
  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 */;
  
  --
  -- Base de données : `command_app2020`
  --
  CREATE DATABASE IF NOT EXISTS `command_app2020` DEFAULT CHARACTER SET latin1 COLLATE latin1_swedish_ci;
  USE `command_app2020`;
  
  -- --------------------------------------------------------
  
  --
  -- 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, '2020_03_21_203916_create_providers_table', 1),
  (4, '2020_03_21_203932_create_products_table', 1),
  (5, '2020_03_21_203952_create_supplies_table', 1),
  (6, '2020_03_21_204019_create_sales_table', 1),
  (7, '2020_03_21_204114_create_notifications_table', 1);
  
  -- --------------------------------------------------------
  
  --
  -- Structure de la table `notifications`
  --
  
  CREATE TABLE `notifications` (
    `id` char(36) COLLATE utf8mb4_unicode_ci NOT NULL,
    `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `notifiable_type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `notifiable_id` bigint(20) UNSIGNED NOT NULL,
    `data` text COLLATE utf8mb4_unicode_ci NOT NULL,
    `read_at` timestamp NULL DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- 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 `products`
  --
  
  CREATE TABLE `products` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `quantity` int(11) NOT NULL,
    `price` int(11) NOT NULL,
    `unity` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `unity_price` int(11) NOT NULL,
    `description` mediumtext 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;
  
  -- --------------------------------------------------------
  
  --
  -- Structure de la table `providers`
  --
  
  CREATE TABLE `providers` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT 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;
  
  -- --------------------------------------------------------
  
  --
  -- Structure de la table `sales`
  --
  
  CREATE TABLE `sales` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `quantity` int(11) NOT NULL,
    `product_id` bigint(20) UNSIGNED NOT NULL,
    `created_at` timestamp NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Structure de la table `supplies`
  --
  
  CREATE TABLE `supplies` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `quanity` int(11) NOT NULL,
    `price` int(11) NOT NULL,
    `confirmed_at` datetime NOT NULL,
    `product_id` bigint(20) UNSIGNED NOT NULL,
    `provider_id` bigint(20) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Structure de la table `users`
  --
  
  CREATE TABLE `users` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `login` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `profile_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `role` enum('admin','cashier') 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,
    `deleted_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Index pour les tables déchargées
  --
  
  --
  -- Index pour la table `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Index pour la table `notifications`
  --
  ALTER TABLE `notifications`
    ADD PRIMARY KEY (`id`),
    ADD KEY `notifications_notifiable_type_notifiable_id_index` (`notifiable_type`,`notifiable_id`);
  
  --
  -- Index pour la table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Index pour la table `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Index pour la table `providers`
  --
  ALTER TABLE `providers`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Index pour la table `sales`
  --
  ALTER TABLE `sales`
    ADD PRIMARY KEY (`id`),
    ADD KEY `sales_product_id_foreign` (`product_id`);
  
  --
  -- Index pour la table `supplies`
  --
  ALTER TABLE `supplies`
    ADD PRIMARY KEY (`id`),
    ADD KEY `supplies_product_id_foreign` (`product_id`),
    ADD KEY `supplies_provider_id_foreign` (`provider_id`);
  
  --
  -- Index pour la table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT pour les tables déchargées
  --
  
  --
  -- AUTO_INCREMENT pour la table `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
  
  --
  -- AUTO_INCREMENT pour la table `products`
  --
  ALTER TABLE `products`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT pour la table `providers`
  --
  ALTER TABLE `providers`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT pour la table `sales`
  --
  ALTER TABLE `sales`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT pour la table `supplies`
  --
  ALTER TABLE `supplies`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- AUTO_INCREMENT pour la table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
  
  --
  -- Contraintes pour les tables déchargées
  --
  
  --
  -- Contraintes pour la table `sales`
  --
  ALTER TABLE `sales`
    ADD CONSTRAINT `sales_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);
  
  --
  -- Contraintes pour la table `supplies`
  --
  ALTER TABLE `supplies`
    ADD CONSTRAINT `supplies_product_id_foreign` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`),
    ADD CONSTRAINT `supplies_provider_id_foreign` FOREIGN KEY (`provider_id`) REFERENCES `providers` (`id`);
  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 */;
  