From b76e772ee25548463531f638cf1ba0aa9d187ae4 Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Sun, 11 Feb 2024 02:40:26 +0100 Subject: [PATCH] additional model methods --- models/messages.js | 5 +++-- models/roleEmojiPairs.js | 3 +++ models/voiceChannels.js | 3 +++ 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/models/messages.js b/models/messages.js index fc6f583..dfbace7 100644 --- a/models/messages.js +++ b/models/messages.js @@ -3,8 +3,9 @@ import { DataTypes, Sequelize } from 'sequelize'; /** * @typedef {Object} Message * @property {string} id A Discord message ID. - * @method hasMany Defines an One-To-Many relationship. - * @param {Object} + * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. + * @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). + * @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). */ /** diff --git a/models/roleEmojiPairs.js b/models/roleEmojiPairs.js index 3b2541b..8eb1b70 100644 --- a/models/roleEmojiPairs.js +++ b/models/roleEmojiPairs.js @@ -6,6 +6,9 @@ import { DataTypes, Deferrable, Sequelize } from 'sequelize'; * @property {string} message A Discord message ID as a foreign key reference. * @property {string} role A Discord role ID. * @property {string} emoji Either a unicode emoji or a string representation in Discord custom emoji format. + * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. + * @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). + * @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). */ /** diff --git a/models/voiceChannels.js b/models/voiceChannels.js index c2479a2..c2fdc76 100644 --- a/models/voiceChannels.js +++ b/models/voiceChannels.js @@ -5,6 +5,9 @@ import { DataTypes, Sequelize } from 'sequelize'; * @property {string} id A Discord channel ID. * @property {boolean} create Whether or not this channel is registered to create customs when joined. * @property {(string|null)} owner The owner of this channel, if not registered for customs. + * @property {(model: Object) => void} hasMany Defines an One-To-Many relationship. + * @property {(conditions: Object) => void} findOne Finds one instance in the database matching the provided condition(-s). + * @property {(conditions: Object) => void} findAll Finds all instances in the database matching the provided condition(-s). */ /**