feat: add user lifecycle management

This commit is contained in:
Syahdan 2026-06-29 21:22:33 +07:00
parent 8ab9a9a497
commit 11b16ac3cf
8 changed files with 331 additions and 47 deletions

View file

@ -110,3 +110,10 @@ export const updateUserRolesSchema = z.object({
userId: entityIdSchema,
roleIds: z.array(entityIdSchema).min(1, "Select at least one role"),
});
export const userCreateSchema = z.object({
name: z.string().trim().min(2, "Name must be at least 2 characters").max(120),
email: z.email("Invalid email address").max(255),
password: z.string().min(8, "Password must be at least 8 characters").max(255),
roleIds: z.array(entityIdSchema).min(1, "Select at least one role"),
});