feat: add notification infrastructure with database channel, enum, and notification classes (Story 3.1)
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>
This commit is contained in:
34
app/Enums/NotificationType.php
Normal file
34
app/Enums/NotificationType.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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é',
|
||||
];
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user