kasperisager/sails-generate-auth

View on GitHub
templates/api/models/User.js

Summary

Maintainability
A
0 mins
Test Coverage
var User = {
  // Enforce model schema in the case of schemaless databases
  schema: true,

  attributes: {
    username  : { type: 'string', unique: true },
    email     : { type: 'email',  unique: true },
    passports : { collection: 'Passport', via: 'user' }
  }
};

module.exports = User;