mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
23 lines
622 B
TypeScript
23 lines
622 B
TypeScript
import { z } from 'zod';
|
|
|
|
const BreweryPostQueryResult = z.object({
|
|
id: z.string(),
|
|
name: z.string(),
|
|
description: z.string(),
|
|
location: z.object({
|
|
city: z.string(),
|
|
address: z.string(),
|
|
coordinates: z.array(z.number()),
|
|
country: z.string().nullable(),
|
|
stateOrProvince: z.string().nullable(),
|
|
}),
|
|
postedBy: z.object({ id: z.string(), username: z.string() }),
|
|
breweryImages: z.array(
|
|
z.object({ path: z.string(), caption: z.string(), id: z.string(), alt: z.string() }),
|
|
),
|
|
createdAt: z.coerce.date(),
|
|
dateEstablished: z.coerce.date(),
|
|
});
|
|
|
|
export default BreweryPostQueryResult;
|