-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: mysql:3306
-- Generation Time: Oct 09, 2023 at 06:20 PM
-- Server version: 10.11.5-MariaDB-1:10.11.5+maria~ubu2204
-- PHP Version: 8.2.8

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `monggopro`
--

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

--
-- Table structure for table `failed_jobs`
--

CREATE TABLE `failed_jobs` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `uuid` varchar(255) NOT NULL,
  `connection` text NOT NULL,
  `queue` text NOT NULL,
  `payload` longtext NOT NULL,
  `exception` longtext NOT NULL,
  `failed_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `galeri`
--

CREATE TABLE `galeri` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `title` varchar(255) DEFAULT NULL,
  `keterangan` text CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL,
  `type` tinyint(4) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `status` tinyint(4) 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;

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

--
-- Table structure for table `migrations`
--

CREATE TABLE `migrations` (
  `id` int(10) UNSIGNED NOT NULL,
  `migration` varchar(255) NOT NULL,
  `batch` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_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_reset_tokens_table', 1),
(3, '2019_08_19_000000_create_failed_jobs_table', 1),
(4, '2019_12_14_000001_create_personal_access_tokens_table', 1),
(5, '2023_08_27_132918_penyewa', 2),
(6, '2023_08_28_115827_produk', 3),
(7, '2023_08_30_184447_galeri', 4),
(8, '2023_09_05_151055_add_column_produk', 5),
(9, '2023_09_14_172308_transaksi', 6);

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

--
-- Table structure for table `password_reset_tokens`
--

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

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

--
-- Table structure for table `penyewa`
--

CREATE TABLE `penyewa` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nama` varchar(255) DEFAULT NULL,
  `nomor` varchar(255) DEFAULT NULL,
  `alamat` varchar(255) DEFAULT NULL,
  `no_telp` varchar(255) DEFAULT NULL,
  `sosial_media` varchar(255) DEFAULT NULL,
  `nama_sosial_media` varchar(255) DEFAULT NULL,
  `jaminan` varchar(255) DEFAULT NULL,
  `instansi` varchar(255) DEFAULT NULL,
  `gambar_identitas` varchar(255) DEFAULT NULL,
  `gambar_penyerahan` varchar(255) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 10,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data for table `penyewa`
--

INSERT INTO `penyewa` (`id`, `nama`, `nomor`, `alamat`, `no_telp`, `sosial_media`, `nama_sosial_media`, `jaminan`, `instansi`, `gambar_identitas`, `gambar_penyerahan`, `status`, `created_at`, `updated_at`) VALUES
(12, 'Andri Rizki Saputra', '123456789', 'Muja Muju, UH II 902, DI Yogyakarta', '+6282322525083', 'IG', 'Andri Rizki Saputra', 'KTP', 'Test', 'identitas-tm4202310010719228-andri-rizki-saputra-2023-10-09-05-18-54-95161.png', 'penyerahan-tm4202310010719228-andri-rizki-saputra-2023-10-09-02-48-28-94076.png', 10, '2023-10-01 07:19:22', '2023-10-09 17:18:54');

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

--
-- Table structure for table `personal_access_tokens`
--

CREATE TABLE `personal_access_tokens` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `tokenable_type` varchar(255) NOT NULL,
  `tokenable_id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `token` varchar(64) NOT NULL,
  `abilities` text DEFAULT NULL,
  `last_used_at` timestamp NULL DEFAULT NULL,
  `expires_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;

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

--
-- Table structure for table `produk`
--

CREATE TABLE `produk` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nomor_seri` varchar(255) DEFAULT NULL,
  `nama` varchar(255) DEFAULT NULL,
  `kelengkapan` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`kelengkapan`)),
  `harga` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`harga`)),
  `stok` int(11) DEFAULT NULL,
  `gambar` varchar(255) DEFAULT NULL,
  `type` tinyint(4) DEFAULT NULL,
  `kondisi` tinyint(4) NOT NULL DEFAULT 0,
  `jenis` varchar(255) DEFAULT NULL,
  `url` varchar(255) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 9,
  `keterangan` text DEFAULT NULL,
  `kondisi_terkini` text DEFAULT NULL,
  `tempat_beli` text DEFAULT NULL,
  `tanggal_beli` date 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 for table `produk`
--

INSERT INTO `produk` (`id`, `nomor_seri`, `nama`, `kelengkapan`, `harga`, `stok`, `gambar`, `type`, `kondisi`, `jenis`, `url`, `status`, `keterangan`, `kondisi_terkini`, `tempat_beli`, `tanggal_beli`, `created_at`, `updated_at`) VALUES
(1, 'TR665345', 'Canon EOS 1300D', '[\"Lesa\",\" monopod\",\" mini threepod\"]', '{\"12 Jam\":\"30000\"}', 8, 'canon-eos-1300d-1.png', 2, 10, 'sewa', 'https://iprice.co.id/harga/canon-eos-1300d/', 10, 'test', 'test', 'test', '2023-09-10', '2023-08-30 16:28:47', '2023-10-01 07:19:22'),
(2, NULL, 'Wedding Promo', '[\"Free Foto Preweddiing\"]', '[\"3000000\"]', 1, 'wedding-promo-2.png', 19, 0, 'jasa', NULL, 9, NULL, NULL, NULL, NULL, '2023-08-30 17:14:40', '2023-08-30 17:17:29'),
(3, NULL, 'Wisuda', '[\"1 Fotografer\",\" Maksimal 4 orang\"]', '[\"300000\"]', 0, NULL, 16, 0, 'jasa', NULL, 9, NULL, NULL, NULL, '2023-09-10', '2023-08-30 17:42:36', '2023-09-10 05:53:27'),
(4, NULL, 'Kamera', '[\"Test\"]', '[\"10000\"]', 0, NULL, NULL, 0, 'jasa', NULL, 0, NULL, NULL, NULL, NULL, '2023-09-10 05:02:08', '2023-09-10 05:03:03'),
(5, NULL, 'Wisuda Promo', '[\"Test\",\" Test 1\"]', '[\"10000\"]', 0, 'wisuda-promo-5.png', 16, 0, 'jasa', NULL, 9, 'test', NULL, NULL, '2023-09-10', '2023-09-10 05:05:00', '2023-09-10 05:53:59');

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

--
-- Table structure for table `transaksi`
--

CREATE TABLE `transaksi` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `nomor_transaksi` varchar(255) DEFAULT NULL,
  `id_penyewa` bigint(20) DEFAULT NULL,
  `id_produk` bigint(20) DEFAULT NULL,
  `qty` tinyint(4) DEFAULT NULL,
  `biaya` decimal(20,0) DEFAULT NULL,
  `uang_muka` decimal(20,0) DEFAULT NULL,
  `total` decimal(20,0) DEFAULT NULL,
  `diskon` decimal(20,0) DEFAULT NULL,
  `kekurangan` decimal(20,0) DEFAULT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 0,
  `durasi` varchar(255) DEFAULT NULL,
  `take_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `return_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `kelengkapan` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT NULL CHECK (json_valid(`kelengkapan`)),
  `ttd_admin` text DEFAULT NULL,
  `ttd_penyewa` text DEFAULT NULL,
  `created_by` bigint(20) 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 for table `transaksi`
--

INSERT INTO `transaksi` (`id`, `nomor_transaksi`, `id_penyewa`, `id_produk`, `qty`, `biaya`, `uang_muka`, `total`, `diskon`, `kekurangan`, `status`, `durasi`, `take_date`, `return_date`, `kelengkapan`, `ttd_admin`, `ttd_penyewa`, `created_by`, `created_at`, `updated_at`) VALUES
(5, 'TM4202310010719228', 12, 1, 2, 30000, 15000, 30000, 0, 15000, 0, '2 Hari', '2023-10-01 06:29:00', '2023-10-02 06:29:00', '{\"Lesa\":\"1\",\"monopod\":\"1\",\"mini threepod\":\"1\"}', NULL, NULL, NULL, '2023-10-01 07:19:22', '2023-10-01 07:19:22');

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` bigint(20) UNSIGNED NOT NULL,
  `name` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `username` varchar(255) NOT NULL,
  `no_telp` varchar(255) NOT NULL,
  `adress` varchar(255) NOT NULL,
  `email_verified_at` timestamp NULL DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `status` tinyint(4) NOT NULL DEFAULT 10,
  `level` tinyint(4) NOT NULL DEFAULT 9,
  `remember_token` varchar(100) 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 for table `users`
--

INSERT INTO `users` (`id`, `name`, `email`, `username`, `no_telp`, `adress`, `email_verified_at`, `password`, `status`, `level`, `remember_token`, `created_at`, `updated_at`) VALUES
(1, 'Super Admin Monggopro', 'monggopro@gmail.com', 'super-admin', '628112641104', 'Yogyakarta', NULL, '$2y$10$xv5aIacArPQyEKgovJZp4erHlcbRWL6werM6zlhY7Txxr4qaEiv7y', 10, 10, NULL, '2023-08-27 10:26:58', '2023-08-27 10:27:10');

--
-- Indexes for dumped tables
--

--
-- Indexes for table `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indexes for table `galeri`
--
ALTER TABLE `galeri`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `password_reset_tokens`
--
ALTER TABLE `password_reset_tokens`
  ADD PRIMARY KEY (`email`);

--
-- Indexes for table `penyewa`
--
ALTER TABLE `penyewa`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `personal_access_tokens_token_unique` (`token`),
  ADD KEY `personal_access_tokens_tokenable_type_tokenable_id_index` (`tokenable_type`,`tokenable_id`);

--
-- Indexes for table `produk`
--
ALTER TABLE `produk`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `transaksi`
--
ALTER TABLE `transaksi`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `users_email_unique` (`email`),
  ADD UNIQUE KEY `users_username_unique` (`username`);

--
-- 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 `galeri`
--
ALTER TABLE `galeri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

--
-- AUTO_INCREMENT for table `penyewa`
--
ALTER TABLE `penyewa`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=13;

--
-- AUTO_INCREMENT for table `personal_access_tokens`
--
ALTER TABLE `personal_access_tokens`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `produk`
--
ALTER TABLE `produk`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `transaksi`
--
ALTER TABLE `transaksi`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;

--
-- AUTO_INCREMENT for table `users`
--
ALTER TABLE `users`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
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 */;
