feat : Création de toutes les entités
This commit is contained in:
16
src/models/post_media.ts
Normal file
16
src/models/post_media.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
import { uuidSchema } from './_shared';
|
||||
|
||||
export const postMediaTypeSchema = z.enum(['IMAGE', 'VIDEO']);
|
||||
|
||||
export const postMediaSchema = z.object({
|
||||
id: uuidSchema,
|
||||
post_id: uuidSchema,
|
||||
url: z.string().url(),
|
||||
type: postMediaTypeSchema,
|
||||
duration_seconds: z.number().int().min(0).nullable(),
|
||||
display_order: z.number().int().default(0),
|
||||
});
|
||||
|
||||
export type PostMedia = z.infer<typeof postMediaSchema>;
|
||||
Reference in New Issue
Block a user