<?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('fan_card_plans', function (Blueprint $table) {
            $table->id();
            $table->string('name'); // e.g., Silver, Gold, Platinum
            $table->string('slug')->unique(); // e.g., silver, gold, platinum
            $table->decimal('price', 10, 2); // Annual price
            $table->text('description')->nullable();
            $table->json('benefits')->nullable(); // Array of benefits
            $table->integer('discount_percentage')->default(0); // Discount on bookings
            $table->boolean('is_active')->default(true);
            $table->boolean('is_featured')->default(false); // Recommended plan
            $table->integer('sort_order')->default(0); // Display order
            $table->string('badge_color')->nullable(); // UI color theme
            $table->string('icon')->nullable(); // Icon class or name
            $table->timestamps();
        });
    }

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