This commit is contained in:
@@ -9,6 +9,11 @@ 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 class holds events that occur in the database for delivery to users
|
||||
//it's the result of an event happening, not the subscription which is seperate and decides who gets what
|
||||
//when an object is modified it may create a NotifyEvent record if anyone subscribes to that event
|
||||
//it will create one of these for every user with that subscription
|
||||
public class NotifyEvent
|
||||
{
|
||||
public long Id { get; set; }
|
||||
@@ -26,17 +31,19 @@ namespace AyaNova.Models
|
||||
public long UserId { get; set; }
|
||||
[Required]
|
||||
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; }
|
||||
//Not sure why these were put here, I'm commenting them out for now
|
||||
//they seem to just be an artifact possibly of making this model from the subscription model? (copy paste)
|
||||
//read the specs again and they aren't mentioned and I don't see any reference anywhere in actual delivery notification nor front end etc
|
||||
//only for the subscription itself
|
||||
//KEEP THIS UNTIL DONE THEN REMOVE IN FUTURE IF IT WASN"T NEEDED
|
||||
// [Required]
|
||||
// public long IdValue { get; set; }
|
||||
// [Required]
|
||||
// public decimal DecValue { 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
|
||||
// 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; }
|
||||
|
||||
|
||||
@@ -45,7 +52,6 @@ namespace AyaNova.Models
|
||||
Created = EventDate = DateTime.UtcNow;
|
||||
IdValue = 0;
|
||||
DecValue = 0;
|
||||
// AgeValue = TimeSpan.Zero;
|
||||
AyaType = AyaType.NoType;
|
||||
ObjectId = 0;
|
||||
Name = string.Empty;
|
||||
|
||||
Reference in New Issue
Block a user