diff options
Diffstat (limited to 'src/lib/models/Level.ts')
-rw-r--r-- | src/lib/models/Level.ts | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/src/lib/models/Level.ts b/src/lib/models/Level.ts index e1f30f4..b834992 100644 --- a/src/lib/models/Level.ts +++ b/src/lib/models/Level.ts @@ -1,18 +1,25 @@ +import { Snowflake } from 'discord.js'; import { DataTypes, Sequelize } from 'sequelize'; import { BaseModel } from './BaseModel'; export interface LevelModel { - id: string; + id: Snowflake; xp: number; } export interface LevelModelCreationAttributes { - id: string; + id: Snowflake; xp?: number; } export class Level extends BaseModel<LevelModel, LevelModelCreationAttributes> { - public id: string; + /** + * The user's id. + */ + public id: Snowflake; + /** + * The user's xp. + */ public xp: number; get level(): number { return Level.convertXpToLevel(this.xp); |