feat(laporan_external): tambahkan fitur laporan eksternal

- Menambahkan controller LaporanExternalController untuk mengelola laporan eksternal.
- Menambahkan request LaporanExternalRequest untuk validasi data laporan eksternal.
- Menambahkan model LaporanExternal untuk interaksi dengan database.
- Menambahkan migrasi untuk tabel laporan_externals dengan kolom yang diperlukan.
This commit is contained in:
Daeng Deni Mardaeni
2025-03-06 08:41:03 +07:00
parent ff4d48704f
commit 38b22bce38
4 changed files with 290 additions and 0 deletions

View File

@@ -0,0 +1,46 @@
<?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_externals', function (Blueprint $table) {
$table->id();
$table->foreignId('permohonan_id')->constrained('permohonans')->onDelete('cascade');
$table->string('nomor_laporan');
$table->date('tgl_final_laporan');
$table->decimal('nilai_pasar', 15, 2);
$table->decimal('indikasi_nilai_likuidasi', 15, 2);
$table->decimal('indikasi_nilai_pasar_tanah', 15, 2);
$table->decimal('estimasi_harga_tanah', 15, 2);
$table->decimal('estimasi_harga_bangunan', 15, 2);
$table->decimal('indikasi_nilai_pasar_bangunan', 15, 2);
$table->decimal('indikasi_nilai_pasar_sarana_pelengkap', 15, 2);
$table->decimal('indikasi_nilai_pasar_mesin', 15, 2);
$table->decimal('indikasi_nilai_pasar_kendaraan_alat_berat', 15, 2);
$table->string('file_resume')->nullable(); // New field for resume file
$table->string('file_laporan')->nullable(); // New field for report file
$table->timestamps();
$table->softDeletes();
$table->unsignedBigInteger('created_by')->nullable();
$table->unsignedBigInteger('updated_by')->nullable();
$table->unsignedBigInteger('deleted_by')->nullable();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('laporan_externals');
}
};