<?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();

            // Category
            $table->foreignId('room_category_id')->nullable()->constrained()->nullOnDelete();

            $table->string('room_number')->unique();
            $table->string('floor')->nullable();

            $table->decimal('price_override', 10, 2)->nullable();


            // Differences
            $table->string('view')->nullable(); // Sea View, Garden View, etc.
            $table->text('description')->nullable(); // Any specific notes for this room

            $table->longText('details')->nullable();
            $table->longText('policies')->nullable();

            // Status
            $table->boolean('is_published')->default(true);

            $table->timestamps();
        });
    }

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