More subscription stuff

This commit is contained in:
2022-08-26 23:01:19 +00:00
parent c66a48b641
commit fa18b594ea
6 changed files with 35 additions and 21 deletions

8
.vscode/launch.json vendored
View File

@@ -62,12 +62,12 @@
"AYANOVA_DB_CONNECTION": "Server=localhost;Username=postgres;Password=raven;Database=AyaNova;CommandTimeout=300;",
"AYANOVA_DATA_PATH": "c:\\temp\\ravendata",
"AYANOVA_USE_URLS": "http://*:7575;",
//"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true",
"AYANOVA_PERMANENTLY_ERASE_DATABASE":"true",
//"AYANOVA_REMOVE_LICENSE_FROM_DB":"true",
"AYANOVA_SERVER_TEST_MODE": "false",
"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
//"AYANOVA_SERVER_TEST_MODE": "false",
//"AYANOVA_SERVER_TEST_MODE_TZ_OFFSET": "-8",
//"AYANOVA_REPORT_RENDERING_TIMEOUT":"1",
"AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
// "AYANOVA_SERVER_TEST_MODE_SEEDLEVEL": "small",
"AYANOVA_BACKUP_PG_DUMP_PATH": "C:\\data\\code\\postgres_14\\bin"
},
"sourceFileMap": {

View File

@@ -555,7 +555,8 @@ PRICING AND PLANS THIS IS OFFICIAL HERE REPLACES ANYTHING WRITTEN ANYWHERE ELSE
- PRICING, must figure that out sooner than later, spend some time and give it a think, read joyce's docs keep in mind new licensing scheme worked up with joyce
Once I have an idea run it past Joyce for final confirmation then shareit codes and purchase pages etc for website
5 days trial
PERPETUAL = 5 days trial
SUBSCRIPTION = 48 hours trial
Flat price per license regardless of how many no discounts for bulk price to be xx.xx
Includes 90 days support and updates after which they're on their own. In this way they don't feel coerced into a subscription which must be a turn off for a lot of people
Separately they can purchase a support and updates subscription within 90days they get a discount of the ongoing price, after 90 days it's full price

View File

@@ -30,8 +30,6 @@ THINGS HOLDING UP PERPETUAL RELEASE
WIP >>>>>>>>>>>>>
NEXT:
todo: active users in terms of license data should not show in log only on boot but also in the about page (not license because it would confuse people) since it's relevant and we need to know it right away
Once the above item is done then move to testing:
@@ -40,6 +38,7 @@ todo: TEST subscription and perpetual license code
Correct date range?
Does a trial request for perpetual work?
correct date range?
Can I bump a trial subscription and / or perptual expiration date if a trialer needs more time!!! IMPORTANT, this way can keep it brief but allow for wiggle
Does new boot code still work when no database?
Does new boot code work to prevent running if wrong build or maint date expired vs build date?
Does it prevent changing a user to active?

View File

@@ -22,15 +22,17 @@ If this is your first time starting AyaNova and it has no database set up yet, t
## How the trial license works
A evaluation trial license can be used to try out all aspects of AyaNova including up to 1000 scheduleable users for up to 5 days.
### Length of trial period
When the trial period expires AyaNova will present an expired license interface instead of the regular interface giving you the option of starting a new trial again for another 5 day period (after erasing the database) or purchasing and installing a license.
For a self-installed "Perpetual" build of AyaNova the trial period is 5 days. At this point you can purchase a license and keep the data entered or start another 5 day trial period with a new trial license request from within AyaNova (will cause all data to be erased).
Your data and settings made during the trial period are still intact when the trial period expires so if you decide at that point to purchase an AyaNova license you can opt to keep the data and settings made during the trial period or erase the data to start fresh.
For a hosted "Subscription" AyaNova as a service the trial period is 48 hours after which you can purchase a license and keep the data entered or the trial period can be extended on request, contact AyaNova support department.
If you need more time to evaluate AyaNova after the 5 day period you can request a new trial key through the same process which will be presented to you .
### Trial process
When you request a new trial key and AyaNova already has a trial key installed, your current AyaNova trial database will be erased to start a fresh trial evaluation period again.
A evaluation trial license can be used to try out all aspects of AyaNova for the trial period.
Your data and settings made during the trial period are still intact when the trial period expires so if you decide at that point to purchase an AyaNova license you can opt to keep the data and settings made during the trial period or erase the data to start fresh. In the case of a subscription hosted AyaNova trial your data will not be kept beyond the trial period unless an extension is requested _before_ the trial expires or a purchase is made.
## Generating sample data

View File

@@ -240,14 +240,14 @@ namespace AyaNova.Util
log.LogInformation("AyaNova database needs to be updated from schema version {0} to version {1}", currentSchema, DESIRED_SCHEMA_LEVEL);
//************* SCHEMA UPDATES ******************
bool PrimeEmptyDB = false;
//////////////////////////////////////////////////
// v8 initial release TABLES
//
if (currentSchema < 1)
{
LogUpdateMessage(log);
PrimeEmptyDB = true;
//create global biz settings table
await ExecQueryAsync("CREATE TABLE aglobalbizsettings (id INTEGER NOT NULL PRIMARY KEY, "
+ "webaddress TEXT, phone1 TEXT, phone2 TEXT, emailaddress TEXT, postaddress TEXT, postcity TEXT, postregion TEXT, postcountry TEXT, postcode TEXT, "
@@ -500,8 +500,8 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
+ "currencyname TEXT, hour12 BOOL NOT NULL, emailaddress TEXT, phone1 TEXT, phone2 TEXT, phone3 TEXT, mapurltemplate TEXT, uicolor VARCHAR(12) NOT NULL default '#ffffff')");
//Prime the db with the default SuperUser account
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
// //Prime the db with the default SuperUser account
// await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
//Add user table
await ExecQueryAsync("CREATE TABLE alicense (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, licenseagree BOOL NOT NULL, dbid TEXT, key TEXT NOT NULL)");
@@ -1599,7 +1599,15 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
log.LogInformation("Completed updating database schema to version {0}", currentSchema);
//*************************************************************************************
if (PrimeEmptyDB)
{
// //Load the default TRANSLATIONS
// await AyaNova.Biz.PrimeData.PrimeTranslations();
//Prime the db with the default SuperUser account
await AyaNova.Biz.PrimeData.PrimeSuperUserAccount(ct);
}
}//eofunction

View File

@@ -413,7 +413,7 @@ namespace AyaNova.Util
watch.Start();
//USERS
//INSIDE USERS - 730 total inside users here plus couple dozen known users below
//IT administrator, can change ops but nothing else
await SeedUserAsync(log, 10, AuthorizationRoles.OpsAdmin, UserType.NotService, forceEmail, appendPassword);
//business administrator, can view ops issues
@@ -423,8 +423,10 @@ namespace AyaNova.Util
////////////////////////////////////////////////
//TECHS (LICENSE CONSUMERS)
//trial license allows 1000
//
//
//########### WARNING: if more than 250 techs must update Rockfish::ravenkeyfactory::GetRavenTrialKey to allow for more
//regular techs
await SeedUserAsync(log, 15, AuthorizationRoles.Tech | AuthorizationRoles.ServiceRestricted, UserType.Service, forceEmail, appendPassword);
//Restricted techs
@@ -452,15 +454,17 @@ namespace AyaNova.Util
await SeedVendorAsync(log, 5000, forceEmail);
await SeedUnitModelAsync(log, 400);
await SeedCustomerAsync(log, 10000, slevel, forceEmail, appendPassword);
await SeedHeadOfficeAsync(log, 500, slevel, forceEmail, appendPassword);
//######### WARNING trial license size limits: Each Head office is up to 3 users generated, each customer is up to 1 generated so assume fully generated
await SeedCustomerAsync(log, 10000, slevel, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 10,000 CUSTOMER users
await SeedHeadOfficeAsync(log, 500, slevel, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 1500 CUSTOMER users
await SeedProjectAsync(log, 1000);
await SeedServiceRateAsync(log, 200);
await SeedTravelRateAsync(log, 100);
await SeedLoanLoanUnitAsync(log, 200);
await SeedCustomerServiceRequestAsync(log, 200, forceEmail, appendPassword);
await SeedCustomerServiceRequestAsync(log, 200, forceEmail, appendPassword);//## WARNING AFFECTS LICENSE potentially 200 CUSTOMER users from this
await SeedPartWarehouseAsync(log, 200);
await SeedPartAsync(log, 10000, 1000);
await SeedPartAssemblyAsync(log, 500);