Files
stocca-tre/server/resources/ingredient/IngredientModel.ts
2022-07-10 23:07:51 +02:00

15 lines
354 B
TypeScript

import { z } from "zod";
export const IngredientSchema = z.object({
id: z.number(),
name: z.string().nonempty(),
displayName: z.string().nonempty(),
displayNameDE: z.string().nonempty(),
});
export const IngredientSchemaWithoutId = IngredientSchema.omit({ id: true });
export type IngredientModel = z.infer<typeof IngredientSchema>;