Set up Laravel notification system with NotificationType enum (5 types), NudgeNotification, DocumentUploadedNotification, and DeclarationOverdueNotification classes with database + mail channels. Add email templates, infrastructure tests, and fix existing NotificationController tests for workspace compatibility. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
35 lines
818 B
PHP
35 lines
818 B
PHP
<?php
|
|
|
|
namespace App\Enums;
|
|
|
|
use BenSampo\Enum\Enum;
|
|
|
|
final class NotificationType extends Enum
|
|
{
|
|
const Nudge = 'nudge';
|
|
|
|
const DeclarationOverdue = 'declaration_overdue';
|
|
|
|
const DocumentUploaded = 'document_uploaded';
|
|
|
|
const BulkNotification = 'bulk_notification';
|
|
|
|
const StatusChanged = 'status_changed';
|
|
|
|
/**
|
|
* Get French display labels for each notification type.
|
|
*
|
|
* @return array<string, string>
|
|
*/
|
|
public static function labels(): array
|
|
{
|
|
return [
|
|
self::Nudge => 'Relance',
|
|
self::DeclarationOverdue => 'Déclaration en retard',
|
|
self::DocumentUploaded => 'Document téléversé',
|
|
self::BulkNotification => 'Notification groupée',
|
|
self::StatusChanged => 'Statut modifié',
|
|
];
|
|
}
|
|
}
|