<?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('rooms', function (Blueprint $table) {
            $table->id('room_id');
            $table->unsignedBigInteger('room_type_id');
            $table->string('room_no', 10);
            $table->boolean('status')->nullable();
            $table->boolean('check_in_status')->default(false);
            $table->boolean('check_out_status')->default(false);
            $table->boolean('deleteStatus')->default(false);
            
            $table->foreign('room_type_id')->references('room_type_id')->on('room_types');
        });
    }

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