feat: add graduation archive and public document services

This commit is contained in:
2026-04-14 13:51:39 +00:00
parent d77ad72bcc
commit 58c9b47dc0
30 changed files with 2513 additions and 295 deletions
@@ -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
{
public function up(): void
{
Schema::create('sync_tokens', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('token_hash')->unique();
$table->text('abilities')->nullable();
$table->foreignId('created_by')->constrained('users')->cascadeOnDelete();
$table->timestamp('last_used_at')->nullable();
$table->timestamp('revoked_at')->nullable();
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('sync_tokens');
}
};
@@ -0,0 +1,42 @@
<?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::create('student_graduations', function (Blueprint $table) {
$table->id();
$table->foreignId('student_id')->constrained()->cascadeOnDelete();
$table->string('student_number')->nullable();
$table->string('nisn')->nullable();
$table->string('full_name');
$table->foreignId('academic_year_id')->nullable()->constrained('academic_years')->nullOnDelete();
$table->foreignId('department_id')->nullable()->constrained('departments')->nullOnDelete();
$table->foreignId('class_id')->nullable()->constrained('classes')->nullOnDelete();
$table->date('entry_date')->nullable();
$table->date('graduation_date')->nullable();
$table->text('graduation_note')->nullable();
$table->string('skl_file_name')->nullable();
$table->string('skl_file_path')->nullable();
$table->string('skl_mime_type')->nullable();
$table->unsignedBigInteger('skl_file_size')->nullable();
$table->string('ijazah_file_name')->nullable();
$table->string('ijazah_file_path')->nullable();
$table->string('ijazah_mime_type')->nullable();
$table->unsignedBigInteger('ijazah_file_size')->nullable();
$table->string('status')->default('graduated');
$table->timestamps();
$table->unique('student_id');
});
}
public function down(): void
{
Schema::dropIfExists('student_graduations');
}
};