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

                $table->date('allotment_date')->unique(); // Fecha de Configuración
                $table->integer('occupation_percentage')->default(0);   // % de Ocupación del día

                $table->json('allotment_room_summary')->nullable();     // Resumen de Habitaciones disponibles (por OTA) para oferta
                $table->json('room_types_configuration')->nullable();   // Configuración General del Calendario

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

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