import { z } from "zod";

export const employeeInputSchema = z.object({
  code: z.string().trim().max(20).optional().or(z.literal("")),
  name: z.string().trim().min(1, "Nama karyawan wajib diisi").max(150),
  email: z
    .string()
    .trim()
    .email("Format email tidak valid")
    .max(150)
    .optional()
    .or(z.literal("")),
  mobile: z.string().trim().max(50).optional().or(z.literal("")),
  position: z.string().trim().min(1, "Jabatan wajib diisi").max(150),
  address: z.string().trim().max(2000).optional().or(z.literal("")),
  status: z.enum(["ACTIVE", "INACTIVE"]).default("ACTIVE")
});

export type EmployeeInput = z.infer<typeof employeeInputSchema>;

