<?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('pakets', function (Blueprint $table) {
            $table->id();
            $table->string('nama_paket');
            $table->string('slug')->unique();
            $table->enum('jenis_paket', ['wedding', 'seminar', 'outdoor', 'custom']);
            $table->decimal('harga', 15, 2);
            $table->string('image')->nullable();
            $table->text('keterangan')->nullable();
            $table->json('detail_barang')->nullable();
            $table->integer('stok')->default(0);
            $table->enum('status', ['aktif', 'nonaktif'])->default('aktif');
            $table->decimal('rating', 3, 2)->default(0.00);
            $table->integer('total_rating')->default(0);
            $table->integer('minimum_order')->default(1);
            $table->integer('maximum_order')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });
    }

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