From 033952d3cdca9e33b24cb39361aad658888552e7 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Sun, 1 Jan 2023 02:11:19 +0000 Subject: [PATCH] --- server/biz/GlobalBizSettingsBiz.cs | 12 ++++++------ server/models/License.cs | 2 +- server/models/Product.cs | 2 +- server/models/Purchase.cs | 2 +- server/util/AySchema.cs | 12 ++++++------ 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index 2f46ca9..5996fb0 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -246,7 +246,7 @@ namespace Sockeye.Biz p.Active = true;//not entirely true but we can always deactivate there aren't many products p.VendorId = 1; p.OurCode = p.VendorCode = jPurchase["productCode"].Value(); - p.Group = ProductGroupFromProductCode(p.OurCode); + p.PGroup = ProductGroupFromProductCode(p.OurCode); if (p.VendorCode == "301028468")//subscription yearly { @@ -271,7 +271,7 @@ namespace Sockeye.Biz var s = new Purchase(); s.VendorId = 1; s.ProductId = p.Id; - s.Group = p.Group; + s.PGroup = p.PGroup; s.CustomerId = CurrentCustomerId; s.CancelDate = DateUtil.EpochToDateNullIsNull(jPurchase["cancelDate"].Value()); s.CouponCode = jPurchase["couponCode"].Value(); @@ -542,7 +542,7 @@ namespace Sockeye.Biz var jKey = JObject.Parse(keyNoWS); l.LicenseExpire = DateTime.MaxValue.ToUniversalTime(); l.MaintenanceExpire = jKey["AyaNovaLicenseKey"]["Expires"].Value().ToUniversalTime(); - l.Group = ProductGroup.AyaNova7; + l.PGroup = ProductGroup.AyaNova7; l.FetchCode = jLicense["code"].Value(); l.Tags.Add("v7"); } @@ -560,7 +560,7 @@ namespace Sockeye.Biz var jKey = JObject.Parse(keyNoWS); l.LicenseExpire = DateTime.MaxValue.ToUniversalTime(); l.MaintenanceExpire = jKey["AyaNovaLiteLicenseKey"]["Expires"].Value().ToUniversalTime(); - l.Group = ProductGroup.AyaNova7; + l.PGroup = ProductGroup.AyaNova7; l.FetchCode = jLicense["code"].Value(); l.Tags.Add("v7"); l.Tags.Add("lite"); @@ -592,9 +592,9 @@ namespace Sockeye.Biz l.DbId = jKey["Key"]["DBID"].Value(); l.LicenseExpire = jKey["Key"]["LicenseExpiration"].Value().ToUniversalTime(); if (jKey["Key"]["Perpetual"].Value()) - l.Group = ProductGroup.RavenPerpetual; + l.PGroup = ProductGroup.RavenPerpetual; else - l.Group = ProductGroup.RavenSubscription; + l.PGroup = ProductGroup.RavenSubscription; l.MaintenanceExpire = jKey["Key"]["MaintenanceExpiration"].Value().ToUniversalTime(); l.Tags.Add("raven"); } diff --git a/server/models/License.cs b/server/models/License.cs index e016ac6..7d442a2 100644 --- a/server/models/License.cs +++ b/server/models/License.cs @@ -20,7 +20,7 @@ namespace Sockeye.Models [NotMapped] public string CustomerViz { get; set; } [Required] - public ProductGroup Group {get;set;} + public ProductGroup PGroup {get;set;} public string RegTo { get; set; } public string Key { get; set; } public string FetchCode { get; set; }//v7 uses diff --git a/server/models/Product.cs b/server/models/Product.cs index f3fbb60..31f1368 100644 --- a/server/models/Product.cs +++ b/server/models/Product.cs @@ -16,7 +16,7 @@ namespace Sockeye.Models public string Name { get; set; } public bool Active { get; set; } [Required] - public ProductGroup Group {get;set;} + public ProductGroup PGroup {get;set;} public long VendorId { get; set; } public TimeSpan LicenseInterval { get; set; } public TimeSpan MaintInterval { get; set; } diff --git a/server/models/Purchase.cs b/server/models/Purchase.cs index 22391fb..6594447 100644 --- a/server/models/Purchase.cs +++ b/server/models/Purchase.cs @@ -21,7 +21,7 @@ namespace Sockeye.Models [Required] public long ProductId { get; set; } [Required] - public ProductGroup Group {get;set;} + public ProductGroup PGroup {get;set;} [NotMapped] public string ProductViz { get; set; } public string SalesOrderNumber { get; set; } diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index 1a68652..dae611e 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -22,16 +22,16 @@ namespace Sockeye.Util //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! private const int DESIRED_SCHEMA_LEVEL = 16; - internal const long EXPECTED_COLUMN_COUNT = 499; + internal const long EXPECTED_COLUMN_COUNT = 502; internal const long EXPECTED_INDEX_COUNT = 74; - internal const long EXPECTED_CHECK_CONSTRAINTS = 238; + internal const long EXPECTED_CHECK_CONSTRAINTS = 240; internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 32; internal const long EXPECTED_VIEWS = 0; internal const long EXPECTED_ROUTINES = 2; //!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImportingAsync WHEN NEW TABLES ADDED!!!! - ///////////////////////////////////////// C499:I74:CC238:FC32:V0:R2 + ///////////////////////////////////////// (C502:I74:CC240:FC32:V0:R2) /* MAXIMUM POSTGRES OBJECT NAME LENGTH: 63 CHARACTERS @@ -874,7 +874,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); LogUpdateMessage(log); await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, " - + "customerid BIGINT REFERENCES acustomer(id), group INTEGER NOT NULL DEFAULT 0, regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, " + + "customerid BIGINT REFERENCES acustomer(id), pgroup INTEGER NOT NULL DEFAULT 0, regto TEXT NOT NULL, key TEXT NOT NULL, fetchcode TEXT, fetchemail TEXT, " + "fetchedon TIMESTAMPTZ, dbid TEXT, licenseexpire TIMESTAMPTZ, maintenanceexpire TIMESTAMPTZ NOT NULL, " + "wiki TEXT, tags VARCHAR(255) ARRAY )"); @@ -892,12 +892,12 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); await ExecQueryAsync("CREATE TABLE aproduct (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, name TEXT NOT NULL UNIQUE, active BOOL NOT NULL DEFAULT true, " - + "vendorid BIGINT NOT NULL REFERENCES avendor(id), group INTEGER NOT NULL DEFAULT 0, licenseinterval INTERVAL, maintinterval INTERVAL, vendorcode TEXT NOT NULL UNIQUE, ourcode TEXT NOT NULL UNIQUE, " + + "vendorid BIGINT NOT NULL REFERENCES avendor(id), pgroup INTEGER NOT NULL DEFAULT 0, licenseinterval INTERVAL, maintinterval INTERVAL, vendorcode TEXT NOT NULL UNIQUE, ourcode TEXT NOT NULL UNIQUE, " + "wiki TEXT, tags VARCHAR(255) ARRAY )"); await ExecQueryAsync("CREATE TABLE apurchase (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, customerid BIGINT REFERENCES acustomer(id) ON DELETE CASCADE, " - + "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT NOT NULL REFERENCES aproduct(id), group INTEGER NOT NULL DEFAULT 0, salesordernumber TEXT NOT NULL, " + + "vendorid BIGINT NOT NULL REFERENCES avendor(id), productid BIGINT NOT NULL REFERENCES aproduct(id), pgroup INTEGER NOT NULL DEFAULT 0, salesordernumber TEXT NOT NULL, " + "purchasedate TIMESTAMPTZ NOT NULL, expiredate TIMESTAMPTZ, canceldate TIMESTAMPTZ, couponcode text, notes text, " + "renewnoticesent BOOL NOT NULL DEFAULT false, quantity INTEGER NOT NULL DEFAULT 1, " + "vendordata TEXT, processeddate TIMESTAMPTZ, "