import { z } from "zod";
export const RoleSchema = z.enum(["ADMIN", "MEMBER"]);
export type Role = z.infer<typeof RoleSchema>;
export const UserSchema = z.object({
id: z.string(),
email: z.string(),
nickname: z.string().nullable(),
role: RoleSchema,
posts: z.array(z.lazy(() => PostSchema)),
createdAt: z.unknown(),
}).strict();
export type User = z.infer<typeof UserSchema>;
export const PostSchema = z.object({
id: z.string(),
title: z.string(),
body: z.string().nullable(),
author: z.lazy(() => UserSchema).nullable(),
}).strict();
export type Post = z.infer<typeof PostSchema>;
export const CreateUserInputSchema = z.object({
email: z.string(),
nickname: z.string().nullish(),
role: RoleSchema.nullish(),
}).strict();
export type CreateUserInput = z.infer<typeof CreateUserInputSchema>;Review generated schemas before pasting them into production code.