feat: new user resource integrating postgresql

This commit is contained in:
Daniel Ledda
2022-07-08 09:31:34 +02:00
parent 3e5c53f9f5
commit ba68f953f0
18 changed files with 281 additions and 121 deletions

View File

@@ -1,6 +1,12 @@
export type IngredientModel = {
id: number,
name: string,
displayName: string,
displayNameDE: string,
};
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>;