import { z } from "zod";

export const CreateUtilizationCategorySchema = z.object({
  code: z.string().min(1).max(20),
  name: z.string().min(1).max(200),
  description: z.string().max(500).optional(),
  sortOrder: z.number().int().default(0),
  isDefault: z.boolean().default(false),
});

export const UpdateUtilizationCategorySchema = z.object({
  code: z.string().min(1).max(20).optional(),
  name: z.string().min(1).max(200).optional(),
  description: z.string().max(500).nullable().optional(),
  sortOrder: z.number().int().optional(),
  isActive: z.boolean().optional(),
  isDefault: z.boolean().optional(),
});

export type CreateUtilizationCategoryInput = z.infer<typeof CreateUtilizationCategorySchema>;
export type UpdateUtilizationCategoryInput = z.infer<typeof UpdateUtilizationCategorySchema>;
