- Fitur: input pelanggaran, sistem poin, surat peringatan otomatis, SP progress - Realtime notifikasi via Laravel Reverb + Echo - Dashboard statistik, manajemen user, manajemen master data - Login 2 kolom premium, user dropdown, pengaturan akun - Tema biru kalem, logo sekolah dinamis, sidebar brand dinamis - Sinkronisasi siswa dari Database Kesiswaan via API
43 lines
1.6 KiB
PHP
43 lines
1.6 KiB
PHP
<?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('students', function (Blueprint $table) {
|
|
$table->id();
|
|
$table->string('source_id')->nullable()->index();
|
|
$table->string('nisn')->unique();
|
|
$table->string('student_number')->nullable()->index();
|
|
$table->string('full_name');
|
|
$table->string('gender')->nullable();
|
|
$table->string('place_of_birth')->nullable();
|
|
$table->date('date_of_birth')->nullable();
|
|
$table->string('address')->nullable();
|
|
$table->string('phone_number')->nullable();
|
|
$table->string('email')->nullable();
|
|
$table->string('class_name')->nullable();
|
|
$table->string('class_level')->nullable();
|
|
$table->string('department_code')->nullable();
|
|
$table->string('department_name')->nullable();
|
|
$table->string('academic_year_name')->nullable();
|
|
$table->string('status')->default('active');
|
|
$table->string('photo_path')->nullable();
|
|
$table->foreignId('class_id')->nullable()->constrained()->nullOnDelete();
|
|
$table->boolean('is_active')->default(true);
|
|
$table->json('metadata')->nullable();
|
|
$table->timestamp('synced_at')->nullable();
|
|
$table->timestamps();
|
|
});
|
|
}
|
|
|
|
public function down(): void
|
|
{
|
|
Schema::dropIfExists('students');
|
|
}
|
|
};
|