Sync SOP ke e-doc Plant & Add Subject dan penyempurnaan bagian matrix training karyawan

This commit is contained in:
Iwit
2026-06-04 19:01:17 +07:00
parent 91c0a8147f
commit 1089f60a3d
26 changed files with 1241 additions and 155 deletions
@@ -0,0 +1,37 @@
<?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()
{
Schema::create('employee_subject', function (Blueprint $table) {
$table->id();
// Menggunakan user_id karena data karyawan ada di tabel users
$table->unsignedBigInteger('user_id');
$table->unsignedBigInteger('subject_id');
$table->enum('status', ['belum_training', 'passed'])->default('belum_training');
$table->timestamps();
// Relasikan ke tabel users
$table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
$table->foreign('subject_id')->references('id')->on('subjects')->onDelete('cascade');
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('employee_subject');
}
};