mirror of
https://github.com/aaronpo97/the-biergarten-app.git
synced 2026-02-16 18:52:06 +00:00
Refactored api services into sep files. Client fix
Fixed hydration errors in beers/[id] by implementing timeDistanceState
This commit is contained in:
15
services/BeerComment/schema/BeerCommentQueryResult.ts
Normal file
15
services/BeerComment/schema/BeerCommentQueryResult.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { z } from 'zod';
|
||||
|
||||
export const BeerCommentQueryResult = z.object({
|
||||
id: z.string().uuid(),
|
||||
content: z.string().min(1).max(300),
|
||||
rating: z.number().int().min(1).max(5),
|
||||
createdAt: z.date().or(z.string().datetime()),
|
||||
postedBy: z.object({
|
||||
id: z.string().uuid(),
|
||||
username: z.string().min(1).max(50),
|
||||
}),
|
||||
});
|
||||
export const BeerCommentQueryResultArray = z.array(BeerCommentQueryResult);
|
||||
export type BeerCommentQueryResultT = z.infer<typeof BeerCommentQueryResult>;
|
||||
export type BeerCommentQueryResultArrayT = z.infer<typeof BeerCommentQueryResultArray>;
|
||||
Reference in New Issue
Block a user