mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
fix chat
This commit is contained in:
@@ -15,5 +15,5 @@ export const RoomTableSchema = z.object({
|
||||
})
|
||||
|
||||
export type RoomTable = z.infer<typeof RoomTableSchema>
|
||||
export type DexieRoomsTableSchema = EntityTable<RoomTable, 'id'>;
|
||||
export type DexieRoomsTable = EntityTable<RoomTable, 'id'>;
|
||||
export const RoomTableColumn = 'id, createdBy, roomName, roomType, expirationDate, lastMessage'
|
||||
|
||||
@@ -10,5 +10,5 @@ export const TypingTableSchema = z.object({
|
||||
})
|
||||
|
||||
export type TypingTable = z.infer<typeof TypingTableSchema>
|
||||
export type DexieTypingsTableSchema = EntityTable<TypingTable, 'id'>;
|
||||
export type DexieTypingsTable = EntityTable<TypingTable, 'id'>;
|
||||
export const TypingTableColumn = 'id, userId, userName, chatRoomId, entryDate'
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
|
||||
import { Dexie, EntityTable, liveQuery } from 'Dexie';
|
||||
import { Dexie } from 'Dexie';
|
||||
import { DexieMessageTable, messageTableColumn, MessageTable } from './schema/message';
|
||||
import { DexieMembersTableSchema, MemberTableColumn } from './schema/members';
|
||||
import { DexieRoomsTableSchema, RoomTableColumn } from './schema/room';
|
||||
import { DexieTypingsTableSchema, TypingTableColumn } from './schema/typing';
|
||||
import { DexieRoomsTable, RoomTableColumn } from './schema/room';
|
||||
import { DexieTypingsTable, TypingTableColumn } from './schema/typing';
|
||||
import { MessageEntity } from '../../../domain/entity/message';
|
||||
import { AttachmentTable, AttachmentTableColumn, DexieAttachmentsTableSchema } from './schema/attachment';
|
||||
// import DexieMemory from 'dexie-in-memory';
|
||||
@@ -12,8 +12,8 @@ import { AttachmentTable, AttachmentTableColumn, DexieAttachmentsTableSchema } f
|
||||
export const chatDatabase = new Dexie('chat-database-infra') as Dexie & {
|
||||
message: DexieMessageTable,
|
||||
members: DexieMembersTableSchema,
|
||||
room: DexieRoomsTableSchema,
|
||||
typing: DexieTypingsTableSchema,
|
||||
room: DexieRoomsTable,
|
||||
typing: DexieTypingsTable,
|
||||
attachment: DexieAttachmentsTableSchema,
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user