ClienteCancelouPush.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace App\Notifications\Push\Prestador\Agendamento;
  3. use App\Enums\PushNotificationCategoryEnum;
  4. use App\Enums\PushNotificationTargetEnum;
  5. use App\Notifications\Push\BasePushNotification;
  6. use Illuminate\Database\Eloquent\Collection;
  7. class ClienteCancelouPush extends BasePushNotification
  8. {
  9. public function __construct(
  10. private readonly string $clientName,
  11. ) {}
  12. public function label(): string
  13. {
  14. return 'provider_client_cancelled';
  15. }
  16. public function title(): string
  17. {
  18. return 'Agendamento cancelado!';
  19. }
  20. public function body(): string
  21. {
  22. return "{$this->clientName} cancelou seu agendamento.";
  23. }
  24. public function target(): PushNotificationTargetEnum
  25. {
  26. return PushNotificationTargetEnum::PRESTADOR;
  27. }
  28. public function category(): PushNotificationCategoryEnum
  29. {
  30. return PushNotificationCategoryEnum::AGENDA;
  31. }
  32. public function eligibleUsers(): Collection
  33. {
  34. return new Collection();
  35. }
  36. public function notificationCooldownDays(): int
  37. {
  38. return 0;
  39. }
  40. public function categoryCooldownDays(): int
  41. {
  42. return 0;
  43. }
  44. }