19 lines
1.2 KiB
TypeScript
19 lines
1.2 KiB
TypeScript
import * as z from 'zod';
|
|
import type { Prisma } from '../../../generated/prisma';
|
|
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(),
|
|
updatedAt: z.coerce.date().optional(),
|
|
folder: z.lazy(() => CloudFolderCreateNestedOneWithoutFilesInputObjectSchema).optional(),
|
|
chunks: z.lazy(() => CloudFileChunkCreateNestedManyWithoutFileInputObjectSchema).optional()
|
|
}).strict();
|
|
export const CloudFileCreateWithoutUserInputObjectSchema: z.ZodType<Prisma.CloudFileCreateWithoutUserInput> = makeSchema() as unknown as z.ZodType<Prisma.CloudFileCreateWithoutUserInput>;
|
|
export const CloudFileCreateWithoutUserInputObjectZodSchema = makeSchema();
|