Files
the-biergarten-app/src/services/posts/BeerPost/schema/BeerPostQueryResult.ts
Aaron William Po fd641c36ab Refactor: begin reorganizing services dir.
- Renamed files and directories to reflect the new structure
- Moved comment-related services to the 'comments' directory
- Moved image-related services to the 'images' directory
- Moved like-related services to the 'likes' directory
- Moved post-related services to the 'posts' directory
- Moved user-related services to the 'users' directory
2023-12-10 14:15:31 -05:00

19 lines
635 B
TypeScript

import ImageQueryValidationSchema from '@/services/schema/ImageSchema/ImageQueryValidationSchema';
import { z } from 'zod';
const BeerPostQueryResult = z.object({
id: z.string(),
name: z.string(),
brewery: z.object({ id: z.string(), name: z.string() }),
description: z.string(),
beerImages: z.array(ImageQueryValidationSchema),
ibu: z.number(),
abv: z.number(),
style: z.object({ id: z.string(), name: z.string(), description: z.string() }),
postedBy: z.object({ id: z.string(), username: z.string() }),
createdAt: z.coerce.date(),
updatedAt: z.coerce.date().nullable(),
});
export default BeerPostQueryResult;