
* Moved prisma to packages * Add missing prisma configs * Extracts common libs and types * Build and pipeline fixes * Adds missing package * Prisma scripts cleanup * Updates lint staged * Type fixes * Sort imports * Updates yarn lock file * Fixes for yarn dx * Revert "Sort imports" This reverts commit 076109decab9b9ba307fc03696c3b0da5c4896f3. * Formatting * Prevent double TS version * Fix conflict * Extracted e2e configs
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
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(),
|
|
});
|
|
|
|
export interface CompleteDestinationCalendar extends z.infer<typeof _DestinationCalendarModel> {
|
|
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
|
|
*/
|
|
export const DestinationCalendarModel: z.ZodSchema<CompleteDestinationCalendar> = z.lazy(() =>
|
|
_DestinationCalendarModel.extend({
|
|
user: UserModel.nullish(),
|
|
booking: BookingModel.nullish(),
|
|
eventType: EventTypeModel.nullish(),
|
|
})
|
|
);
|