<?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('pendaftarans', function (Blueprint $table) {
            $table->id();
            $table->string('no_pendaftaran')->unique();
            $table->string('nama_lengkap');
            $table->string('no_telepon');
            $table->string('nisn');
            $table->string('tempat_lahir');
            $table->date('tanggal_lahir');
            $table->enum('jenis_kelamin',['Laki-laki','Perempuan']);
            $table->string('agama');
            $table->string('anak_ke');
            $table->enum('status_anak',['Anak Kandung','Anak Angkat']);
            $table->text('alamat_murid');
            $table->string('riwayat_penyakit')->nullable();
            $table->string('sekolah_asal');
            $table->string('nama_ayah');
            $table->string('nama_ibu');
            $table->string('alamat_orangtua');
            $table->string('telepon_orangtua');
            $table->string('pekerjaan_ayah');
            $table->string('pekerjaan_ibu');
            $table->string('pendidikan_ayah');
            $table->string('pendidikan_ibu');
            $table->integer('penghasilan_ayah')->nullable();
            $table->integer('penghasilan_ibu')->nullable();
            $table->string('nomor_kip');
            $table->enum('jurusan',['MPLB','PPLG','TO']);
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     */
    public function down(): void
    {
        Schema::dropIfExists('pendaftarans');
    }
};
