Files
web/server/routers/hotels/schemas/hotel/content.ts
2025-02-25 10:45:45 +01:00

27 lines
726 B
TypeScript

import { z } from "zod"
import { nullableStringValidator } from "@/utils/zod/stringValidator"
import { imageSchema } from "../image"
import { restaurantsOverviewPageSchema } from "./include/additionalData/restaurantsOverviewPage"
const descriptionSchema = z
.object({
medium: nullableStringValidator,
short: nullableStringValidator,
})
.nullish()
const textsSchema = z.object({
descriptions: descriptionSchema,
facilityInformation: nullableStringValidator,
meetingDescription: descriptionSchema,
surroundingInformation: nullableStringValidator,
})
export const hotelContentSchema = z.object({
images: imageSchema,
restaurantsOverviewPage: restaurantsOverviewPageSchema,
texts: textsSchema,
})