From 1a7a627446edfeb270850f0ed15c9c8d604380b2 Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sat, 25 Mar 2023 21:25:43 -0400 Subject: Now using sequelize; Minor tweaks; New activities --- models/quote.js | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 models/quote.js (limited to 'models/quote.js') diff --git a/models/quote.js b/models/quote.js new file mode 100644 index 0000000..f31b472 --- /dev/null +++ b/models/quote.js @@ -0,0 +1,29 @@ +const Sequelize = require("sequelize"); +const sequelize = require('../utils/sequelize'); + +const quote = sequelize.define('quotes', { + id: { + type: Sequelize.INTEGER, + autoIncrement: true, + primaryKey: true + }, + author: { + type: Sequelize.STRING, + allowNull: false + }, + authorImage: { + type: Sequelize.STRING, + allowNull: false + }, + quote: { + type: Sequelize.TEXT, + allowNull: false + }, + year: { + type: Sequelize.STRING, + allowNull: false + } + +}) + +module.exports = quote -- cgit v1.2.3