This commit is contained in:
Timo Hocker 2020-05-02 21:11:55 +02:00
parent 702f7383cb
commit 174739ad17
2 changed files with 13 additions and 3 deletions

View File

@ -6,8 +6,18 @@
*/ */
export abstract class ControlModel { export abstract class ControlModel {
public abstract get object(): Record<string, unknown>; protected data: Record<string, string|number|boolean>;
public abstract set object(obj: Record<string, unknown>);
public abstract get object(): Record<string, string|number|boolean>;
public abstract set object(obj: Record<string, string|number|boolean>);
public get (key: string): string|number|boolean {
return data[key];
}
public set (key: string, value: string|number|boolean): void {
this.data[key] = value;
}
public update (): void { public update (): void {
this.verify (); this.verify ();

View File

@ -16,7 +16,7 @@ export abstract class DatabaseModel {
this.data.id = val; this.data.id = val;
} }
public get data (): Record<string, string|number, boolean> { public get object (): Record<string, string|number, boolean> {
return this.data; return this.data;
} }