Neuron®
The Neuron® is the basis for the creation of open and secure federated networks for smart societies.
Loading...
Searching...
No Matches
NotificationRecord.cs
1using System;
3
5{
9 [CollectionName("NotificationsV2")]
10 [TypeName(TypeNameSerialization.FullName)]
11 [Index(nameof(Id))]
12 [Index(nameof(Channel), nameof(TimestampCreated))]
13 public sealed class NotificationRecord
14 {
18 [ObjectId]
19 public string? ObjectId { get; set; }
20
24 public string Id { get; set; } = string.Empty;
25
29 public string Channel { get; set; } = string.Empty;
30
34 public string Title { get; set; } = string.Empty;
35
39 public string? Body { get; set; }
40
44 public string? CorrelationId { get; set; }
45
49 public string Action { get; set; } = NotificationAction.Unknown.ToString();
50
54 public string? EntityId { get; set; }
55
59 public string ExtrasJson { get; set; } = "{}";
60
64 public string? RawPayload { get; set; }
65
69 public int SchemaVersion { get; set; } = 1;
70
74 public DateTime TimestampCreated { get; set; } = DateTime.UtcNow;
75
79 public DateTime? DeliveredAt { get; set; }
80
84 public DateTime? ReadAt { get; set; }
85
89 public DateTime? ConsumedAt { get; set; }
90
94 public NotificationState State { get; set; }
95
99 public NotificationSource Source { get; set; }
100
105
109 public int OccurrenceCount { get; set; } = 1;
110
114 public string? LegacyType { get; set; }
115
119 public string? LegacyCategory { get; set; }
120 }
121}
string? RawPayload
Gets or sets the raw payload received from the transport.
string? LegacyCategory
Gets or sets the legacy notification category for migration traceability.
NotificationSource Source
Gets or sets the notification source.
string? CorrelationId
Gets or sets the correlation identifier used for deduplication.
string? ObjectId
Gets or sets the object identifier.
int SchemaVersion
Gets or sets the schema version used when parsing the payload.
string Channel
Gets or sets the channel identifier.
NotificationPresentation Presentation
Gets or sets the presentation preference.
string? EntityId
Gets or sets the entity identifier associated with the notification.
DateTime? DeliveredAt
Gets or sets when the notification was delivered.
DateTime TimestampCreated
Gets or sets the timestamp when the notification was created.
DateTime? ConsumedAt
Gets or sets when the notification was consumed.
string Id
Gets or sets the stable notification identifier.
int OccurrenceCount
Gets or sets how many times this notification intent has been observed.
NotificationState State
Gets or sets the notification state.
DateTime? ReadAt
Gets or sets when the notification was read.
string? Body
Gets or sets the notification body.
string Title
Gets or sets the notification title.
string Action
Gets or sets the action to execute when consumed.
string ExtrasJson
Gets or sets serialized extras payload (JSON).
string? LegacyType
Gets or sets the legacy notification type for migration traceability.
NotificationState
Notification lifecycle state.
NotificationAction
Actions that can be routed from notifications.
NotificationPresentation
Presentation preference for a notification intent.
NotificationSource
Describes the source producing a notification.
TypeNameSerialization
How the type name should be serialized.