Derive project device phases from category
This commit is contained in:
parent
5fb81bab04
commit
1e3c721cfa
9 changed files with 101 additions and 80 deletions
|
|
@ -1,14 +1,14 @@
|
|||
import { z } from "zod";
|
||||
import { projectDeviceSyncFields } from "../constants/project-device-sync-fields.js";
|
||||
import { expectedProjectRevisionSchema } from "./project-command.schemas.js";
|
||||
import { circuitGroupCategories } from "../constants/circuit-group.js";
|
||||
|
||||
export const createProjectDeviceSchema = z.object({
|
||||
name: z.string().min(1),
|
||||
displayName: z.string().min(1),
|
||||
phaseType: z.enum(["single_phase", "three_phase"]),
|
||||
connectionKind: z.string().optional(),
|
||||
costGroup: z.string().optional(),
|
||||
category: z.string().optional(),
|
||||
category: z.enum(circuitGroupCategories),
|
||||
quantity: z.number().min(0),
|
||||
powerPerUnit: z.number().min(0),
|
||||
simultaneityFactor: z.number().min(0).max(1),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue