import { z } from "zod"; export const createGlobalDeviceSchema = z.object({ name: z.string().min(1).max(200), displayName: z.string().min(1).max(200), category: z.string().max(100).optional(), quantity: z.number().min(0), installedPowerPerUnitKw: z.number().min(0), demandFactor: z.number().min(0).max(1), phaseCount: z.union([z.literal(1), z.literal(3)]), powerFactor: z.number().min(0).max(1).optional(), note: z.string().max(2000).optional(), }).strict(); export const updateGlobalDeviceSchema = createGlobalDeviceSchema; export type CreateGlobalDeviceInput = z.infer; export type UpdateGlobalDeviceInput = z.infer;