import { z } from 'zod';

export const createProductSizeSchema = z.object({
    code: z.string().min(1, 'Code is required').max(50, 'Code must be less than 50 characters'),
    name: z.string().min(1, 'Name is required').max(100, 'Name must be less than 100 characters'),
    description: z.string().max(500, 'Description must be less than 500 characters').optional(),
});

export type CreateProductSizeFormValues = z.infer<typeof createProductSizeSchema>;

export const updateProductSizeSchema = z.object({
    code: z.string().min(1, 'Code is required').max(50, 'Code must be less than 50 characters'),
    name: z.string().min(1, 'Name is required').max(100, 'Name must be less than 100 characters'),
    description: z.string().max(500, 'Description must be less than 500 characters').optional(),
});

export type UpdateProductSizeFormValues = z.infer<typeof updateProductSizeSchema>;
