Educativo4Push.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Notifications\Push\Cliente\Educativo;
  3. use App\Enums\PushNotificationCategoryEnum;
  4. use App\Enums\PushNotificationTargetEnum;
  5. use App\Models\User;
  6. use App\Notifications\Push\BasePushNotification;
  7. use Illuminate\Database\Eloquent\Collection;
  8. class Educativo4Push extends BasePushNotification
  9. {
  10. public function label(): string
  11. {
  12. return 'cliente_educativo_4';
  13. }
  14. public function title(): string
  15. {
  16. return 'Transparência';
  17. }
  18. public function body(): string
  19. {
  20. return 'Você vê perfil, avaliações e valores antes de contratar.';
  21. }
  22. public function target(): PushNotificationTargetEnum
  23. {
  24. return PushNotificationTargetEnum::CLIENTE;
  25. }
  26. public function category(): PushNotificationCategoryEnum
  27. {
  28. return PushNotificationCategoryEnum::EDUCATIVO;
  29. }
  30. public function eligibleUsers(): Collection
  31. {
  32. return User::whereHas('client')
  33. ->where('registration_complete', true)
  34. ->get();
  35. }
  36. }