import { z } from "zod";

export const stockAdjustmentSchema = z.object({
  lot_id: z.string().min(1, "Lot wajib dipilih"),
  adjustment_reason_id: z.string().min(1, "Adjustment reason wajib dipilih"),
  adjustment_date: z.string().min(1, "Tanggal adjustment wajib diisi"),
  qty_change: z.coerce
    .number()
    .refine((value) => value !== 0, "Qty adjustment tidak boleh 0"),
  notes: z.string().trim().max(2000).optional().nullable()
});

export type StockAdjustmentPayload = z.infer<typeof stockAdjustmentSchema>;
