import { z } from 'zod';
const UsersSchema = z.object({
id: z.string().describe("Unique identifier for the user"),
username: z.string().min(3).max(20).describe("Unique username for the user"),
email: z.string().regex(/^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$/).describe("Email address"),
password: z.string().min(8).describe("User password (min 8 characters)"),
age: z.coerce.number().min(13).describe("User age (must be at least 13)"),
isActive: z.boolean().describe("Active status"),
role: z.enum(['user', 'admin', 'moderator']).describe("User role in the system"),
lastLogin: z.coerce.date().describe("Last login timestamp"),
profile: z.object({
fullName: z.string().describe("Full name of the user"),
bio: z.string().max(500).describe("User biography (max 500 characters)"),
avatarUrl: z.string().regex(/^https?://.*$/).describe("URL to user's avatar image")
}),
socialMedia: z.array(z.object({
platform: z.enum(['twitter', 'facebook', 'instagram', 'linkedin']),
username: z.string(),
url: z.string().regex(/^https?://.*$/)
})).describe("List of user's social media accounts")
});
export default UsersSchema;