import { z } from "zod";

export const financialEntrySchema = z.object({
  entryType: z.enum(["RECEIVABLE", "PAYABLE"]),
  entityId: z.string().min(1, "Selecione o cliente ou fornecedor."),
  description: z.string().min(3, "A descrição deve ter pelo menos 3 caracteres."),
  amount: z.number().min(0.01, "O valor deve ser maior que zero."),
  dueDate: z.string().min(1, "Informe a data de vencimento."),
  notes: z.string().optional(),
});

export type FinancialEntryFormValues = z.infer<typeof financialEntrySchema>;
