This commit is contained in:
2020-07-16 23:21:09 +00:00
parent 68c5b30e5b
commit fd23ce1fcb
7 changed files with 128 additions and 42 deletions

View File

@@ -21,10 +21,15 @@ namespace AyaNova.Models
[Required]
public NotifyEventType EventType { get; set; }
[Required]
public long UserId { get; set; }
[Required]
public long SubscriptionId { 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; }
public DateTime? EventDate { get; set; }//date of the event actually occuring, e.g. WarrantyExpiry date. Duped with delivery date as source of truth in case edit to advance setting in subscription changes delivery date
public DateTime? DeliverDate { get; set; }//date user wants the event notification delivered, usually same as event date but could be set earlier if Advance setting in effect. This is the date consulted for delivery only.
public string Message { get; set; }
@@ -35,8 +40,9 @@ namespace AyaNova.Models
Created = DateTime.UtcNow;
IdValue = 0;
DecValue = 0;
AyaType=AyaType.NoType;
ObjectId=0;
AgeValue = new TimeSpan(0, 0, 0);
AyaType = AyaType.NoType;
ObjectId = 0;
}
public override string ToString()

View File

@@ -24,16 +24,18 @@ namespace AyaNova.Models
public long AttachReportId { get; set; }
//CONDITIONS - Following fields are all conditions set on whether to notify or not
//CREATE NOTIFY EVENT CONDITIONS - Following fields are all conditions set on whether to create a notify event or not
public AyaType AyaType { get; set; }//Note: must be specific object, not global for any object related stuff to avoid many role issues and also potential overload
[Required]
public NotifyEventType EventType { get; set; }
[Required]
public long IdValue { get; set; }//if required, this must match, default is zero to match to not set
public decimal DecValue { get; set; }//if required this must match or be greater or something
public TimeSpan AgeValue { get; set; }//for events that depend on an age of something (e.g. WorkorderStatusAge)
public decimal DecValue { get; set; }//if required this must match or be greater or something
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 NotifySubscription()
{
Tags = new List<string>();