Files
GreenHomeBack/src/GreenHome.Domain/AlertNotification.cs
2025-12-17 00:34:41 +03:30

20 lines
790 B
C#

namespace GreenHome.Domain;
public sealed class AlertNotification
{
public int Id { get; set; }
public int DeviceId { get; set; }
public Device Device { get; set; } = null!;
public int UserId { get; set; }
public User User { get; set; } = null!;
public int? AlertConditionId { get; set; }
public AlertCondition? AlertCondition { get; set; }
public AlertNotificationType NotificationType { get; set; } // Call or SMS
public string Message { get; set; } = string.Empty;
public string? MessageOutboxIds { get; set; } // JSON array of message outbox IDs (for SMS)
public string? ErrorMessage { get; set; } // Error details if sending failed
public DateTime SentAt { get; set; } = DateTime.UtcNow;
public bool IsSent { get; set; } = true;
}