UrsTalentLevelUpEvent.php 931 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <?php
  2. namespace App\Module\UrsPromotion\Events;
  3. use Illuminate\Foundation\Events\Dispatchable;
  4. use Illuminate\Queue\SerializesModels;
  5. /**
  6. * URS达人等级提升事件
  7. */
  8. class UrsTalentLevelUpEvent
  9. {
  10. use Dispatchable, SerializesModels;
  11. /**
  12. * 用户ID
  13. */
  14. public int $userId;
  15. /**
  16. * 旧等级
  17. */
  18. public int $oldLevel;
  19. /**
  20. * 新等级
  21. */
  22. public int $newLevel;
  23. /**
  24. * 直推人数
  25. */
  26. public int $directCount;
  27. /**
  28. * 团队总人数
  29. */
  30. public int $promotionCount;
  31. /**
  32. * 创建事件实例
  33. */
  34. public function __construct(int $userId, int $oldLevel, int $newLevel, int $directCount, int $promotionCount)
  35. {
  36. $this->userId = $userId;
  37. $this->oldLevel = $oldLevel;
  38. $this->newLevel = $newLevel;
  39. $this->directCount = $directCount;
  40. $this->promotionCount = $promotionCount;
  41. }
  42. }