diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-31 22:38:06 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-31 22:38:06 -0400 |
commit | c40a94697d64962edda41345e03fa76f51aa431c (patch) | |
tree | 1e258d51d6b19b9918f1d478b3f4c51dca3adc93 /src/lib/models/Stat.ts | |
parent | 901d9dfc8c5d95b8c76519e700c624294d4df787 (diff) | |
download | tanzanite-c40a94697d64962edda41345e03fa76f51aa431c.tar.gz tanzanite-c40a94697d64962edda41345e03fa76f51aa431c.tar.bz2 tanzanite-c40a94697d64962edda41345e03fa76f51aa431c.zip |
upgrade typescript, improve workflow, bunch of bug fixes and some other things
Diffstat (limited to 'src/lib/models/Stat.ts')
-rw-r--r-- | src/lib/models/Stat.ts | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/lib/models/Stat.ts b/src/lib/models/Stat.ts index 89fc00f..a6e8f19 100644 --- a/src/lib/models/Stat.ts +++ b/src/lib/models/Stat.ts @@ -1,4 +1,4 @@ -import { DataTypes, Sequelize } from 'sequelize'; +import { DataTypes, type Sequelize } from 'sequelize'; import { BaseModel } from './BaseModel'; import { jsonBigint } from './__helpers'; @@ -14,16 +14,17 @@ export interface StatModelCreationAttributes { commandsUsed?: bigint; } -// declaration merging so that the fields don't override Sequelize's getters -export interface Stat { - /** The bot's environment. */ - environment: Environment; +export class Stat extends BaseModel<StatModel, StatModelCreationAttributes> implements StatModel { + /** + * The bot's environment. + */ + public declare environment: Environment; - /** The number of commands used */ - commandsUsed: bigint; -} + /** + * The number of commands used + */ + public declare commandsUsed: bigint; -export class Stat extends BaseModel<StatModel, StatModelCreationAttributes> implements StatModel { public static initModel(sequelize: Sequelize): void { Stat.init( { |