diff options
Diffstat (limited to 'src/Enmarcha.Backend/Data/Models/ServiceAlert.cs')
| -rw-r--r-- | src/Enmarcha.Backend/Data/Models/ServiceAlert.cs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Enmarcha.Backend/Data/Models/ServiceAlert.cs b/src/Enmarcha.Backend/Data/Models/ServiceAlert.cs index 5f80e3c..39cf3fa 100644 --- a/src/Enmarcha.Backend/Data/Models/ServiceAlert.cs +++ b/src/Enmarcha.Backend/Data/Models/ServiceAlert.cs @@ -24,6 +24,15 @@ public class ServiceAlert [Column("event_end_date")] public DateTime EventEndDate { get; set; } [Column("hidden_date")] public DateTime HiddenDate { get; set; } + /// <summary>Incremented each time a push notification is sent for this alert.</summary> + public int Version { get; set; } = 1; + + /// <summary>Set when a push notification was sent for the PreNotice phase.</summary> + [Column("pre_notice_notified_at")] public DateTime? PreNoticeNotifiedAt { get; set; } + + /// <summary>Set when a push notification was sent for the Active phase.</summary> + [Column("active_notified_at")] public DateTime? ActiveNotifiedAt { get; set; } + public AlertPhase GetPhase(DateTime? now = null) { now ??= DateTime.UtcNow; |
