api/models/Host.js
/**
* Host.js
*
* @description :: TODO: You might write a short summary of how this model works and what it represents here.
* @docs :: http://sailsjs.org/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
name: {
type: 'string',
required: true,
unique: true
},
guid: {
type: 'string'
},
macs: {
type: 'array'
},
image: {
model: 'image'
},
groups: {
collection: 'group',
via: 'hosts'
},
workflows: {
collection: 'Workflow',
via: 'host'
}
}
};