Created
August 18, 2017 02:52
-
-
Save unicodeveloper/1ee1657a4d0a72fc72415eb61a57fff6 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
// Define our User model | |
module.exports = (Sequelize, DataTypes) => { | |
return Sequelize.define(‘users’, { | |
id: { | |
type: DataTypes.INTEGER, | |
primaryKey: true, | |
autoIncrement: true, | |
allowNull: false, | |
}, | |
email: { | |
type: DataTypes.STRING, | |
allowNull: false, | |
}, | |
password: { | |
type: DataTypes.STRING, | |
allowNull: false, | |
}, | |
firstname: { | |
type: DataTypes.STRING, | |
allowNull: false, | |
}, | |
lastname: { | |
type: DataTypes.STRING, | |
allowNull: false, | |
}, | |
bio: { | |
type: DataTypes.TEXT, | |
allowNull: true, | |
}, | |
}); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment