Derive device voltages from project settings
This commit is contained in:
parent
b1a11397b3
commit
084103bf54
39 changed files with 2696 additions and 76 deletions
|
|
@ -7,11 +7,10 @@ export const createGlobalDeviceSchema = z.object({
|
|||
quantity: z.number().min(0),
|
||||
installedPowerPerUnitKw: z.number().min(0),
|
||||
demandFactor: z.number().min(0).max(1),
|
||||
voltageV: z.number().positive().optional(),
|
||||
phaseCount: z.union([z.literal(1), z.literal(3)]).optional(),
|
||||
powerFactor: z.number().min(0).max(1).optional(),
|
||||
note: z.string().optional(),
|
||||
});
|
||||
}).strict();
|
||||
|
||||
export const updateGlobalDeviceSchema = createGlobalDeviceSchema;
|
||||
|
||||
|
|
|
|||
|
|
@ -14,9 +14,7 @@ export const createProjectDeviceSchema = z.object({
|
|||
simultaneityFactor: z.number().min(0).max(1),
|
||||
cosPhi: z.number().min(0).max(1).optional(),
|
||||
remark: z.string().optional(),
|
||||
// Transitional metadata used when importing from the legacy global-device library.
|
||||
voltageV: z.number().positive().optional(),
|
||||
});
|
||||
}).strict();
|
||||
|
||||
export const updateProjectDeviceSchema = createProjectDeviceSchema;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue