Skip to content

Instantly share code, notes, and snippets.

@victorsteven
Created April 20, 2019 18:04
Show Gist options
  • Select an option

  • Save victorsteven/b073a316aa26e4bb9530b588b1f355b3 to your computer and use it in GitHub Desktop.

Select an option

Save victorsteven/b073a316aa26e4bb9530b588b1f355b3 to your computer and use it in GitHub Desktop.
Book Model
module.exports = (sequelize, DataTypes) => {
const Book = sequelize.define('Book', {
title: {
type: DataTypes.STRING,
allowNull: false,
},
price: {
type: DataTypes.STRING,
allowNull: false,
},
description: {
type: DataTypes.STRING,
allowNull: false,
},
});
return Book;
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment