LandCreatedEvent.php 784 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Module\Farm\Events;
  3. use Illuminate\Broadcasting\InteractsWithSockets;
  4. use Illuminate\Foundation\Events\Dispatchable;
  5. use Illuminate\Queue\SerializesModels;
  6. /**
  7. * 土地创建事件
  8. *
  9. * 当新土地被创建时触发此事件
  10. */
  11. class LandCreatedEvent
  12. {
  13. use Dispatchable, InteractsWithSockets, SerializesModels;
  14. /**
  15. * 用户ID
  16. *
  17. * @var int
  18. */
  19. public $userId;
  20. /**
  21. * 土地ID
  22. *
  23. * @var int
  24. */
  25. public $landId;
  26. /**
  27. * 创建一个新的事件实例
  28. *
  29. * @param int $userId 用户ID
  30. * @param int $landId 土地ID
  31. * @return void
  32. */
  33. public function __construct(int $userId, int $landId)
  34. {
  35. $this->userId = $userId;
  36. $this->landId = $landId;
  37. }
  38. }