<?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('promotion_packages', function (Blueprint $table) {
            $table->id();
            $table->string('name');
            $table->text('description')->nullable();
            $table->decimal('price', 10, 2);
            $table->integer('duration_days');
            $table->tinyInteger('page_position')->default(1)->comment('1 = Page 1, 2 = Page 2');
            $table->integer('max_products')->default(1)->comment('Max products in this package');
            $table->integer('priority_level')->default(1)->comment('Higher = shown first');
            $table->string('badge_text')->default('Featured');
            $table->string('badge_color')->default('#FF6B00');
            $table->boolean('is_active')->default(true);
            $table->timestamps();
        });
    }

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