This commit is contained in:
2021-08-02 22:28:30 +00:00
parent 5ecf1a2620
commit f522dda8f1
9 changed files with 104 additions and 41 deletions

View File

@@ -6,8 +6,11 @@ using Newtonsoft.Json;
namespace AyaNova.Models
{
//NOTE: Any non required field (nullable in DB) sb nullable here, i.e. decimal? not decimal,
//otherwise the server will call it an invalid record if the field isn't sent from client
//This model holds the deliveries that have been attempted in the past 90 days (cleaned out by corenotifysweeper)
//it is used for verification / troubleshooting purposes from the OPS log
//and also used as a circuit breaker by the corejobnotify to ensure users are not spammed with identical messages
public class NotifyDeliveryLog
{
@@ -16,20 +19,21 @@ namespace AyaNova.Models
[Required]
public DateTime Processed { get; set; }
public AyaType AyaType { get; set; }
//public AyaType AyaType { get; set; }
public long ObjectId { get; set; }
[Required]
public NotifyEventType EventType { get; set; }
// [Required]
//public NotifyEventType EventType { get; set; }
[Required]
public long NotifySubscriptionId { get; set; }
[Required]
public long IdValue { get; set; }
[Required]
public decimal DecValue { get; set; }
[Required]
public long UserId { get; set; }
[Required]
public NotifyDeliveryMethod DeliveryMethod { get; set; }
// [Required]
// public long IdValue { get; set; }
//[Required]
// public decimal DecValue { get; set; }
// [Required]
// public long UserId { get; set; }
// [Required]
// public NotifyDeliveryMethod DeliveryMethod { get; set; }
[Required]
public bool Fail { get; set; }
public string Error { get; set; }
@@ -38,9 +42,11 @@ namespace AyaNova.Models
public NotifyDeliveryLog()
{
Processed = DateTime.UtcNow;
IdValue = 0;
DecValue = 0;
AyaType = AyaType.NoType;
Fail = false;
// IdValue = 0;
// DecValue = 0;
// AyaType = AyaType.NoType;
ObjectId = 0;
}