/**
 * Created by sghaida on 5/11/2017.
 */

var mongo   = require('mongoose'),
    Schema  = mongo.Schema;

var applicationSchema = new Schema({
    name: String,
    description: String,
    imageUrl: {type: String, default: ''},
    url: String,
    creationDate: {type: Date, default: Date.now},
    exposedTo: {
        sites: [String],
        countries: [String]
    },
    owner: {
        id: {
            type: Schema.Types.ObjectId,
            ref: 'Department'
        },
        name: String
    },
    author: {
        id: {
            type: Schema.Types.ObjectId,
            ref: 'User'
        },
        emailAddress: String
    },
    tags : [{
        type: Schema.Types.ObjectId,
        ref: 'Tag'
    }],
});

module.exports = mongo.model('Application', applicationSchema);
@@ -725,16 +725,61 @@
     %7D%5D,%0A
+    isOnline: %7Btype: Boolean, default: true%7D%0A
 %7D);%0A%0Amod

add isOnline status to application model