Initial changes to support forms & form builder
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone Build is passing

This commit is contained in:
2020-11-16 22:49:19 -06:00
parent 7bde7576d5
commit 48fe2c7757
6 changed files with 43 additions and 8 deletions

View File

@@ -21,6 +21,7 @@ class Node extends VersionedModel {
Mode: {type: String, default: 'norm'},
Value: String,
},
AdditionalData: Object,
PageId: String,
CreatedAt: { type: Date, default: () => new Date },
UpdatedAt: { type: Date, default: () => new Date },
@@ -57,6 +58,7 @@ class Node extends VersionedModel {
update_from_raw(data) {
if ( data.Type ) this.Type = data.Type
if ( data.Value ) this.Value = data.Value
if ( data.AdditionalData ) this.AdditionalData = data.AdditionalData;
}
async cast_to_version_data() {

View File

@@ -3,6 +3,7 @@ const { ObjectId } = require('mongodb')
const uuid = require('uuid/v4')
const ActiveScope = require('../scopes/Active.scope')
const { PageType } = require('../../enum');
/*
* Page Model
@@ -31,6 +32,7 @@ class Page extends VersionedModel {
CreatedUserId: {type: String},
UpdateUserId: {type: String},
ChildPageIds: [String],
PageType: {type: String, default: PageType.Note}, // PageType
// Menu flags
noDelete: { type: Boolean, default: false },

View File

@@ -39,6 +39,7 @@ class ColumnDef extends VersionedModel {
return {
name: this.headerName,
uuid: this.UUID,
field: this.field,
database_id: this.DatabaseId,
type: this.Type,
metadata: this.data(),