diff options
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/models/Level.ts | 10 |
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; + } } |