<?php

namespace Modules\SystemCore\App\Events;

use Illuminate\Foundation\Events\Dispatchable;
use Illuminate\Queue\SerializesModels;
use Modules\SystemCore\App\Models\CorePurchaseOrder;

class PurchaseOrderPaymentStatusChanged
{
    use Dispatchable, SerializesModels;

    public CorePurchaseOrder $purchaseOrder;

    public string $oldStatus;

    public string $newStatus;

    /**
     * Create a new event instance.
     */
    public function __construct(CorePurchaseOrder $purchaseOrder, string $oldStatus, string $newStatus)
    {
        $this->purchaseOrder = $purchaseOrder;
        $this->oldStatus = $oldStatus;
        $this->newStatus = $newStatus;
    }
}
