20 lines
577 B
TypeScript
20 lines
577 B
TypeScript
import * as z from 'zod';
|
|
// prettier-ignore
|
|
export const CloudFileModelSchema = z.object({
|
|
id: z.number().int(),
|
|
userId: z.number().int(),
|
|
name: z.string(),
|
|
mimeType: z.string().nullable(),
|
|
fileSize: z.bigint(),
|
|
folderId: z.number().int().nullable(),
|
|
isComplete: z.boolean(),
|
|
totalChunks: z.number().int().nullable(),
|
|
createdAt: z.date(),
|
|
updatedAt: z.date(),
|
|
user: z.unknown(),
|
|
folder: z.unknown().nullable(),
|
|
chunks: z.array(z.unknown())
|
|
}).strict();
|
|
|
|
export type CloudFilePureType = z.infer<typeof CloudFileModelSchema>;
|