From d37cc8c56cbf8c9ffe7023c671abe0d579ea875d Mon Sep 17 00:00:00 2001 From: Andrew Lee Date: Sun, 30 Mar 2025 17:21:29 -0400 Subject: Moved models to the db folder --- bot/src/db/models/quote.js | 64 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 bot/src/db/models/quote.js (limited to 'bot/src/db/models/quote.js') diff --git a/bot/src/db/models/quote.js b/bot/src/db/models/quote.js new file mode 100644 index 0000000..3ff705d --- /dev/null +++ b/bot/src/db/models/quote.js @@ -0,0 +1,64 @@ +import { INTEGER, STRING, TEXT } from 'sequelize'; +import { sequelize } from '../../utils/sequelize.js'; + +export const quote = sequelize.define('quotes', { + id: { + type: INTEGER, + autoIncrement: true, + primaryKey: true + }, + author: { + type: STRING, + allowNull: false + }, + authorImage: { + type: STRING, + allowNull: false + }, + quote: { + type: TEXT, + allowNull: false + }, + year: { + type: STRING, + allowNull: false + }, + submitter: { + type: STRING, + allowNull: false + } + +}); + +export const pendingQuote = sequelize.define('pending-quotes', { + id: { + type: INTEGER, + autoIncrement: true, + primaryKey: true + }, + author: { + type: STRING, + allowNull: false + }, + authorImage: { + type: STRING, + allowNull: false + }, + quote: { + type: TEXT, + allowNull: false + }, + year: { + type: STRING, + allowNull: false + }, + submitterAuthor: { + type: STRING, + allowNull: false + }, + submitterID: { + type: STRING, + allowNull: false + } + +}); -- cgit v1.2.3