mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 20:13:49 +00:00
Update: more work on beer styles, add erd to readme
This commit is contained in:
@@ -17,6 +17,8 @@ const getAllBeerStyles = async (
|
||||
updatedAt: true,
|
||||
abvRange: true,
|
||||
ibuRange: true,
|
||||
description: true,
|
||||
glassware: { select: { id: true, name: true } },
|
||||
},
|
||||
})) as z.infer<typeof BeerStyleQueryResult>[];
|
||||
|
||||
|
||||
@@ -1,16 +1,15 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
const BeerStyleQueryResult = z.object({
|
||||
abvRange: z.tuple([z.number(), z.number()]),
|
||||
createdAt: z.coerce.date(),
|
||||
description: z.string(),
|
||||
glassware: z.object({ id: z.string().cuid(), name: z.string() }),
|
||||
ibuRange: z.tuple([z.number(), z.number()]),
|
||||
id: z.string().cuid(),
|
||||
name: z.string(),
|
||||
postedBy: z.object({
|
||||
id: z.string().cuid(),
|
||||
username: z.string(),
|
||||
}),
|
||||
createdAt: z.coerce.date(),
|
||||
postedBy: z.object({ id: z.string().cuid(), username: z.string() }),
|
||||
updatedAt: z.coerce.date().nullable(),
|
||||
abvRange: z.tuple([z.number(), z.number()]),
|
||||
ibuRange: z.tuple([z.number(), z.number()]),
|
||||
});
|
||||
|
||||
export default BeerStyleQueryResult;
|
||||
|
||||
Reference in New Issue
Block a user