text: -- phpMyAdmin SQL Dump
  -- version 4.8.3
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Generation Time: Oct 04, 2019 at 08:24 AM
  -- Server version: 10.1.36-MariaDB
  -- PHP Version: 7.3.7
  
  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: `project2`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `failed_jobs`
  --
  
  CREATE TABLE `failed_jobs` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `connection` text COLLATE utf8_unicode_ci NOT NULL,
    `queue` text COLLATE utf8_unicode_ci NOT NULL,
    `payload` longtext COLLATE utf8_unicode_ci NOT NULL,
    `exception` longtext COLLATE utf8_unicode_ci NOT NULL,
    `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `migrations`
  --
  
  CREATE TABLE `migrations` (
    `id` int(10) UNSIGNED NOT NULL,
    `migration` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `batch` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_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, '2019_09_20_024442_create_table_mobil', 2),
  (5, '2019_09_20_030530_create_table_penjualan', 3),
  (8, '2019_09_24_063937_create_table_user', 6);
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `mobil`
  --
  
  CREATE TABLE `mobil` (
    `id` int(10) UNSIGNED NOT NULL,
    `nama_mobil` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
    `harga_mobil` int(20) NOT NULL,
    `stock` int(10) NOT NULL,
    `gambar` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `mobil`
  --
  
  INSERT INTO `mobil` (`id`, `nama_mobil`, `harga_mobil`, `stock`, `gambar`, `created_at`, `updated_at`) VALUES
  (2, 'Ikhsan', 100000, 17, 'mobil.jpg', '2019-09-20 23:31:51', '2019-10-03 23:19:29'),
  (3, 'Ikhsun', 200000, 7, 'mobil2.jpg', '2019-09-24 23:08:49', '2019-10-03 19:18:07'),
  (4, 'Xanio', 200000, 5, 'mobil4.jpeg', '2019-10-03 18:23:29', '2019-10-03 20:31:07');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `password_resets`
  --
  
  CREATE TABLE `password_resets` (
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `token` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `penjualan`
  --
  
  CREATE TABLE `penjualan` (
    `id` int(10) UNSIGNED NOT NULL,
    `id_mobil` int(10) UNSIGNED DEFAULT NULL,
    `id_admin` int(10) UNSIGNED DEFAULT NULL,
    `id_user` int(10) UNSIGNED DEFAULT NULL,
    `stock` int(11) NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id` int(10) UNSIGNED NOT NULL,
    `nama_user` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `alamat` varchar(200) COLLATE utf8_unicode_ci NOT NULL,
    `harga_mobil` int(20) NOT NULL,
    `total_harga` int(50) DEFAULT NULL,
    `id_mobil` int(11) UNSIGNED NOT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `users`
  --
  
  CREATE TABLE `users` (
    `id` int(10) UNSIGNED NOT NULL,
    `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `email_verified_at` timestamp NULL DEFAULT NULL,
    `password` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
    `remember_token` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
    `created_at` timestamp NULL DEFAULT NULL,
    `updated_at` timestamp NULL DEFAULT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  
  --
  -- Dumping data for table `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `email_verified_at`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
  (8, 'Aby', 'aby_sucahyo_27rpl@student.smktelkom-mlg.sch.id', NULL, '$2y$10$P9FgHz0EoSNDK43/Lq6dfe7Wg2YkaT9thLATMwWux2lL6MJde7nje', NULL, '2019-09-23 23:08:24', '2019-09-23 23:08:24');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- 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 `mobil`
  --
  ALTER TABLE `mobil`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indexes for table `penjualan`
  --
  ALTER TABLE `penjualan`
    ADD PRIMARY KEY (`id`),
    ADD KEY `id_mobil` (`id_mobil`),
    ADD KEY `id_admin` (`id_admin`),
    ADD KEY `id_user` (`id_user`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id`),
    ADD KEY `id_mobil` (`id_mobil`);
  
  --
  -- Indexes for table `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- 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=9;
  
  --
  -- AUTO_INCREMENT for table `mobil`
  --
  ALTER TABLE `mobil`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  
  --
  -- AUTO_INCREMENT for table `penjualan`
  --
  ALTER TABLE `penjualan`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
  
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=20;
  
  --
  -- AUTO_INCREMENT for table `users`
  --
  ALTER TABLE `users`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;
  
  --
  -- Constraints for dumped tables
  --
  
  --
  -- Constraints for table `penjualan`
  --
  ALTER TABLE `penjualan`
    ADD CONSTRAINT `penjualan_ibfk_1` FOREIGN KEY (`id_mobil`) REFERENCES `mobil` (`id`),
    ADD CONSTRAINT `penjualan_ibfk_2` FOREIGN KEY (`id_user`) REFERENCES `user` (`id`),
    ADD CONSTRAINT `penjualan_ibfk_3` FOREIGN KEY (`id_admin`) REFERENCES `users` (`id`);
  
  --
  -- Constraints for table `user`
  --
  ALTER TABLE `user`
    ADD CONSTRAINT `user_ibfk_1` FOREIGN KEY (`id_mobil`) REFERENCES `mobil` (`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 */;
  