/**
* Parrot.js
*
* @description :: The set of parrots registered in our app.
* @docs :: http://sailsjs.com/documentation/concepts/models-and-orm/models
*/
module.exports = {
attributes: {
// e.g. "Polly"
name: {
type: 'string'
},
// e.g. 3.26
wingspan: {
type: 'number',
required: true,
columnType: 'FLOAT'
},
// e.g. "cm"
wingspanUnits: {
type: 'string',
isIn: ['cm', 'in', 'm', 'mm'],
defaultsTo: 'cm'
},
// e.g. [{...}, {...}, ...]
knownDialects: {
collection: 'Dialect'
}
}
};
Created
February 16, 2017 18:36
-
-
Save rachaelshaw/f5bf442b2171154aa6021846d1a250f8 to your computer and use it in GitHub Desktop.
An example model definition for the Sails framework documentation - http://sailsjs.com/documentation
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Three is a section for "Embeds" in the models generated by sails . What is it all about, and how do we use them?