import * as z from "zod";

export const searchFormSchema = z.object({
  name: z.string().optional(),
  enabled: z.boolean().optional(),
});

export const jenkinsmanagerFormSchema = z.object({
  name: z.string().min(1, "请输入名称").max(50, "名称不能超过50个字符"),
  description: z.string().max(200, "描述不能超过200个字符").optional(),
  enabled: z.boolean().default(true),
  sort: z.number().min(0).default(0),
});

export type SearchFormValues = z.infer<typeof searchFormSchema>;
export type JenkinsManagerFormValues = z.infer<typeof jenkinsmanagerFormSchema>;
