Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
_.each(hook.models, function _loadEachModelDefIntoWaterline(normalizedModelDef, identity) {
// Create a Waterline "Collection" instance for each model, then register it w/ the ORM.
sails.log.silly('Registering model `%s` in Waterline', identity);
orm.registerModel(Waterline.Model.extend(normalizedModelDef));
});
/**
* Example User Model
*
*/
var Waterline = require('waterline');
var User = Waterline.Model.extend({
/**
* Set Table Name to whatever you want
*/
tableName: 'waterline_user',
/**
* Attributes are equal to Database Columns
* in a relational database or documents in a
* document-oriented database.
*/
attributes: {
first_name: {
type: 'string',