feat : Création de toutes les entités

This commit is contained in:
Yaël Perret
2026-09-01 17:18:28 +02:00
parent d4246aa2c8
commit d8aa9956d0
32 changed files with 529 additions and 5 deletions

15
src/models/comments.ts Normal file
View File

@@ -0,0 +1,15 @@
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>;