22 lines
506 B
TypeScript
22 lines
506 B
TypeScript
import { z } from "zod"
|
|
|
|
import { productTypePriceSchema } from "../productTypePrice"
|
|
|
|
import { CurrencyEnum } from "@/types/enums/currency"
|
|
|
|
export const productSchema = z.object({
|
|
productType: z.object({
|
|
member: productTypePriceSchema.optional(),
|
|
public: productTypePriceSchema.default({
|
|
localPrice: {
|
|
currency: CurrencyEnum.SEK,
|
|
pricePerNight: 0,
|
|
pricePerStay: 0,
|
|
},
|
|
rateCode: "",
|
|
rateType: "",
|
|
requestedPrice: undefined,
|
|
}),
|
|
}),
|
|
})
|