aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/instance
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/models/instance')
-rw-r--r--src/lib/models/instance/ActivePunishment.ts5
-rw-r--r--src/lib/models/instance/Guild.ts3
-rw-r--r--src/lib/models/instance/Level.ts3
-rw-r--r--src/lib/models/instance/ModLog.ts3
-rw-r--r--src/lib/models/instance/Reminder.ts3
-rw-r--r--src/lib/models/instance/StickyRole.ts3
6 files changed, 19 insertions, 1 deletions
diff --git a/src/lib/models/instance/ActivePunishment.ts b/src/lib/models/instance/ActivePunishment.ts
index 1d6104f..38012ca 100644
--- a/src/lib/models/instance/ActivePunishment.ts
+++ b/src/lib/models/instance/ActivePunishment.ts
@@ -31,6 +31,9 @@ export interface ActivePunishmentModelCreationAttributes {
modlog: string;
}
+/**
+ * Keeps track of active punishments so they can be removed later.
+ */
export class ActivePunishment
extends BaseModel<ActivePunishmentModel, ActivePunishmentModelCreationAttributes>
implements ActivePunishmentModel
@@ -77,7 +80,7 @@ export class ActivePunishment
public static initModel(sequelize: Sequelize): void {
ActivePunishment.init(
{
- id: { type: DataTypes.STRING, primaryKey: true, allowNull: false, defaultValue: nanoid },
+ id: { type: DataTypes.STRING, primaryKey: true, defaultValue: nanoid },
type: { type: DataTypes.STRING, allowNull: false },
user: { type: DataTypes.STRING, allowNull: false },
guild: { type: DataTypes.STRING, allowNull: false, references: { model: 'Guilds', key: 'id' } },
diff --git a/src/lib/models/instance/Guild.ts b/src/lib/models/instance/Guild.ts
index 11469d2..b41eb9e 100644
--- a/src/lib/models/instance/Guild.ts
+++ b/src/lib/models/instance/Guild.ts
@@ -47,6 +47,9 @@ export interface GuildModelCreationAttributes {
levelUpChannel?: Snowflake;
}
+/**
+ * Settings for a guild.
+ */
export class Guild extends BaseModel<GuildModel, GuildModelCreationAttributes> implements GuildModel {
/**
* The ID of the guild
diff --git a/src/lib/models/instance/Level.ts b/src/lib/models/instance/Level.ts
index e18753d..77bc3d4 100644
--- a/src/lib/models/instance/Level.ts
+++ b/src/lib/models/instance/Level.ts
@@ -15,6 +15,9 @@ export interface LevelModelCreationAttributes {
xp?: number;
}
+/**
+ * Leveling information for a user in a guild.
+ */
export class Level extends BaseModel<LevelModel, LevelModelCreationAttributes> implements LevelModel {
/**
* The user's id.
diff --git a/src/lib/models/instance/ModLog.ts b/src/lib/models/instance/ModLog.ts
index bcccbb4..c25f043 100644
--- a/src/lib/models/instance/ModLog.ts
+++ b/src/lib/models/instance/ModLog.ts
@@ -49,6 +49,9 @@ export interface ModLogModelCreationAttributes {
hidden?: boolean;
}
+/**
+ * A mod log case.
+ */
export class ModLog extends BaseModel<ModLogModel, ModLogModelCreationAttributes> implements ModLogModel {
/**
* The primary key of the modlog entry.
diff --git a/src/lib/models/instance/Reminder.ts b/src/lib/models/instance/Reminder.ts
index 9ca78f1..964ea63 100644
--- a/src/lib/models/instance/Reminder.ts
+++ b/src/lib/models/instance/Reminder.ts
@@ -24,6 +24,9 @@ export interface ReminderModelCreationAttributes {
notified?: boolean;
}
+/**
+ * Represents a reminder the a user has set.
+ */
export class Reminder extends BaseModel<ReminderModel, ReminderModelCreationAttributes> implements ReminderModel {
/**
* The id of the reminder.
diff --git a/src/lib/models/instance/StickyRole.ts b/src/lib/models/instance/StickyRole.ts
index fb1c30d..00e98ce 100644
--- a/src/lib/models/instance/StickyRole.ts
+++ b/src/lib/models/instance/StickyRole.ts
@@ -16,6 +16,9 @@ export interface StickyRoleModelCreationAttributes {
nickname?: string;
}
+/**
+ * Information about a user's roles and nickname when they leave a guild.
+ */
export class StickyRole extends BaseModel<StickyRoleModel, StickyRoleModelCreationAttributes> implements StickyRoleModel {
/**
* The id of the user the roles belongs to.