import { defineCollection, z } from 'astro:content';

const knowledgebaseCollection = defineCollection({
  type: 'content',
  schema: z.object({
    title: z.string(),
    description: z.string(),
    last_updated: z.date(),
    
    tool_name: z.string().optional(),           
    related_tools: z.array(z.string()).default([]), 
    
    author: z.string().default('Anon'),
    difficulty: z.enum(['novice', 'beginner', 'intermediate', 'advanced', 'expert']).optional(),
    categories: z.array(z.string()).default([]),
    tags: z.array(z.string()).default([]),
    
    published: z.boolean().default(true),
    
  })
});