This commit is contained in:
2021-04-01 21:24:22 +00:00
parent 5b54497ddf
commit 84f394f2ed
4 changed files with 15 additions and 10 deletions

View File

@@ -22,7 +22,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
private const int DESIRED_SCHEMA_LEVEL = 1;
internal const long EXPECTED_COLUMN_COUNT = 929;
internal const long EXPECTED_COLUMN_COUNT = 931;
internal const long EXPECTED_INDEX_COUNT = 141;
internal const long EXPECTED_CHECK_CONSTRAINTS = 429;
internal const long EXPECTED_FOREIGN_KEY_CONSTRAINTS = 115;
@@ -31,8 +31,7 @@ namespace AyaNova.Util
//!!!!WARNING: BE SURE TO UPDATE THE DbUtil::EmptyBizDataFromDatabaseForSeedingOrImporting WHEN NEW TABLES ADDED!!!!
///////////////////////////////////////////////////////////////// (C929:I141:CC429:FC115:V6:R2)
/////////////////////////////////////////////////////////////////
/*
@@ -829,12 +828,12 @@ $BODY$ LANGUAGE PLPGSQL STABLE");
//WORKORDERITEM UNIT
await ExecQueryAsync("CREATE TABLE aworkorderitemunit (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
+ "notes TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, unitid BIGINT NOT NULL REFERENCES aunit"
+ "notes TEXT, wiki TEXT, customfields TEXT, tags VARCHAR(255) ARRAY, unitid BIGINT NOT NULL REFERENCES aunit"
+ ")");
//WORKORDERITEM OUTSIDE SERVICE
await ExecQueryAsync("CREATE TABLE aworkorderitemoutsideservice (id BIGINT GENERATED ALWAYS AS IDENTITY PRIMARY KEY, workorderitemid BIGINT NOT NULL REFERENCES aworkorderitem (id), "
+ "unitid BIGINT REFERENCES aunit, vendorsenttoid BIGINT REFERENCES avendor, vendorsentviaid BIGINT REFERENCES avendor, rmanumber text, trackingnumber text, "
+ "notes TEXT, unitid BIGINT REFERENCES aunit, vendorsenttoid BIGINT REFERENCES avendor, vendorsentviaid BIGINT REFERENCES avendor, rmanumber text, trackingnumber text, "
+ "repaircost DECIMAL(38,18) NOT NULL default 0, shippingcost DECIMAL(38,18) NOT NULL default 0, shippingprice DECIMAL(38,18) NOT NULL default 0, "
+ "SentDate TIMESTAMP, etadate TIMESTAMP, returndate TIMESTAMP"
+ ")");

View File

@@ -2220,10 +2220,18 @@ namespace AyaNova.Util
RequestDate=woDate.ToUniversalTime()
};
//add two users for testing
var woItemScheduledUser=new WorkOrderItemScheduledUser(){
UserId = Fake.Random.Long(1, TotalSeededUsers),
EstimatedQuantity=1
};
woItem.ScheduledUsers.Add(woItemScheduledUser);
woItemScheduledUser=new WorkOrderItemScheduledUser(){
UserId = Fake.Random.Long(1, TotalSeededUsers),
EstimatedQuantity=2
};
woItem.ScheduledUsers.Add(woItemScheduledUser);
o.Items.Add(woItem);
}