improve chat

This commit is contained in:
Peter Maquiran
2024-08-17 22:05:57 +01:00
parent eb615d4335
commit 650c772084
43 changed files with 712 additions and 1540 deletions
@@ -1,13 +1,22 @@
import { z } from "zod";
import { EntityTable } from 'Dexie';
import { zodDataUrlSchema } from "src/app/utils/zod";
import { MessageAttachmentFileType, MessageAttachmentSource } from "src/app/module/chat/data/dto/message/messageOutputDTO";
export const AttachmentTableSchema = z.object({
id: z.string().optional(), // attachment id
$id: z.number().optional(), // local id
$messageId: z.number(),
attachmentId: z.string().optional(),
file: zodDataUrlSchema,
//
fileType: z.nativeEnum(MessageAttachmentFileType),
source: z.nativeEnum(MessageAttachmentSource),
fileName: z.string().optional(),
applicationId: z.number().optional(),
docId: z.string().optional(),
mimeType: z.string().optional(),
id: z.string().optional(),
description: z.string().optional(),
})
export type AttachmentTable = z.infer<typeof AttachmentTableSchema>