This commit is contained in:
2019-05-20 19:09:08 +00:00
parent 7d11399574
commit dd2b227d88
9 changed files with 16 additions and 29 deletions

View File

@@ -173,7 +173,7 @@ namespace AyaNova.Util
exec("CREATE UNIQUE INDEX auser_name_id_idx ON auser (id, name);");
//Add user options table
exec("CREATE TABLE auseroptions (id BIGSERIAL PRIMARY KEY, ownerid bigint not null, " +
exec("CREATE TABLE auseroptions (id BIGSERIAL PRIMARY KEY, " +
"userid bigint not null, timezoneoffset decimal(19,5) not null default 0, emailaddress text, uicolor int not null default 0)");

View File

@@ -414,7 +414,7 @@ namespace AyaNova.Util
{
User u = new User();
u.Active = active;
u.OwnerId = 1;
var p = new Bogus.Person();
u.Name = Uniquify(p.FullName);
if (login != null)
@@ -435,7 +435,7 @@ namespace AyaNova.Util
//TODO: After have USER and HEADOFFICE and VENDOR, if usertype is subcontractor or client or headoffice it needs to set a corresponding user's parent org record id to go with it
u.Tags = RandomTags(Fake);
//Children and relations
u.UserOptions = new UserOptions(1);
u.UserOptions = new UserOptions();
u.UserOptions.EmailAddress = p.Email.Replace("gmail.com", "helloayanova.com").Replace("hotmail.com", "helloayanova.com").Replace("yahoo.com", "helloayanova.com");
u.UserOptions.TimeZoneOffset = timeZoneOffset;