13 lines
311 B
TypeScript
13 lines
311 B
TypeScript
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>;
|