Commit 828a85dc authored by Mahdi Sellami's avatar Mahdi Sellami

Added dataObjects to application schema

parent ce31992f
//Require Mongoose
var mongoose = require('mongoose');
var PersonSchema = require('./person').schema
var DataObjectSchema = require('./dataObject').schema
//Define a schema
var Schema = mongoose.Schema;
......@@ -14,7 +15,8 @@ var ApplicationSchema = new Schema({
statusLastChangeDate : String,
decisionDate : String,
decisionJustification : String,
applicant : PersonSchema
applicant : PersonSchema,
dataObjects : [DataObjectSchema]
});
//Export function to create "Application" model class
......
//Require Mongoose
var mongoose = require('mongoose');
//Define a schema
var Schema = mongoose.Schema;
var DataObjectSchema = new Schema({
dataObjectId : String,
verfahrensId : String,
leikaId : String,
title : String,
type : String,
content : Schema.Types.Mixed
});
//Export function to create "DataObject" model class
module.exports = DataObject = mongoose.model('DataObject', DataObjectSchema );
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment