Skip to content

Instantly share code, notes, and snippets.

@hadoan
Created May 27, 2020 14:21
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 hadoan/9570463ec20fcb044cbe9969fe98b386 to your computer and use it in GitHub Desktop.
Save hadoan/9570463ec20fcb044cbe9969fe98b386 to your computer and use it in GitHub Desktop.
const Sequelize = require('sequelize');
const sequelize = require('../util/database');
const Product = sequelize.define('product', {
id: {
type: Sequelize.INTEGER,
autoIncrement: true,
allowNull: false,
primaryKey: true
},
title: Sequelize.STRING,
price: {
type: Sequelize.DOUBLE,
allowNull: false
},
imageUrl: Sequelize.STRING,
description: Sequelize.STRING
});
module.exports = Product;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment