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: { type: Sequelize.STRING, allowNull: false }, description: { type: Sequelize.STRING, allowNull: false } }); module.exports = Product;
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter