aboutsummaryrefslogtreecommitdiff
path: root/src/lib/models/Level.ts
diff options
context:
space:
mode:
authorTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-11 23:08:28 -0600
committerTymanWasTaken <32660892+tymanwastaken@users.noreply.github.com>2021-05-11 23:08:28 -0600
commitca380193453a1bfa12d3da38bb7a0ea96d8577b9 (patch)
treee5fedb9ac5627762b6dc6da52efc8afac4ed3a50 /src/lib/models/Level.ts
parent3cd8db5ebc83fd31dd831605bc347dedbc2f9367 (diff)
downloadtanzanite-ca380193453a1bfa12d3da38bb7a0ea96d8577b9.tar.gz
tanzanite-ca380193453a1bfa12d3da38bb7a0ea96d8577b9.tar.bz2
tanzanite-ca380193453a1bfa12d3da38bb7a0ea96d8577b9.zip
add setlevel command
Diffstat (limited to 'src/lib/models/Level.ts')
-rw-r--r--src/lib/models/Level.ts10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/lib/models/Level.ts b/src/lib/models/Level.ts
index bce9aa4..65ec8e6 100644
--- a/src/lib/models/Level.ts
+++ b/src/lib/models/Level.ts
@@ -1,4 +1,3 @@
-import { Optional } from 'sequelize/types';
import { BaseModel } from './BaseModel';
export interface LevelModel {
@@ -6,7 +5,10 @@ export interface LevelModel {
xp: number;
}
-export type LevelModelCreationAttributes = Optional<LevelModel, 'xp'>;
+export interface LevelModelCreationAttributes {
+ id: string;
+ xp?: number;
+}
export class Level extends BaseModel<LevelModel, LevelModelCreationAttributes> {
public id: string;
@@ -18,4 +20,8 @@ export class Level extends BaseModel<LevelModel, LevelModelCreationAttributes> {
// WIP
return 0;
}
+ static convertLevelToXp(xp: number): number {
+ // WIP
+ return 0;
+ }
}