Skip to content

Instantly share code, notes, and snippets.

@debbysa
Created May 10, 2020 11:49
Show Gist options
  • Save debbysa/d7909d3af29b26d96b176ded8935e8a2 to your computer and use it in GitHub Desktop.
Save debbysa/d7909d3af29b26d96b176ded8935e8a2 to your computer and use it in GitHub Desktop.
// 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