UserParticipatedEvent.php 761 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. namespace App\Module\Activity\Events;
  3. use Illuminate\Broadcasting\InteractsWithSockets;
  4. use Illuminate\Foundation\Events\Dispatchable;
  5. use Illuminate\Queue\SerializesModels;
  6. /**
  7. * 用户参与活动事件
  8. */
  9. class UserParticipatedEvent
  10. {
  11. use Dispatchable, InteractsWithSockets, SerializesModels;
  12. /**
  13. * 用户ID
  14. *
  15. * @var int
  16. */
  17. public int $userId;
  18. /**
  19. * 活动ID
  20. *
  21. * @var int
  22. */
  23. public int $activityId;
  24. /**
  25. * 创建一个新的事件实例
  26. *
  27. * @param int $userId 用户ID
  28. * @param int $activityId 活动ID
  29. */
  30. public function __construct(int $userId, int $activityId)
  31. {
  32. $this->userId = $userId;
  33. $this->activityId = $activityId;
  34. }
  35. }