refactor: some stuff

This commit is contained in:
Daniel Ledda
2022-07-18 08:28:19 +02:00
parent c9f2d2720c
commit 3390a17ad9
8 changed files with 56 additions and 64 deletions

View File

@@ -1,14 +0,0 @@
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>;