Rewrite frontend, added rooms, voltage selection per project, startet with todos
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import { z } from "zod";
|
||||
|
||||
export const createGlobalDeviceSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
category: z.string().optional(),
|
||||
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(),
|
||||
});
|
||||
|
||||
export const updateGlobalDeviceSchema = createGlobalDeviceSchema;
|
||||
|
||||
export type CreateGlobalDeviceInput = z.infer<typeof createGlobalDeviceSchema>;
|
||||
export type UpdateGlobalDeviceInput = z.infer<typeof updateGlobalDeviceSchema>;
|
||||
Reference in New Issue
Block a user