cluedin-widget
Version:
This project contains all the pages needed for browsing entities and searching them. The aim is to replace the CluedIn.Webapp project with this one when all the pages ( including the Admin page ) will be ported to REACT.
46 lines (43 loc) • 865 B
JavaScript
var mongoose = require.main.require('mongoose');
var uuid = require( 'node-uuid' );
var conf = require( '../config' );
var colSchema = mongoose.Schema( {
size: {
type: Number
},
mobileSize: {
type: Number
},
name: {
type: String,
required: true
}
} );
var rowSchema = mongoose.Schema( {
type: {
type: String,
enum: [ 'row', 'grid' ]
},
size: {
type: Number
},
columns: [ colSchema ]
} );
var Layout = mongoose.Schema( {
code: {
type: String,
required: true,
unique: true
},
isDefault: {
type: String
},
guid: {
type: String,
required: true,
unique: true,
default: uuid.v1
},
children: [ rowSchema ]
} );
module.exports = mongoose.model( conf.Layout, Layout );