monev sampai target

This commit is contained in:
2026-04-27 09:13:35 +07:00
parent 5e2430cb2b
commit f3d4ba5f76
19 changed files with 1939 additions and 0 deletions
@@ -0,0 +1,140 @@
<?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('program_framework', function (Blueprint $table) {
$table->id();
$table->string('nama');
$table->integer('tahun');
$table->foreignId('program_id')->nullable()->constrained('core_program')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
Schema::create('program_transformasi', function (Blueprint $table) {
$table->id();
$table->string('kode');
$table->string('nama');
$table->foreignId('framework_id')->nullable()->constrained('program_framework')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
Schema::create('program_aktivitas', function (Blueprint $table) {
$table->id();
$table->string('kode');
$table->string('nama', length: 1000);
$table->enum('jenis_aktivitas', ['tujuan', 'aktivitas'])->default('aktivitas');
$table->string('indikator', length: 1000);
$table->text('deskripsi')->nullable();
$table->foreignId('transformasi_id')->nullable()->constrained('program_transformasi')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
Schema::create('program_target', function (Blueprint $table) {
$table->id();
$table->string('variabel');
$table->enum('tipe', ['integer', 'float', 'boolean'])->default('integer');
$table->integer('target_integer')->nullable();
$table->float('target_float', 10, 2)->nullable();
$table->boolean('target_boolean')->nullable();
$table->integer('baseline_integer')->nullable();
$table->float('baseline_float', 10, 2)->nullable();
$table->boolean('baseline_boolean')->nullable();
$table->integer('realisasi_integer')->nullable();
$table->float('realisasi_float', 10, 2)->nullable();
$table->boolean('realisasi_boolean')->nullable();
$table->foreignId('aktivitas_id')->nullable()->constrained('program_aktivitas')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
Schema::create('program_verifikasi', function (Blueprint $table) {
$table->id();
$table->string('dokumen');
$table->string('link_dokumen', length: 1000)->nullable();
$table->foreignId('aktivitas_id')->nullable()->constrained('program_aktivitas')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
Schema::create('program_realisasi', function (Blueprint $table) {
$table->id();
$table->integer('realisasi_integer')->nullable();
$table->float('realisasi_float', 10, 2)->nullable();
$table->boolean('realisasi_boolean')->nullable();
$table->foreignId('target_id')->nullable()->constrained('program_target')->nullOnDelete();
$table->foreignId('created_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('updated_by')->nullable()->constrained('users')->onDelete('set null');
$table->foreignId('deleted_by')->nullable()->constrained('users')->onDelete('set null');
$table->timestamps();
$table->softDeletes();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('program_realisasi');
Schema::dropIfExists('program_target');
Schema::dropIfExists('program_verifikasi');
Schema::dropIfExists('program_aktivitas');
Schema::dropIfExists('program_transformasi');
Schema::dropIfExists('program_framework');
}
};