Files
the-biergarten-app/services/BeerComment/schema/BeerCommentQueryResult.ts
Aaron William Po b69dbc95b4 Work on brewery page, refactors
Refactor query types to explicitly use z.infer
2023-03-31 21:13:35 -04:00

15 lines
345 B
TypeScript

import { z } from 'zod';
const BeerCommentQueryResult = z.object({
id: z.string().uuid(),
content: z.string().min(1).max(500),
rating: z.number().int().min(1).max(5),
createdAt: z.coerce.date(),
postedBy: z.object({
id: z.string().uuid(),
username: z.string().min(1).max(50),
}),
});
export default BeerCommentQueryResult;