Created
May 10, 2020 11:49
-
-
Save debbysa/d7909d3af29b26d96b176ded8935e8a2 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
// models/Movie.js | |
const Sequelize = require("sequelize") | |
const sequelize = require("../config/db") | |
const Movie = sequelize.define( | |
"movie", | |
{ | |
id_movie: { | |
type: Sequelize.INTEGER, | |
primaryKey: true, | |
autoIncrement: true | |
}, | |
title: { | |
type: Sequelize.STRING(100) | |
}, | |
genre: { | |
type: Sequelize.STRING(100) | |
} | |
}, | |
{ timestamps: false, tableName: "movie" } | |
) | |
module.exports = Movie |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment