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.
53 lines (49 loc) • 925 B
JavaScript
var mongoose = require.main.require('mongoose');
var conf = require('../config');
var WidgetConfigurationSchema = mongoose.Schema({
name: {
type: String,
required: true,
},
onlyAdmin: {
type: Boolean,
default: false,
},
place: {
type: String,
},
parameters: {
type: String,
},
size: {
type: String,
},
isDeleted: {
type: Boolean,
default: false,
},
});
var entityConfigurationSchema = mongoose.Schema({
entityType: {
type: String,
required: true,
},
widgets: [WidgetConfigurationSchema],
});
var UserProfile = mongoose.Schema({
userId: {
type: String,
required: true,
unique: true,
},
isOnBoardingFinished: {
type: Boolean,
default: false,
},
widgetState: {
type: Object,
default: {},
},
widgetConfiguration: [entityConfigurationSchema],
});
module.exports = mongoose.model(conf.UserProfile, UserProfile);