Created
March 19, 2019 10:45
-
-
Save yoann217/258a92ddd38d8bf75003f20f4b6aa928 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'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