import { z } from 'zod';

export const createProductCollectionSchema = 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 CreateProductCollectionFormValues = z.infer<typeof createProductCollectionSchema>;

export const updateProductCollectionSchema = 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 UpdateProductCollectionFormValues = z.infer<typeof updateProductCollectionSchema>;
