This commit is contained in:
@@ -209,7 +209,7 @@ namespace AyaNova.Util
|
||||
//Add widget table
|
||||
//id, text, longtext, boolean, currency,
|
||||
await ExecQueryAsync("CREATE TABLE awidget (id BIGSERIAL PRIMARY KEY, name varchar(255) not null, serial bigint not null," +
|
||||
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, roles int4, count integer," +
|
||||
"startdate timestamp, enddate timestamp, dollaramount decimal(19,5), active bool, usertype int4, count integer," +
|
||||
"notes text, userid bigint null, customfields text, tags varchar(255) ARRAY)");
|
||||
|
||||
//TEST TEST TEST ONLY FOR DEVELOPMENT TESTING TO ENSURE UNIQUENESS
|
||||
|
||||
@@ -585,7 +585,7 @@ namespace AyaNova.Util
|
||||
var f = new Bogus.Faker();
|
||||
|
||||
//RANDOM ROLES
|
||||
Array values = Enum.GetValues(typeof(AuthorizationRoles));
|
||||
Array values = Enum.GetValues(typeof(UserType));
|
||||
Random random = new Random();
|
||||
|
||||
|
||||
@@ -600,8 +600,8 @@ namespace AyaNova.Util
|
||||
o.EndDate = DateTime.Now.AddMinutes(60).ToUniversalTime();
|
||||
o.DollarAmount = Convert.ToDecimal(f.Commerce.Price());
|
||||
//Random but valid enum
|
||||
AuthorizationRoles randomRole = (AuthorizationRoles)values.GetValue(random.Next(values.Length));
|
||||
o.Roles = randomRole;
|
||||
UserType randomUserType = (UserType)values.GetValue(random.Next(values.Length));
|
||||
o.UserType = randomUserType;
|
||||
|
||||
o.Notes = f.Lorem.Sentence();
|
||||
o.Tags = RandomTags(f);
|
||||
|
||||
Reference in New Issue
Block a user