CadastroAprovadoPush.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. namespace App\Notifications\Push\Prestador\Transacional;
  3. use App\Enums\PushNotificationCategoryEnum;
  4. use App\Enums\PushNotificationTargetEnum;
  5. use App\Notifications\Push\BasePushNotification;
  6. use Illuminate\Database\Eloquent\Collection;
  7. /**
  8. * Push transacional disparada no momento em que o cadastro do prestador é aprovado.
  9. *
  10. * Não é registrada no PushNotificationDispatcher: o envio parte do
  11. * ProviderService, não da varredura do scheduler.
  12. */
  13. class CadastroAprovadoPush extends BasePushNotification
  14. {
  15. public function label(): string
  16. {
  17. return 'provider_cadastro_aprovado';
  18. }
  19. public function title(): string
  20. {
  21. return 'Cadastro aprovado! 🎉';
  22. }
  23. public function body(): string
  24. {
  25. return 'Boas-vindas ao diária app. Seu perfil foi aprovado e você já pode receber diárias.';
  26. }
  27. public function target(): PushNotificationTargetEnum
  28. {
  29. return PushNotificationTargetEnum::PRESTADOR;
  30. }
  31. public function category(): PushNotificationCategoryEnum
  32. {
  33. return PushNotificationCategoryEnum::TRANSACIONAL;
  34. }
  35. public function notificationCooldownDays(): int
  36. {
  37. return 0;
  38. }
  39. public function categoryCooldownDays(): int
  40. {
  41. return 0;
  42. }
  43. /**
  44. * Nunca é elegível por varredura — o disparo é sempre pontual.
  45. */
  46. public function eligibleUsers(): Collection
  47. {
  48. return new Collection;
  49. }
  50. }