import { z } from "zod"; export const CreateRoleSchema = z.object({ name: z.string().min(1).max(100), description: z.string().max(500).optional(), color: z.string().regex(/^#[0-9a-fA-F]{6}$/).optional(), }); export const UpdateRoleSchema = CreateRoleSchema.partial().extend({ isActive: z.boolean().optional(), }); export const ResourceRoleSchema = z.object({ roleId: z.string(), isPrimary: z.boolean().default(false), }); export type CreateRoleInput = z.infer; export type UpdateRoleInput = z.infer; export type ResourceRoleInput = z.infer;