Created
April 20, 2019 18:04
-
-
Save victorsteven/b073a316aa26e4bb9530b588b1f355b3 to your computer and use it in GitHub Desktop.
Book Model
This file contains hidden or 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 = (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