| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace App\Module\Activity\Events;
- use Illuminate\Broadcasting\InteractsWithSockets;
- use Illuminate\Foundation\Events\Dispatchable;
- use Illuminate\Queue\SerializesModels;
- /**
- * 活动状态变更事件
- */
- class ActivityStatusChangedEvent
- {
- use Dispatchable, InteractsWithSockets, SerializesModels;
- /**
- * 活动ID
- *
- * @var int
- */
- public int $activityId;
- /**
- * 旧状态
- *
- * @var int
- */
- public int $oldStatus;
- /**
- * 新状态
- *
- * @var int
- */
- public int $newStatus;
- /**
- * 创建一个新的事件实例
- *
- * @param int $activityId 活动ID
- * @param int $oldStatus 旧状态
- * @param int $newStatus 新状态
- */
- public function __construct(int $activityId, int $oldStatus, int $newStatus)
- {
- $this->activityId = $activityId;
- $this->oldStatus = $oldStatus;
- $this->newStatus = $newStatus;
- }
- }
|