-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 13 Jan 2024 pada 22.44
-- Versi server: 10.5.23-MariaDB-cll-lve-log
-- Versi PHP: 8.1.25

START TRANSACTION;



--
-- Database: `pixartsi_monggopro`
--

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

--
-- Struktur dari tabel `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;

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

--
-- Struktur dari tabel `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;

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

--
-- Struktur dari tabel `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 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_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);

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

--
-- Struktur dari tabel `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 untuk tabel `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-11-26-05-02-24-91344.png', 'penyerahan-tm4202310010719228-andri-rizki-saputra-2023-11-26-05-02-32-52224.png', 0, '2023-10-01 07:19:22', '2023-11-26 10:02:32'),
(13, 'Andri Rizki Saputra', '1234567890', 'Muja Muju, UH II 902, DI Yogyakarta', '+6282322525083', 'IG', 'Andri Rizki Saputra', 'KTP', NULL, 'identitas-tm1202310260412193-andri-rizki-saputra-2023-10-26-04-16-43-77336.png', 'penyerahan-tm1202310260412193-andri-rizki-saputra-2023-10-26-04-16-56-59191.png', 10, '2023-10-25 21:12:19', '2023-10-25 21:16:56'),
(14, 'Andri Rizki Saputra', '1234567890', 'Muja Muju, UH II 902, DI Yogyakarta', '+6282322525083', 'IG', 'Andri Rizki Saputra', 'KTP', NULL, 'identitas-tm3202310260617041-andri-rizki-saputra-2023-10-26-06-17-08-35875.png', 'penyerahan-tm3202310260617041-andri-rizki-saputra-2023-10-26-06-17-19-77573.png', 10, '2023-10-25 23:17:04', '2023-10-25 23:17:19');

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

--
-- Struktur dari tabel `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 untuk tabel `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');

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

--
-- Struktur dari tabel `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 untuk tabel `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\"}', 'admin-tm4202310010719228-andri-rizki-saputra-2023-11-26-05-01-53-61589.png', 'penyewa-tm4202310010719228-andri-rizki-saputra-2023-11-26-05-02-11-50409.png', 1, '2023-10-01 07:19:22', '2023-11-26 10:02:11');

--
-- Indexes for dumped tables
--

--
-- Indeks untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`);

--
-- Indeks untuk tabel `galeri`
--
ALTER TABLE `galeri`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `migrations`
--
ALTER TABLE `migrations`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `penyewa`
--
ALTER TABLE `penyewa`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `produk`
--
ALTER TABLE `produk`
  ADD PRIMARY KEY (`id`);

--
-- Indeks untuk tabel `transaksi`
--
ALTER TABLE `transaksi`
  ADD PRIMARY KEY (`id`);

--
-- AUTO_INCREMENT untuk tabel yang dibuang
--

--
-- AUTO_INCREMENT untuk tabel `failed_jobs`
--
ALTER TABLE `failed_jobs`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT untuk tabel `galeri`
--
ALTER TABLE `galeri`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=7;

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

--
-- AUTO_INCREMENT untuk tabel `penyewa`
--
ALTER TABLE `penyewa`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;

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

--
-- AUTO_INCREMENT untuk tabel `transaksi`
--
ALTER TABLE `transaksi`
  MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
COMMIT;

