Semaphore/lib/models/Job.js
2014-08-24 22:00:05 +01:00

22 lines
355 B
JavaScript

var mongoose = require('mongoose')
var ObjectId = mongoose.Schema.ObjectId;
var schema = mongoose.Schema({
created: {
type: Date,
default: Date.now
},
playbook: {
type: ObjectId,
ref: 'Playbook'
},
name: String,
play_file: String, //x.yml
use_vault: Boolean
});
schema.index({
name: 1
});
module.exports = mongoose.model('Job', schema);