This commit is contained in:
59
server/models/CustomerNotifyEvent.cs
Normal file
59
server/models/CustomerNotifyEvent.cs
Normal file
@@ -0,0 +1,59 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Sockeye.Biz;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Sockeye.Models
|
||||
{
|
||||
//Customer notification event
|
||||
public class CustomerNotifyEvent
|
||||
{
|
||||
public long Id { get; set; }
|
||||
public uint Concurrency { get; set; }
|
||||
|
||||
[Required]
|
||||
public DateTime Created { get; set; }
|
||||
public SockType SockType { get; set; }
|
||||
public long ObjectId { get; set; }
|
||||
[Required]
|
||||
public string Name { get; set; }//object name or closest equivalent for display
|
||||
[Required]
|
||||
public NotifyEventType EventType { get; set; }
|
||||
[Required]
|
||||
public long CustomerId { get; set; }
|
||||
[Required]
|
||||
public long CustomerNotifySubscriptionId { get; set; }//source subscription that triggered this event to be created
|
||||
|
||||
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; }
|
||||
// public string Subject { get; set; }//email subject line
|
||||
// public string Message { get; set; }//email body
|
||||
|
||||
|
||||
|
||||
public CustomerNotifyEvent()
|
||||
{
|
||||
Created = EventDate = DateTime.UtcNow;
|
||||
// IdValue = 0;
|
||||
DecValue = 0;
|
||||
SockType = SockType.NoType;
|
||||
ObjectId = 0;
|
||||
Name = string.Empty;
|
||||
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return JsonConvert.SerializeObject(this, Newtonsoft.Json.Formatting.None);
|
||||
}
|
||||
|
||||
//linked entity
|
||||
// public NotifySubscription NotifySubscription { get; set; }
|
||||
// public User User { get; set; }
|
||||
|
||||
}//eoc
|
||||
|
||||
}//eons
|
||||
Reference in New Issue
Block a user