From 248d82b42e30d40a0028ba36e9fe855a6e811e0e Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sat, 7 Jan 2023 01:33:33 +0000 Subject: [PATCH] --- server/biz/GlobalBizSettingsBiz.cs | 4 +-- server/models/License.cs | 55 ++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 5 deletions(-) diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index a20b7cd..d69c02f 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -541,7 +541,7 @@ namespace Sockeye.Biz */ string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"); var jKey = JObject.Parse(keyNoWS); - l.LicenseExpire = DateTime.MaxValue.ToUniversalTime(); + l.LicenseExpire = null; l.MaintenanceExpire = jKey["AyaNovaLicenseKey"]["Expires"].Value().ToUniversalTime(); l.PGroup = ProductGroup.AyaNova7; l.FetchCode = jLicense["code"].Value(); @@ -559,7 +559,7 @@ namespace Sockeye.Biz */ string keyNoWS = System.Text.RegularExpressions.Regex.Replace(StringUtil.Extract(KeyText, "[KEY", "KEY]").Trim(), "(\"(?:[^\"\\\\]|\\\\.)*\")|\\s+", "$1"); var jKey = JObject.Parse(keyNoWS); - l.LicenseExpire = DateTime.MaxValue.ToUniversalTime(); + l.LicenseExpire = null; l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value().ToUniversalTime(); l.PGroup = ProductGroup.AyaNova7; l.FetchCode = jLicense["code"].Value(); diff --git a/server/models/License.cs b/server/models/License.cs index 4f5f547..ce67cf1 100644 --- a/server/models/License.cs +++ b/server/models/License.cs @@ -15,22 +15,71 @@ namespace Sockeye.Models public long Id { get; set; } public uint Concurrency { get; set; } - public DateTime Created { get; set; } + public DateTime Created { get; set; } public bool Active { get; set; }//active licenses can be fetched by customer, inactive means still putting together or it's been kiboshed public long? CustomerId { get; set; } [NotMapped] public string CustomerViz { get; set; } [Required] - public ProductGroup PGroup {get;set;} + public ProductGroup PGroup { get; set; } public string RegTo { get; set; } public string Key { get; set; } public string FetchCode { get; set; }//v7 uses public string FetchEmail { get; set; }//v7 uses public DateTime? FetchedOn { get; set; } public string DbId { get; set; }//v8 uses - public DateTime LicenseExpire { get; set; } + public DateTime? LicenseExpire { get; set; } public DateTime MaintenanceExpire { get; set; } + //V7 props for dto + //not stored in db, hydrated if v7 license and + //used to do the generation from selections at client + [NotMapped] + public bool WBI { get; set; } + [NotMapped] + public DateTime? WBIExpires { get; set; } + [NotMapped] + public bool MBI { get; set; } + [NotMapped] + public DateTime? MBIExpires { get; set; } + [NotMapped] + public bool RI { get; set; } + [NotMapped] + public DateTime? RIExpires { get; set; } + [NotMapped] + public bool QBI { get; set; } + [NotMapped] + public DateTime? QBIExpires { get; set; } + [NotMapped] + public bool QBOI { get; set; } + [NotMapped] + public DateTime? QBOIExpires { get; set; } + [NotMapped] + public bool PTI { get; set; } + [NotMapped] + public DateTime? PTIExpires { get; set; } + [NotMapped] + public bool QuickNotification { get; set; } + [NotMapped] + public DateTime? QuickNotificationExpires { get; set; } + [NotMapped] + public bool ExportToXLS { get; set; } + [NotMapped] + public DateTime? ExportToXLSExpires { get; set; } + [NotMapped] + public bool OutlookSchedule { get; set; } + [NotMapped] + public DateTime? OutlookScheduleExpires { get; set; } + [NotMapped] + public bool OLI { get; set; } + [NotMapped] + public DateTime? OLIExpires { get; set; } + [NotMapped] + public bool ImportExportCSVDuplicate { get; set; } + [NotMapped] + public DateTime? ImportExportCSVDuplicateExpires { get; set; } + + public string Wiki { get; set; } public List Tags { get; set; }