mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
+11
-11
@@ -2,25 +2,25 @@ import { models } from 'beast-orm'
|
||||
import { AESEncrypt } from '../services/aesencrypt.service'
|
||||
|
||||
const _AESEncrypt = new AESEncrypt()
|
||||
|
||||
const { ArrayField, JsonField} = models.indexedDB.fields
|
||||
|
||||
export class MessageModel extends models.Model {
|
||||
|
||||
channels = models.IndDbJsonField()
|
||||
mentions = models.IndDbJsonField()
|
||||
channels = ArrayField()
|
||||
mentions = ArrayField()
|
||||
msg = models.CharField()
|
||||
rid = models.CharField()
|
||||
ts = models.CharField()
|
||||
u = models.IndDbJsonField()
|
||||
u = JsonField()
|
||||
_id = models.CharField({unique:true})
|
||||
_updatedAt = models.CharField()
|
||||
messageSend = models.BooleanField()
|
||||
offline = models.BooleanField()
|
||||
viewed = models.IndDbJsonField()
|
||||
received = models.IndDbJsonField()
|
||||
viewed = ArrayField()
|
||||
received = ArrayField()
|
||||
localReference = models.CharField({blank:true})
|
||||
attachments = models.IndDbJsonField()
|
||||
file = models.IndDbJsonField()
|
||||
attachments = ArrayField()
|
||||
file = ArrayField()
|
||||
|
||||
}
|
||||
|
||||
@@ -29,8 +29,8 @@ export class DeleteMessageModel extends models.Model {
|
||||
messageId = models.IntegerField()
|
||||
rid = models.CharField()
|
||||
ts = models.CharField()
|
||||
u = models.IndDbJsonField()
|
||||
needToReceiveBy = models.IndDbJsonField()
|
||||
u = JsonField()
|
||||
needToReceiveBy = ArrayField()
|
||||
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@ export class DeleteMessageModel extends models.Model {
|
||||
|
||||
models.register({
|
||||
databaseName: 'chat-storage',
|
||||
type: 'indexeddb',
|
||||
type: 'indexedDB',
|
||||
version: 1,
|
||||
models: [MessageModel, DeleteMessageModel]
|
||||
})
|
||||
Reference in New Issue
Block a user