Files
DentalManagementMHAprilgg/packages/db/shared/schemas/objects/CloudFileCreateInput.schema.ts
2026-04-04 22:13:55 -04:00

20 lines
1.4 KiB
TypeScript

import * as z from 'zod';
import type { Prisma } from '../../../generated/prisma';
import { UserCreateNestedOneWithoutCloudFilesInputObjectSchema as UserCreateNestedOneWithoutCloudFilesInputObjectSchema } from './UserCreateNestedOneWithoutCloudFilesInput.schema';
import { CloudFolderCreateNestedOneWithoutFilesInputObjectSchema as CloudFolderCreateNestedOneWithoutFilesInputObjectSchema } from './CloudFolderCreateNestedOneWithoutFilesInput.schema';
import { CloudFileChunkCreateNestedManyWithoutFileInputObjectSchema as CloudFileChunkCreateNestedManyWithoutFileInputObjectSchema } from './CloudFileChunkCreateNestedManyWithoutFileInput.schema'
const makeSchema = () => z.object({
name: z.string(),
mimeType: z.string().optional().nullable(),
fileSize: z.bigint(),
isComplete: z.boolean().optional(),
totalChunks: z.number().int().optional().nullable(),
createdAt: z.coerce.date().optional(),
user: z.lazy(() => UserCreateNestedOneWithoutCloudFilesInputObjectSchema),
folder: z.lazy(() => CloudFolderCreateNestedOneWithoutFilesInputObjectSchema).optional(),
chunks: z.lazy(() => CloudFileChunkCreateNestedManyWithoutFileInputObjectSchema).optional()
}).strict();
export const CloudFileCreateInputObjectSchema: z.ZodType<Prisma.CloudFileCreateInput> = makeSchema() as unknown as z.ZodType<Prisma.CloudFileCreateInput>;
export const CloudFileCreateInputObjectZodSchema = makeSchema();