-
-
Save aanchirinah/4a66f7d64879daae7869b779af3bac0f to your computer and use it in GitHub Desktop.
Generating Verification Token model
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
module.exports = function(sequelize, DataTypes) { | |
var VerificationToken = sequelize.define('VerificationToken', { | |
userId: DataTypes.STRING, | |
token: DataTypes.STRING | |
}, { | |
classMethods: { | |
associate: function(models) { | |
verificationtoken.belongsTo(models.User, { | |
as: "user", | |
foreignKey: "userId", | |
foreignKeyConstraint: true | |
}); | |
} | |
} | |
}); | |
return VerificationToken; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment