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

@@ -0,0 +1,12 @@
import { z } from "zod";
export const UserSchema = z.object({
id: z.number(),
displayName: z.string(),
email: z.string().email(),
password: z.string().min(256).max(256),
});
export const UserSchemaWithoutId = UserSchema.omit({ id: true });
export type UserModel = z.infer<typeof UserSchema>;