<?php

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

return new class extends Migration
{
    public function up()
    {
        Schema::create('vip_cards', function (Blueprint $table) {
            $table->id();
            $table->string('name');                         // e.g. "Tesla Black Card"
            $table->string('slug')->unique();
            $table->text('description')->nullable();
            $table->text('short_description')->nullable();  // one-liner for cards
            $table->decimal('price', 12, 2);
            $table->integer('duration_days');                // membership validity in days
            $table->json('benefits')->nullable();            // array of benefit strings
            $table->string('card_image')->nullable();        // admin-uploaded card image path
            $table->string('color', 50)->default('#1a1a1a'); // hex color for card styling
            $table->integer('sort_order')->default(0);
            $table->boolean('featured')->default(false);
            $table->string('status', 20)->default('active'); // active, inactive
            $table->softDeletes();
            $table->timestamps();
        });
    }

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