mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
add models
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import { models } from 'beast-orm'
|
||||
// import { models } from 'beast-orm'
|
||||
import { models } from 'src/plugin/src'
|
||||
import { environment } from 'src/environments/environment'
|
||||
const { ArrayField, JsonField} = models.indexedDB.fields
|
||||
|
||||
@@ -47,4 +48,37 @@ models.register({
|
||||
})
|
||||
|
||||
|
||||
window['MessageModel'] = MessageModel
|
||||
window['MessageModel'] = MessageModel
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
export class ActionModel extends models.Model{
|
||||
ProcessId = models.IntegerField({unique: true})
|
||||
Description = models.CharField()
|
||||
Detail = models.CharField()
|
||||
DateBegin = models.CharField()
|
||||
DateEnd = models.CharField()
|
||||
ActionType = models.CharField()
|
||||
}
|
||||
|
||||
export class PublicationModel extends models.Model{
|
||||
DateIndex = models.CharField()
|
||||
DocumentId = models.IntegerField({unique: true})
|
||||
ProcessId = models.CharField()
|
||||
Title = models.CharField()
|
||||
Message = models.CharField()
|
||||
DatePublication = models.CharField()
|
||||
OriginalFileName = models.CharField()
|
||||
FileBase64 = models.CharField()
|
||||
FileExtension = models.CharField()
|
||||
OrganicEntityId = models.IntegerField()
|
||||
}
|
||||
|
||||
models.register({
|
||||
databaseName: 'actions'+environment.version.lastCommitNumber + environment.id,
|
||||
type: 'indexedDB',
|
||||
version: 14,
|
||||
models: [PublicationModel, ActionModel]
|
||||
})
|
||||
Reference in New Issue
Block a user