Semaphore/lib/models/HostGroup.js

20 lines
312 B
JavaScript
Raw Normal View History

2014-08-24 23:00:05 +02:00
var mongoose = require('mongoose')
var ObjectId = mongoose.Schema.ObjectId;
var schema = mongoose.Schema({
created: {
type: Date,
default: Date.now
},
name: String,
playbook: {
type: ObjectId,
ref: 'Playbook'
}
});
schema.index({
name: 1
});
module.exports = mongoose.model('HostGroup', schema);