Migrated database changes after refactoring the Notification model

This commit is contained in:
Khwezi Mngoma
2026-05-10 15:27:26 +02:00
parent 394429677e
commit e8e9a85c57
20 changed files with 244 additions and 777 deletions
@@ -6,13 +6,19 @@ public class UpdateNotificationCommand : IRequest<Result>
public bool Processed { get; set; }
private UpdateNotificationCommand(Guid notificationId, bool processed)
public bool HasError { get; set; }
public string[]? Errors { get; set; }
private UpdateNotificationCommand(Guid notificationId, bool processed, bool hasError = false, string[]? errors = null)
{
NotificationId = notificationId;
Processed = processed;
HasError = hasError;
Errors = errors;
}
public static UpdateNotificationCommand Create(Guid notificationId, bool processed)
public static UpdateNotificationCommand Create(Guid notificationId, bool processed, bool hasError = false, string[]? errors = null)
{
if(notificationId == Guid.Empty)
throw new ArgumentException("Notification ID cannot be empty.", nameof(notificationId));