<?php

namespace App\Events;

use App\Models\Order;
use Illuminate\Foundation\Events\Dispatchable;

/**
 * Event dipanggil setelah transaksi checkout berhasil di-commit.
 * Jangan dispatch di dalam DB::transaction — dispatch SETELAH transaction selesai.
 */
class OrderPlaced
{
    use Dispatchable;

    public function __construct(
        public readonly Order $order
    ) {}
}
