<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
    public function up(): void
    {
        Schema::create('subscription_plans', function (Blueprint $table) {
            $table->id();
            $table->string('plan_name', 100);
            $table->text('description')->nullable();
            $table->decimal('price', 10, 2);
            $table->string('billing_cycle', 20)->nullable();
            $table->integer('max_users')->nullable();
            $table->integer('max_bookings_per_month')->nullable();
            $table->json('features')->nullable();
            $table->timestamps();
            
            $table->unique('plan_name');
        });
    }

    public function down(): void
    {
        Schema::dropIfExists('subscription_plans');
    }
};
