text: -- phpMyAdmin SQL Dump
  -- version 4.9.0.1
  -- https://www.phpmyadmin.net/
  --
  -- Host: 127.0.0.1
  -- Waktu pembuatan: 21 Jun 2020 pada 16.34
  -- Versi server: 10.4.6-MariaDB
  -- Versi PHP: 7.1.31
  
  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: `rental`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `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;
  
  --
  -- Dumping data untuk tabel `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_06_21_072755_create_slider', 2),
  (4, '2020_06_21_075654_create_produk', 3),
  (6, '2020_06_21_101604_create_pesanan', 4);
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `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;
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `pesanan`
  --
  
  CREATE TABLE `pesanan` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `produk_id` bigint(20) UNSIGNED DEFAULT NULL,
    `user_id` bigint(20) UNSIGNED DEFAULT NULL,
    `nama` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `date1` date NOT NULL,
    `date2` date NOT NULL,
    `durasi` int(5) NOT NULL,
    `jenis` char(1) COLLATE utf8mb4_unicode_ci NOT NULL,
    `tujuan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `bukti` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
    `status` char(1) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '0',
    `harga` int(10) NOT NULL,
    `terbilang` 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;
  
  --
  -- Dumping data untuk tabel `pesanan`
  --
  
  INSERT INTO `pesanan` (`id`, `produk_id`, `user_id`, `nama`, `date1`, `date2`, `durasi`, `jenis`, `tujuan`, `bukti`, `status`, `harga`, `terbilang`, `created_at`, `updated_at`) VALUES
  (1, 1, 1, 'asaaa', '2020-06-21', '2020-06-22', 1, '1', 'Jakarta', '/photosBukti/Kal Kausar_53416803_4IA01.jpg', '2', 0, '', '2020-06-21 03:52:31', '2020-06-21 05:23:29'),
  (2, 1, 1, 'asaaa', '2020-06-21', '2020-06-22', 1, '2', 'Jakarta', '/photosBukti/bukti.jpg', '2', 30100000, '', '2020-06-21 04:39:01', '2020-06-21 06:25:46'),
  (3, 1, 1, 'asaaa', '2020-06-23', '2020-06-24', 1, '1', 'Jakarta', '/photosBukti/Pemerintah_Kota_Banda_Aceh-logo-50B13BDE74-seeklogo.com.png', '2', 30100000, 'Tiga Puluh  Juta Seratus   Ribu', '2020-06-21 06:01:03', '2020-06-21 06:02:36');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `produk`
  --
  
  CREATE TABLE `produk` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `namaMobil` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `produk_images` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `kapasitas` int(11) NOT NULL,
    `bb` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `harga` int(11) 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 untuk tabel `produk`
  --
  
  INSERT INTO `produk` (`id`, `namaMobil`, `produk_images`, `kapasitas`, `bb`, `harga`, `created_at`, `updated_at`) VALUES
  (1, 'Mitsubishi Triton', '/photosProduk/Triton01.jpg', 4, 'Diesel', 700000, '2020-06-21 01:19:42', '2020-06-21 06:18:10'),
  (2, 'Innova Reborn Type G', '/photosProduk/Innova-Reborn-2.jpg', 7, 'Diesel', 850000, '2020-06-21 06:19:32', '2020-06-21 06:19:32'),
  (3, 'Avanza Type G', '/photosProduk/Untitled-2-2-1-500x323.jpg', 6, 'Premium', 500000, '2020-06-21 06:21:01', '2020-06-21 06:21:01');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `roles`
  --
  
  CREATE TABLE `roles` (
    `id` int(10) UNSIGNED NOT NULL,
    `namaRule` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data untuk tabel `roles`
  --
  
  INSERT INTO `roles` (`id`, `namaRule`) VALUES
  (1, 'Admin'),
  (2, 'User');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `slider`
  --
  
  CREATE TABLE `slider` (
    `id` bigint(20) UNSIGNED NOT NULL,
    `slider_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slider_image` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
    `slider_text` longtext 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 untuk tabel `slider`
  --
  
  INSERT INTO `slider` (`id`, `slider_name`, `slider_image`, `slider_text`, `created_at`, `updated_at`) VALUES
  (2, 'Maksimalkan Waktu Anda', '/photosSlider/slider1.jpg', 'Kami Melayani Anda Sepenuh Hati', '2020-06-21 06:12:23', '2020-06-21 06:12:23'),
  (3, 'Menghemat Tenaga', '/photosSlider/slider2-2.jpg', 'Layanan Prima dapat Memaksimalkan Penggunaan Tenaga', '2020-06-21 06:14:14', '2020-06-21 06:14:14'),
  (4, 'Unit Terbaru', '/photosSlider/slider3-2.jpg', 'Unit dengan Tahun Rendah Dapat Memaksimalkan Perjalanan Anda', '2020-06-21 06:14:54', '2020-06-21 06:14:54');
  
  -- --------------------------------------------------------
  
  --
  -- Struktur dari tabel `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,
    `roles_id` int(10) UNSIGNED DEFAULT NULL,
    `password` varchar(255) 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
  ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
  
  --
  -- Dumping data untuk tabel `users`
  --
  
  INSERT INTO `users` (`id`, `name`, `email`, `roles_id`, `password`, `remember_token`, `created_at`, `updated_at`) VALUES
  (1, 'user', 'user@gmail.com', 2, '$2y$10$TbdH.YaRm9rnssSjLlcrbeOGpsU5VeeBxWGBaIGKNaoqKAnoRUTUa', NULL, NULL, NULL),
  (2, 'Kal Kausar', 'kalkausar98@gmail.com', 1, '$2y$10$TbdH.YaRm9rnssSjLlcrbeOGpsU5VeeBxWGBaIGKNaoqKAnoRUTUa', NULL, NULL, NULL);
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indeks untuk tabel `migrations`
  --
  ALTER TABLE `migrations`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indeks untuk tabel `password_resets`
  --
  ALTER TABLE `password_resets`
    ADD KEY `password_resets_email_index` (`email`);
  
  --
  -- Indeks untuk tabel `pesanan`
  --
  ALTER TABLE `pesanan`
    ADD PRIMARY KEY (`id`),
    ADD KEY `pesanan_produk_id_foreign` (`produk_id`),
    ADD KEY `pesanan_user_id_foreign` (`user_id`);
  
  --
  -- Indeks untuk tabel `produk`
  --
  ALTER TABLE `produk`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indeks untuk tabel `roles`
  --
  ALTER TABLE `roles`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indeks untuk tabel `slider`
  --
  ALTER TABLE `slider`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indeks untuk tabel `users`
  --
  ALTER TABLE `users`
    ADD PRIMARY KEY (`id`),
    ADD UNIQUE KEY `users_email_unique` (`email`),
    ADD KEY `users_roles_id_foreign` (`roles_id`);
  
  --
  -- AUTO_INCREMENT untuk tabel yang dibuang
  --
  
  --
  -- AUTO_INCREMENT untuk tabel `migrations`
  --
  ALTER TABLE `migrations`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;
  
  --
  -- AUTO_INCREMENT untuk tabel `pesanan`
  --
  ALTER TABLE `pesanan`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT untuk tabel `produk`
  --
  ALTER TABLE `produk`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  
  --
  -- AUTO_INCREMENT untuk tabel `roles`
  --
  ALTER TABLE `roles`
    MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- AUTO_INCREMENT untuk tabel `slider`
  --
  ALTER TABLE `slider`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  
  --
  -- AUTO_INCREMENT untuk tabel `users`
  --
  ALTER TABLE `users`
    MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  
  --
  -- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
  --
  
  --
  -- Ketidakleluasaan untuk tabel `pesanan`
  --
  ALTER TABLE `pesanan`
    ADD CONSTRAINT `pesanan_produk_id_foreign` FOREIGN KEY (`produk_id`) REFERENCES `produk` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
    ADD CONSTRAINT `pesanan_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ON UPDATE CASCADE;
  
  --
  -- Ketidakleluasaan untuk tabel `users`
  --
  ALTER TABLE `users`
    ADD CONSTRAINT `users_roles_id_foreign` FOREIGN KEY (`roles_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE ON UPDATE 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 */;
  