set last message

This commit is contained in:
Peter Maquiran
2024-09-10 16:01:51 +01:00
parent f77592d0c4
commit 9fee233d91
23 changed files with 268 additions and 126 deletions
@@ -2,6 +2,7 @@ import { z } from "zod";
import { EntityTable } from 'Dexie';
import { RoomType } from "src/app/core/chat/entity/group";
import { MessageEntity, MessageEntitySchema } from "src/app/core/chat/entity/message";
import { MessageTableSchema } from "./message";
export const RoomTableSchema = z.object({
id: z.string().uuid(),
@@ -15,7 +16,7 @@ export const RoomTableSchema = z.object({
createdAt: z.any(),
expirationDate: z.any().nullable(),
roomType: z.nativeEnum(RoomType),
messages: MessageEntitySchema.array().optional(),
messages: MessageTableSchema.array().optional(),
bold: z.number().optional()
})