mirror of
https://github.com/semaphoreui/semaphore.git
synced 2025-01-23 08:41:20 +01:00
20 lines
312 B
JavaScript
20 lines
312 B
JavaScript
|
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);
|