feat: get breakfast package from API
This commit is contained in:
@@ -1,7 +1,15 @@
|
||||
import { z } from "zod"
|
||||
|
||||
import { breakfastEnum } from "@/types/enums/breakfast"
|
||||
import { breakfastPackageSchema } from "@/server/routers/hotels/output"
|
||||
|
||||
export const breakfastSchema = z.object({
|
||||
breakfast: z.nativeEnum(breakfastEnum),
|
||||
import { BreakfastPackageEnum } from "@/types/enums/breakfast"
|
||||
|
||||
export const breakfastStoreSchema = z.object({
|
||||
breakfast: breakfastPackageSchema.or(
|
||||
z.literal(BreakfastPackageEnum.NO_BREAKFAST)
|
||||
),
|
||||
})
|
||||
|
||||
export const breakfastFormSchema = z.object({
|
||||
breakfast: z.string().or(z.literal(BreakfastPackageEnum.NO_BREAKFAST)),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user