import { z } from "zod";
import { Types } from "mongoose";

const objectIdSchema = z
  .string()
  .min(1, "ID is required")
  .refine((id) => Types.ObjectId.isValid(id), "Invalid ObjectId");

export const createReportSchema = z.object({
  userId: objectIdSchema,
  reason: z
    .string()
    .trim()
    .min(1, "Reason is required")
    .max(500, "Reason must be at most 500 characters"),
});
