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:
2026-03-26 11:26:03 +01:00
parent 6956f7bf95
commit 1ab3cfc445
10 changed files with 731 additions and 9 deletions

View 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é',
];
}
}