This commit is contained in:
2020-07-20 19:05:28 +00:00
parent 0842ce025e
commit ab65e15d99
7 changed files with 69 additions and 26 deletions

View File

@@ -23,7 +23,7 @@ namespace AyaNova.Models
[Required]
public NotifyEventType EventType { get; set; }
[Required]
public long SubscriptionId { get; set; }
public long NotifySubscriptionId { get; set; }
public string Message { get; set; }
[Required]
public bool Fetched { get; set; }
@@ -34,6 +34,9 @@ namespace AyaNova.Models
Fetched = false;
}
//linked entity
public NotifySubscription NotifySubscription { get; set; }
}//eoc
}//eons

View File

@@ -21,10 +21,10 @@ namespace AyaNova.Models
[Required]
public NotifyEventType EventType { get; set; }
[Required]
public long SubscriptionId { get; set; }
[Required]
public long NotifySubscriptionId { get; set; }
[Required]
public long IdValue { get; set; }
[Required]
[Required]
public decimal DecValue { get; set; }
[Required]
public long UserId { get; set; }
@@ -38,12 +38,15 @@ namespace AyaNova.Models
public NotifyDeliveryLog()
{
Processed = DateTime.UtcNow;
IdValue=0;
DecValue=0;
AyaType=AyaType.NoType;
ObjectId=0;
IdValue = 0;
DecValue = 0;
AyaType = AyaType.NoType;
ObjectId = 0;
}
//linked entity
public NotifySubscription NotifySubscription { get; set; }
}//eoc
}//eons

View File

@@ -23,13 +23,14 @@ namespace AyaNova.Models
[Required]
public long UserId { get; set; }
[Required]
public long SubscriptionId { get; set; }//source subscription that triggered this event to be created
public long NotifySubscriptionId { get; set; }//source subscription that triggered this event to be created
[Required]
public long IdValue { get; set; }
[Required]
public decimal DecValue { get; set; }
[Required]
public TimeSpan AgeValue { get; set; }
// [Required]// public TimeSpan AgeValue { get; set; }
//date of the event actually occuring, e.g. WarrantyExpiry date. Compared with subscription to determine if deliverable or not
public DateTime? EventDate { get; set; }
//NO: Delivery code consults subscription instead of this
@@ -42,7 +43,7 @@ namespace AyaNova.Models
Created = DateTime.UtcNow;
IdValue = 0;
DecValue = 0;
AgeValue = new TimeSpan(0, 0, 0);
// AgeValue = new TimeSpan(0, 0, 0);
AyaType = AyaType.NoType;
ObjectId = 0;
}
@@ -52,6 +53,9 @@ namespace AyaNova.Models
return JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.None);
}
//linked entity
public NotifySubscription NotifySubscription { get; set; }
}//eoc
}//eons

View File

@@ -34,7 +34,7 @@ namespace AyaNova.Models
public List<string> Tags { get; set; }//Tags to filter an event, object *must* have these tags to generate event related to it (AT TIME OF UPDATE)
//DELIVERY CONDITIONS - following are all conditions on *whether* to deliver the existing notify event or not
public TimeSpan AgeValue { get; set; }//for events that depend on an age of something (e.g. WorkorderStatusAge)
public TimeSpan AgeValue { get; set; }//for events that depend on an age of something (e.g. WorkorderStatusAge), This value determines when event has "come of age" but advancenotice controls how far in advance of this delivery is made
public NotifySubscription()
{