fix: clean up hotel and its typings
This commit is contained in:
21
server/routers/hotels/schemas/rate.ts
Normal file
21
server/routers/hotels/schemas/rate.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
import { z } from "zod"
|
||||
|
||||
const flexibilityPrice = z.object({
|
||||
member: z.number(),
|
||||
standard: z.number(),
|
||||
})
|
||||
|
||||
export const rateSchema = z.object({
|
||||
breakfastIncluded: z.boolean(),
|
||||
description: z.string(),
|
||||
id: z.number(),
|
||||
imageSrc: z.string(),
|
||||
name: z.string(),
|
||||
prices: z.object({
|
||||
currency: z.string(),
|
||||
freeCancellation: flexibilityPrice,
|
||||
freeRebooking: flexibilityPrice,
|
||||
nonRefundable: flexibilityPrice,
|
||||
}),
|
||||
size: z.string(),
|
||||
})
|
||||
Reference in New Issue
Block a user