import { z } from 'zod';

export const customerSchema = z.object({
  code: z.string().min(3),
  name: z.string().min(3),
  taxId: z.string().min(8),
  email: z.string().email(),
  phone: z.string().min(8),
  customerType: z.enum(['developer', 'contractor', 'owner', 'consultant']),
  customerStatus: z.enum(['active', 'prospect', 'inactive']),
  branchId: z.string().min(1),
  address: z.string().min(3),
  province: z.string().min(2),
  district: z.string().min(2),
  subDistrict: z.string().min(2),
  postalCode: z.string().min(4)
});

export type CustomerFormValues = z.infer<typeof customerSchema>;
