cal.pub0.org/packages/prisma/zod/destinationcalendar.ts

30 lines
1.0 KiB
TypeScript
Raw Normal View History

2022-02-17 18:26:53 +00:00
import * as z from "zod"
import * as imports from "../zod-utils"
import { CompleteUser, UserModel, CompleteBooking, BookingModel, CompleteEventType, EventTypeModel } from "./index"
export const _DestinationCalendarModel = z.object({
id: z.number().int(),
integration: z.string(),
externalId: z.string(),
userId: z.number().int().nullish(),
bookingId: z.number().int().nullish(),
eventTypeId: z.number().int().nullish(),
2022-02-17 18:26:53 +00:00
})
export interface CompleteDestinationCalendar extends z.infer<typeof _DestinationCalendarModel> {
2022-02-17 18:26:53 +00:00
user?: CompleteUser | null
booking?: CompleteBooking | null
eventType?: CompleteEventType | null
}
/**
* DestinationCalendarModel contains all relations on your model in addition to the scalars
*
* NOTE: Lazy required in case of potential circular dependencies within schema
*/
2022-02-17 18:26:53 +00:00
export const DestinationCalendarModel: z.ZodSchema<CompleteDestinationCalendar> = z.lazy(() => _DestinationCalendarModel.extend({
user: UserModel.nullish(),
booking: BookingModel.nullish(),
eventType: EventTypeModel.nullish(),
}))