This commit is contained in:
2020-03-06 21:50:53 +00:00
parent d17e88db12
commit 2adcc9f016
8 changed files with 24 additions and 20 deletions

View File

@@ -168,7 +168,7 @@ namespace AyaNova.Util
//Add user table
await ExecQueryAsync("CREATE TABLE auser (id BIGSERIAL PRIMARY KEY, active bool not null, name varchar(255) not null unique, " +
"login text not null, password text not null, salt text not null, roles integer not null, translationid bigint not null REFERENCES atranslation (id), " +
"login text not null, password text not null, salt text not null, roles integer not null, " +
"dlkey text, dlkeyexpire timestamp, usertype integer not null, employeenumber varchar(255), notes text, customerid bigint, " +
"headofficeid bigint, subvendorid bigint, customfields text, tags varchar(255) ARRAY)");
@@ -177,7 +177,7 @@ namespace AyaNova.Util
//Add user options table
await ExecQueryAsync("CREATE TABLE auseroptions (id BIGSERIAL PRIMARY KEY, " +
"userid bigint not null, languageoverride text, timezoneoverride text, currencyname text, hour12 bool not null, emailaddress text, uicolor varchar(12) not null default '#000000')");
"userid bigint not null, translationid bigint not null REFERENCES atranslation (id), languageoverride text, timezoneoverride text, currencyname text, hour12 bool not null, emailaddress text, uicolor varchar(12) not null default '#000000')");
//Prime the db with the default MANAGER account

View File

@@ -582,7 +582,7 @@ namespace AyaNova.Util
else
u.Password = u.Login;
u.Roles = roles;
u.TranslationId = translationId;
u.UserType = userType;
u.EmployeeNumber = "A-" + (454 + SeededUserCount).ToString() + "-Y";
u.Notes = Fake.Lorem.Sentence();//Fake.Lorem.Paragraph(2);
@@ -590,10 +590,11 @@ namespace AyaNova.Util
u.Tags = RandomTags(Fake);
//Children and relations
u.UserOptions = new UserOptions();
u.UserOptions.TranslationId = translationId;
u.UserOptions.EmailAddress = p.Email.Replace("gmail.com", "helloayanova.com").Replace("hotmail.com", "helloayanova.com").Replace("yahoo.com", "helloayanova.com");
u.UserOptions.Hour12 = true;
u.UserOptions.CurrencyName = "USD";
u.UserOptions.UiColor= Fake.Internet.Color();
u.UserOptions.UiColor = Fake.Internet.Color();
@@ -625,7 +626,7 @@ namespace AyaNova.Util
// WidgetBiz biz = WidgetBiz.GetBiz(ServiceProviderProvider.DBContext);
var f = new Bogus.Faker();
//RANDOM ROLES
Array values = Enum.GetValues(typeof(UserType));