<?php

namespace Modules\SystemCore\App\Events;

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

class SalesOrderPaymentStatusChanged
{
    use Dispatchable, SerializesModels;

    public CoreSalesOrder $salesOrder;

    public string $oldStatus;

    public string $newStatus;

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