/* * Copyright (C) Sapphirecode - All Rights Reserved * This file is part of Modelling which is released under MIT. * See file 'LICENSE' for full license details. * Created by Timo Hocker , May 2020 */ export abstract class DatabaseModel { protected data: Record = {}; public get id (): number { return this.data.id; } public set id (val: number) { this.data.id = val; } public constructor (id) { this.id = id; } public abstract get(key: string): string|number|boolean; public abstract set(key: string, value: string|number|boolean); public abstract async read(): Promise; public abstract async write(): Promise; }