Derive device voltages from project settings
This commit is contained in:
@@ -101,6 +101,7 @@ function createTestDatabase(): DatabaseContext {
|
||||
quantity: 1,
|
||||
powerPerUnit: 2.5,
|
||||
simultaneityFactor: 0.8,
|
||||
voltageV: 400,
|
||||
})
|
||||
.run();
|
||||
context.db
|
||||
@@ -112,6 +113,7 @@ function createTestDatabase(): DatabaseContext {
|
||||
equipmentIdentifier: "-1F1",
|
||||
displayName: "Ausgang",
|
||||
sortOrder: 10,
|
||||
voltage: 230,
|
||||
isReserve: 0,
|
||||
})
|
||||
.run();
|
||||
@@ -165,7 +167,10 @@ function changeCompleteProjectState(context: DatabaseContext) {
|
||||
.run();
|
||||
context.db
|
||||
.update(circuits)
|
||||
.set({ displayName: "Geänderter Stromkreis" })
|
||||
.set({
|
||||
displayName: "Geänderter Stromkreis",
|
||||
voltage: 240,
|
||||
})
|
||||
.where(eq(circuits.id, "circuit-1"))
|
||||
.run();
|
||||
context.db
|
||||
@@ -198,8 +203,14 @@ function changeCompleteProjectState(context: DatabaseContext) {
|
||||
quantity: 2,
|
||||
powerPerUnit: 0.05,
|
||||
simultaneityFactor: 1,
|
||||
voltageV: 240,
|
||||
})
|
||||
.run();
|
||||
context.db
|
||||
.update(projectDevices)
|
||||
.set({ voltageV: 415 })
|
||||
.where(eq(projectDevices.id, "device-1"))
|
||||
.run();
|
||||
new DistributionBoardFixtureRepository(
|
||||
context.db
|
||||
).createWithCircuitListAndDefaultSections("project-1", "UV-02");
|
||||
|
||||
Reference in New Issue
Block a user