<?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('families', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('employee_id')->index();
            $table->string('fathers_name', 100)->nullable();
            $table->string('fathers_age', 25)->nullable();
            $table->date('fathers_birth_date')->nullable();
            $table->string('fathers_occupation', 50)->nullable();
            $table->text('fathers_address')->nullable();
            $table->string('mothers_name', 100)->nullable();
            $table->string('mothers_age', 25)->nullable();
            $table->date('mothers_birth_date')->nullable();
            $table->string('mothers_occupation')->nullable();
            $table->text('mothers_address')->nullable();
            $table->string('spouse_name', 100)->nullable();
            $table->date('spouse_birth_date')->nullable();
            $table->text('spouse_address')->nullable();
            $table->string('spouse_contact_no', 25)->nullable();
            $table->string('spouse_occupation', 50)->nullable();
            $table->string('spouse_employer', 50)->nullable();
            $table->string('spouse_employer_contact_no', 50)->nullable();
            $table->boolean('enabled')->default(true)->index();
            $table->softDeletes();
            $table->timestamps();
        });
    }

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