Skip to content

Instantly share code, notes, and snippets.

@yoann217
Created March 19, 2019 10:45
Show Gist options
  • Save yoann217/258a92ddd38d8bf75003f20f4b6aa928 to your computer and use it in GitHub Desktop.
Save yoann217/258a92ddd38d8bf75003f20f4b6aa928 to your computer and use it in GitHub Desktop.
'use strict';
module.exports = (sequelize, DataTypes) => {
var User = sequelize.define('User', {
email: DataTypes.STRING,
password: DataTypes.STRING,
}, {
defaultScope: {
attributes: {exclude: ['password']},
},
scopes: {
withPassword: {}
}
});
User.associate = function (models) {
};
return User;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment