import { z } from "zod";

export const articleSchema = z.object({
  title: z.string().min(1),
  slug: z.string().min(1),
  content: z.any().optional(),
  authorId: z.string().optional(),
  categoryId: z.string().optional(),
  published: z.boolean(),
});

export const createArticleSchema = articleSchema.pick({
  title: true,
});

export const articleFilterSchema = z.object({
  query: z.string().optional(),
  category: z.string().optional(),
  sort: z.string().optional(),
});
