using System; using System.Collections.Generic; using AyaNova.Biz; using System.ComponentModel.DataAnnotations; 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 public class NotifySubscription { public long Id { get; set; } public uint Concurrency { get; set; } [Required] public long UserId { get; set; } public AyaType? AyaType { get; set; } [Required] public NotifyEventType EventType { get; set; } public TimeSpan? AdvanceNotice { get; set; } //Note: I've been doing nullable wrong sort of: https://stackoverflow.com/a/29149207/8939 public long? IdValue { get; set; } public decimal? DecValue { get; set; } [Required] public NotifyDeliveryMethod DeliveryMethod { get; set; } public string DeliveryAddress { get; set; } public long? AttachReportId { get; set; } public List InTags { get; set; } public List OutTags { get; set; } public NotifySubscription() { InTags = new List(); OutTags = new List(); } }//eoc }//eons