diff options
Diffstat (limited to 'bot/src/db/models')
| -rw-r--r-- | bot/src/db/models/command-usages.js | 26 | ||||
| -rw-r--r-- | bot/src/db/models/guild-settings.js | 35 | ||||
| -rw-r--r-- | bot/src/db/models/quote.js | 64 |
3 files changed, 125 insertions, 0 deletions
diff --git a/bot/src/db/models/command-usages.js b/bot/src/db/models/command-usages.js new file mode 100644 index 0000000..21b4c86 --- /dev/null +++ b/bot/src/db/models/command-usages.js @@ -0,0 +1,26 @@ +import { INTEGER, STRING } from 'sequelize'; +import { sequelize } from '../../utils/sequelize.js'; + +export const commandUsages = sequelize.define('command-usages', { + id: { + type: INTEGER, + autoIncrement: true, + primaryKey: true + }, + command: { + type: STRING, + allowNull: false + }, + userID: { + type: STRING, + allowNull: false + }, + guildID: { + type: STRING, + allowNull: true + } + +}, { + updatedAt: false, +}); + diff --git a/bot/src/db/models/guild-settings.js b/bot/src/db/models/guild-settings.js new file mode 100644 index 0000000..c6bcaa4 --- /dev/null +++ b/bot/src/db/models/guild-settings.js @@ -0,0 +1,35 @@ +import { INTEGER, STRING, BOOLEAN } from 'sequelize'; +import { sequelize } from '../../utils/sequelize.js'; + +export const guildSettings = sequelize.define('guild-settings', { + id: { + type: INTEGER, + primaryKey: true, + autoIncrement: true, + }, + guildID: { + type: STRING, + allowNull: false + }, + logChannelID: { + type: STRING, + allowNull: true + }, + suggestionsChannelID: { + type: STRING, + allowNull: true + }, + qotdChannelID: { + type: STRING, + allowNull: true + }, + qotdToggle: { + type: BOOLEAN, + allowNull: true + }, + ollamaEnabled: { + type: BOOLEAN, + allowNull: true + }, + +}); 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 + } + +}); |
