feat: new user resource integrating postgresql
This commit is contained in:
12
server/resources/user/UserModel.ts
Normal file
12
server/resources/user/UserModel.ts
Normal 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>;
|
||||
Reference in New Issue
Block a user