ImageDeletedEvent.php 958 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Module\File\Events;
  3. use Illuminate\Broadcasting\InteractsWithSockets;
  4. use Illuminate\Foundation\Events\Dispatchable;
  5. use Illuminate\Queue\SerializesModels;
  6. /**
  7. * 图片删除事件
  8. */
  9. class ImageDeletedEvent
  10. {
  11. use Dispatchable, InteractsWithSockets, SerializesModels;
  12. /**
  13. * 图片ID
  14. *
  15. * @var int
  16. */
  17. public int $imageId;
  18. /**
  19. * 图片路径
  20. *
  21. * @var string
  22. */
  23. public string $imagePath;
  24. /**
  25. * 存储磁盘
  26. *
  27. * @var string
  28. */
  29. public string $storageDisk;
  30. /**
  31. * 创建一个新的事件实例
  32. *
  33. * @param int $imageId
  34. * @param string $imagePath
  35. * @param string $storageDisk
  36. * @return void
  37. */
  38. public function __construct(int $imageId, string $imagePath, string $storageDisk)
  39. {
  40. $this->imageId = $imageId;
  41. $this->imagePath = $imagePath;
  42. $this->storageDisk = $storageDisk;
  43. }
  44. }