View our GitHub

Please visit sails-docs on GitHub to view documentation on your mobile device.

Edit Page

myApp/api/models/User.js

Purpose

This file was created when you ran 'sails generate api User'. It contains the structure for the model called 'User'.

In this file you will specify what attributes each model instance (record) should have. You can also add custom model instance methods, as well as override the global settings for things like policies and connections.

One of the best parts about Sails is it uses Waterline. This means you can start developing your data models long before you commit to a particular database.

/**
* User.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/ORM/Models.html
*/

module.exports = {

  attributes: {

  }
};

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be immediately reflected on the website.