This commit is contained in:
2023-01-05 23:49:07 +00:00
parent db5c713312
commit 88786993bc
4 changed files with 12 additions and 7 deletions

View File

@@ -606,6 +606,8 @@ namespace Sockeye.Biz
l.FetchEmail = jLicense["email"].Value<string>();
l.Key = jLicense["key"].Value<string>();
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);

View File

@@ -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; }

View File

@@ -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 )");