first commit
This commit is contained in:
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
<?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('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tahun');
|
||||
$table->integer('id_unit_kerja');
|
||||
$table->string('unit_kerja_nama');
|
||||
$table->bigInteger('total_p1')->default(0);
|
||||
$table->bigInteger('total_p2')->default(0);
|
||||
$table->bigInteger('total_thr')->default(0);
|
||||
$table->bigInteger('total_r13')->default(0);
|
||||
$table->bigInteger('total_publikasi')->default(0);
|
||||
$table->bigInteger('total_remunerasi')->default(0);
|
||||
$table->timestamps();
|
||||
|
||||
// Indexes
|
||||
$table->index(['tahun', 'id_unit_kerja']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('verifikator.rekapitulasi');
|
||||
}
|
||||
};
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
<?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::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->bigInteger('kekurangan_p1')->default(0)->after('total_remunerasi');
|
||||
$table->bigInteger('kekurangan_p2')->default(0)->after('kekurangan_p1');
|
||||
$table->bigInteger('kekurangan_thr')->default(0)->after('kekurangan_p2');
|
||||
$table->bigInteger('kekurangan_r13')->default(0)->after('kekurangan_thr');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->dropColumn(['kekurangan_p1', 'kekurangan_p2', 'kekurangan_thr', 'kekurangan_r13']);
|
||||
});
|
||||
}
|
||||
};
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?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::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->decimal('kekurangan_p1', 16, 2)->default(0)->change();
|
||||
$table->decimal('kekurangan_p2', 16, 2)->default(0)->change();
|
||||
$table->decimal('kekurangan_thr', 16, 2)->default(0)->change();
|
||||
$table->decimal('kekurangan_r13', 16, 2)->default(0)->change();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->bigInteger('kekurangan_p1')->default(0)->change();
|
||||
$table->bigInteger('kekurangan_p2')->default(0)->change();
|
||||
$table->bigInteger('kekurangan_thr')->default(0)->change();
|
||||
$table->bigInteger('kekurangan_r13')->default(0)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
<?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::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->renameColumn('kekurangan_p1', 'total_kekurangan_p1');
|
||||
$table->renameColumn('kekurangan_p2', 'total_kekurangan_p2');
|
||||
$table->renameColumn('kekurangan_thr', 'total_kekurangan_thr');
|
||||
$table->renameColumn('kekurangan_r13', 'total_kekurangan_r13');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->renameColumn('total_kekurangan_p1', 'kekurangan_p1');
|
||||
$table->renameColumn('total_kekurangan_p2', 'kekurangan_p2');
|
||||
$table->renameColumn('total_kekurangan_thr', 'kekurangan_thr');
|
||||
$table->renameColumn('total_kekurangan_r13', 'kekurangan_r13');
|
||||
});
|
||||
}
|
||||
};
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
<?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::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->bigInteger('layanan_pendidikan')->default(0);
|
||||
$table->bigInteger('kerjasama_unit_kerja')->default(0);
|
||||
$table->bigInteger('pendapatan_rumah_sakit')->default(0);
|
||||
$table->bigInteger('layanan_perbankan')->default(0);
|
||||
$table->bigInteger('total_pendapatan')->default(0);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.rekapitulasi', function (Blueprint $table) {
|
||||
$table->dropColumn([
|
||||
'layanan_pendidikan',
|
||||
'kerjasama_unit_kerja',
|
||||
'pendapatan_rumah_sakit',
|
||||
'layanan_perbankan',
|
||||
'total_pendapatan'
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('periodes', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('periodes');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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('permissions', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('permissions');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,32 @@
|
||||
<?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('jobs', function (Blueprint $table) {
|
||||
$table->bigIncrements('id');
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,35 @@
|
||||
<?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('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?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::connection('pgsql')->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->string('jenis_pegawai')->nullable()->after('nama');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('pgsql')->table('rekapitulasi.p1', function (Blueprint $table) {
|
||||
$table->dropColumn('jenis_pegawai');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('verifikator.dosens', function (Blueprint $table) {
|
||||
$table->string('nip_honorer')->nullable()->after('nip_siakad');
|
||||
});
|
||||
|
||||
Schema::table('verifikator.tendiks', function (Blueprint $table) {
|
||||
$table->string('nip_honorer')->nullable()->after('nip_siakad');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.dosens', function (Blueprint $table) {
|
||||
$table->dropColumn('nip_honorer');
|
||||
});
|
||||
|
||||
Schema::table('verifikator.tendiks', function (Blueprint $table) {
|
||||
$table->dropColumn('nip_honorer');
|
||||
});
|
||||
}
|
||||
};
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::table('verifikator.dosens', function (Blueprint $table) {
|
||||
$table->renameColumn('nip_honorer', 'id_dawai');
|
||||
});
|
||||
|
||||
Schema::table('verifikator.tendiks', function (Blueprint $table) {
|
||||
$table->renameColumn('nip_honorer', 'id_dawai');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.dosens', function (Blueprint $table) {
|
||||
$table->renameColumn('id_dawai', 'nip_honorer');
|
||||
});
|
||||
|
||||
Schema::table('verifikator.tendiks', function (Blueprint $table) {
|
||||
$table->renameColumn('id_dawai', 'nip_honorer');
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?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('verifikator.team_unit_kerjas', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('team_id')->constrained('verifikator.teams')->onDelete('cascade');
|
||||
$table->integer('unit_kerja_id');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('verifikator.team_unit_kerjas');
|
||||
}
|
||||
};
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
<?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::table('verifikator.team_unit_kerjas', function (Blueprint $table) {
|
||||
$table->integer('unit_kerja_id')->nullable()->change();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::table('verifikator.team_unit_kerjas', function (Blueprint $table) {
|
||||
$table->integer('unit_kerja_id')->nullable(false)->change();
|
||||
});
|
||||
}
|
||||
};
|
||||
+23
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
public function up(): void
|
||||
{
|
||||
Schema::connection('rekapitulasi')->table('p1', function (Blueprint $table) {
|
||||
$table->boolean('is_locked')->default(false)->after('keterangan');
|
||||
$table->timestamp('paid_at')->nullable()->after('is_locked');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('rekapitulasi')->table('p1', function (Blueprint $table) {
|
||||
$table->dropColumn(['is_locked', 'paid_at']);
|
||||
});
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?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('verifikator.rasio_publikasis', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unit_kerja_id')->constrained('verifikator.unit_kerjas');
|
||||
$table->integer('periode');
|
||||
$table->double('rasio');
|
||||
$table->timestamp('paid_at')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('verifikator.rasio_publikasis');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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::connection('rekapitulasi')->create('p1', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tahun');
|
||||
$table->integer('bulan');
|
||||
$table->string('nip');
|
||||
$table->string('nama');
|
||||
$table->integer('id_unit_kerja');
|
||||
$table->string('nama_unit_kerja');
|
||||
$table->integer('id_unit_pembayaran');
|
||||
$table->string('pangkat');
|
||||
$table->string('golongan');
|
||||
$table->integer('id_jabatan_fungsional')->nullable();
|
||||
$table->string('nama_jabatan_fungsional')->nullable();
|
||||
$table->string('grade_jabatan_fungsional')->nullable();
|
||||
$table->decimal('gaji_jabatan_fungsional', 16, 2)->nullable();
|
||||
$table->integer('id_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('nama_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('grade_jabatan_tugas_tambahan')->nullable();
|
||||
$table->decimal('gaji_jabatan_tugas_tambahan', 16, 2)->nullable();
|
||||
$table->decimal('gaji_yang_dibayarkan', 16, 2);
|
||||
$table->decimal('pph21', 16, 2)->default(0);
|
||||
$table->decimal('gaji_bersih', 16, 2);
|
||||
$table->string('npwp')->nullable();
|
||||
$table->string('nomor_rekening')->nullable();
|
||||
$table->text('keterangan')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('rekapitulasi')->dropIfExists('p1');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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::connection('rekapitulasi')->create('thr', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tahun');
|
||||
$table->integer('bulan');
|
||||
$table->string('nip');
|
||||
$table->string('nama');
|
||||
$table->integer('id_unit_kerja');
|
||||
$table->string('nama_unit_kerja');
|
||||
$table->integer('id_unit_pembayaran');
|
||||
$table->string('pangkat');
|
||||
$table->string('golongan');
|
||||
$table->integer('id_jabatan_fungsional')->nullable();
|
||||
$table->string('nama_jabatan_fungsional')->nullable();
|
||||
$table->string('grade_jabatan_fungsional')->nullable();
|
||||
$table->decimal('gaji_jabatan_fungsional', 16, 2)->nullable();
|
||||
$table->integer('id_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('nama_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('grade_jabatan_tugas_tambahan')->nullable();
|
||||
$table->decimal('gaji_jabatan_tugas_tambahan', 16, 2)->nullable();
|
||||
$table->decimal('gaji_yang_dibayarkan', 16, 2);
|
||||
$table->decimal('pph21', 16, 2)->default(0);
|
||||
$table->decimal('gaji_bersih', 16, 2);
|
||||
$table->string('npwp')->nullable();
|
||||
$table->string('nomor_rekening')->nullable();
|
||||
$table->text('keterangan')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('rekapitulasi')->dropIfExists('thr');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,50 @@
|
||||
<?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::connection('rekapitulasi')->create('r13', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->integer('tahun');
|
||||
$table->integer('bulan');
|
||||
$table->string('nip');
|
||||
$table->string('nama');
|
||||
$table->integer('id_unit_kerja');
|
||||
$table->string('nama_unit_kerja');
|
||||
$table->integer('id_unit_pembayaran');
|
||||
$table->string('pangkat');
|
||||
$table->string('golongan');
|
||||
$table->integer('id_jabatan_fungsional')->nullable();
|
||||
$table->string('nama_jabatan_fungsional')->nullable();
|
||||
$table->string('grade_jabatan_fungsional')->nullable();
|
||||
$table->decimal('gaji_jabatan_fungsional', 16, 2)->nullable();
|
||||
$table->integer('id_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('nama_jabatan_tugas_tambahan')->nullable();
|
||||
$table->string('grade_jabatan_tugas_tambahan')->nullable();
|
||||
$table->decimal('gaji_jabatan_tugas_tambahan', 16, 2)->nullable();
|
||||
$table->decimal('gaji_yang_dibayarkan', 16, 2);
|
||||
$table->decimal('pph21', 16, 2)->default(0);
|
||||
$table->decimal('gaji_bersih', 16, 2);
|
||||
$table->string('npwp')->nullable();
|
||||
$table->string('nomor_rekening')->nullable();
|
||||
$table->text('keterangan')->nullable();
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::connection('rekapitulasi')->dropIfExists('r13');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
// use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Seed the application's database.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
// User::factory(10)->create();
|
||||
|
||||
User::factory()->create([
|
||||
'name' => 'Test User',
|
||||
'email' => 'test@example.com',
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use Illuminate\Database\Console\Seeds\WithoutModelEvents;
|
||||
use Illuminate\Database\Seeder;
|
||||
use App\Models\Verifikator\Rekapitulasi;
|
||||
|
||||
class RekapitulasiSeeder extends Seeder
|
||||
{
|
||||
/**
|
||||
* Run the database seeds.
|
||||
*/
|
||||
public function run(): void
|
||||
{
|
||||
$tahun = date('Y');
|
||||
|
||||
$unitKerjas = [
|
||||
['id_unit_kerja' => 1, 'nama' => 'Fakultas Hukum'],
|
||||
['id_unit_kerja' => 2, 'nama' => 'Fakultas Ekonomi dan Bisnis'],
|
||||
['id_unit_kerja' => 3, 'nama' => 'Fakultas Pertanian'],
|
||||
['id_unit_kerja' => 4, 'nama' => 'Fakultas Teknik'],
|
||||
['id_unit_kerja' => 5, 'nama' => 'Fakultas Ilmu Sosial dan Ilmu Politik'],
|
||||
['id_unit_kerja' => 6, 'nama' => 'Fakultas Keguruan dan Ilmu Pendidikan'],
|
||||
['id_unit_kerja' => 7, 'nama' => 'Fakultas Kehutanan'],
|
||||
['id_unit_kerja' => 8, 'nama' => 'Fakultas Matematika dan Ilmu Pengetahuan Alam'],
|
||||
['id_unit_kerja' => 9, 'nama' => 'Fakultas Kedokteran'],
|
||||
['id_unit_kerja' => 99, 'nama' => 'Universitas']
|
||||
];
|
||||
|
||||
foreach ($unitKerjas as $unitKerja) {
|
||||
Rekapitulasi::create([
|
||||
'tahun' => $tahun,
|
||||
'id_unit_kerja' => $unitKerja['id_unit_kerja'],
|
||||
'unit_kerja_nama' => $unitKerja['nama'],
|
||||
'total_p1' => 0,
|
||||
'total_p2' => 0,
|
||||
'total_thr' => 0,
|
||||
'total_r13' => 0,
|
||||
'total_publikasi' => 0,
|
||||
'total_remunerasi' => 0
|
||||
]);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user