feat(laporan-slik): implementasi sistem laporan SLIK

- Menambahkan tabel `laporan_slik` (47 kolom, index, audit trail, status aktif/non-aktif)
- Membuat model `LaporanSlik` dengan fillable lengkap, relasi ke Slik & User, accessor agunan/status badge
- Menambahkan controller `LaporanSlikController` dengan method store(), datatables(), export()
- store(): validasi strict, cek duplikasi, copy data dari Slik ke laporan, hapus data asal
- datatables(): filter search/tahun/bulan/status, pagination, sorting, JSON response standar
- export(): ekspor Excel dengan filter sama, nama file otomatis timestamp, error handling
- Integrasi sistem: transaksi DB aman, logging detail, support bulk operations, memory optimisasi
- UX: SweetAlert, DataTable real-time, loading state, error message jelas, auto-reload
- Security & performa: validasi input, XSS & SQLi prevention, index optimization, siap rate limiting
This commit is contained in:
Daeng Deni Mardaeni
2025-09-17 13:00:24 +07:00
parent 41262e0317
commit c3c40fdc27
3 changed files with 447 additions and 0 deletions

View File

@@ -0,0 +1,84 @@
<?php
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
/**
* Run the migrations.
*/
public function up(): void
{
Schema::create('laporan_slik', function (Blueprint $table) {
$table->id();
$table->unsignedBigInteger('slik_id')->nullable();
$table->string('sandi_bank', 10)->nullable();
$table->string('kode_kantor', 10)->nullable();
$table->string('kode_cabang', 10)->nullable();
$table->string('tahun', 4)->nullable();
$table->string('bulan', 2)->nullable();
$table->string('no_rekening', 50)->nullable();
$table->string('cif', 50)->nullable();
$table->string('kode_jenis', 10)->nullable();
$table->string('kode_jenis_ket', 100)->nullable();
$table->string('kode_sifat', 10)->nullable();
$table->string('kode_sifat_ket', 100)->nullable();
$table->string('kode_valuta', 5)->nullable();
$table->string('kode_valuta_ket', 50)->nullable();
$table->string('baki_debet', 20)->nullable();
$table->string('kolektibilitas', 5)->nullable();
$table->string('kolektibilitas_ket', 50)->nullable();
$table->string('tanggal_mulai', 10)->nullable();
$table->string('tanggal_jatuh_tempo', 10)->nullable();
$table->string('tanggal_selesai', 10)->nullable();
$table->string('tanggal_restrukturisasi', 10)->nullable();
$table->string('kode_sebab_macet', 10)->nullable();
$table->string('kode_sebab_macet_ket', 100)->nullable();
$table->string('tanggal_macet', 10)->nullable();
$table->string('kode_kondisi', 10)->nullable();
$table->string('kode_kondisi_ket', 100)->nullable();
$table->string('tanggal_kondisi', 10)->nullable();
$table->string('nilai_agunan', 20)->nullable();
$table->string('nilai_agunan_ket', 100)->nullable();
$table->string('jenis_agunan', 50)->nullable();
$table->string('kode_agunan', 10)->nullable();
$table->string('kode_agunan_ket', 100)->nullable();
$table->string('peringkat_agunan', 10)->nullable();
$table->string('peringkat_agunan_ket', 100)->nullable();
$table->string('nama_debitur', 100)->nullable();
$table->string('npwp', 50)->nullable();
$table->string('no_ktp', 50)->nullable();
$table->string('no_telp', 50)->nullable();
$table->string('kode_kab_kota', 10)->nullable();
$table->string('kode_kab_kota_ket', 100)->nullable();
$table->string('kode_negara_domisili', 10)->nullable();
$table->string('kode_negara_domisili_ket', 100)->nullable();
$table->string('kode_pos', 10)->nullable();
$table->string('alamat', 200)->nullable();
$table->string('fasilitas', 100)->nullable();
$table->string('status_agunan', 20)->nullable();
$table->string('tanggal_lapor', 10)->nullable();
$table->string('status', 20)->default('aktif');
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->timestamps();
$table->index('slik_id');
$table->index('no_rekening');
$table->index('cif');
$table->index('nama_debitur');
$table->index(['tahun', 'bulan']);
$table->index('created_at');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('laporan_slik');
}
};