-- https://www.phpmyadmin.net/
--
-- Waktu pembuatan: 01 Agu 2026 pada 09.50
-- Versi server: 8.4.3
-- Versi PHP: 8.3.16

START TRANSACTION;



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

--
-- Struktur dari tabel `failed_jobs`
--

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

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

--
-- Struktur dari tabel `jobs`
--

CREATE TABLE `jobs` (
  `id` bigint UNSIGNED NOT NULL,
  `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `attempts` smallint UNSIGNED NOT NULL,
  `reserved_at` int UNSIGNED DEFAULT NULL,
  `available_at` int UNSIGNED NOT NULL,
  `created_at` int UNSIGNED NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Struktur dari tabel `job_batches`
--

CREATE TABLE `job_batches` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `total_jobs` int NOT NULL,
  `pending_jobs` int NOT NULL,
  `failed_jobs` int NOT NULL,
  `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `options` mediumtext COLLATE utf8mb4_unicode_ci,
  `cancelled_at` int DEFAULT NULL,
  `created_at` int NOT NULL,
  `finished_at` int DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Struktur dari tabel `migrations`
--

CREATE TABLE `migrations` (
  `id` int UNSIGNED NOT NULL,
  `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `batch` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `migrations`
--

INSERT INTO `migrations` (`id`, `migration`, `batch`) VALUES
(1, '0001_01_01_000000_create_users_table', 1),
(2, '0001_01_01_000001_create_cache_table', 1),
(3, '0001_01_01_000002_create_jobs_table', 1),
(4, '2026_06_05_093359_add_role_to_users_table', 1),
(5, '2026_06_05_094550_create_anggota_table', 1),
(6, '2026_06_05_100000_add_foto_to_users_table', 1),
(7, '2026_06_05_100040_create_simpanan_table', 1),
(8, '2026_06_05_101205_add_tanggal_terdaftar_to_anggota_table', 1),
(9, '2026_06_05_101917_add_status_to_simpanan_table', 1),
(10, '2026_06_05_103535_create_pinjaman_table', 1),
(11, '2026_06_05_103544_create_pinjaman_detail_table', 1),
(12, '2026_06_05_104437_change_nominal_to_bigint_in_pinjaman_table', 1),
(13, '2026_06_05_110000_create_settings_table', 1),
(14, '2026_06_05_110100_create_pembayaran_table', 1),
(15, '2026_06_05_110200_add_nama_aplikasi_to_settings_table', 1),
(16, '2026_06_05_110300_add_bunga_default_to_settings_table', 1),
(17, '2026_06_05_110500_add_denda_persen_to_pinjaman_table', 1),
(18, '2026_06_11_000001_add_password_to_anggota_table', 2),
(19, '2026_06_11_000002_add_keterangan_to_pinjaman_table', 3);

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

--
-- Struktur dari tabel `pembayaran`
--

CREATE TABLE `pembayaran` (
  `id` bigint UNSIGNED NOT NULL,
  `pinjaman_detail_id` bigint UNSIGNED NOT NULL,
  `tanggal_bayar` date NOT NULL,
  `jumlah_dibayar` decimal(18,2) NOT NULL,
  `denda` decimal(18,2) NOT NULL DEFAULT '0.00',
  `keterangan` varchar(255) 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 `pembayaran`
--

INSERT INTO `pembayaran` (`id`, `pinjaman_detail_id`, `tanggal_bayar`, `jumlah_dibayar`, `denda`, `keterangan`, `created_at`, `updated_at`) VALUES
(9, 25, '2026-06-06', 84167.00, 0.00, 'Pembayaran angsuran ke-1 pinjaman PJN-20260605-0002', '2026-06-05 21:49:18', '2026-06-05 21:49:18'),
(10, 26, '2026-10-22', 116992.13, 32825.13, 'Pembayaran angsuran ke-2 pinjaman PJN-20260605-0002', '2026-06-05 21:49:27', '2026-06-05 21:49:27'),
(11, 27, '2026-06-06', 84167.00, 0.00, 'Pembayaran angsuran ke-3 pinjaman PJN-20260605-0002', '2026-06-05 21:51:47', '2026-06-05 21:51:47'),
(12, 28, '2026-06-06', 84167.00, 0.00, 'Pembayaran angsuran ke-4 pinjaman PJN-20260605-0002', '2026-06-05 21:51:53', '2026-06-05 21:51:53'),
(13, 29, '2026-06-06', 84167.00, 0.00, 'Pembayaran angsuran ke-5 pinjaman PJN-20260605-0002', '2026-06-05 21:51:59', '2026-06-05 21:51:59'),
(14, 30, '2026-06-06', 84167.00, 0.00, 'Pembayaran angsuran ke-6 pinjaman PJN-20260605-0002', '2026-06-05 21:52:04', '2026-06-05 21:52:04'),
(15, 31, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-1 pinjaman PJN-20260611-0001', '2026-06-11 15:17:22', '2026-06-11 15:17:22'),
(16, 32, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-2 pinjaman PJN-20260611-0001', '2026-06-11 15:17:26', '2026-06-11 15:17:26'),
(17, 33, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-3 pinjaman PJN-20260611-0001', '2026-06-11 15:17:33', '2026-06-11 15:17:33'),
(18, 34, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-4 pinjaman PJN-20260611-0001', '2026-06-11 15:17:37', '2026-06-11 15:17:37'),
(19, 35, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-5 pinjaman PJN-20260611-0001', '2026-06-11 15:17:42', '2026-06-11 15:17:42'),
(20, 36, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-6 pinjaman PJN-20260611-0001', '2026-06-11 15:17:45', '2026-06-11 15:17:45'),
(21, 37, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-7 pinjaman PJN-20260611-0001', '2026-06-11 15:17:52', '2026-06-11 15:17:52'),
(22, 38, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-8 pinjaman PJN-20260611-0001', '2026-06-11 15:17:57', '2026-06-11 15:17:57'),
(23, 39, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-9 pinjaman PJN-20260611-0001', '2026-06-11 15:18:01', '2026-06-11 15:18:01'),
(24, 40, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-10 pinjaman PJN-20260611-0001', '2026-06-11 15:18:05', '2026-06-11 15:18:05'),
(25, 41, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-11 pinjaman PJN-20260611-0001', '2026-06-11 15:18:09', '2026-06-11 15:18:09'),
(26, 42, '2026-06-11', 8417.00, 0.00, 'Pembayaran angsuran ke-12 pinjaman PJN-20260611-0001', '2026-06-11 15:18:13', '2026-06-11 15:18:13'),
(27, 70, '2026-08-01', 16833.00, 0.00, 'Pembayaran angsuran ke-1 pinjaman PJN-20260801-0001', '2026-08-01 07:23:35', '2026-08-01 07:23:35'),
(28, 71, '2026-08-01', 16833.00, 0.00, 'Pembayaran angsuran ke-2 pinjaman PJN-20260801-0001', '2026-08-01 07:23:48', '2026-08-01 07:23:48'),
(29, 76, '2026-08-01', 50500.00, 0.00, 'Pembayaran angsuran ke-1 pinjaman PJN-20260801-0002', '2026-08-01 09:21:20', '2026-08-01 09:21:20'),
(30, 77, '2026-08-01', 50500.00, 0.00, 'Pembayaran angsuran ke-2 pinjaman PJN-20260801-0002', '2026-08-01 09:21:31', '2026-08-01 09:21:31'),
(31, 78, '2026-08-01', 50500.00, 0.00, 'Pembayaran angsuran ke-3 pinjaman PJN-20260801-0002', '2026-08-01 09:22:28', '2026-08-01 09:22:28'),
(32, 79, '2026-08-01', 50500.00, 0.00, 'Pembayaran angsuran ke-4 pinjaman PJN-20260801-0002', '2026-08-01 09:22:35', '2026-08-01 09:22:35'),
(33, 80, '2026-08-01', 50500.00, 0.00, 'Pembayaran angsuran ke-5 pinjaman PJN-20260801-0002', '2026-08-01 09:22:41', '2026-08-01 09:22:41'),
(34, 81, '2027-03-25', 63630.00, 13130.00, 'Pembayaran angsuran ke-6 pinjaman PJN-20260801-0002', '2026-08-01 09:22:57', '2026-08-01 09:22:57');

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

--
-- Struktur dari tabel `pinjaman`
--

CREATE TABLE `pinjaman` (
  `id` bigint UNSIGNED NOT NULL,
  `tanggal` date NOT NULL,
  `no_pinjaman` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `anggota_id` bigint UNSIGNED NOT NULL,
  `nominal` bigint NOT NULL,
  `bunga` decimal(5,2) NOT NULL,
  `jangka_waktu` int NOT NULL,
  `tanggal_selesai` date NOT NULL,
  `status` enum('lunas','belum_lunas') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'belum_lunas',
  `keterangan` enum('menunggu_konfirmasi','disetujui','ditolak') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'menunggu_konfirmasi',
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `denda_persen` decimal(5,2) NOT NULL DEFAULT '0.00'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

--
-- Dumping data untuk tabel `pinjaman`
--

INSERT INTO `pinjaman` (`id`, `tanggal`, `no_pinjaman`, `anggota_id`, `nominal`, `bunga`, `jangka_waktu`, `tanggal_selesai`, `status`, `keterangan`, `created_at`, `updated_at`, `denda_persen`) VALUES
(2, '2026-06-05', 'PJN-20260605-0002', 3, 500000, 1.00, 6, '2026-12-05', 'lunas', 'disetujui', '2026-06-05 03:43:17', '2026-06-05 21:52:04', 0.50),
(3, '2026-06-11', 'PJN-20260611-0001', 4, 100000, 1.00, 12, '2027-06-11', 'lunas', 'disetujui', '2026-06-11 14:48:50', '2026-06-11 15:18:13', 0.50),
(4, '2026-06-11', 'PJN-20260611-0002', 4, 10000, 1.00, 12, '2027-06-11', 'belum_lunas', 'menunggu_konfirmasi', '2026-06-11 15:16:06', '2026-06-11 15:16:06', 0.50),
(5, '2026-06-11', 'PJN-20260611-0003', 4, 100, 1.00, 12, '2027-06-11', 'belum_lunas', 'menunggu_konfirmasi', '2026-06-11 15:16:17', '2026-06-11 15:16:17', 0.50),
(7, '2026-08-01', 'PJN-20260801-0001', 2, 100000, 1.00, 6, '2027-02-01', 'belum_lunas', 'disetujui', '2026-08-01 07:23:13', '2026-08-01 07:23:13', 0.50),
(8, '2026-08-01', 'PJN-20260801-0002', 16, 300000, 1.00, 6, '2027-02-01', 'lunas', 'disetujui', '2026-08-01 09:21:06', '2026-08-01 09:22:57', 0.50);

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

--
-- Struktur dari tabel `pinjaman_detail`
--

CREATE TABLE `pinjaman_detail` (
  `id` bigint UNSIGNED NOT NULL,
  `pinjaman_id` bigint UNSIGNED NOT NULL,
  `angsuran_ke` int NOT NULL,
  `tanggal_jatuh_tempo` date NOT NULL,
  `jumlah_angsuran` bigint NOT NULL,
  `sisa_bayar` bigint NOT NULL,
  `status_pembayaran` enum('lunas','belum_lunas') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'belum_lunas',
  `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 `pinjaman_detail`
--

INSERT INTO `pinjaman_detail` (`id`, `pinjaman_id`, `angsuran_ke`, `tanggal_jatuh_tempo`, `jumlah_angsuran`, `sisa_bayar`, `status_pembayaran`, `created_at`, `updated_at`) VALUES
(25, 2, 1, '2026-07-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:49:18'),
(26, 2, 2, '2026-08-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:49:27'),
(27, 2, 3, '2026-09-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:51:47'),
(28, 2, 4, '2026-10-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:51:53'),
(29, 2, 5, '2026-11-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:51:59'),
(30, 2, 6, '2026-12-05', 84167, 0, 'lunas', '2026-06-05 21:49:11', '2026-06-05 21:52:04'),
(31, 3, 1, '2026-07-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:22'),
(32, 3, 2, '2026-08-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:26'),
(33, 3, 3, '2026-09-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:33'),
(34, 3, 4, '2026-10-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:37'),
(35, 3, 5, '2026-11-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:42'),
(36, 3, 6, '2026-12-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:45'),
(37, 3, 7, '2027-01-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:52'),
(38, 3, 8, '2027-02-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:17:57'),
(39, 3, 9, '2027-03-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:18:01'),
(40, 3, 10, '2027-04-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:18:05'),
(41, 3, 11, '2027-05-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:18:09'),
(42, 3, 12, '2027-06-11', 8417, 0, 'lunas', '2026-06-11 14:48:50', '2026-06-11 15:18:13'),
(43, 4, 1, '2026-07-11', 842, 9258, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(44, 4, 2, '2026-08-11', 842, 8417, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(45, 4, 3, '2026-09-11', 842, 7575, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(46, 4, 4, '2026-10-11', 842, 6733, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(47, 4, 5, '2026-11-11', 842, 5892, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(48, 4, 6, '2026-12-11', 842, 5050, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(49, 4, 7, '2027-01-11', 842, 4208, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(50, 4, 8, '2027-02-11', 842, 3367, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(51, 4, 9, '2027-03-11', 842, 2525, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(52, 4, 10, '2027-04-11', 842, 1683, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(53, 4, 11, '2027-05-11', 842, 842, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(54, 4, 12, '2027-06-11', 842, 0, 'belum_lunas', '2026-06-11 15:16:06', '2026-06-11 15:16:06'),
(55, 5, 1, '2026-07-11', 8, 93, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(56, 5, 2, '2026-08-11', 8, 84, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(57, 5, 3, '2026-09-11', 8, 76, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(58, 5, 4, '2026-10-11', 8, 67, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(59, 5, 5, '2026-11-11', 8, 59, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(60, 5, 6, '2026-12-11', 8, 51, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(61, 5, 7, '2027-01-11', 8, 42, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(62, 5, 8, '2027-02-11', 8, 34, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(63, 5, 9, '2027-03-11', 8, 25, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(64, 5, 10, '2027-04-11', 8, 17, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(65, 5, 11, '2027-05-11', 8, 8, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(66, 5, 12, '2027-06-11', 8, 0, 'belum_lunas', '2026-06-11 15:16:17', '2026-06-11 15:16:17'),
(70, 7, 1, '2026-09-01', 16833, 0, 'lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:35'),
(71, 7, 2, '2026-10-01', 16833, 0, 'lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:48'),
(72, 7, 3, '2026-11-01', 16833, 50500, 'belum_lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:13'),
(73, 7, 4, '2026-12-01', 16833, 33667, 'belum_lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:13'),
(74, 7, 5, '2027-01-01', 16833, 16833, 'belum_lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:13'),
(75, 7, 6, '2027-02-01', 16833, 0, 'belum_lunas', '2026-08-01 07:23:13', '2026-08-01 07:23:13'),
(76, 8, 1, '2026-09-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:21:20'),
(77, 8, 2, '2026-10-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:21:31'),
(78, 8, 3, '2026-11-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:22:28'),
(79, 8, 4, '2026-12-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:22:35'),
(80, 8, 5, '2027-01-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:22:41'),
(81, 8, 6, '2027-02-01', 50500, 0, 'lunas', '2026-08-01 09:21:06', '2026-08-01 09:22:57');

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

--
-- Struktur dari tabel `sessions`
--

CREATE TABLE `sessions` (
  `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `user_id` bigint UNSIGNED DEFAULT NULL,
  `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `user_agent` text COLLATE utf8mb4_unicode_ci,
  `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
  `last_activity` int NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Struktur dari tabel `simpanan`
--

CREATE TABLE `simpanan` (
  `id` bigint UNSIGNED NOT NULL,
  `no_simpanan` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
  `tanggal` date NOT NULL,
  `anggota_id` bigint UNSIGNED NOT NULL,
  `jenis_simpanan` enum('pokok','wajib','sukarela') COLLATE utf8mb4_unicode_ci NOT NULL,
  `nominal` decimal(15,2) NOT NULL,
  `status` enum('pending','disetujui','ditolak') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending',
  `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 `simpanan`
--

INSERT INTO `simpanan` (`id`, `no_simpanan`, `tanggal`, `anggota_id`, `jenis_simpanan`, `nominal`, `status`, `created_at`, `updated_at`) VALUES
(3, 'SPN-20260605-0003', '2024-01-10', 3, 'pokok', 500000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(4, 'SPN-20260605-0004', '2024-01-10', 4, 'pokok', 500000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(6, 'SPN-20260605-0006', '2024-01-15', 2, 'wajib', 100000.00, 'ditolak', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(7, 'SPN-20260605-0007', '2024-01-15', 3, 'wajib', 100000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(8, 'SPN-20260605-0008', '2024-01-20', 5, 'pokok', 500000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(9, 'SPN-20260605-0009', '2024-01-20', 5, 'sukarela', 200000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(11, 'SPN-20260605-0011', '2024-02-15', 2, 'wajib', 100000.00, 'pending', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(12, 'SPN-20260605-0012', '2024-02-15', 3, 'wajib', 100000.00, 'pending', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(13, 'SPN-20260605-0013', '2024-02-20', 5, 'sukarela', 150000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(14, 'SPN-20260605-0014', '2024-03-10', 6, 'pokok', 500000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(15, 'SPN-20260605-0015', '2024-03-15', 6, 'wajib', 100000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(17, 'SPN-20260605-0017', '2024-03-15', 2, 'wajib', 100000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(18, 'SPN-20260605-0018', '2024-04-01', 7, 'pokok', 500000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(19, 'SPN-20260605-0019', '2024-04-15', 7, 'wajib', 100000.00, 'disetujui', '2026-06-05 03:17:47', '2026-06-05 03:20:22'),
(20, 'SPN-20260611-0001', '1999-09-19', 20, 'wajib', 1000000.00, 'disetujui', '2026-06-11 14:56:04', '2026-06-11 14:56:04'),
(21, 'SPN-20260801-0001', '2026-08-01', 2, 'pokok', 200000.00, 'disetujui', '2026-08-01 07:22:15', '2026-08-01 07:22:15'),
(22, 'SPN-20260801-0002', '2026-08-01', 16, 'pokok', 500000.00, 'disetujui', '2026-08-01 09:19:59', '2026-08-01 09:20:12');

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

--
-- Indeks untuk tabel `jobs`
--
ALTER TABLE `jobs`
  ADD PRIMARY KEY (`id`),
  ADD KEY `jobs_queue_index` (`queue`);

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

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

--
-- Indeks untuk tabel `pembayaran`
--
ALTER TABLE `pembayaran`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pembayaran_pinjaman_detail_id_foreign` (`pinjaman_detail_id`);

--
-- Indeks untuk tabel `pinjaman`
--
ALTER TABLE `pinjaman`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `pinjaman_no_pinjaman_unique` (`no_pinjaman`),
  ADD KEY `pinjaman_anggota_id_foreign` (`anggota_id`);

--
-- Indeks untuk tabel `pinjaman_detail`
--
ALTER TABLE `pinjaman_detail`
  ADD PRIMARY KEY (`id`),
  ADD KEY `pinjaman_detail_pinjaman_id_foreign` (`pinjaman_id`);

--
-- Indeks untuk tabel `sessions`
--
ALTER TABLE `sessions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `sessions_user_id_index` (`user_id`),
  ADD KEY `sessions_last_activity_index` (`last_activity`);

--
-- Indeks untuk tabel `simpanan`
--
ALTER TABLE `simpanan`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `simpanan_no_simpanan_unique` (`no_simpanan`),
  ADD KEY `simpanan_anggota_id_foreign` (`anggota_id`);

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

--
-- AUTO_INCREMENT untuk tabel `jobs`
--
ALTER TABLE `jobs`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT untuk tabel `pembayaran`
--
ALTER TABLE `pembayaran`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=35;

--
-- AUTO_INCREMENT untuk tabel `pinjaman`
--
ALTER TABLE `pinjaman`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=9;

--
-- AUTO_INCREMENT untuk tabel `pinjaman_detail`
--
ALTER TABLE `pinjaman_detail`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=82;

--
-- AUTO_INCREMENT untuk tabel `simpanan`
--
ALTER TABLE `simpanan`
  MODIFY `id` bigint UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;

--
-- Ketidakleluasaan untuk tabel pelimpahan (Dumped Tables)
--

--
-- Ketidakleluasaan untuk tabel `pembayaran`
--
ALTER TABLE `pembayaran`
  ADD CONSTRAINT `pembayaran_pinjaman_detail_id_foreign` FOREIGN KEY (`pinjaman_detail_id`) REFERENCES `pinjaman_detail` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `pinjaman`
--
ALTER TABLE `pinjaman`
  ADD CONSTRAINT `pinjaman_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `pinjaman_detail`
--
ALTER TABLE `pinjaman_detail`
  ADD CONSTRAINT `pinjaman_detail_pinjaman_id_foreign` FOREIGN KEY (`pinjaman_id`) REFERENCES `pinjaman` (`id`) ON DELETE CASCADE;

--
-- Ketidakleluasaan untuk tabel `simpanan`
--
ALTER TABLE `simpanan`
  ADD CONSTRAINT `simpanan_anggota_id_foreign` FOREIGN KEY (`anggota_id`) REFERENCES `anggota` (`id`) ON DELETE CASCADE;
COMMIT;

