Files
doneit-web/src/app/module/chat/infra/database/dexie/schema/attachment.ts
T

14 lines
410 B
TypeScript
Raw Normal View History

2024-08-13 10:52:35 +01:00
import { z } from "zod";
import { EntityTable } from 'Dexie';
export const AttachmentTableSchema = z.object({
id: z.string(),
$id: z.string(),
messageId: z.string(),
file: z.string(),
})
export type AttachmentTable = z.infer<typeof AttachmentTableSchema>
export type DexieAttachmentsTableSchema = EntityTable<AttachmentTable, '$id'>;
export const AttachmentTableColumn = '++$id, id, messageId, file'