| 123456789101112131415161718192021222324252627282930 |
- <?php
- namespace App\Module\Mex\Events;
- use App\Module\Mex\Models\MexOrder;
- use App\Module\Mex\Models\MexTransaction;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 订单完成事件
- *
- * 当订单完成时触发此事件
- */
- class OrderCompletedEvent
- {
- use Dispatchable, SerializesModels;
- public MexOrder $order;
- public ?MexTransaction $transaction;
- /**
- * 创建事件实例
- */
- public function __construct(MexOrder $order, ?MexTransaction $transaction = null)
- {
- $this->order = $order;
- $this->transaction = $transaction;
- }
- }
|