Files
Bahla-Frontend/src/models/comments.ts
2026-09-01 17:18:28 +02:00

16 lines
389 B
TypeScript

import { z } from 'zod';
import { timestampSchema, uuidSchema } from './_shared';
export const commentSchema = z.object({
id: uuidSchema,
post_id: uuidSchema,
user_id: uuidSchema,
parent_comment_id: uuidSchema.nullable(),
content: z.string().trim().min(1),
created_at: timestampSchema,
updated_at: timestampSchema,
});
export type Comment = z.infer<typeof commentSchema>;