Initial changes to support forms & form builder
This commit is contained in:
@@ -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() {
|
||||
|
||||
@@ -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 },
|
||||
|
||||
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user