From 88786993bc803642166d77b3e54a6790beb8e7a3 Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Thu, 5 Jan 2023 23:49:07 +0000 Subject: [PATCH] --- server/biz/GlobalBizSettingsBiz.cs | 2 ++ server/models/License.cs | 3 ++- server/util/AySchema.cs | 2 +- todo.txt | 12 +++++++----- 4 files changed, 12 insertions(+), 7 deletions(-) diff --git a/server/biz/GlobalBizSettingsBiz.cs b/server/biz/GlobalBizSettingsBiz.cs index 044bbb5..a20b7cd 100644 --- a/server/biz/GlobalBizSettingsBiz.cs +++ b/server/biz/GlobalBizSettingsBiz.cs @@ -606,6 +606,8 @@ namespace Sockeye.Biz l.FetchEmail = jLicense["email"].Value(); l.Key = jLicense["key"].Value(); + l.Active=true;//active here means it's been fully prepared and is viable for use, all prior licenses fit this description so all are active + LicenseBiz biz = LicenseBiz.GetBiz(ct); await biz.CreateAsync(l); diff --git a/server/models/License.cs b/server/models/License.cs index 7d442a2..4f5f547 100644 --- a/server/models/License.cs +++ b/server/models/License.cs @@ -15,7 +15,8 @@ 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; } diff --git a/server/util/AySchema.cs b/server/util/AySchema.cs index 70e2d24..78674a8 100644 --- a/server/util/AySchema.cs +++ b/server/util/AySchema.cs @@ -873,7 +873,7 @@ $BODY$ LANGUAGE PLPGSQL STABLE"); { LogUpdateMessage(log); - await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, " + await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, created TIMESTAMPTZ NOT NULL, active BOOL NOT NULL DEFAULT false, " + "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 )"); diff --git a/todo.txt b/todo.txt index 4be91a8..1bde6aa 100644 --- a/todo.txt +++ b/todo.txt @@ -1,19 +1,21 @@ LICENSE NOTES -Sockeye should generate a license on a sale receipt, maybe after a slight delay. Generated license should be in the list of licenses but have a unfulfilled status of some kind so it's ready for me to visually see purchases applicable and confirm approve and send it with one click but it's not doing it itself. +Sockeye should generate a license on a sale receipt, maybe after a slight delay. +Generated license should be in the list of licenses but have a unfulfilled status of some kind so it's ready for me to visually +see purchases applicable and confirm approve and send it with one click but it's not doing it itself. -If more purchases come on that supply to take customer for v7 then it should regenerate a new license or I guess edit the one it made before and just add to it. -Idea bring that all I have to do is open they list off licenses and just release any that are good to go. +If more purchases come in that apply to same customer for v7 then it should regenerate a new license or I guess edit the one it made before and just add to it. +Idea being that all I have to do is open they list of licenses and just release any that are good to go. UI should show the purchases that go into a license so can confirm visually without having to click anywhere else. -This way is all but automatic in pero for full automation later. +This way is all but automatic in preparation for full automation later. Maybe even a semi automatic dead man switch that will just send it after 24 guess if I don't once it's confirmed to work properly. So need properties added to license object for fulfilled status and a property indicating sent to customer and a menu options to send manually maybe too. I guess will need a template for email messages as well. -Tier into notification system. +Tied into notification system. Don't forget some licenses are not done through SHAREitb do must support manual generation from Paypal etc ALSO