Semaphore/lib/models/Playbook.js

22 lines
366 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,
location: String, // Git URL
vault_password: String,
identity: {
2014-08-24 23:00:05 +02:00
type: ObjectId,
ref: 'Identity'
2014-08-24 23:00:05 +02:00
}
});
schema.index({
name: 1
});
module.exports = mongoose.model('Playbook', schema);