<?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('statuses', function (Blueprint $table) {

            $table->id();

            $table->foreignId('file_id')
                ->constrained('files');

            $table->tinyInteger('status')->default(1);

            $table->date('date_of_bill_ascent')->nullable();

            $table->date('date_of_law_commencement')->nullable();

            $table->foreignId('created_by')->constrained('users')->nullable();

            $table->unsignedBigInteger('updated_by')->foreignId('users')->nullable();
            $table->timestamps();
        });
    }

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