Something went wrong on our end
-
Markus Grigull authoredMarkus Grigull authored
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
visualization.js 1.39 KiB
/**
* File: visualization.js
* Author: Markus Grigull <mgrigull@eonerc.rwth-aachen.de>
* Date: 28.06.2016
*
* This file is part of VILLASweb-backend.
*
* VILLASweb-backend is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* VILLASweb-backend is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with VILLASweb-backend. If not, see <http://www.gnu.org/licenses/>.
******************************************************************************/
// include
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
// visualization model
var visualizationSchema = new Schema({
name: { type: String, required: true },
project: { type: Schema.Types.ObjectId, ref: 'Project', required: true },
widgets: { type: Array, default: [] },
grid: { type: Number, default: 1 },
user: { type: Schema.Types.ObjectId, ref: 'User', required: true }
}, { versionKey: false, timestamps: true });
module.exports = mongoose.model('Visualization', visualizationSchema);