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

17 lines
432 B
TypeScript

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>;