| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364 |
- <?php
- namespace App\Notifications\Push\Cliente\Agendamento;
- use App\Enums\PushNotificationCategoryEnum;
- use App\Enums\PushNotificationTargetEnum;
- use App\Notifications\Push\BasePushNotification;
- use Illuminate\Database\Eloquent\Collection;
- /**
- * Notificação enviada ao cliente quando um prestador aceita seu agendamento
- * (agendamento padrão) ou envia uma proposta para um pedido sob medida.
- */
- class PrestadorAceitouPush extends BasePushNotification
- {
- public function __construct(
- private readonly string $providerName,
- private readonly bool $isProposal = false,
- ) {}
- public function label(): string
- {
- return 'client_provider_accepted';
- }
- public function title(): string
- {
- return $this->isProposal
- ? 'Nova proposta recebida'
- : 'Prestador confirmado! 🎉';
- }
- public function body(): string
- {
- return $this->isProposal
- ? "{$this->providerName} enviou uma proposta para o seu pedido sob medida."
- : "{$this->providerName} aceitou seu agendamento.";
- }
- public function target(): PushNotificationTargetEnum
- {
- return PushNotificationTargetEnum::CLIENTE;
- }
- public function category(): PushNotificationCategoryEnum
- {
- return PushNotificationCategoryEnum::AGENDA;
- }
- public function eligibleUsers(): Collection
- {
- return new Collection();
- }
- public function notificationCooldownDays(): int
- {
- return 0;
- }
- public function categoryCooldownDays(): int
- {
- return 0;
- }
- }
|