This commit is contained in:
Timo Hocker 2020-05-02 20:04:14 +02:00
parent d504f892c0
commit 249316858f

View File

@ -9,19 +9,19 @@ export abstract class DatabaseModel {
protected data: Record<string, string|number|boolean> = {};
public get id (): number {
return this.data.id;
return this.data.id as number;
}
public set id (val: number) {
this.data.id = val;
}
public constructor (id) {
public constructor (id: number) {
this.id = id;
}
public abstract get(key: string): string|number|boolean;
public abstract set(key: string, value: string|number|boolean);
public abstract set(key: string, value: string|number|boolean): void;
public abstract async read(): Promise<void>;
public abstract async write(): Promise<void>;