import { z } from 'zod';

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

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