/**
 * Comment types — threaded discussion on tracker items.
 */

import { z } from 'zod';

export interface CommentDoc {
  id: string;
  itemId: string;
  productId: string;
  authorId: string;
  authorEmail: string | null;
  body: string;
  createdAt: string;
  updatedAt: string;
}

export const CreateCommentSchema = z.object({
  body: z.string().min(1).max(10000),
});

export const UpdateCommentSchema = z.object({
  body: z.string().min(1).max(10000),
});

export type CreateCommentInput = z.infer<typeof CreateCommentSchema>;
export type UpdateCommentInput = z.infer<typeof UpdateCommentSchema>;
