Skip to content

Instantly share code, notes, and snippets.

@unicodeveloper
Created August 18, 2017 02:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save unicodeveloper/1ee1657a4d0a72fc72415eb61a57fff6 to your computer and use it in GitHub Desktop.
Save unicodeveloper/1ee1657a4d0a72fc72415eb61a57fff6 to your computer and use it in GitHub Desktop.
// 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